Fix issue #7434 - nessus_db_scan_workspace: wrong number of arguments

This commit is contained in:
Dennis Herrmann 2016-12-10 11:38:30 +01:00
parent f0dca7abbf
commit ce202cb9b2
1 changed files with 8 additions and 1 deletions

View File

@ -1136,7 +1136,14 @@ module Msf
end end
targets.chop! targets.chop!
print_status("Creating scan from policy #{policy_id}, called \"#{name}\" and scanning all hosts in #{framework.db.workspace.name}") print_status("Creating scan from policy #{policy_id}, called \"#{name}\" and scanning all hosts in #{framework.db.workspace.name}")
scan = @n.scan_create(policy_id, name, desc, targets) et=Hash.new
et['enabled']=false
et['launch']='ONETIME'
et['name']=name
et['text_targets']=targets
et['description']=desc
et['launch_now']=false
scan = @n.scan_create(policy_id, et)
if !scan["error"] if !scan["error"]
scan = scan["scan"] scan = scan["scan"]
print_status("Scan ID #{scan['id']} successfully created") print_status("Scan ID #{scan['id']} successfully created")