1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-09-11 17:08:02 +02:00

Land #7695, Fix issue #7434 - nessus_db_scan_workspace: wrong number of arguments

This commit is contained in:
Brent Cook 2017-02-03 11:36:56 -06:00
commit f101b790ee
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96

View File

@ -968,13 +968,14 @@ module Msf
end
if valid_policy(uuid)
print_status("Creating scan from policy number #{uuid}, called #{scan_name} - #{description} and scanning #{targets}")
et=Hash.new
et['enabled']=false
et['launch']='ONETIME'
et['name']=scan_name
et['text_targets']=targets
et['description']=description
et['launch_now']=false
et = {
'enabled' => false,
'launch' => 'ONETIME',
'name' => scan_name,
'text_targets' => targets,
'description' => description,
'launch_now' => false
}
scan = @n.scan_create(uuid, et)
tbl = Rex::Text::Table.new(
'Columns' => [
@ -1077,13 +1078,14 @@ module Msf
end
targets.chop!
print_status("Creating scan from policy #{policy_id}, called \"#{name}\" and scanning all hosts in all the workspaces")
et=Hash.new
et['enabled']=false
et['launch']='ONETIME'
et['name']=name
et['text_targets']=targets
et['description']=desc
et['launch_now']=true
et = {
'enabled' => false,
'launch' => 'ONETIME',
'name' => name,
'text_targets' => targets,
'description' => desc,
'launch_now' => true
}
scan = @n.scan_create(policy_id, et)
if !scan["error"]
scan = scan["scan"]
@ -1136,7 +1138,15 @@ module Msf
end
targets.chop!
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 = {
'enabled' => false,
'launch' => 'ONETIME',
'name' => name,
'text_targets' => targets,
'description' => desc,
'launch_now' => false
}
scan = @n.scan_create(policy_id, et)
if !scan["error"]
scan = scan["scan"]
print_status("Scan ID #{scan['id']} successfully created")