virustotalx 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +49 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +67 -0
- data/LICENSE +21 -0
- data/README.md +73 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/virustotal.rb +18 -0
- data/lib/virustotal/api.rb +21 -0
- data/lib/virustotal/clients/base.rb +98 -0
- data/lib/virustotal/clients/domain.rb +11 -0
- data/lib/virustotal/clients/file.rb +47 -0
- data/lib/virustotal/clients/ip_address.rb +11 -0
- data/lib/virustotal/clients/url.rb +16 -0
- data/lib/virustotal/errors.rb +6 -0
- data/lib/virustotal/version.rb +5 -0
- data/lib/virustotalx.rb +3 -0
- data/virustotalx.gemspec +33 -0
- metadata +148 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 81764924df363de73f62d4368dc94e147e127191600079c6469c3395d15b54fa
|
|
4
|
+
data.tar.gz: 9afc5ef8eaecf1dbfec5db769e744cfaa605f185b04449a5443fa74acf5014ff
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c8ae7d801c06e49e166a8fce75a637dee7bef7d985758f5d01ecd0ebbcd515850c12961f13554f6caf0372b5f236acaa9651a5d359cd5174bfecba79814a777e
|
|
7
|
+
data.tar.gz: 7c5866ffd1eed670f9e0da74db74446b18e648f12497c6cdb08c5b8fac1ff260e7a04cb7c5d3f7f10a1878295227b7f523683cd5df90b88c17cddd04dd06b989
|
data/.gitignore
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
/.config
|
|
4
|
+
/coverage/
|
|
5
|
+
/InstalledFiles
|
|
6
|
+
/pkg/
|
|
7
|
+
/spec/reports/
|
|
8
|
+
/spec/examples.txt
|
|
9
|
+
/test/tmp/
|
|
10
|
+
/test/version_tmp/
|
|
11
|
+
/tmp/
|
|
12
|
+
|
|
13
|
+
# Used by dotenv library to load environment variables.
|
|
14
|
+
.env
|
|
15
|
+
|
|
16
|
+
## Specific to RubyMotion:
|
|
17
|
+
.dat*
|
|
18
|
+
.repl_history
|
|
19
|
+
build/
|
|
20
|
+
*.bridgesupport
|
|
21
|
+
build-iPhoneOS/
|
|
22
|
+
build-iPhoneSimulator/
|
|
23
|
+
|
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
|
25
|
+
#
|
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
|
29
|
+
#
|
|
30
|
+
# vendor/Pods/
|
|
31
|
+
|
|
32
|
+
## Documentation cache and generated files:
|
|
33
|
+
/.yardoc/
|
|
34
|
+
/_yardoc/
|
|
35
|
+
/doc/
|
|
36
|
+
/rdoc/
|
|
37
|
+
|
|
38
|
+
## Environment normalization:
|
|
39
|
+
/.bundle/
|
|
40
|
+
/vendor/bundle
|
|
41
|
+
/lib/bundler/man/
|
|
42
|
+
|
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
45
|
+
|
|
46
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
47
|
+
.rvmrc
|
|
48
|
+
|
|
49
|
+
.rspec_status
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
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
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Manabu Niseki
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# virustotalx
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/ninoseki/virustotalx)
|
|
4
|
+
[](https://coveralls.io/github/ninoseki/virustotalx?branch=master)
|
|
5
|
+
|
|
6
|
+
Yet another VirusTotal API wrapper for Ruby
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
gem install virustotalx
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require "virustotalx"
|
|
18
|
+
# or
|
|
19
|
+
require "virustotal"
|
|
20
|
+
|
|
21
|
+
# when given nothing, it tries to load your API key from ENV["VIRUSTOTASL_API_KEY"]
|
|
22
|
+
api = VirusTotal::API.new
|
|
23
|
+
# or you can set it manually
|
|
24
|
+
api = VirusTotal::API.new(key: "YOUR_API_KEY")
|
|
25
|
+
|
|
26
|
+
hash = "726a2eedb9df3d63ec1b4a7d774a799901f1a2b9"
|
|
27
|
+
api.file.report(hash)
|
|
28
|
+
api.file.scan("PAHT_TO_FILE")
|
|
29
|
+
api.file.rescan(hash)
|
|
30
|
+
api.file.upload_url
|
|
31
|
+
api.file.download(hash)
|
|
32
|
+
api.file.behaviour(hash)
|
|
33
|
+
api.file.network_traffic(hash)
|
|
34
|
+
api.file.clusters("DATETIME")
|
|
35
|
+
api.file.search("resource:#{hash}")
|
|
36
|
+
|
|
37
|
+
api.url.report("http://github.com")
|
|
38
|
+
api.url.scan("https://github.com/ninoseki/virustotalx")
|
|
39
|
+
|
|
40
|
+
api.domain.report("github.com")
|
|
41
|
+
|
|
42
|
+
api.ip_address.report("1.1.1.1")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
See `/spec/clients` for more.
|
|
46
|
+
|
|
47
|
+
## Supported API endpoints
|
|
48
|
+
|
|
49
|
+
* [VirusTotal API reference](https://developers.virustotal.com/reference)
|
|
50
|
+
|
|
51
|
+
| HTTP Method | URL | Public / Private | API method |
|
|
52
|
+
|-------------|-----------------------|------------------|-----------------------------------------------------------|
|
|
53
|
+
| GET | /file/report | Public | `VirusTotal::Client::File#report(resource, allinfo: nil)` |
|
|
54
|
+
| POST | /file/scan | Public | `VirusTotal::Client::File#scan(path)` |
|
|
55
|
+
| GET | /file/scan/upload_url | Private | `VirusTotal::Client::File#upload_url` |
|
|
56
|
+
| POST | /file/rescan | Public | `VirusTotal::Client::File#rescan(resource)` |
|
|
57
|
+
| GET | /file/download | Private | `VirusTotal::Client::File#download(hash)` |
|
|
58
|
+
| GET | /file/behaviour | Private | `VirusTotal::Client::File#behaviour(hash)` |
|
|
59
|
+
| GET | /file/network-traffic | Private | `VirusTotal::Client::File#network_traffic(hash)` |
|
|
60
|
+
| GET | /file/feed | Private | N/A |
|
|
61
|
+
| GET | /file/clusters | Private | `VirusTotal::Client::File#clusters(date)` |
|
|
62
|
+
| GET | /file/search | Private | `VirusTotal::Client::File#search(query, offset: nil)` |
|
|
63
|
+
| GET | /url/report | Public | `VirusTotal::Client::URL#report(resource, allinfo: nil)` |
|
|
64
|
+
| POST | /url/scan | Public | `VirusTotal::Client::URL#scan(url)` |
|
|
65
|
+
| GET | /url/feed | Private | N/A |
|
|
66
|
+
| GET | /domain/report | Public | `VirusTotal::Client::Domain#report(domain)` |
|
|
67
|
+
| GET | /ip-address/report | Public | `VirusTotal::Client::IPAddress(ip)` |
|
|
68
|
+
| GET | /comments/ | Public | N/A |
|
|
69
|
+
| POST | /comments/put | Public | N/A |
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "virustotalx"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/virustotal.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "virustotal/version"
|
|
4
|
+
|
|
5
|
+
require "virustotal/errors"
|
|
6
|
+
|
|
7
|
+
require "virustotal/api"
|
|
8
|
+
|
|
9
|
+
require "virustotal/clients/base"
|
|
10
|
+
|
|
11
|
+
require "virustotal/clients/domain"
|
|
12
|
+
require "virustotal/clients/file"
|
|
13
|
+
require "virustotal/clients/ip_address"
|
|
14
|
+
require "virustotal/clients/url"
|
|
15
|
+
|
|
16
|
+
module VirusTotal
|
|
17
|
+
class Error < StandardError; end
|
|
18
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "clients/base"
|
|
4
|
+
|
|
5
|
+
module VirusTotal
|
|
6
|
+
class API
|
|
7
|
+
attr_reader :domain
|
|
8
|
+
attr_reader :file
|
|
9
|
+
attr_reader :ip_address
|
|
10
|
+
attr_reader :url
|
|
11
|
+
|
|
12
|
+
def initialize(key: ENV["VIRUSTOTAL_API_KEY"])
|
|
13
|
+
raise ArgumentError, "No API key has been found or provided! (setup your VIRUSTOTAL_API_KEY environment varialbe)" unless key
|
|
14
|
+
|
|
15
|
+
@domain = Client::Domain.new(key: key)
|
|
16
|
+
@file = Client::File.new(key: key)
|
|
17
|
+
@ip_address = Client::IPAddress.new(key: key)
|
|
18
|
+
@url = Client::URL.new(key: key)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
require "net/https"
|
|
5
|
+
require "uri"
|
|
6
|
+
|
|
7
|
+
module VirusTotal
|
|
8
|
+
module Client
|
|
9
|
+
class Base
|
|
10
|
+
HOST = "www.virustotal.com"
|
|
11
|
+
VERSION = "v2"
|
|
12
|
+
BASE_URL = "https://#{HOST}/vtapi/#{VERSION}"
|
|
13
|
+
|
|
14
|
+
attr_reader :key
|
|
15
|
+
|
|
16
|
+
def initialize(key: ENV["VIRUSTOTAL_API_KEY"])
|
|
17
|
+
@key = key
|
|
18
|
+
raise ArgumentError, "No key has been found or provided!" unless key?
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def key?
|
|
24
|
+
!key.nil?
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def default_params
|
|
28
|
+
{ apikey: key }
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def url_for(path)
|
|
32
|
+
URI(BASE_URL + path)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def https_options
|
|
36
|
+
if proxy = ENV["HTTPS_PROXY"] || ENV["https_proxy"]
|
|
37
|
+
uri = URI(proxy)
|
|
38
|
+
{
|
|
39
|
+
proxy_address: uri.hostname,
|
|
40
|
+
proxy_port: uri.port,
|
|
41
|
+
proxy_from_env: false,
|
|
42
|
+
use_ssl: true
|
|
43
|
+
}
|
|
44
|
+
else
|
|
45
|
+
{ use_ssl: true }
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def request(req)
|
|
50
|
+
Net::HTTP.start(HOST, 443, https_options) do |http|
|
|
51
|
+
response = http.request(req)
|
|
52
|
+
|
|
53
|
+
case response.code
|
|
54
|
+
when "200"
|
|
55
|
+
if response["Content-Type"] == "application/json"
|
|
56
|
+
yield JSON.parse(response.body)
|
|
57
|
+
else
|
|
58
|
+
yield response.body
|
|
59
|
+
end
|
|
60
|
+
when "204"
|
|
61
|
+
raise(RateLimitError, response.body)
|
|
62
|
+
when "302"
|
|
63
|
+
yield response["Location"]
|
|
64
|
+
else
|
|
65
|
+
raise(Error, "unsupported response code returned: #{response.code}")
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def get(path, params = {}, &block)
|
|
71
|
+
uri = url_for(path)
|
|
72
|
+
uri.query = URI.encode_www_form(params.merge(default_params))
|
|
73
|
+
get = Net::HTTP::Get.new(uri)
|
|
74
|
+
|
|
75
|
+
request(get, &block)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def post(path, params = {}, &block)
|
|
79
|
+
post = Net::HTTP::Post.new(url_for(path))
|
|
80
|
+
post.set_form_data params.merge(default_params)
|
|
81
|
+
|
|
82
|
+
request(post, &block)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def post_with_file(path, file:, filename:, &block)
|
|
86
|
+
post = Net::HTTP::Post.new(url_for(path))
|
|
87
|
+
|
|
88
|
+
data = [
|
|
89
|
+
["file", file, { "filename": filename }],
|
|
90
|
+
["apikey", key]
|
|
91
|
+
]
|
|
92
|
+
post.set_form(data, "multipart/form-data")
|
|
93
|
+
|
|
94
|
+
request(post, &block)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module VirusTotal
|
|
4
|
+
module Client
|
|
5
|
+
class File < Base
|
|
6
|
+
def report(resource, allinfo: nil)
|
|
7
|
+
params = { resource: resource, allinfo: allinfo }.compact
|
|
8
|
+
post("/file/report", params) { |json| json }
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def scan(path)
|
|
12
|
+
name = ::File.basename(path)
|
|
13
|
+
data = ::File.read(path)
|
|
14
|
+
post_with_file("/file/scan", filename: name, file: data) { |json| json }
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def rescan(resource)
|
|
18
|
+
post("/file/rescan", resource: resource) { |json| json }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def upload_url
|
|
22
|
+
get("/file/scan/upload_url") { |location| location }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def download(hash)
|
|
26
|
+
get("/file/download", hash: hash) { |raw| raw }
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def behaviour(hash)
|
|
30
|
+
get("/file/behaviour", hash: hash) { |json| json }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def network_traffic(hash)
|
|
34
|
+
get("/file/network-traffic", hash: hash) { |json| json }
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def clusters(date)
|
|
38
|
+
get("/file/clusters", date: date) { |json| json }
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def search(query, offset: nil)
|
|
42
|
+
params = { query: query, offset: offset }.compact
|
|
43
|
+
get("/file/search", params) { |json| json }
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module VirusTotal
|
|
4
|
+
module Client
|
|
5
|
+
class URL < Base
|
|
6
|
+
def report(resource, allinfo: nil)
|
|
7
|
+
params = { resource: resource, allinfo: allinfo }.compact
|
|
8
|
+
post("/url/report", params) { |json| json }
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def scan(url)
|
|
12
|
+
post("/url/scan", url: url) { |json| json }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/virustotalx.rb
ADDED
data/virustotalx.gemspec
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require "virustotal/version"
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = "virustotalx"
|
|
9
|
+
spec.version = VirusTotal::VERSION
|
|
10
|
+
spec.authors = ["Manabu Niseki"]
|
|
11
|
+
spec.email = ["manabu.niseki@gmail.com"]
|
|
12
|
+
|
|
13
|
+
spec.summary = "Yet another VirusTotal API wrapper for Ruby"
|
|
14
|
+
spec.description = "Yet another VirusTotal API wrapper for Ruby"
|
|
15
|
+
spec.homepage = "https://github.com/ninoseki/virustotalx"
|
|
16
|
+
spec.license = "MIT"
|
|
17
|
+
|
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
22
|
+
end
|
|
23
|
+
spec.bindir = "exe"
|
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
25
|
+
spec.require_paths = ["lib"]
|
|
26
|
+
|
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
|
28
|
+
spec.add_development_dependency "coveralls", "~> 0.8"
|
|
29
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.8"
|
|
31
|
+
spec.add_development_dependency "vcr", "~> 4.0"
|
|
32
|
+
spec.add_development_dependency "webmock", "~> 3.5"
|
|
33
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: virustotalx
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Manabu Niseki
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '2.0'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '2.0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: coveralls
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0.8'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0.8'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '12.3'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '12.3'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '3.8'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '3.8'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: vcr
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '4.0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '4.0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: webmock
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '3.5'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '3.5'
|
|
97
|
+
description: Yet another VirusTotal API wrapper for Ruby
|
|
98
|
+
email:
|
|
99
|
+
- manabu.niseki@gmail.com
|
|
100
|
+
executables: []
|
|
101
|
+
extensions: []
|
|
102
|
+
extra_rdoc_files: []
|
|
103
|
+
files:
|
|
104
|
+
- ".gitignore"
|
|
105
|
+
- ".rspec"
|
|
106
|
+
- ".travis.yml"
|
|
107
|
+
- Gemfile
|
|
108
|
+
- Gemfile.lock
|
|
109
|
+
- LICENSE
|
|
110
|
+
- README.md
|
|
111
|
+
- Rakefile
|
|
112
|
+
- bin/console
|
|
113
|
+
- bin/setup
|
|
114
|
+
- lib/virustotal.rb
|
|
115
|
+
- lib/virustotal/api.rb
|
|
116
|
+
- lib/virustotal/clients/base.rb
|
|
117
|
+
- lib/virustotal/clients/domain.rb
|
|
118
|
+
- lib/virustotal/clients/file.rb
|
|
119
|
+
- lib/virustotal/clients/ip_address.rb
|
|
120
|
+
- lib/virustotal/clients/url.rb
|
|
121
|
+
- lib/virustotal/errors.rb
|
|
122
|
+
- lib/virustotal/version.rb
|
|
123
|
+
- lib/virustotalx.rb
|
|
124
|
+
- virustotalx.gemspec
|
|
125
|
+
homepage: https://github.com/ninoseki/virustotalx
|
|
126
|
+
licenses:
|
|
127
|
+
- MIT
|
|
128
|
+
metadata: {}
|
|
129
|
+
post_install_message:
|
|
130
|
+
rdoc_options: []
|
|
131
|
+
require_paths:
|
|
132
|
+
- lib
|
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - ">="
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '0'
|
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
|
+
requirements:
|
|
140
|
+
- - ">="
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: '0'
|
|
143
|
+
requirements: []
|
|
144
|
+
rubygems_version: 3.0.2
|
|
145
|
+
signing_key:
|
|
146
|
+
specification_version: 4
|
|
147
|
+
summary: Yet another VirusTotal API wrapper for Ruby
|
|
148
|
+
test_files: []
|