File tree Expand file tree Collapse file tree 1 file changed +24
-21
lines changed Expand file tree Collapse file tree 1 file changed +24
-21
lines changed Original file line number Diff line number Diff line change @@ -968,13 +968,14 @@ def cmd_nessus_scan_new(*args)
968
968
end
969
969
if valid_policy ( uuid )
970
970
print_status ( "Creating scan from policy number #{ uuid } , called #{ scan_name } - #{ description } and scanning #{ targets } " )
971
- et = Hash . new
972
- et [ 'enabled' ] = false
973
- et [ 'launch' ] = 'ONETIME'
974
- et [ 'name' ] = scan_name
975
- et [ 'text_targets' ] = targets
976
- et [ 'description' ] = description
977
- et [ 'launch_now' ] = false
971
+ et = {
972
+ 'enabled' => false ,
973
+ 'launch' => 'ONETIME' ,
974
+ 'name' => scan_name ,
975
+ 'text_targets' => targets ,
976
+ 'description' => description ,
977
+ 'launch_now' => false
978
+ }
978
979
scan = @n . scan_create ( uuid , et )
979
980
tbl = Rex ::Text ::Table . new (
980
981
'Columns' => [
@@ -1077,13 +1078,14 @@ def cmd_nessus_db_scan(*args)
1077
1078
end
1078
1079
targets . chop!
1079
1080
print_status ( "Creating scan from policy #{ policy_id } , called \" #{ name } \" and scanning all hosts in all the workspaces" )
1080
- et = Hash . new
1081
- et [ 'enabled' ] = false
1082
- et [ 'launch' ] = 'ONETIME'
1083
- et [ 'name' ] = name
1084
- et [ 'text_targets' ] = targets
1085
- et [ 'description' ] = desc
1086
- et [ 'launch_now' ] = true
1081
+ et = {
1082
+ 'enabled' => false ,
1083
+ 'launch' => 'ONETIME' ,
1084
+ 'name' => name ,
1085
+ 'text_targets' => targets ,
1086
+ 'description' => desc ,
1087
+ 'launch_now' => true
1088
+ }
1087
1089
scan = @n . scan_create ( policy_id , et )
1088
1090
if !scan [ "error" ]
1089
1091
scan = scan [ "scan" ]
@@ -1136,13 +1138,14 @@ def cmd_nessus_db_scan_workspace(*args)
1136
1138
end
1137
1139
targets . chop!
1138
1140
print_status ( "Creating scan from policy #{ policy_id } , called \" #{ name } \" and scanning all hosts in #{ framework . db . workspace . name } " )
1139
- et = Hash . new
1140
- et [ 'enabled' ] = false
1141
- et [ 'launch' ] = 'ONETIME'
1142
- et [ 'name' ] = name
1143
- et [ 'text_targets' ] = targets
1144
- et [ 'description' ] = desc
1145
- et [ 'launch_now' ] = false
1141
+ et = {
1142
+ 'enabled' => false ,
1143
+ 'launch' => 'ONETIME' ,
1144
+ 'name' => name ,
1145
+ 'text_targets' => targets ,
1146
+ 'description' => desc ,
1147
+ 'launch_now' => false
1148
+ }
1146
1149
scan = @n . scan_create ( policy_id , et )
1147
1150
if !scan [ "error" ]
1148
1151
scan = scan [ "scan" ]
You can’t perform that action at this time.
0 commit comments