module PWN::Plugins::IBMAppscan
def self.folder_item_scan_action(opts = {})
def self.folder_item_scan_action(opts = {}) [:appscan_obj] pts[:folder_item_id].to_i ion].to_s.scrub.to_sym opts[:poll_interval].nil? 60 se opts[:poll_interval].to_i d is in a Ready state = PWN::Plugins::IBMAppscan.get_folder_item_by_id( ppscan_obj, : folder_item_id der_item[:state] error("Scan isn't in a Ready state. Current state: #{state}, abort.") if state != 'Ready' icking Off Scan for Folder Item: #{folder_item_id}") an_rest_call( ppscan_obj, post, lderitems/#{folder_item_id}", tion=2' to Monitor Scan Completion Ready' erval em = PWN::Plugins::IBMAppscan.get_folder_item_by_id( appscan_obj, id: folder_item_id older_item[:state] "Current Scan State: #{state}...") can Completed @ #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}") an_rest_call( ppscan_obj, post, lderitems/#{folder_item_id}", tion=3' an_rest_call( ppscan_obj, post, lderitems/#{folder_item_id}", tion=4' an_rest_call( ppscan_obj, post, lderitems/#{folder_item_id}", tion=5' error("Invalid action. Valid actions are:\n:run\n:suspend\n:cancel\n:end\n") esponse] = response esponse] = Nokogiri::XML(response) => e