WebInspect在cmd下操作教程(带java调用例子)

wi.exe-u url [-s file] [-ws file] [-Framework name] [-CrawlCoverage name]
 [-ps policyID | -pc path][-ab|an|am|ad|aa|ak {creds}] [-o|c]
 [-n name] [-e[abcdefghijklmno] file][-x|xd|xa|xn] [-b filepath] [-v] [-?
]
 [-r report_name -y report_type -w report_favorite-f report_export_file -
g[phacxe]
 [-t compliance_template_file]] [-dfilepath -m filename]
 [-i scanid] [-ir scanid] [-db] [-?]

General---------------------------------------------------------

 -? show usage 命令帮助
 -u {url} url (orIP Address)  URL
 -s {settings file} settings file
设置文件
 -db use the database defined in thesettings file 使用设置中的定义配置数据库
 -ws {designfile} web service design file WEB服务器文件设置
 -o audit only(requires policy -p)
 -c crawl only
 -n {name} scan name (does not apply whenresuming a scan)
 -b {filepath} use given SecureBase file
 -d {filepath} move db to filepath (usedwith -m)
 -m {filename} move db to filename (usedwith -d)
 -i {scan id} scan id
 -ir {scan id} resume scan with thespecified id

Restrictto root folder -----------------------------------------

-xDirectory Only (self)
 -xd Directory and subdirectory(descendants)
 -xa Directory and parents (ancestors)
 -xn No Restrictions

Framework-------------------------------------------------------

-Framework{framework name} framework description
 Oracle optimal scanning of applicationbuilt with
 Oracle ADF Faces technology

CrawlCoverage --------------------------------------------------

-CrawlCoverage{coverage name} crawl coverage description
 Thorough perform an exhaustive crawl ofyour site
 Default focus more on coverage thenperformance
 Moderate an overall good balance ofcoverage and speed
 Quick focus on breadth and performance

AuditPolicy ----------------------------------------------------

-ps{policy ID} policy for audit
 1 Standard
 2 Assault
 3 SOAP
 4 Quick
 5 Safe
 6 Development
 7 Blank
 16 QA
 17 Application
 18 Platform
 1001 SQL Injection
 1002 Cross-Site Scripting
 1003 OWASP Top 10 Application SecurityRisks 2007
 1004 All Checks
 1005 Passive
 1007 SAP
 1008 Criticals and Highs
 1009 OWASP Top 10 Application SecurityRisks 2010

-pc{policy path} custom policy file path

Authentication--------------------------------------------------

-ab"userid:pwd" basic authentication mode 基本身份验证模式
 -an "userid:pwd" NTLMauthentication mode NTLM身份验证模式
 -ad "userid:pwd" digestauthentication mode 摘要式身份验证模式
 -ak "userid:pwd" kerberosauthentication mode Kerberos身份验证模式
 -aa "userid:pwd" automaticauthentication mode 自动身份验证模式
 -am {macro path} web macro authenticationmode 网页宏认证模式

Output----------------------------------------------------------

-ea{filepath} export scan in full XML format完整的XML格式的扫描
 -eb {filepath} export scan details(Full) in XML XML导出扫描的详细信息(全)
 -ec {filepath} export scan details(Comments) in XML (评论)
 -ed {filepath}export scan details (Hidden Fields) in XML
(隐藏字段)
 -ee {filepath}export scan details (Script) in XML (脚本)
 -ef {filepath} export scan details (SetCookies) in XML (设置Cookies)
 -eg {filepath}export scan details (Web Forms) in XML 
Web窗体)
 -eh {filepath} export scan details(URLs) in XML (网址)
 -ei {filepath} export scan details(Requests) in XML (请求)
 -ej {filepath}export scan details (Sessions) in XML (Session)
 -ek {filepath} export scandetails (Emails) in XML  (
电子邮箱)
 -el {filepath}export scan details (Parameters) in XML (
参数)
 -em {folderpath} export scan details(Web Dump) in XML (网络转存)
 -en {filepath}export scan details (Offsite Links) in XML (
异地链接)
 -eo {filepath}export scan details (Vulnerabilities) in XML (
漏洞)

-vverbose output 详细输出

Reports---------------------------------------------------------

-r{report_name} name of the report to run 以该报告的名称来运行

以下为参数

