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,599 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.virustotal.com/api/v3/urls/aHR0cDovL3d3dy5nb29nbGUuY29t
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
+ - dab996a77af21c14c565d7805d94996f
35
+ Date:
36
+ - Wed, 02 Sep 2020 14:02:34 GMT
37
+ Server:
38
+ - Google Frontend
39
+ Content-Length:
40
+ - '21528'
41
+ body:
42
+ encoding: UTF-8
43
+ string: |-
44
+ {
45
+ "data": {
46
+ "attributes": {
47
+ "categories": {
48
+ "BitDefender": "searchengines",
49
+ "Comodo Valkyrie Verdict": "mobile communications",
50
+ "Forcepoint ThreatSeeker": "search engines and portals",
51
+ "sophos": "search engines"
52
+ },
53
+ "favicon": {
54
+ "dhash": "e88e931939338ee8",
55
+ "raw_md5": "b4db2a4b6d91e0df5850a3fdcee9c8df"
56
+ },
57
+ "first_submission_date": 1275400795,
58
+ "has_content": false,
59
+ "html_meta": {
60
+ "description": [
61
+ "Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for."
62
+ ],
63
+ "robots": [
64
+ "noodp"
65
+ ]
66
+ },
67
+ "last_analysis_date": 1599054323,
68
+ "last_analysis_results": {
69
+ "ADMINUSLabs": {
70
+ "category": "harmless",
71
+ "engine_name": "ADMINUSLabs",
72
+ "method": "blacklist",
73
+ "result": "clean"
74
+ },
75
+ "AegisLab WebGuard": {
76
+ "category": "harmless",
77
+ "engine_name": "AegisLab WebGuard",
78
+ "method": "blacklist",
79
+ "result": "clean"
80
+ },
81
+ "AlienVault": {
82
+ "category": "harmless",
83
+ "engine_name": "AlienVault",
84
+ "method": "blacklist",
85
+ "result": "clean"
86
+ },
87
+ "Antiy-AVL": {
88
+ "category": "harmless",
89
+ "engine_name": "Antiy-AVL",
90
+ "method": "blacklist",
91
+ "result": "clean"
92
+ },
93
+ "Artists Against 419": {
94
+ "category": "harmless",
95
+ "engine_name": "Artists Against 419",
96
+ "method": "blacklist",
97
+ "result": "clean"
98
+ },
99
+ "AutoShun": {
100
+ "category": "undetected",
101
+ "engine_name": "AutoShun",
102
+ "method": "blacklist",
103
+ "result": "unrated"
104
+ },
105
+ "Avira": {
106
+ "category": "harmless",
107
+ "engine_name": "Avira",
108
+ "method": "blacklist",
109
+ "result": "clean"
110
+ },
111
+ "BADWARE.INFO": {
112
+ "category": "harmless",
113
+ "engine_name": "BADWARE.INFO",
114
+ "method": "blacklist",
115
+ "result": "clean"
116
+ },
117
+ "Baidu-International": {
118
+ "category": "harmless",
119
+ "engine_name": "Baidu-International",
120
+ "method": "blacklist",
121
+ "result": "clean"
122
+ },
123
+ "BitDefender": {
124
+ "category": "harmless",
125
+ "engine_name": "BitDefender",
126
+ "method": "blacklist",
127
+ "result": "clean"
128
+ },
129
+ "BlockList": {
130
+ "category": "harmless",
131
+ "engine_name": "BlockList",
132
+ "method": "blacklist",
133
+ "result": "clean"
134
+ },
135
+ "Blueliv": {
136
+ "category": "harmless",
137
+ "engine_name": "Blueliv",
138
+ "method": "blacklist",
139
+ "result": "clean"
140
+ },
141
+ "CINS Army": {
142
+ "category": "harmless",
143
+ "engine_name": "CINS Army",
144
+ "method": "blacklist",
145
+ "result": "clean"
146
+ },
147
+ "CLEAN MX": {
148
+ "category": "harmless",
149
+ "engine_name": "CLEAN MX",
150
+ "method": "blacklist",
151
+ "result": "clean"
152
+ },
153
+ "CRDF": {
154
+ "category": "harmless",
155
+ "engine_name": "CRDF",
156
+ "method": "blacklist",
157
+ "result": "clean"
158
+ },
159
+ "Certego": {
160
+ "category": "harmless",
161
+ "engine_name": "Certego",
162
+ "method": "blacklist",
163
+ "result": "clean"
164
+ },
165
+ "Comodo Valkyrie Verdict": {
166
+ "category": "harmless",
167
+ "engine_name": "Comodo Valkyrie Verdict",
168
+ "method": "blacklist",
169
+ "result": "clean"
170
+ },
171
+ "CyRadar": {
172
+ "category": "harmless",
173
+ "engine_name": "CyRadar",
174
+ "method": "blacklist",
175
+ "result": "clean"
176
+ },
177
+ "Cyan": {
178
+ "category": "undetected",
179
+ "engine_name": "Cyan",
180
+ "method": "blacklist",
181
+ "result": "unrated"
182
+ },
183
+ "CyberCrime": {
184
+ "category": "harmless",
185
+ "engine_name": "CyberCrime",
186
+ "method": "blacklist",
187
+ "result": "clean"
188
+ },
189
+ "Cyren": {
190
+ "category": "harmless",
191
+ "engine_name": "Cyren",
192
+ "method": "blacklist",
193
+ "result": "clean"
194
+ },
195
+ "DNS8": {
196
+ "category": "harmless",
197
+ "engine_name": "DNS8",
198
+ "method": "blacklist",
199
+ "result": "clean"
200
+ },
201
+ "Dr.Web": {
202
+ "category": "harmless",
203
+ "engine_name": "Dr.Web",
204
+ "method": "blacklist",
205
+ "result": "clean"
206
+ },
207
+ "ESET": {
208
+ "category": "harmless",
209
+ "engine_name": "ESET",
210
+ "method": "blacklist",
211
+ "result": "clean"
212
+ },
213
+ "EmergingThreats": {
214
+ "category": "harmless",
215
+ "engine_name": "EmergingThreats",
216
+ "method": "blacklist",
217
+ "result": "clean"
218
+ },
219
+ "Emsisoft": {
220
+ "category": "harmless",
221
+ "engine_name": "Emsisoft",
222
+ "method": "blacklist",
223
+ "result": "clean"
224
+ },
225
+ "EonScope": {
226
+ "category": "harmless",
227
+ "engine_name": "EonScope",
228
+ "method": "blacklist",
229
+ "result": "clean"
230
+ },
231
+ "Feodo Tracker": {
232
+ "category": "harmless",
233
+ "engine_name": "Feodo Tracker",
234
+ "method": "blacklist",
235
+ "result": "clean"
236
+ },
237
+ "Forcepoint ThreatSeeker": {
238
+ "category": "harmless",
239
+ "engine_name": "Forcepoint ThreatSeeker",
240
+ "method": "blacklist",
241
+ "result": "clean"
242
+ },
243
+ "Fortinet": {
244
+ "category": "harmless",
245
+ "engine_name": "Fortinet",
246
+ "method": "blacklist",
247
+ "result": "clean"
248
+ },
249
+ "FraudScore": {
250
+ "category": "harmless",
251
+ "engine_name": "FraudScore",
252
+ "method": "blacklist",
253
+ "result": "clean"
254
+ },
255
+ "G-Data": {
256
+ "category": "harmless",
257
+ "engine_name": "G-Data",
258
+ "method": "blacklist",
259
+ "result": "clean"
260
+ },
261
+ "Google Safebrowsing": {
262
+ "category": "harmless",
263
+ "engine_name": "Google Safebrowsing",
264
+ "method": "blacklist",
265
+ "result": "clean"
266
+ },
267
+ "GreenSnow": {
268
+ "category": "harmless",
269
+ "engine_name": "GreenSnow",
270
+ "method": "blacklist",
271
+ "result": "clean"
272
+ },
273
+ "Hoplite Industries": {
274
+ "category": "harmless",
275
+ "engine_name": "Hoplite Industries",
276
+ "method": "blacklist",
277
+ "result": "clean"
278
+ },
279
+ "IPsum": {
280
+ "category": "harmless",
281
+ "engine_name": "IPsum",
282
+ "method": "blacklist",
283
+ "result": "clean"
284
+ },
285
+ "K7AntiVirus": {
286
+ "category": "harmless",
287
+ "engine_name": "K7AntiVirus",
288
+ "method": "blacklist",
289
+ "result": "clean"
290
+ },
291
+ "Kaspersky": {
292
+ "category": "harmless",
293
+ "engine_name": "Kaspersky",
294
+ "method": "blacklist",
295
+ "result": "clean"
296
+ },
297
+ "Lumu": {
298
+ "category": "undetected",
299
+ "engine_name": "Lumu",
300
+ "method": "blacklist",
301
+ "result": "unrated"
302
+ },
303
+ "MalSilo": {
304
+ "category": "harmless",
305
+ "engine_name": "MalSilo",
306
+ "method": "blacklist",
307
+ "result": "clean"
308
+ },
309
+ "Malware Domain Blocklist": {
310
+ "category": "harmless",
311
+ "engine_name": "Malware Domain Blocklist",
312
+ "method": "blacklist",
313
+ "result": "clean"
314
+ },
315
+ "MalwareDomainList": {
316
+ "category": "harmless",
317
+ "engine_name": "MalwareDomainList",
318
+ "method": "blacklist",
319
+ "result": "clean"
320
+ },
321
+ "MalwarePatrol": {
322
+ "category": "harmless",
323
+ "engine_name": "MalwarePatrol",
324
+ "method": "blacklist",
325
+ "result": "clean"
326
+ },
327
+ "Malwared": {
328
+ "category": "harmless",
329
+ "engine_name": "Malwared",
330
+ "method": "blacklist",
331
+ "result": "clean"
332
+ },
333
+ "Netcraft": {
334
+ "category": "undetected",
335
+ "engine_name": "Netcraft",
336
+ "method": "blacklist",
337
+ "result": "unrated"
338
+ },
339
+ "NotMining": {
340
+ "category": "undetected",
341
+ "engine_name": "NotMining",
342
+ "method": "blacklist",
343
+ "result": "unrated"
344
+ },
345
+ "Nucleon": {
346
+ "category": "harmless",
347
+ "engine_name": "Nucleon",
348
+ "method": "blacklist",
349
+ "result": "clean"
350
+ },
351
+ "OpenPhish": {
352
+ "category": "harmless",
353
+ "engine_name": "OpenPhish",
354
+ "method": "blacklist",
355
+ "result": "clean"
356
+ },
357
+ "PREBYTES": {
358
+ "category": "harmless",
359
+ "engine_name": "PREBYTES",
360
+ "method": "blacklist",
361
+ "result": "clean"
362
+ },
363
+ "PhishLabs": {
364
+ "category": "undetected",
365
+ "engine_name": "PhishLabs",
366
+ "method": "blacklist",
367
+ "result": "unrated"
368
+ },
369
+ "Phishing Database": {
370
+ "category": "harmless",
371
+ "engine_name": "Phishing Database",
372
+ "method": "blacklist",
373
+ "result": "clean"
374
+ },
375
+ "Phishtank": {
376
+ "category": "harmless",
377
+ "engine_name": "Phishtank",
378
+ "method": "blacklist",
379
+ "result": "clean"
380
+ },
381
+ "Quick Heal": {
382
+ "category": "harmless",
383
+ "engine_name": "Quick Heal",
384
+ "method": "blacklist",
385
+ "result": "clean"
386
+ },
387
+ "Quttera": {
388
+ "category": "harmless",
389
+ "engine_name": "Quttera",
390
+ "method": "blacklist",
391
+ "result": "clean"
392
+ },
393
+ "Rising": {
394
+ "category": "harmless",
395
+ "engine_name": "Rising",
396
+ "method": "blacklist",
397
+ "result": "clean"
398
+ },
399
+ "SCUMWARE.org": {
400
+ "category": "harmless",
401
+ "engine_name": "SCUMWARE.org",
402
+ "method": "blacklist",
403
+ "result": "clean"
404
+ },
405
+ "Sangfor": {
406
+ "category": "harmless",
407
+ "engine_name": "Sangfor",
408
+ "method": "blacklist",
409
+ "result": "clean"
410
+ },
411
+ "SecureBrain": {
412
+ "category": "harmless",
413
+ "engine_name": "SecureBrain",
414
+ "method": "blacklist",
415
+ "result": "clean"
416
+ },
417
+ "Snort IP sample list": {
418
+ "category": "harmless",
419
+ "engine_name": "Snort IP sample list",
420
+ "method": "blacklist",
421
+ "result": "clean"
422
+ },
423
+ "Sophos": {
424
+ "category": "harmless",
425
+ "engine_name": "Sophos",
426
+ "method": "blacklist",
427
+ "result": "clean"
428
+ },
429
+ "Spam404": {
430
+ "category": "harmless",
431
+ "engine_name": "Spam404",
432
+ "method": "blacklist",
433
+ "result": "clean"
434
+ },
435
+ "Spamhaus": {
436
+ "category": "harmless",
437
+ "engine_name": "Spamhaus",
438
+ "method": "blacklist",
439
+ "result": "clean"
440
+ },
441
+ "StopBadware": {
442
+ "category": "undetected",
443
+ "engine_name": "StopBadware",
444
+ "method": "blacklist",
445
+ "result": "unrated"
446
+ },
447
+ "StopForumSpam": {
448
+ "category": "harmless",
449
+ "engine_name": "StopForumSpam",
450
+ "method": "blacklist",
451
+ "result": "clean"
452
+ },
453
+ "Sucuri SiteCheck": {
454
+ "category": "harmless",
455
+ "engine_name": "Sucuri SiteCheck",
456
+ "method": "blacklist",
457
+ "result": "clean"
458
+ },
459
+ "Tencent": {
460
+ "category": "harmless",
461
+ "engine_name": "Tencent",
462
+ "method": "blacklist",
463
+ "result": "clean"
464
+ },
465
+ "ThreatHive": {
466
+ "category": "harmless",
467
+ "engine_name": "ThreatHive",
468
+ "method": "blacklist",
469
+ "result": "clean"
470
+ },
471
+ "Threatsourcing": {
472
+ "category": "harmless",
473
+ "engine_name": "Threatsourcing",
474
+ "method": "blacklist",
475
+ "result": "clean"
476
+ },
477
+ "Trustwave": {
478
+ "category": "harmless",
479
+ "engine_name": "Trustwave",
480
+ "method": "blacklist",
481
+ "result": "clean"
482
+ },
483
+ "URLhaus": {
484
+ "category": "harmless",
485
+ "engine_name": "URLhaus",
486
+ "method": "blacklist",
487
+ "result": "clean"
488
+ },
489
+ "VX Vault": {
490
+ "category": "harmless",
491
+ "engine_name": "VX Vault",
492
+ "method": "blacklist",
493
+ "result": "clean"
494
+ },
495
+ "Virusdie External Site Scan": {
496
+ "category": "harmless",
497
+ "engine_name": "Virusdie External Site Scan",
498
+ "method": "blacklist",
499
+ "result": "clean"
500
+ },
501
+ "Web Security Guard": {
502
+ "category": "harmless",
503
+ "engine_name": "Web Security Guard",
504
+ "method": "blacklist",
505
+ "result": "clean"
506
+ },
507
+ "Yandex Safebrowsing": {
508
+ "category": "harmless",
509
+ "engine_name": "Yandex Safebrowsing",
510
+ "method": "blacklist",
511
+ "result": "clean"
512
+ },
513
+ "ZeroCERT": {
514
+ "category": "harmless",
515
+ "engine_name": "ZeroCERT",
516
+ "method": "blacklist",
517
+ "result": "clean"
518
+ },
519
+ "desenmascara.me": {
520
+ "category": "harmless",
521
+ "engine_name": "desenmascara.me",
522
+ "method": "blacklist",
523
+ "result": "clean"
524
+ },
525
+ "malwares.com URL checker": {
526
+ "category": "harmless",
527
+ "engine_name": "malwares.com URL checker",
528
+ "method": "blacklist",
529
+ "result": "clean"
530
+ },
531
+ "securolytics": {
532
+ "category": "harmless",
533
+ "engine_name": "securolytics",
534
+ "method": "blacklist",
535
+ "result": "clean"
536
+ },
537
+ "zvelo": {
538
+ "category": "harmless",
539
+ "engine_name": "zvelo",
540
+ "method": "blacklist",
541
+ "result": "clean"
542
+ }
543
+ },
544
+ "last_analysis_stats": {
545
+ "harmless": 72,
546
+ "malicious": 0,
547
+ "suspicious": 0,
548
+ "timeout": 0,
549
+ "undetected": 7
550
+ },
551
+ "last_final_url": "http://www.google.com/",
552
+ "last_http_response_code": 200,
553
+ "last_http_response_content_length": 39099,
554
+ "last_http_response_content_sha256": "58cdac7f674d6e5206cbe5efab47aba8cc026a78d07cafc4626df62426d96961",
555
+ "last_http_response_cookies": {
556
+ "1P_JAR": "2020-09-02-13",
557
+ "NID": "204=AxrlJe3WPdVNSLQT5tFNqsKLAwcqAl3aR_00h2Tbta4nVqnwshE4IHrx5-T9_UnoZsD49A02zs-ZYWOXkxfcH47WP53T5sU9k5nq_KzpCI3dIX036BYQnrG2Tw1BHBR3V1OOijJ8gdK_GLRIGXync7gPfmJafBqB36L-EI4fL-Q"
558
+ },
559
+ "last_http_response_headers": {
560
+ "cache-control": "private, max-age=0",
561
+ "content-length": "39099",
562
+ "content-type": "text/html; charset=UTF-8",
563
+ "date": "Wed, 02 Sep 2020 13:45:23 GMT",
564
+ "expires": "-1",
565
+ "p3p": "CP=\"This is not a P3P policy! See g.co/p3phelp for more info.\"",
566
+ "server": "gws",
567
+ "set-cookie": "1P_JAR=2020-09-02-13; expires=Fri, 02-Oct-2020 13:45:23 GMT; path=/; domain=.google.com; Secure, NID=204=AxrlJe3WPdVNSLQT5tFNqsKLAwcqAl3aR_00h2Tbta4nVqnwshE4IHrx5-T9_UnoZsD49A02zs-ZYWOXkxfcH47WP53T5sU9k5nq_KzpCI3dIX036BYQnrG2Tw1BHBR3V1OOijJ8gdK_GLRIGXync7gPfmJafBqB36L-EI4fL-Q; expires=Thu, 04-Mar-2021 13:45:23 GMT; path=/; domain=.google.com; HttpOnly",
568
+ "x-frame-options": "SAMEORIGIN",
569
+ "x-xss-protection": "0"
570
+ },
571
+ "last_modification_date": 1599055354,
572
+ "last_submission_date": 1599055354,
573
+ "outgoing_links": [
574
+ "http://www.youtube.com/?gl=US&tab=w1",
575
+ "http://www.blogger.com/?tab=wj"
576
+ ],
577
+ "reputation": 5725,
578
+ "tags": [],
579
+ "targeted_brand": {},
580
+ "threat_names": [],
581
+ "times_submitted": 529309,
582
+ "title": "Google",
583
+ "total_votes": {
584
+ "harmless": 13621,
585
+ "malicious": 9056
586
+ },
587
+ "trackers": {},
588
+ "url": "http://www.google.com/"
589
+ },
590
+ "id": "u-a354494a73382ea0b4bc47f4c9e8d6c578027cd4598196dc88f05a22b5817293-1599122231",
591
+ "links": {
592
+ "self": "https://www.virustotal.com/api/v3/urls/dd014af5ed6b38d9130e3f466f850e46d21b951199d53a18ef29ee9341614eaf"
593
+ },
594
+ "type": "url"
595
+ }
596
+ }
597
+ http_version:
598
+ recorded_at: Wed, 02 Sep 2020 14:02:34 GMT
599
+ recorded_with: VCR 5.0.0