Class: ZAPv2::Ascan
- Inherits:
-
Object
- Object
- ZAPv2::Ascan
- Defined in:
- lib/zap/v2apis/ascan.rb
Instance Method Summary collapse
- #add_excluded_param(name, type, url) ⇒ Object
- #add_scan_policy(scanpolicyname, alertthreshold, attackstrength) ⇒ Object
- #alerts_ids(scanid) ⇒ Object
- #attack_mode_queue ⇒ Object
- #clear_excluded_from_scan ⇒ Object
- #disable_all_scanners(scanpolicyname = '') ⇒ Object
- #disable_scanners(ids, scanpolicyname = '') ⇒ Object
- #enable_all_scanners(scanpolicyname = '') ⇒ Object
- #enable_scanners(ids, scanpolicyname = '') ⇒ Object
- #exclude_from_scan(regex) ⇒ Object
- #excluded_from_scan ⇒ Object
- #excluded_param_types ⇒ Object
- #excluded_params ⇒ Object
- #import_scan_policy(path) ⇒ Object
-
#initialize(client) ⇒ Ascan
constructor
A new instance of Ascan.
- #messages_ids(scanid) ⇒ Object
- #modify_excluded_param(idx, name, type, url) ⇒ Object
- #option_add_query_param ⇒ Object
- #option_allow_attack_on_start ⇒ Object
- #option_attack_policy ⇒ Object
- #option_default_policy ⇒ Object
- #option_delay_in_ms ⇒ Object
- #option_excluded_param_list ⇒ Object
- #option_handle_anti_csrf_tokens ⇒ Object
- #option_host_per_scan ⇒ Object
- #option_inject_plugin_id_in_header ⇒ Object
- #option_max_alerts_per_rule ⇒ Object
- #option_max_chart_time_in_mins ⇒ Object
- #option_max_results_to_list ⇒ Object
- #option_max_rule_duration_in_mins ⇒ Object
- #option_max_scan_duration_in_mins ⇒ Object
- #option_max_scans_in_ui ⇒ Object
- #option_prompt_in_attack_mode ⇒ Object
- #option_prompt_to_clear_finished_scans ⇒ Object
- #option_rescan_in_attack_mode ⇒ Object
- #option_scan_headers_all_requests ⇒ Object
- #option_scan_null_json_values ⇒ Object
- #option_show_advanced_dialog ⇒ Object
- #option_target_params_enabled_rpc ⇒ Object
- #option_target_params_injectable ⇒ Object
- #option_thread_per_host ⇒ Object
- #pause(scanid) ⇒ Object
- #pause_all_scans ⇒ Object
- #policies(scanpolicyname = '', policyid = '') ⇒ Object
- #remove_all_scans ⇒ Object
- #remove_excluded_param(idx) ⇒ Object
- #remove_scan(scanid) ⇒ Object
- #remove_scan_policy(scanpolicyname) ⇒ Object
- #resume(scanid) ⇒ Object
- #resume_all_scans ⇒ Object
- #scan(url, recurse = '', inscopeonly = '', scanpolicyname = '', method = '', postdata = '', contextid = '') ⇒ Object
- #scan_as_user(url, contextid, userid, recurse = '', scanpolicyname = '', method = '', postdata = '') ⇒ Object
- #scan_policy_names ⇒ Object
- #scan_progress(scanid) ⇒ Object
- #scanners(scanpolicyname = '', policyid = '') ⇒ Object
- #scans ⇒ Object
- #set_enabled_policies(ids, scanpolicyname = '') ⇒ Object
- #set_option_add_query_param(boolean) ⇒ Object
- #set_option_allow_attack_on_start(boolean) ⇒ Object
- #set_option_attack_policy(string) ⇒ Object
- #set_option_default_policy(string) ⇒ Object
- #set_option_delay_in_ms(integer) ⇒ Object
- #set_option_handle_anti_csrf_tokens(boolean) ⇒ Object
- #set_option_host_per_scan(integer) ⇒ Object
- #set_option_inject_plugin_id_in_header(boolean) ⇒ Object
- #set_option_max_alerts_per_rule(integer) ⇒ Object
- #set_option_max_chart_time_in_mins(integer) ⇒ Object
- #set_option_max_results_to_list(integer) ⇒ Object
- #set_option_max_rule_duration_in_mins(integer) ⇒ Object
- #set_option_max_scan_duration_in_mins(integer) ⇒ Object
- #set_option_max_scans_in_ui(integer) ⇒ Object
- #set_option_prompt_in_attack_mode(boolean) ⇒ Object
- #set_option_prompt_to_clear_finished_scans(boolean) ⇒ Object
- #set_option_rescan_in_attack_mode(boolean) ⇒ Object
- #set_option_scan_headers_all_requests(boolean) ⇒ Object
- #set_option_scan_null_json_values(boolean) ⇒ Object
- #set_option_show_advanced_dialog(boolean) ⇒ Object
- #set_option_target_params_enabled_rpc(integer) ⇒ Object
- #set_option_target_params_injectable(integer) ⇒ Object
- #set_option_thread_per_host(integer) ⇒ Object
- #set_policy_alert_threshold(id, alertthreshold, scanpolicyname = '') ⇒ Object
- #set_policy_attack_strength(id, attackstrength, scanpolicyname = '') ⇒ Object
- #set_scanner_alert_threshold(id, alertthreshold, scanpolicyname = '') ⇒ Object
- #set_scanner_attack_strength(id, attackstrength, scanpolicyname = '') ⇒ Object
- #skip_scanner(scanid, scannerid) ⇒ Object
- #status(scanid) ⇒ Object
- #stop(scanid) ⇒ Object
- #stop_all_scans ⇒ Object
- #update_scan_policy(scanpolicyname, alertthreshold, attackstrength) ⇒ Object
Constructor Details
#initialize(client) ⇒ Ascan
Returns a new instance of Ascan.
5 6 7 |
# File 'lib/zap/v2apis/ascan.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#add_excluded_param(name, type, url) ⇒ Object
153 154 155 |
# File 'lib/zap/v2apis/ascan.rb', line 153 def add_excluded_param(name, type, url) @client.get("/JSON/ascan/action/addExcludedParam/?name=#{name}&type=#{type}&url=#{url}") end |
#add_scan_policy(scanpolicyname, alertthreshold, attackstrength) ⇒ Object
157 158 159 |
# File 'lib/zap/v2apis/ascan.rb', line 157 def add_scan_policy(scanpolicyname, alertthreshold, attackstrength) @client.get("/JSON/ascan/action/addScanPolicy/?scanPolicyName=#{scanpolicyname}&alertThreshold=#{alertthreshold}&attackStrength=#{attackstrength}") end |
#alerts_ids(scanid) ⇒ Object
9 10 11 |
# File 'lib/zap/v2apis/ascan.rb', line 9 def alerts_ids(scanid) @client.get("/JSON/ascan/view/alertsIds/?scanId=#{scanid}") end |
#attack_mode_queue ⇒ Object
13 14 15 |
# File 'lib/zap/v2apis/ascan.rb', line 13 def attack_mode_queue @client.get('/JSON/ascan/view/attackModeQueue/') end |
#clear_excluded_from_scan ⇒ Object
161 162 163 |
# File 'lib/zap/v2apis/ascan.rb', line 161 def clear_excluded_from_scan @client.get('/JSON/ascan/action/clearExcludedFromScan/') end |
#disable_all_scanners(scanpolicyname = '') ⇒ Object
165 166 167 |
# File 'lib/zap/v2apis/ascan.rb', line 165 def disable_all_scanners(scanpolicyname = '') @client.get("/JSON/ascan/action/disableAllScanners/?scanPolicyName=#{scanpolicyname}") end |
#disable_scanners(ids, scanpolicyname = '') ⇒ Object
169 170 171 |
# File 'lib/zap/v2apis/ascan.rb', line 169 def disable_scanners(ids, scanpolicyname = '') @client.get("/JSON/ascan/action/disableScanners/?ids=#{ids}&scanPolicyName=#{scanpolicyname}") end |
#enable_all_scanners(scanpolicyname = '') ⇒ Object
173 174 175 |
# File 'lib/zap/v2apis/ascan.rb', line 173 def enable_all_scanners(scanpolicyname = '') @client.get("/JSON/ascan/action/enableAllScanners/?scanPolicyName=#{scanpolicyname}") end |
#enable_scanners(ids, scanpolicyname = '') ⇒ Object
177 178 179 |
# File 'lib/zap/v2apis/ascan.rb', line 177 def enable_scanners(ids, scanpolicyname = '') @client.get("/JSON/ascan/action/enableScanners/?ids=#{ids}&scanPolicyName=#{scanpolicyname}") end |
#exclude_from_scan(regex) ⇒ Object
181 182 183 |
# File 'lib/zap/v2apis/ascan.rb', line 181 def exclude_from_scan(regex) @client.get("/JSON/ascan/action/excludeFromScan/?regex=#{regex}") end |
#excluded_from_scan ⇒ Object
17 18 19 |
# File 'lib/zap/v2apis/ascan.rb', line 17 def excluded_from_scan @client.get('/JSON/ascan/view/excludedFromScan/') end |
#excluded_param_types ⇒ Object
21 22 23 |
# File 'lib/zap/v2apis/ascan.rb', line 21 def excluded_param_types @client.get('/JSON/ascan/view/excludedParamTypes/') end |
#excluded_params ⇒ Object
25 26 27 |
# File 'lib/zap/v2apis/ascan.rb', line 25 def excluded_params @client.get('/JSON/ascan/view/excludedParams/') end |
#import_scan_policy(path) ⇒ Object
185 186 187 |
# File 'lib/zap/v2apis/ascan.rb', line 185 def import_scan_policy(path) @client.get("/JSON/ascan/action/importScanPolicy/?path=#{path}") end |
#messages_ids(scanid) ⇒ Object
29 30 31 |
# File 'lib/zap/v2apis/ascan.rb', line 29 def (scanid) @client.get("/JSON/ascan/view/messagesIds/?scanId=#{scanid}") end |
#modify_excluded_param(idx, name, type, url) ⇒ Object
189 190 191 |
# File 'lib/zap/v2apis/ascan.rb', line 189 def modify_excluded_param(idx, name, type, url) @client.get("/JSON/ascan/action/modifyExcludedParam/?idx=#{idx}&name=#{name}&type=#{type}&url=#{url}") end |
#option_add_query_param ⇒ Object
33 34 35 |
# File 'lib/zap/v2apis/ascan.rb', line 33 def option_add_query_param @client.get('/JSON/ascan/view/optionAddQueryParam/') end |
#option_allow_attack_on_start ⇒ Object
37 38 39 |
# File 'lib/zap/v2apis/ascan.rb', line 37 def option_allow_attack_on_start @client.get('/JSON/ascan/view/optionAllowAttackOnStart/') end |
#option_attack_policy ⇒ Object
41 42 43 |
# File 'lib/zap/v2apis/ascan.rb', line 41 def option_attack_policy @client.get('/JSON/ascan/view/optionAttackPolicy/') end |
#option_default_policy ⇒ Object
45 46 47 |
# File 'lib/zap/v2apis/ascan.rb', line 45 def option_default_policy @client.get('/JSON/ascan/view/optionDefaultPolicy/') end |
#option_delay_in_ms ⇒ Object
49 50 51 |
# File 'lib/zap/v2apis/ascan.rb', line 49 def option_delay_in_ms @client.get('/JSON/ascan/view/optionDelayInMs/') end |
#option_excluded_param_list ⇒ Object
53 54 55 |
# File 'lib/zap/v2apis/ascan.rb', line 53 def option_excluded_param_list @client.get('/JSON/ascan/view/optionExcludedParamList/') end |
#option_handle_anti_csrf_tokens ⇒ Object
57 58 59 |
# File 'lib/zap/v2apis/ascan.rb', line 57 def option_handle_anti_csrf_tokens @client.get('/JSON/ascan/view/optionHandleAntiCSRFTokens/') end |
#option_host_per_scan ⇒ Object
61 62 63 |
# File 'lib/zap/v2apis/ascan.rb', line 61 def option_host_per_scan @client.get('/JSON/ascan/view/optionHostPerScan/') end |
#option_inject_plugin_id_in_header ⇒ Object
65 66 67 |
# File 'lib/zap/v2apis/ascan.rb', line 65 def option_inject_plugin_id_in_header @client.get('/JSON/ascan/view/optionInjectPluginIdInHeader/') end |
#option_max_alerts_per_rule ⇒ Object
69 70 71 |
# File 'lib/zap/v2apis/ascan.rb', line 69 def option_max_alerts_per_rule @client.get('/JSON/ascan/view/optionMaxAlertsPerRule/') end |
#option_max_chart_time_in_mins ⇒ Object
73 74 75 |
# File 'lib/zap/v2apis/ascan.rb', line 73 def option_max_chart_time_in_mins @client.get('/JSON/ascan/view/optionMaxChartTimeInMins/') end |
#option_max_results_to_list ⇒ Object
77 78 79 |
# File 'lib/zap/v2apis/ascan.rb', line 77 def option_max_results_to_list @client.get('/JSON/ascan/view/optionMaxResultsToList/') end |
#option_max_rule_duration_in_mins ⇒ Object
81 82 83 |
# File 'lib/zap/v2apis/ascan.rb', line 81 def option_max_rule_duration_in_mins @client.get('/JSON/ascan/view/optionMaxRuleDurationInMins/') end |
#option_max_scan_duration_in_mins ⇒ Object
85 86 87 |
# File 'lib/zap/v2apis/ascan.rb', line 85 def option_max_scan_duration_in_mins @client.get('/JSON/ascan/view/optionMaxScanDurationInMins/') end |
#option_max_scans_in_ui ⇒ Object
89 90 91 |
# File 'lib/zap/v2apis/ascan.rb', line 89 def option_max_scans_in_ui @client.get('/JSON/ascan/view/optionMaxScansInUI/') end |
#option_prompt_in_attack_mode ⇒ Object
93 94 95 |
# File 'lib/zap/v2apis/ascan.rb', line 93 def option_prompt_in_attack_mode @client.get('/JSON/ascan/view/optionPromptInAttackMode/') end |
#option_prompt_to_clear_finished_scans ⇒ Object
97 98 99 |
# File 'lib/zap/v2apis/ascan.rb', line 97 def option_prompt_to_clear_finished_scans @client.get('/JSON/ascan/view/optionPromptToClearFinishedScans/') end |
#option_rescan_in_attack_mode ⇒ Object
101 102 103 |
# File 'lib/zap/v2apis/ascan.rb', line 101 def option_rescan_in_attack_mode @client.get('/JSON/ascan/view/optionRescanInAttackMode/') end |
#option_scan_headers_all_requests ⇒ Object
105 106 107 |
# File 'lib/zap/v2apis/ascan.rb', line 105 def option_scan_headers_all_requests @client.get('/JSON/ascan/view/optionScanHeadersAllRequests/') end |
#option_scan_null_json_values ⇒ Object
109 110 111 |
# File 'lib/zap/v2apis/ascan.rb', line 109 def option_scan_null_json_values @client.get('/JSON/ascan/view/optionScanNullJsonValues/') end |
#option_show_advanced_dialog ⇒ Object
113 114 115 |
# File 'lib/zap/v2apis/ascan.rb', line 113 def option_show_advanced_dialog @client.get('/JSON/ascan/view/optionShowAdvancedDialog/') end |
#option_target_params_enabled_rpc ⇒ Object
117 118 119 |
# File 'lib/zap/v2apis/ascan.rb', line 117 def option_target_params_enabled_rpc @client.get('/JSON/ascan/view/optionTargetParamsEnabledRPC/') end |
#option_target_params_injectable ⇒ Object
121 122 123 |
# File 'lib/zap/v2apis/ascan.rb', line 121 def option_target_params_injectable @client.get('/JSON/ascan/view/optionTargetParamsInjectable/') end |
#option_thread_per_host ⇒ Object
125 126 127 |
# File 'lib/zap/v2apis/ascan.rb', line 125 def option_thread_per_host @client.get('/JSON/ascan/view/optionThreadPerHost/') end |
#pause(scanid) ⇒ Object
193 194 195 |
# File 'lib/zap/v2apis/ascan.rb', line 193 def pause(scanid) @client.get("/JSON/ascan/action/pause/?scanId=#{scanid}") end |
#pause_all_scans ⇒ Object
197 198 199 |
# File 'lib/zap/v2apis/ascan.rb', line 197 def pause_all_scans @client.get('/JSON/ascan/action/pauseAllScans/') end |
#policies(scanpolicyname = '', policyid = '') ⇒ Object
129 130 131 |
# File 'lib/zap/v2apis/ascan.rb', line 129 def policies(scanpolicyname = '', policyid = '') @client.get("/JSON/ascan/view/policies/?scanPolicyName=#{scanpolicyname}&policyId=#{policyid}") end |
#remove_all_scans ⇒ Object
201 202 203 |
# File 'lib/zap/v2apis/ascan.rb', line 201 def remove_all_scans @client.get('/JSON/ascan/action/removeAllScans/') end |
#remove_excluded_param(idx) ⇒ Object
205 206 207 |
# File 'lib/zap/v2apis/ascan.rb', line 205 def remove_excluded_param(idx) @client.get("/JSON/ascan/action/removeExcludedParam/?idx=#{idx}") end |
#remove_scan(scanid) ⇒ Object
209 210 211 |
# File 'lib/zap/v2apis/ascan.rb', line 209 def remove_scan(scanid) @client.get("/JSON/ascan/action/removeScan/?scanId=#{scanid}") end |
#remove_scan_policy(scanpolicyname) ⇒ Object
213 214 215 |
# File 'lib/zap/v2apis/ascan.rb', line 213 def remove_scan_policy(scanpolicyname) @client.get("/JSON/ascan/action/removeScanPolicy/?scanPolicyName=#{scanpolicyname}") end |
#resume(scanid) ⇒ Object
217 218 219 |
# File 'lib/zap/v2apis/ascan.rb', line 217 def resume(scanid) @client.get("/JSON/ascan/action/resume/?scanId=#{scanid}") end |
#resume_all_scans ⇒ Object
221 222 223 |
# File 'lib/zap/v2apis/ascan.rb', line 221 def resume_all_scans @client.get('/JSON/ascan/action/resumeAllScans/') end |
#scan(url, recurse = '', inscopeonly = '', scanpolicyname = '', method = '', postdata = '', contextid = '') ⇒ Object
225 226 227 |
# File 'lib/zap/v2apis/ascan.rb', line 225 def scan(url, recurse = '', inscopeonly = '', scanpolicyname = '', method = '', postdata = '', contextid = '') @client.get("/JSON/ascan/action/scan/?url=#{url}&recurse=#{recurse}&inScopeOnly=#{inscopeonly}&scanPolicyName=#{scanpolicyname}&method=#{method}&postData=#{postdata}&contextId=#{contextid}") end |
#scan_as_user(url, contextid, userid, recurse = '', scanpolicyname = '', method = '', postdata = '') ⇒ Object
229 230 231 |
# File 'lib/zap/v2apis/ascan.rb', line 229 def scan_as_user(url, contextid, userid, recurse = '', scanpolicyname = '', method = '', postdata = '') @client.get("/JSON/ascan/action/scanAsUser/?url=#{url}&contextId=#{contextid}&userId=#{userid}&recurse=#{recurse}&scanPolicyName=#{scanpolicyname}&method=#{method}&postData=#{postdata}") end |
#scan_policy_names ⇒ Object
133 134 135 |
# File 'lib/zap/v2apis/ascan.rb', line 133 def scan_policy_names @client.get('/JSON/ascan/view/scanPolicyNames/') end |
#scan_progress(scanid) ⇒ Object
137 138 139 |
# File 'lib/zap/v2apis/ascan.rb', line 137 def scan_progress(scanid) @client.get("/JSON/ascan/view/scanProgress/?scanId=#{scanid}") end |
#scanners(scanpolicyname = '', policyid = '') ⇒ Object
141 142 143 |
# File 'lib/zap/v2apis/ascan.rb', line 141 def scanners(scanpolicyname = '', policyid = '') @client.get("/JSON/ascan/view/scanners/?scanPolicyName=#{scanpolicyname}&policyId=#{policyid}") end |
#scans ⇒ Object
145 146 147 |
# File 'lib/zap/v2apis/ascan.rb', line 145 def scans @client.get('/JSON/ascan/view/scans/') end |
#set_enabled_policies(ids, scanpolicyname = '') ⇒ Object
233 234 235 |
# File 'lib/zap/v2apis/ascan.rb', line 233 def set_enabled_policies(ids, scanpolicyname = '') @client.get("/JSON/ascan/action/setEnabledPolicies/?ids=#{ids}&scanPolicyName=#{scanpolicyname}") end |
#set_option_add_query_param(boolean) ⇒ Object
237 238 239 |
# File 'lib/zap/v2apis/ascan.rb', line 237 def set_option_add_query_param(boolean) @client.get("/JSON/ascan/action/setOptionAddQueryParam/?Boolean=#{boolean}") end |
#set_option_allow_attack_on_start(boolean) ⇒ Object
241 242 243 |
# File 'lib/zap/v2apis/ascan.rb', line 241 def set_option_allow_attack_on_start(boolean) @client.get("/JSON/ascan/action/setOptionAllowAttackOnStart/?Boolean=#{boolean}") end |
#set_option_attack_policy(string) ⇒ Object
245 246 247 |
# File 'lib/zap/v2apis/ascan.rb', line 245 def set_option_attack_policy(string) @client.get("/JSON/ascan/action/setOptionAttackPolicy/?String=#{string}") end |
#set_option_default_policy(string) ⇒ Object
249 250 251 |
# File 'lib/zap/v2apis/ascan.rb', line 249 def set_option_default_policy(string) @client.get("/JSON/ascan/action/setOptionDefaultPolicy/?String=#{string}") end |
#set_option_delay_in_ms(integer) ⇒ Object
253 254 255 |
# File 'lib/zap/v2apis/ascan.rb', line 253 def set_option_delay_in_ms(integer) @client.get("/JSON/ascan/action/setOptionDelayInMs/?Integer=#{integer}") end |
#set_option_handle_anti_csrf_tokens(boolean) ⇒ Object
257 258 259 |
# File 'lib/zap/v2apis/ascan.rb', line 257 def set_option_handle_anti_csrf_tokens(boolean) @client.get("/JSON/ascan/action/setOptionHandleAntiCSRFTokens/?Boolean=#{boolean}") end |
#set_option_host_per_scan(integer) ⇒ Object
261 262 263 |
# File 'lib/zap/v2apis/ascan.rb', line 261 def set_option_host_per_scan(integer) @client.get("/JSON/ascan/action/setOptionHostPerScan/?Integer=#{integer}") end |
#set_option_inject_plugin_id_in_header(boolean) ⇒ Object
265 266 267 |
# File 'lib/zap/v2apis/ascan.rb', line 265 def set_option_inject_plugin_id_in_header(boolean) @client.get("/JSON/ascan/action/setOptionInjectPluginIdInHeader/?Boolean=#{boolean}") end |
#set_option_max_alerts_per_rule(integer) ⇒ Object
269 270 271 |
# File 'lib/zap/v2apis/ascan.rb', line 269 def set_option_max_alerts_per_rule(integer) @client.get("/JSON/ascan/action/setOptionMaxAlertsPerRule/?Integer=#{integer}") end |
#set_option_max_chart_time_in_mins(integer) ⇒ Object
273 274 275 |
# File 'lib/zap/v2apis/ascan.rb', line 273 def set_option_max_chart_time_in_mins(integer) @client.get("/JSON/ascan/action/setOptionMaxChartTimeInMins/?Integer=#{integer}") end |
#set_option_max_results_to_list(integer) ⇒ Object
277 278 279 |
# File 'lib/zap/v2apis/ascan.rb', line 277 def set_option_max_results_to_list(integer) @client.get("/JSON/ascan/action/setOptionMaxResultsToList/?Integer=#{integer}") end |
#set_option_max_rule_duration_in_mins(integer) ⇒ Object
281 282 283 |
# File 'lib/zap/v2apis/ascan.rb', line 281 def set_option_max_rule_duration_in_mins(integer) @client.get("/JSON/ascan/action/setOptionMaxRuleDurationInMins/?Integer=#{integer}") end |
#set_option_max_scan_duration_in_mins(integer) ⇒ Object
285 286 287 |
# File 'lib/zap/v2apis/ascan.rb', line 285 def set_option_max_scan_duration_in_mins(integer) @client.get("/JSON/ascan/action/setOptionMaxScanDurationInMins/?Integer=#{integer}") end |
#set_option_max_scans_in_ui(integer) ⇒ Object
289 290 291 |
# File 'lib/zap/v2apis/ascan.rb', line 289 def set_option_max_scans_in_ui(integer) @client.get("/JSON/ascan/action/setOptionMaxScansInUI/?Integer=#{integer}") end |
#set_option_prompt_in_attack_mode(boolean) ⇒ Object
293 294 295 |
# File 'lib/zap/v2apis/ascan.rb', line 293 def set_option_prompt_in_attack_mode(boolean) @client.get("/JSON/ascan/action/setOptionPromptInAttackMode/?Boolean=#{boolean}") end |
#set_option_prompt_to_clear_finished_scans(boolean) ⇒ Object
297 298 299 |
# File 'lib/zap/v2apis/ascan.rb', line 297 def set_option_prompt_to_clear_finished_scans(boolean) @client.get("/JSON/ascan/action/setOptionPromptToClearFinishedScans/?Boolean=#{boolean}") end |
#set_option_rescan_in_attack_mode(boolean) ⇒ Object
301 302 303 |
# File 'lib/zap/v2apis/ascan.rb', line 301 def set_option_rescan_in_attack_mode(boolean) @client.get("/JSON/ascan/action/setOptionRescanInAttackMode/?Boolean=#{boolean}") end |
#set_option_scan_headers_all_requests(boolean) ⇒ Object
305 306 307 |
# File 'lib/zap/v2apis/ascan.rb', line 305 def set_option_scan_headers_all_requests(boolean) @client.get("/JSON/ascan/action/setOptionScanHeadersAllRequests/?Boolean=#{boolean}") end |
#set_option_scan_null_json_values(boolean) ⇒ Object
309 310 311 |
# File 'lib/zap/v2apis/ascan.rb', line 309 def set_option_scan_null_json_values(boolean) @client.get("/JSON/ascan/action/setOptionScanNullJsonValues/?Boolean=#{boolean}") end |
#set_option_show_advanced_dialog(boolean) ⇒ Object
313 314 315 |
# File 'lib/zap/v2apis/ascan.rb', line 313 def set_option_show_advanced_dialog(boolean) @client.get("/JSON/ascan/action/setOptionShowAdvancedDialog/?Boolean=#{boolean}") end |
#set_option_target_params_enabled_rpc(integer) ⇒ Object
317 318 319 |
# File 'lib/zap/v2apis/ascan.rb', line 317 def set_option_target_params_enabled_rpc(integer) @client.get("/JSON/ascan/action/setOptionTargetParamsEnabledRPC/?Integer=#{integer}") end |
#set_option_target_params_injectable(integer) ⇒ Object
321 322 323 |
# File 'lib/zap/v2apis/ascan.rb', line 321 def set_option_target_params_injectable(integer) @client.get("/JSON/ascan/action/setOptionTargetParamsInjectable/?Integer=#{integer}") end |
#set_option_thread_per_host(integer) ⇒ Object
325 326 327 |
# File 'lib/zap/v2apis/ascan.rb', line 325 def set_option_thread_per_host(integer) @client.get("/JSON/ascan/action/setOptionThreadPerHost/?Integer=#{integer}") end |
#set_policy_alert_threshold(id, alertthreshold, scanpolicyname = '') ⇒ Object
329 330 331 |
# File 'lib/zap/v2apis/ascan.rb', line 329 def set_policy_alert_threshold(id, alertthreshold, scanpolicyname = '') @client.get("/JSON/ascan/action/setPolicyAlertThreshold/?id=#{id}&alertThreshold=#{alertthreshold}&scanPolicyName=#{scanpolicyname}") end |
#set_policy_attack_strength(id, attackstrength, scanpolicyname = '') ⇒ Object
333 334 335 |
# File 'lib/zap/v2apis/ascan.rb', line 333 def set_policy_attack_strength(id, attackstrength, scanpolicyname = '') @client.get("/JSON/ascan/action/setPolicyAttackStrength/?id=#{id}&attackStrength=#{attackstrength}&scanPolicyName=#{scanpolicyname}") end |
#set_scanner_alert_threshold(id, alertthreshold, scanpolicyname = '') ⇒ Object
337 338 339 |
# File 'lib/zap/v2apis/ascan.rb', line 337 def set_scanner_alert_threshold(id, alertthreshold, scanpolicyname = '') @client.get("/JSON/ascan/action/setScannerAlertThreshold/?id=#{id}&alertThreshold=#{alertthreshold}&scanPolicyName=#{scanpolicyname}") end |
#set_scanner_attack_strength(id, attackstrength, scanpolicyname = '') ⇒ Object
341 342 343 |
# File 'lib/zap/v2apis/ascan.rb', line 341 def set_scanner_attack_strength(id, attackstrength, scanpolicyname = '') @client.get("/JSON/ascan/action/setScannerAttackStrength/?id=#{id}&attackStrength=#{attackstrength}&scanPolicyName=#{scanpolicyname}") end |
#skip_scanner(scanid, scannerid) ⇒ Object
345 346 347 |
# File 'lib/zap/v2apis/ascan.rb', line 345 def skip_scanner(scanid, scannerid) @client.get("/JSON/ascan/action/skipScanner/?scanId=#{scanid}&scannerId=#{scannerid}") end |
#status(scanid) ⇒ Object
149 150 151 |
# File 'lib/zap/v2apis/ascan.rb', line 149 def status(scanid) @client.get("/JSON/ascan/view/status/?scanId=#{scanid}") end |
#stop(scanid) ⇒ Object
349 350 351 |
# File 'lib/zap/v2apis/ascan.rb', line 349 def stop(scanid) @client.get("/JSON/ascan/action/stop/?scanId=#{scanid}") end |
#stop_all_scans ⇒ Object
353 354 355 |
# File 'lib/zap/v2apis/ascan.rb', line 353 def stop_all_scans @client.get('/JSON/ascan/action/stopAllScans/') end |
#update_scan_policy(scanpolicyname, alertthreshold, attackstrength) ⇒ Object
357 358 359 |
# File 'lib/zap/v2apis/ascan.rb', line 357 def update_scan_policy(scanpolicyname, alertthreshold, attackstrength) @client.get("/JSON/ascan/action/updateScanPolicy/?scanPolicyName=#{scanpolicyname}&alertThreshold=#{alertthreshold}&attackStrength=#{attackstrength}") end |