zoukankan      html  css  js  c++  java
  • xp_cmdshell用WinRAR压缩和解压文件

    --压缩文件: a 压缩,-ep 从名称中排除路径
    declare	@sql nvarchar(200)
    set @sql = '"D:\Program Files\WinRAR\WinRAR.exe" a -ep F:\a.rar F:\a.txt'
    exec master..xp_cmdshell @sql
    
    --解压文件: e 解压,-o+ 覆盖
    declare	@sql nvarchar(200)
    set @sql = '"D:\Program Files\WinRAR\WinRAR.exe" e -o+ F:\a.rar F:\'
    exec master..xp_cmdshell @sql
    
    --解压文件: e 压缩, -o-跳过,-inul 禁止所有消息。
    declare	@sql nvarchar(200)
    set @sql = '"D:\Program Files\WinRAR\WinRAR.exe" e -o- -inul F:\a.rar F:\'
    exec master..xp_cmdshell @sql
    
    
    
    ---附:
    ---xp_cmdshell的启用、禁用
    -- To allow advanced options to be changed.
    EXEC sp_configure 'show advanced options', 1
    GO
    -- To update the currently configured value for advanced options.
    RECONFIGURE
    GO
    -- To enable the feature.
    EXEC sp_configure 'xp_cmdshell', 1 --1为启用,0为禁用
    GO
    -- To update the currently configured value for this feature.
    RECONFIGURE
    GO
    
  • 相关阅读:
    开启CTF大门
    关于windows下scapy出现log_runtime问题
    Python关于Threading暂停恢复解决办法
    angr入门之CLE
    Linux信号量
    IDApython 命令
    Array 数组对象
    随机数 random()
    四舍五入round()
    向下取整floor()
  • 原文地址:https://www.cnblogs.com/gdjlc/p/2237043.html
Copyright © 2011-2022 走看看