Class: HybridAnalysis::Clients::QuickScan
- Defined in:
- lib/hybridanalysis/clients/quick_scan.rb
Constant Summary
Constants inherited from Client
Client::BASE_URL, Client::DEFAULT_UA, Client::HOST, Client::VERSION
Instance Attribute Summary
Attributes inherited from Client
Instance Method Summary collapse
-
#convert_to_full(id, environment_id:, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) ⇒ Hash
convert quick scan to sandbox report.
-
#file(scan_type:, file:, no_share_third_party: nil, allow_community_access: nil, comment: nil, submit_name: nil) ⇒ Hash
submit a file for quick scan, you can check results in overview endpoint.
-
#get(id) ⇒ Hash
some scanners need time to process file, if in response ‘finished` is set to false, then you need use this endpoint to get final results.
-
#state ⇒ Array
return list of available scanners.
-
#url(scan_type:, url:, no_share_third_party: nil, allow_community_access: nil, comment: nil, submit_name: nil) ⇒ Hash
submit a website’s url or url with file for analysis.
Methods inherited from Client
Constructor Details
This class inherits a constructor from HybridAnalysis::Clients::Client
Instance Method Details
#convert_to_full(id, environment_id:, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) ⇒ Hash
convert quick scan to sandbox report
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/hybridanalysis/clients/quick_scan.rb', line 101 def convert_to_full(id, environment_id:, no_hash_lookup: nil, action_script: nil, hybrid_analysis: nil, experimental_anti_evasion: nil, script_logging: nil, input_sample_tampering: nil, tor_enabled_analysis: nil, offline_analysis: nil, email: nil, comment: nil, custom_date_time: nil, custom_cmd_line: nil, custom_run_time: nil, submit_name: nil, document_password: nil, environment_variable: nil) params = { environment_id: environment_id, no_hash_lookup: no_hash_lookup, action_script: action_script, hybrid_analysis: hybrid_analysis, experimental_anti_evasion: experimental_anti_evasion, script_logging: script_logging, input_sample_tampering: input_sample_tampering, tor_enabled_analysis: tor_enabled_analysis, offline_analysis: offline_analysis, email: email, comment: comment, custom_date_time: custom_date_time, custom_cmd_line: custom_cmd_line, custom_run_time: custom_run_time, submit_name: submit_name, document_password: document_password, environment_variable: environment_variable }.compact _post("/quick-scan/#{id}/convert-to-full", params) { |json| json } end |
#file(scan_type:, file:, no_share_third_party: nil, allow_community_access: nil, comment: nil, submit_name: nil) ⇒ Hash
submit a file for quick scan, you can check results in overview endpoint
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hybridanalysis/clients/quick_scan.rb', line 27 def file(scan_type:, file:, no_share_third_party: nil, allow_community_access: nil, comment: nil, submit_name: nil) name = File.basename(file) data = File.read(file) params = { scan_type: scan_type, no_share_third_party: no_share_third_party, allow_community_access: allow_community_access, comment: comment, submit_name: submit_name }.compact _post_with_file("/quick-scan/file", file: data, filename: name, params: params) { |json| json } end |
#get(id) ⇒ Hash
some scanners need time to process file, if in response ‘finished` is set to false, then you need use this endpoint to get final results
73 74 75 |
# File 'lib/hybridanalysis/clients/quick_scan.rb', line 73 def get(id) _get("/quick-scan/#{id}") { |json| json } end |
#state ⇒ Array
return list of available scanners
11 12 13 |
# File 'lib/hybridanalysis/clients/quick_scan.rb', line 11 def state _get("/quick-scan/state") { |json| json } end |
#url(scan_type:, url:, no_share_third_party: nil, allow_community_access: nil, comment: nil, submit_name: nil) ⇒ Hash
submit a website’s url or url with file for analysis
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/hybridanalysis/clients/quick_scan.rb', line 54 def url(scan_type:, url:, no_share_third_party: nil, allow_community_access: nil, comment: nil, submit_name: nil) params = { scan_type: scan_type, url: url, no_share_third_party: no_share_third_party, allow_community_access: allow_community_access, comment: comment, submit_name: submit_name }.compact _post("/quick-scan/url", params) { |json| json } end |