virustotal_api_compat 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.github/CODE_OF_CONDUCT.md +46 -0
  3. data/.github/CONTRIBUTING.md +7 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. data/.github/pull_request_template.md +11 -0
  7. data/.github/workflows/ruby.yml +46 -0
  8. data/.gitignore +18 -0
  9. data/.rubocop.yml +39 -0
  10. data/CHANGELOG.md +70 -0
  11. data/Gemfile +5 -0
  12. data/LICENSE.txt +22 -0
  13. data/README.md +253 -0
  14. data/Rakefile +25 -0
  15. data/lib/virustotal_api/analysis.rb +16 -0
  16. data/lib/virustotal_api/base.rb +78 -0
  17. data/lib/virustotal_api/domain.rb +18 -0
  18. data/lib/virustotal_api/exceptions.rb +9 -0
  19. data/lib/virustotal_api/file.rb +67 -0
  20. data/lib/virustotal_api/group.rb +18 -0
  21. data/lib/virustotal_api/ip.rb +18 -0
  22. data/lib/virustotal_api/uri.rb +6 -0
  23. data/lib/virustotal_api/url.rb +38 -0
  24. data/lib/virustotal_api/user.rb +18 -0
  25. data/lib/virustotal_api/version.rb +6 -0
  26. data/lib/virustotal_api.rb +11 -0
  27. data/test/analysis_test.rb +26 -0
  28. data/test/base_test.rb +63 -0
  29. data/test/domain_test.rb +27 -0
  30. data/test/exceptions_test.rb +31 -0
  31. data/test/file_test.rb +73 -0
  32. data/test/fixtures/analysis.yml +544 -0
  33. data/test/fixtures/domain.yml +830 -0
  34. data/test/fixtures/domain_bad_request.yml +52 -0
  35. data/test/fixtures/file_analyse.yml +52 -0
  36. data/test/fixtures/file_find.yml +853 -0
  37. data/test/fixtures/file_not_found.yml +52 -0
  38. data/test/fixtures/file_rate_limit.yml +52 -0
  39. data/test/fixtures/file_unauthorized.yml +51 -0
  40. data/test/fixtures/file_upload.yml +54 -0
  41. data/test/fixtures/group_find.yml +216 -0
  42. data/test/fixtures/ip.yml +716 -0
  43. data/test/fixtures/large_file_upload.yml +99 -0
  44. data/test/fixtures/null_file +1 -0
  45. data/test/fixtures/unscanned_url_find.yml +44 -0
  46. data/test/fixtures/url_analyse.yml +52 -0
  47. data/test/fixtures/url_encoding_find.yml +651 -0
  48. data/test/fixtures/url_find.yml +599 -0
  49. data/test/fixtures/user_find.yml +213 -0
  50. data/test/group_test.rb +27 -0
  51. data/test/ip_test.rb +26 -0
  52. data/test/test_helper.rb +11 -0
  53. data/test/uri_test.rb +10 -0
  54. data/test/url_test.rb +47 -0
  55. data/test/user_test.rb +26 -0
  56. data/test/version_test.rb +9 -0
  57. data/virustotal_api.gemspec +33 -0
  58. metadata +287 -0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.virustotal.com/api/v3/domains/xpressco.za
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ User-Agent:
13
+ - rest-client/2.1.0 (linux-gnu x86_64) ruby/2.5.1p57
14
+ X-Apikey:
15
+ - testapikey
16
+ Content-Length:
17
+ - '0'
18
+ Content-Type:
19
+ - application/x-www-form-urlencoded
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Host:
23
+ - www.virustotal.com
24
+ response:
25
+ status:
26
+ code: 400
27
+ message: Bad Request
28
+ headers:
29
+ Cache-Control:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ X-Cloud-Trace-Context:
34
+ - f9f5f005efc95b0390a91fb6306201d6
35
+ Date:
36
+ - Mon, 28 Dec 2020 13:56:50 GMT
37
+ Server:
38
+ - Google Frontend
39
+ Content-Length:
40
+ - '138'
41
+ body:
42
+ encoding: UTF-8
43
+ string: |-
44
+ {
45
+ "error": {
46
+ "code": "InvalidArgumentError",
47
+ "message": "Domain \"xpressco.za\" is not a valid domain pattern"
48
+ }
49
+ }
50
+ http_version:
51
+ recorded_at: Mon, 28 Dec 2020 13:56:50 GMT
52
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.virustotal.com/api/v3/files/01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b/analyse
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - "*/*"
12
+ User-Agent:
13
+ - rest-client/2.1.0 (linux-gnu x86_64) ruby/2.5.1p57
14
+ X-Apikey:
15
+ - testapikey
16
+ Content-Length:
17
+ - '0'
18
+ Content-Type:
19
+ - application/x-www-form-urlencoded
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Host:
23
+ - www.virustotal.com
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Cache-Control:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ X-Cloud-Trace-Context:
34
+ - e9e0279ba3697265d73eb77cad81649d
35
+ Date:
36
+ - Wed, 02 Sep 2020 14:02:35 GMT
37
+ Server:
38
+ - Google Frontend
39
+ Content-Length:
40
+ - '128'
41
+ body:
42
+ encoding: UTF-8
43
+ string: |-
44
+ {
45
+ "data": {
46
+ "id": "NjhiMzI5ZGE5ODkzZTM0MDk5YzdkOGFkNWNiOWM5NDA6MTU5OTA1NTM1NQ==",
47
+ "type": "analysis"
48
+ }
49
+ }
50
+ http_version:
51
+ recorded_at: Wed, 02 Sep 2020 14:02:35 GMT
52
+ recorded_with: VCR 5.0.0