virustotalx 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/README.md +5 -0
- data/lib/virustotal/clients/base.rb +5 -0
- data/lib/virustotal/clients/domain.rb +3 -1
- data/lib/virustotal/clients/file.rb +3 -1
- data/lib/virustotal/clients/ip_address.rb +3 -1
- data/lib/virustotal/clients/url.rb +3 -1
- data/lib/virustotal/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18dd7bc4a5890a35b197f8ce635e736dec2507a9af5405cee5289dd7b2713ea2
|
4
|
+
data.tar.gz: d4d8c7ce2a065cfc287b8f376d8a15128542a7e1ad95db3f4d0000a32a721bce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b2b3ca2a70c7861dcf9c04c8570134157bc0bda833bbac8e25cdc10378968e0cbf075bc80d8523537c1f8398e24f005dae4da7d26ca48d69ef874d1d0942b29
|
7
|
+
data.tar.gz: a6d86db493ba0045bed293681be7a7d640dbcec2c3bd795bdefd5f666b3dc7d53465b6c15d7268d82044f537c74add8a512d51449fbe06629867415029164cfc
|
data/.gitignore
CHANGED
@@ -42,6 +42,9 @@ build-iPhoneSimulator/
|
|
42
42
|
|
43
43
|
# for a library or gem, you might want to ignore these files since the code is
|
44
44
|
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
Gemfile.lock
|
46
|
+
.ruby-version
|
47
|
+
.ruby-gemset
|
45
48
|
|
46
49
|
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
47
50
|
.rvmrc
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# virustotalx
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/virustotalx.svg)](https://badge.fury.io/rb/virustotalx)
|
3
4
|
[![Build Status](https://travis-ci.org/ninoseki/virustotalx.svg?branch=master)](https://travis-ci.org/ninoseki/virustotalx)
|
4
5
|
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/virustotalx/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/virustotalx?branch=master)
|
5
6
|
|
@@ -40,6 +41,10 @@ api.url.scan("https://github.com/ninoseki/virustotalx")
|
|
40
41
|
api.domain.report("github.com")
|
41
42
|
|
42
43
|
api.ip_address.report("1.1.1.1")
|
44
|
+
|
45
|
+
# it returns nil when given a non-existing resource to #report methods
|
46
|
+
api.domain.report("a_domain_which_does_not_exist.com")
|
47
|
+
# => nil
|
43
48
|
```
|
44
49
|
|
45
50
|
See `/spec/clients` for more.
|
@@ -5,7 +5,9 @@ module VirusTotal
|
|
5
5
|
class File < Base
|
6
6
|
def report(resource, allinfo: nil)
|
7
7
|
params = { resource: resource, allinfo: allinfo }.compact
|
8
|
-
post("/file/report", params)
|
8
|
+
post("/file/report", params) do |json|
|
9
|
+
handle_response_code json
|
10
|
+
end
|
9
11
|
end
|
10
12
|
|
11
13
|
def scan(path)
|
@@ -5,7 +5,9 @@ module VirusTotal
|
|
5
5
|
class URL < Base
|
6
6
|
def report(resource, allinfo: nil)
|
7
7
|
params = { resource: resource, allinfo: allinfo }.compact
|
8
|
-
post("/url/report", params)
|
8
|
+
post("/url/report", params) do |json|
|
9
|
+
handle_response_code json
|
10
|
+
end
|
9
11
|
end
|
10
12
|
|
11
13
|
def scan(url)
|
data/lib/virustotal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virustotalx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,7 +105,6 @@ files:
|
|
105
105
|
- ".rspec"
|
106
106
|
- ".travis.yml"
|
107
107
|
- Gemfile
|
108
|
-
- Gemfile.lock
|
109
108
|
- LICENSE
|
110
109
|
- README.md
|
111
110
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
virustotalx (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
addressable (2.6.0)
|
10
|
-
public_suffix (>= 2.0.2, < 4.0)
|
11
|
-
coveralls (0.8.23)
|
12
|
-
json (>= 1.8, < 3)
|
13
|
-
simplecov (~> 0.16.1)
|
14
|
-
term-ansicolor (~> 1.3)
|
15
|
-
thor (>= 0.19.4, < 2.0)
|
16
|
-
tins (~> 1.6)
|
17
|
-
crack (0.4.3)
|
18
|
-
safe_yaml (~> 1.0.0)
|
19
|
-
diff-lcs (1.3)
|
20
|
-
docile (1.3.1)
|
21
|
-
hashdiff (0.3.9)
|
22
|
-
json (2.2.0)
|
23
|
-
public_suffix (3.0.3)
|
24
|
-
rake (12.3.2)
|
25
|
-
rspec (3.8.0)
|
26
|
-
rspec-core (~> 3.8.0)
|
27
|
-
rspec-expectations (~> 3.8.0)
|
28
|
-
rspec-mocks (~> 3.8.0)
|
29
|
-
rspec-core (3.8.0)
|
30
|
-
rspec-support (~> 3.8.0)
|
31
|
-
rspec-expectations (3.8.3)
|
32
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
-
rspec-support (~> 3.8.0)
|
34
|
-
rspec-mocks (3.8.0)
|
35
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
-
rspec-support (~> 3.8.0)
|
37
|
-
rspec-support (3.8.0)
|
38
|
-
safe_yaml (1.0.5)
|
39
|
-
simplecov (0.16.1)
|
40
|
-
docile (~> 1.1)
|
41
|
-
json (>= 1.8, < 3)
|
42
|
-
simplecov-html (~> 0.10.0)
|
43
|
-
simplecov-html (0.10.2)
|
44
|
-
term-ansicolor (1.7.1)
|
45
|
-
tins (~> 1.0)
|
46
|
-
thor (0.20.3)
|
47
|
-
tins (1.20.2)
|
48
|
-
vcr (4.0.0)
|
49
|
-
webmock (3.5.1)
|
50
|
-
addressable (>= 2.3.6)
|
51
|
-
crack (>= 0.3.2)
|
52
|
-
hashdiff
|
53
|
-
|
54
|
-
PLATFORMS
|
55
|
-
ruby
|
56
|
-
|
57
|
-
DEPENDENCIES
|
58
|
-
bundler (~> 2.0)
|
59
|
-
coveralls (~> 0.8)
|
60
|
-
rake (~> 12.3)
|
61
|
-
rspec (~> 3.8)
|
62
|
-
vcr (~> 4.0)
|
63
|
-
virustotalx!
|
64
|
-
webmock (~> 3.5)
|
65
|
-
|
66
|
-
BUNDLED WITH
|
67
|
-
2.0.1
|