最基本用法:
 

nessus -q [-pPS] <host> <port> <user> <pass> <targets-file> <result-file> [-T <format>]
            format: "nbe", "html", "html_graph", "text", "xml", "old-xml", "tex", or "nsr"

如:/opt/nessus/bin/nessus -xq localhost 1241 yourLogin yourPassword host/targets.txt report/report.html

-x do not check SSL certificates.
-q quiet  mode  or  batch  mode.  Setting this option makes the nessus
              client expect all of the following settings.
              host
                     is the nessusd host to whom you will connect.
              port
                     is the port to which you will connect on the remote  nessusd
                     host.
              user
                     is the user name to use to connect to nessusd.
              password
                     is the password associated with this user name.
             targets
                     is the name of a file containing the target machines.
             results
                     is  the name of the file where the results will be stored at
                     the end of the test.

-V 使batch模式为窗口显示状态信息 ()
-x 不检查SSL证书
-v Version,显示版本号并推出
-h help 显示命令概要并退出
-T <type> 以<type>格式保存数据,<type>可以是&ldquo;nbe&rdquo;,&ldquo;html&rdquo;,&ldquo;nessus&rdquo;,&ldquo;text&rdquo;.(测试不起作用)

转换报告
.nbe转其他
/opt/nessus/bin/nessus -i in.nbe -o out.[html|txt|nessus]
.nessus转html
/opt/nessus/bin/nessus –dot-nessus in.nessus -i <ReportName> -o out.html

使用.nessus文件
查看策略: /opt/nessus/bin/nessus –dot-nessus /opt/nessus/report/nessus_report_1.nessus –list-policies
查看结果报告: /opt/nessus/bin/nessus –dot-nessus /opt/nessus/report/nessus_report_1.nessus –list-reports

localhost可为nessus服务器的IP如211.71.235.165
1241为nessus服务器的服务端口号
yourLogin为用户帐号名
yourPassword为用户密码
targets.txt文件中包含要审计的目标主机(或网络)地址
report.txt(或report.html)为审计报告

target可以是单机,也可以是一个网段 如 10.5.0.227 或 10.5.0.111-10.5.0.227 或cidr主机快 如192.168.0.1/24
举例:
/opt/nessus/bin/nessus -xq localhost 1241 user 123456 /opt/nessus/host/target.txt /opt/nessus/report/report.html