Skip to content

Commit

Permalink
Fix nessus_list_templates command argument parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
isbear committed Jun 9, 2017
1 parent 77b1125 commit d5a7b29
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions plugins/nessus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -516,26 +516,16 @@ def cmd_nessus_template_list(*args)
return
when '-S', '--search'
search_term = /#{args.shift}/nmi
else
type = arg
end
end

if !nessus_verify_token
return
end
case args.length
when 1
type = args[0]
else
print_status("Usage: ")
print_status("nessus_template_list <scan> | <policy>")
print_status("Example:> nessus_template_list scan")
print_status("OR")
print_status("nessus_template_list policy")
print_status("Returns a list of information about the scan or policy templates..")
return
end
if type.in?(['scan', 'policy'])
list=@n.list_template(type)
list=@n.list_templates(type)
else
print_error("Only scan and policy are valid templates")
return
Expand Down

0 comments on commit d5a7b29

Please sign in to comment.