Class: HybridAnalysis::Clients::Search
- Defined in:
- lib/hybridanalysis/clients/search.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
-
#hash(hash) ⇒ Array
summary for given hash.
-
#hashes(*hashes) ⇒ Array
summary for given hashes.
-
#terms(filename: nil, filetype: nil, filetype_desc: nil, env_id: nil, country: nil, verdict: nil, av_detect: nil, vx_family: nil, tag: nil, date_from: nil, date_to: nil, port: nil, host: nil, domain: nil, url: nil, similar_to: nil, context: nil, imp_hash: nil, ssdeep: nil, authentihash: nil, uses_tactic: nil, uses_technique: nil) ⇒ Hash
search the database using the search terms.
Methods inherited from Client
Constructor Details
This class inherits a constructor from HybridAnalysis::Clients::Client
Instance Method Details
#hash(hash) ⇒ Array
summary for given hash
13 14 15 16 |
# File 'lib/hybridanalysis/clients/search.rb', line 13 def hash(hash) params = { hash: hash }.compact _post("/search/hash", params) { |json| json } end |
#hashes(*hashes) ⇒ Array
summary for given hashes
25 26 27 28 |
# File 'lib/hybridanalysis/clients/search.rb', line 25 def hashes(*hashes) params = { "hashes[]": hashes }.compact _post("/search/hashes", params) { |json| json } end |
#terms(filename: nil, filetype: nil, filetype_desc: nil, env_id: nil, country: nil, verdict: nil, av_detect: nil, vx_family: nil, tag: nil, date_from: nil, date_to: nil, port: nil, host: nil, domain: nil, url: nil, similar_to: nil, context: nil, imp_hash: nil, ssdeep: nil, authentihash: nil, uses_tactic: nil, uses_technique: nil) ⇒ Hash
search the database using the search terms
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/hybridanalysis/clients/search.rb', line 58 def terms(filename: nil, filetype: nil, filetype_desc: nil, env_id: nil, country: nil, verdict: nil, av_detect: nil, vx_family: nil, tag: nil, date_from: nil, date_to: nil, port: nil, host: nil, domain: nil, url: nil, similar_to: nil, context: nil, imp_hash: nil, ssdeep: nil, authentihash: nil, uses_tactic: nil, uses_technique: nil) params = { filename: filename, filetype: filetype, filetype_desc: filetype_desc, env_id: env_id, country: country, verdict: verdict, av_detect: av_detect, vx_family: vx_family, tag: tag, date_from: date_from, date_to: date_to, port: port, host: host, domain: domain, url: url, similar_to: similar_to, context: context, imp_hash: imp_hash, ssdeep: ssdeep, authentihash: authentihash, uses_tactic: uses_tactic, uses_technique: uses_technique }.compact _post("/search/terms", params) { |json| json } end |