virustotal_api_compat 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/CODE_OF_CONDUCT.md +46 -0
- data/.github/CONTRIBUTING.md +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/pull_request_template.md +11 -0
- data/.github/workflows/ruby.yml +46 -0
- data/.gitignore +18 -0
- data/.rubocop.yml +39 -0
- data/CHANGELOG.md +70 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +253 -0
- data/Rakefile +25 -0
- data/lib/virustotal_api/analysis.rb +16 -0
- data/lib/virustotal_api/base.rb +78 -0
- data/lib/virustotal_api/domain.rb +18 -0
- data/lib/virustotal_api/exceptions.rb +9 -0
- data/lib/virustotal_api/file.rb +67 -0
- data/lib/virustotal_api/group.rb +18 -0
- data/lib/virustotal_api/ip.rb +18 -0
- data/lib/virustotal_api/uri.rb +6 -0
- data/lib/virustotal_api/url.rb +38 -0
- data/lib/virustotal_api/user.rb +18 -0
- data/lib/virustotal_api/version.rb +6 -0
- data/lib/virustotal_api.rb +11 -0
- data/test/analysis_test.rb +26 -0
- data/test/base_test.rb +63 -0
- data/test/domain_test.rb +27 -0
- data/test/exceptions_test.rb +31 -0
- data/test/file_test.rb +73 -0
- data/test/fixtures/analysis.yml +544 -0
- data/test/fixtures/domain.yml +830 -0
- data/test/fixtures/domain_bad_request.yml +52 -0
- data/test/fixtures/file_analyse.yml +52 -0
- data/test/fixtures/file_find.yml +853 -0
- data/test/fixtures/file_not_found.yml +52 -0
- data/test/fixtures/file_rate_limit.yml +52 -0
- data/test/fixtures/file_unauthorized.yml +51 -0
- data/test/fixtures/file_upload.yml +54 -0
- data/test/fixtures/group_find.yml +216 -0
- data/test/fixtures/ip.yml +716 -0
- data/test/fixtures/large_file_upload.yml +99 -0
- data/test/fixtures/null_file +1 -0
- data/test/fixtures/unscanned_url_find.yml +44 -0
- data/test/fixtures/url_analyse.yml +52 -0
- data/test/fixtures/url_encoding_find.yml +651 -0
- data/test/fixtures/url_find.yml +599 -0
- data/test/fixtures/user_find.yml +213 -0
- data/test/group_test.rb +27 -0
- data/test/ip_test.rb +26 -0
- data/test/test_helper.rb +11 -0
- data/test/uri_test.rb +10 -0
- data/test/url_test.rb +47 -0
- data/test/user_test.rb +26 -0
- data/test/version_test.rb +9 -0
- data/virustotal_api.gemspec +33 -0
- metadata +287 -0
@@ -0,0 +1,99 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.virustotal.com/api/v3/files/upload_url
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
Accept:
|
9
|
+
- "*/*"
|
10
|
+
User-Agent:
|
11
|
+
- rest-client/2.1.0 (linux-gnu x86_64) ruby/2.5.1p57
|
12
|
+
X-Apikey:
|
13
|
+
- testapikey
|
14
|
+
Content-Length:
|
15
|
+
- '282'
|
16
|
+
Content-Type:
|
17
|
+
- multipart/form-data; boundary=----RubyFormBoundaryjv5FxFNLpwqDoUQA
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
Host:
|
21
|
+
- www.virustotal.com
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Cloud-Trace-Context:
|
32
|
+
- 9c3d1ae8f345c5ca8060a4b793174891
|
33
|
+
Date:
|
34
|
+
- Wed, 02 Sep 2020 14:02:36 GMT
|
35
|
+
Server:
|
36
|
+
- Google Frontend
|
37
|
+
Content-Length:
|
38
|
+
- '128'
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: |-
|
42
|
+
{
|
43
|
+
"data": "https://www.virustotal.com/_ah/upload/AMmfu6b-_DXUeFe36Sb3b0F4B8mH9Nb-CHbRoUNVOPwG/"
|
44
|
+
}
|
45
|
+
http_version:
|
46
|
+
recorded_at: Wed, 02 Sep 2020 14:02:37 GMT
|
47
|
+
|
48
|
+
- request:
|
49
|
+
method: post
|
50
|
+
uri: https://www.virustotal.com/_ah/upload/AMmfu6b-_DXUeFe36Sb3b0F4B8mH9Nb-CHbRoUNVOPwG/
|
51
|
+
body:
|
52
|
+
encoding: ASCII-8BIT
|
53
|
+
string: "------RubyFormBoundaryjv5FxFNLpwqDoUQA\r\nContent-Disposition: form-data;
|
54
|
+
name=\"filename\"\r\n\r\nnull_file\r\n------RubyFormBoundaryjv5FxFNLpwqDoUQA\r\nContent-Disposition:
|
55
|
+
form-data; name=\"file\"; filename=\"null_file\"\r\nContent-Type: text/plain\r\n\r\n\n\r\n------RubyFormBoundaryjv5FxFNLpwqDoUQA--\r\n"
|
56
|
+
headers:
|
57
|
+
Accept:
|
58
|
+
- "*/*"
|
59
|
+
User-Agent:
|
60
|
+
- rest-client/2.1.0 (linux-gnu x86_64) ruby/2.5.1p57
|
61
|
+
X-Apikey:
|
62
|
+
- testapikey
|
63
|
+
Content-Length:
|
64
|
+
- '282'
|
65
|
+
Content-Type:
|
66
|
+
- multipart/form-data; boundary=----RubyFormBoundaryjv5FxFNLpwqDoUQA
|
67
|
+
Accept-Encoding:
|
68
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
69
|
+
Host:
|
70
|
+
- www.virustotal.com
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
Cache-Control:
|
77
|
+
- no-cache
|
78
|
+
Content-Type:
|
79
|
+
- application/json; charset=utf-8
|
80
|
+
X-Cloud-Trace-Context:
|
81
|
+
- 9c3d1ae8f345c5ca8060a4b793174891
|
82
|
+
Date:
|
83
|
+
- Wed, 02 Sep 2020 14:02:36 GMT
|
84
|
+
Server:
|
85
|
+
- Google Frontend
|
86
|
+
Content-Length:
|
87
|
+
- '128'
|
88
|
+
body:
|
89
|
+
encoding: UTF-8
|
90
|
+
string: |-
|
91
|
+
{
|
92
|
+
"data": {
|
93
|
+
"id": "NjhiMzI5ZGE5ODkzZTM0MDk5YzdkOGFkNWNiOWM5NDA6MTU5OTA1NTM1Ng==",
|
94
|
+
"type": "analysis"
|
95
|
+
}
|
96
|
+
}
|
97
|
+
http_version:
|
98
|
+
recorded_at: Wed, 02 Sep 2020 14:02:37 GMT
|
99
|
+
recorded_with: VCR 5.0.0
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.virustotal.com/api/v3/urls/aHR0cDovL3d3dy51bnNjYW5uZWQuY29t
|
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: 404
|
27
|
+
message: NotFound
|
28
|
+
headers:
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
X-Cloud-Trace-Context:
|
34
|
+
- 1becba7a0a3fb209729658773d5c7699
|
35
|
+
Date:
|
36
|
+
- Wed, 02 Sep 2020 14:02:35 GMT
|
37
|
+
Server:
|
38
|
+
- Google Frontend
|
39
|
+
Content-Length:
|
40
|
+
- '19870'
|
41
|
+
body: nil
|
42
|
+
http_version:
|
43
|
+
recorded_at: Wed, 02 Sep 2020 14:02:35 GMT
|
44
|
+
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/urls/aHR0cDovL3d3dy5nb29nbGUuY29t/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
|
+
- ecca2b78747bfc20bbf988a9566af71e
|
35
|
+
Date:
|
36
|
+
- Wed, 02 Sep 2020 14:02:34 GMT
|
37
|
+
Server:
|
38
|
+
- Google Frontend
|
39
|
+
Content-Length:
|
40
|
+
- '145'
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: |-
|
44
|
+
{
|
45
|
+
"data": {
|
46
|
+
"id": "u-dd014af5ed6b38d9130e3f466f850e46d21b951199d53a18ef29ee9341614eaf-1599055354",
|
47
|
+
"type": "analysis"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
http_version:
|
51
|
+
recorded_at: Wed, 02 Sep 2020 14:02:34 GMT
|
52
|
+
recorded_with: VCR 5.0.0
|