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

bug/bundler_fix
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
1 changed files with 25 additions and 15 deletions

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")