我正在做一个涉及wapiti和nikto web工具的项目。我已经设法用这个命令为这两个工具生成了一个报告
python wapiti.py www.kca.ac.ke ;perl nikto.pl -h www.kca.ac.ke -Display V -F htm -output /root/.wapiti/generated_report/index.html.但是我想运行一个命令,比如
python wapiti.py www.kca.ac.ke同时拿到wapiti和nikto的网络扫描报告。我该如何实现这个目标呢?
发布于 2015-07-08 22:27:17
一个shell脚本就可以工作了。将以下代码保存为' run _wapiti_and_nikto_scans',然后运行:
bash run_wapiti_and_nikto_scans www.my.site.com下面是脚本:
#!/bin/bash
SITE=$1
if [ -n "$SITE" ]; then # -n tests to see if the argument is non empty
echo "Looking to scan $SITE"
echo "Running 'python wapiti.py $SITE'"
python wapiti.py $SITE || echo "Failed to run wapiti!" && exit 1;
echo "Running 'perl nikto.pl -h $SITE -Display V -F htm -output /root/.wapiti/generated_report/index.html'"
perl nikto.pl -h $SITE -Display V -F htm -output /root/.wapiti/generated_report/index.html || echo "Failed to run nikto!" && exit 1;
echo "Done!"
exit 0; # Success
fi
echo "usage: run_wapiti_and_nikto_scans www.my.site.com";
exit 1; # Failure https://stackoverflow.com/questions/31293488
复制相似问题