shodanx 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +3 -2
- data/lib/shodan/clients/alert.rb +1 -1
- data/lib/shodan/clients/exploits.rb +2 -2
- data/lib/shodan/clients/host.rb +4 -4
- data/lib/shodan/clients/query.rb +3 -3
- data/lib/shodan/version.rb +1 -1
- data/shodanx.gemspec +5 -5
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ba14c81cf406004a7a79c1cca55459e70f63abea3ce6541af7ad66cfadcf0fe
|
4
|
+
data.tar.gz: b47c6afe871a6d35bca9f7bed002733d59e357cb9ab70a3a323cec734ca1c24c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a1977923db0aeb77e06a0fcdb15de8aff3a450d6db0052fea9bc1e7bba57373b8250260f9ddf01e9ab53705a06e6f41d31d86442f7e7fc8080c4d26827b9944
|
7
|
+
data.tar.gz: 8bf423c09f1ba39154463c2cbe451abbb169f03fdc8971733f617b40bdbc7bfce3ce52f5cb48d2ff92ddce68670481e38491dfa77dcd0168bc6d4bf564b0aeba
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/shodanx.svg)](https://badge.fury.io/rb/shodanx)
|
4
4
|
[![Build Status](https://travis-ci.org/ninoseki/shodanx.svg?branch=master)](https://travis-ci.org/ninoseki/shodanx)
|
5
5
|
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/shodanx/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/shodanx?branch=master)
|
6
|
+
[![CodeFactor](https://www.codefactor.io/repository/github/ninoseki/shodanx/badge)](https://www.codefactor.io/repository/github/ninoseki/shodanx)
|
6
7
|
|
7
8
|
Yet another Shodan API wrapper for Ruby.
|
8
9
|
|
@@ -87,7 +88,7 @@ See `/spec` for more.
|
|
87
88
|
### [REST API](https://developer.shodan.io/api)
|
88
89
|
|
89
90
|
| Method | URI | API method |
|
90
|
-
|
91
|
+
| ------ | ----------------------------------------------------- | -------------------------------------------------------------------------- |
|
91
92
|
| GET | /shodan/host/{ip} | `api.host.get_by_ip(ip, **params)` |
|
92
93
|
| GET | /shodan/host/count | `api.host.count(query = "", facets: {}, **params)` |
|
93
94
|
| GET | /shodan/host/search | `api.host.search(query = "", facets: {}, page: 1, minify: true, **params)` |
|
@@ -126,7 +127,7 @@ See `/spec` for more.
|
|
126
127
|
### [Exploits API](https://developer.shodan.io/api/exploits/rest)
|
127
128
|
|
128
129
|
| Method | URI | API method |
|
129
|
-
|
130
|
+
| ------ | ------- | ---------------------------------------------------------------- |
|
130
131
|
| GET | /search | `api.exploits.search(query = "", facets: {}, page: 1, **params)` |
|
131
132
|
| GET | /count | `api.exploits.count(query = "", facets: {}, page: 1, **params)` |
|
132
133
|
|
data/lib/shodan/clients/alert.rb
CHANGED
@@ -21,7 +21,7 @@ module Shodan
|
|
21
21
|
params = turn_into_query(params)
|
22
22
|
facets = turn_into_facets(facets)
|
23
23
|
params[:page] = page
|
24
|
-
get("/search", params.merge(facets))
|
24
|
+
get("/search", **params.merge(facets))
|
25
25
|
end
|
26
26
|
|
27
27
|
# This method behaves identical to the "/search" method with
|
@@ -31,7 +31,7 @@ module Shodan
|
|
31
31
|
params = turn_into_query(params)
|
32
32
|
facets = turn_into_facets(facets)
|
33
33
|
params[:page] = page
|
34
|
-
get("/count", params.merge(facets))
|
34
|
+
get("/count", **params.merge(facets))
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/lib/shodan/clients/host.rb
CHANGED
@@ -10,7 +10,7 @@ module Shodan
|
|
10
10
|
# @option params [Hash]
|
11
11
|
# @return [Hash]
|
12
12
|
def get_by_ip(ip, **params)
|
13
|
-
get("/shodan/host/#{ip}", params)
|
13
|
+
get("/shodan/host/#{ip}", **params)
|
14
14
|
end
|
15
15
|
|
16
16
|
# This method behaves identical to "/shodan/host/search" with the only
|
@@ -22,7 +22,7 @@ module Shodan
|
|
22
22
|
params[:query] = query
|
23
23
|
converted_params = turn_into_query(params)
|
24
24
|
facets = turn_into_facets(facets)
|
25
|
-
get("/shodan/host/count", converted_params.merge(facets))
|
25
|
+
get("/shodan/host/count", **converted_params.merge(facets))
|
26
26
|
end
|
27
27
|
|
28
28
|
# Search Shodan using the same query syntax as the website and use facets
|
@@ -33,7 +33,7 @@ module Shodan
|
|
33
33
|
facets = turn_into_facets(facets)
|
34
34
|
params[:page] = page
|
35
35
|
params[:minify] = minify
|
36
|
-
get("/shodan/host/search", params.merge(facets))
|
36
|
+
get("/shodan/host/search", **params.merge(facets))
|
37
37
|
end
|
38
38
|
|
39
39
|
# This method lets you determine which filters are being used by
|
@@ -41,7 +41,7 @@ module Shodan
|
|
41
41
|
def tokens(query = "", **params)
|
42
42
|
params[:query] = query
|
43
43
|
params = turn_into_query(params)
|
44
|
-
get("/shodan/host/search/tokens", params)
|
44
|
+
get("/shodan/host/search/tokens", **params)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
data/lib/shodan/clients/query.rb
CHANGED
@@ -7,21 +7,21 @@ module Shodan
|
|
7
7
|
class Query < Base
|
8
8
|
# Use this method to obtain a list of search queries that users have saved in Shodan.
|
9
9
|
def list(**params)
|
10
|
-
get("/shodan/query", params)
|
10
|
+
get("/shodan/query", **params)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Use this method to search the directory of search queries that users have saved in Shodan.
|
14
14
|
def search(query, **params)
|
15
15
|
params[:query] = query
|
16
16
|
params = turn_into_query(params)
|
17
|
-
get("/shodan/query/search", params)
|
17
|
+
get("/shodan/query/search", **params)
|
18
18
|
end
|
19
19
|
|
20
20
|
# Use this method to obtain a list of popular tags for the saved search queries in Shodan.
|
21
21
|
def tags(size = 10)
|
22
22
|
params = {}
|
23
23
|
params[:size] = size
|
24
|
-
get("/shodan/query/tags", params)
|
24
|
+
get("/shodan/query/tags", **params)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/lib/shodan/version.rb
CHANGED
data/shodanx.gemspec
CHANGED
@@ -24,10 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.add_development_dependency "bundler", "~> 2.
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
28
28
|
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
|
-
spec.add_development_dependency "rake", "~>
|
30
|
-
spec.add_development_dependency "rspec", "~> 3.
|
31
|
-
spec.add_development_dependency "vcr", "~> 5.
|
32
|
-
spec.add_development_dependency "webmock", "~> 3.
|
29
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.9"
|
31
|
+
spec.add_development_dependency "vcr", "~> 5.1"
|
32
|
+
spec.add_development_dependency "webmock", "~> 3.8"
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shodanx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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:
|
11
|
+
date: 2020-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,56 +44,56 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.9'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '5.
|
75
|
+
version: '5.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '5.
|
82
|
+
version: '5.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: webmock
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.8'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.8'
|
97
97
|
description: Yet another Shodan API wrapper for Ruby
|
98
98
|
email:
|
99
99
|
- manabu.niseki@gmail.com
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.1.2
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Yet another Shodan API wrapper for Ruby
|