[英]Run command with parameters in batch file
假设一个伪命令:
psuedocmd.exe
它具有各种参数,例如:
/scan /save /savefolder
现在,我想使用批处理文件运行psuedocmd.exe。 而且我也想使用参数。 我在批处理文件中使用以下行
psuedocmd.exe /scan /save
但是在这种情况下,psuedocmd.exe在没有参数的情况下运行。
尝试将参数放在引号"parameter value"
,尤其是在路径中包含空格的情况下。
检查批处理文本文件是否未以某种编码保存,从而使您的/
被读取为转义字符。
如果要通过移交批处理文件中的参数来运行.exe,请不要使用变量,而应使用%1,%2等。
run.bat /save /folder
run.bat的内容在哪里:
pseudocommand.exe %1 %2
呵呵,过了半年,我没有耐心了。
在Acunetix Web漏洞扫描程序中使用save
参数时,必须提供savefolder
参数,使批处理文件中的该行类似于:
wvs_console.exe /scan "http://www.aaa.com" /save /savefolder "c:\log"
文档摘录:
/scan Scans a single website.
Syntax: /scan [url]
Example: /scan http://testphp.vulnweb.com
/save Saves scan once scan is finished. The file will be
saved in the location specified by the “/savefolder” switch.
Syntax: /save
/savefolder Specify the folder were all the scans and other
scan related files will be saved.
Syntax: /savefolder [directory]
Example: /savefolder C:\Acunetix\Scans
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.