Top Level Namespace

Defined Under Namespace

Modules: NessusXMLRPC

Instance Method Summary collapse

Instance Method Details

#give_errorObject



93
94
95
96
97
# File 'bin/nessus-cli.rb', line 93

def give_error
	$stderr.print "You used incompatible options, probably you mixed --scan with --stop"
	$stderr.print "or something similar."
	exit 0
end

#give_helpObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'bin/nessus-cli.rb', line 32

def give_help
	puts <<-EOF
--user <user>	user for login to Nessus server
--password <p>	password for login to Nessus server
--scan <name>	start scan with name
--target <ip>	specify list of targets, separated by comma
--policy <pol>	specify policy to use (name of policy)
--url <url>	url of Nessus server (default: localhost:8834)
--wait [t]	wait scan to finish (ask in regular periods of <t> for status)
--output <f>	output report XML to file <f>
--output1 <f>	output report XML v1 to file <f>
--reportdelete	delete report after finish or delete report by id (if alone)
--stop <id>	stop scan identified by <id>
--stop-all	stop all scans
--pause <id>	pause scan identified by <id>
--pause-all	pause all scans
--resume <id>	resume scan identified by <id>
--resume-all	resume all scans
--report <id>	download report identified by <id>
--list-scans	list scans
--list-policy	list policies
--status <id>	get status of scan by <id>
--verbose	be verbose
--debug		be even more verbose
--help		this help

Examples: 
#{$0} --user john --password doe --scan scan-localhost --wait --output report.xml --target localhost
EOF
	exit 0
end

#introObject



24
25
26
27
28
# File 'bin/nessus-cli.rb', line 24

def intro 
	$stderr.print $0 + ": Nessus command line interface for XML-RPC\n"
	$stderr.print "(C) Vlatko Kosturjak, Kost. Distributed under GPL.\n"
	$stderr.print "\n"
end