Aggregate
 Alert View
 Attack Status
 Compliance
 Crawled URLS
 Developer Reference
 Duplicates
 Executive Summary
 False Positive
 QA Summary
 Scan Difference
 Scan Log
 Trend
 Vulnerability Summary
 Vulnerability (Classic)

-w{favorite_name} name of the report favorite to run


 -ag aggregate reports in report favorite

-y{report_type} the type of report, either 'Standard' or 'Custom'报告类型分为标准和自定义
 -f {export_file} where to export thereport file - file path and file 报告路径
name

-gpexport report as pdf
 -gh export report as zipped up html
 -ga export report as raw report file
 -gc export report as rich text file
 -gx export report as text
 -ge export report as excel file

-t{filepath} use given compliance template file

 

 

实际列子

 

F:\WebInspect>wi.exe -uhttp://127.1.1.0:8080/jfgl/logon.jsp -ab "SuperAdmin:1"

 -r"Vulnerability (Classic)" -y Standard -eb c:\Temp\Report.xml -fc:\Temp\Repo

rt.pdf –gp  -v

 

F:\WebInspect>wi.exe  启动WebInspect cmd扫描程序

 -uhttp://127.1.1.0:8080/jfgl/logon.jsp -ab url路径

-ab "SuperAdmin:1" 登陆页面用户名密码

-r "Vulnerability (Classic)" 报告运行名称

-y Standard 报告类型为标准

-eb c:\Temp\Report.xml XML导出扫描的详细信息(全)

-f c:\Temp\Report.pdf -gh 生成pdf文档

-v

 

 

 

Java调用

publicstaticvoid main(String[] args) {

       try {

 

           Runtime run = Runtime.getRuntime();

 

           String[] cmd = new String[3];

           cmd[0] = "cmd";

           cmd[1] = "/C";

           StringBuffer sb = new StringBuffer();

           sb.append("f:/WebInspect/wi.exe");

           sb.append("-u ");

           //url由用户传入

           sb.append("http://127.1.1.0:8080/jfgl/logon.jsp");

           sb.append("-ab ");

           //用户名密码由用户传入

           sb.append("'SuperAdmin:1'");

           sb.append(" -r'Vulnerability (Classic)' ");

           sb.append("-y Standard");

           sb.append("-ebc:/Temp/Report.xml ");

           sb.append("-f c:/Temp/Report.pdf-gp ");

           sb.append("-v");

           cmd[2] = sb.toString();

           System.out.println("开始扫描...");

           Process p = run.exec(cmd);

          

           InputStream in = p.getInputStream();

           while (in.read() != -1) {

              System.out.println("扫描中...");

           }

           in.close();

           p.destroy();

       } catch (IOException e) {

           System.out.println("扫描失败...");

           e.printStackTrace();

       }

       System.out.println("扫描成功...");

    }

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
WebInspect是一款由HPE Fortify推出的应用安全测试工具。通过对网站进行扫描和评估,WebInspect可以发现潜在的应用漏洞和安全风险,帮助开发人员和安全专家提前识别并解决这些问题,确保网站的安全性和可靠性。 要下载WebInspect,首先需要访问HPE Fortify的官方网站。在网站上找到WebInspect的下载页面,并选择合适的版本和操作系统,比如Windows或者Linux。点击下载按钮,待下载完成后,打开安装包,并按照提示完成安装过程。 安装完成后,打开WebInspect应用程序。首次运行时会提示用户设置WebInspect的一些基本配置,如语言设置、代理设置等。根据个人需求进行相应设置,然后点击保存并应用。 接下来,点击开始扫描,输入要测试的目标网址,并选择扫描类型。WebInspect提供了多种扫描模式,如全面扫描、漏洞验证、配置审核等。根据需要选择合适的模式,然后点击开始扫描。 WebInspect将开始对目标网站进行扫描,检测潜在的漏洞和安全问题。扫描过程可能需要一些时间,具体时间根据目标网站的大小和复杂程度而定。扫描完成后,WebInspect会生成一份报告,其中详细列出了发现的漏洞和问题,并提供了相应的修复建议。 使用WebInspect测试Web应用程序的安全性,能够帮助开发人员和安全专家发现并修复潜在的安全问题,确保网站的安全性。因此,下载、安装并使用WebInspect是保障网站安全的重要步骤之一。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值