virustotal_api 0.5.2 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +42 -3
- data/CHANGELOG.md +19 -0
- data/README.md +15 -3
- data/lib/virustotal_api/analysis.rb +0 -8
- data/lib/virustotal_api/base.rb +18 -6
- data/lib/virustotal_api/domain.rb +0 -6
- data/lib/virustotal_api/file.rb +20 -9
- data/lib/virustotal_api/group.rb +0 -8
- data/lib/virustotal_api/ip.rb +0 -6
- data/lib/virustotal_api/url.rb +0 -8
- data/lib/virustotal_api/user.rb +0 -8
- data/lib/virustotal_api/version.rb +1 -1
- data/test/analysis_test.rb +4 -1
- data/test/base_test.rb +16 -0
- data/test/domain_test.rb +3 -8
- data/test/file_test.rb +31 -29
- data/test/fixtures/domain_bad_request.yml +52 -0
- data/test/fixtures/file_upload.yml +1 -1
- data/test/fixtures/large_file_upload.yml +99 -0
- data/test/fixtures/url_encoding_find.yml +651 -0
- data/test/group_test.rb +2 -7
- data/test/ip_test.rb +2 -0
- data/test/url_test.rb +7 -25
- data/test/user_test.rb +2 -7
- metadata +11 -3
- data/.github/ISSUE_TEMPLATE.md +0 -15
@@ -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
|