shodanx 0.1.0 → 0.2.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 +4 -4
- data/README.md +42 -0
- data/lib/shodan/clients/dns.rb +5 -0
- data/lib/shodan/version.rb +1 -1
- data/lib/shodanx.rb +3 -0
- data/shodanx.gemspec +2 -2
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acbb54a8e36c25a9ef03f0b2646e5ea145e97dea895edce638347941511ea6f1
|
4
|
+
data.tar.gz: 84fbf32c7628af6dc881d41da1ac7abef47d9cf38030ec73442816172142558f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffad336f780093a0250fe5cdbffbfdaaa8d124269a638722548f97fcf09f3b820638f5199d6b2bd2df0a1fedf569852f872531cd8fb3b73d51df8cfe7da9b5da
|
7
|
+
data.tar.gz: cff05a3cd0310e56b3fded2be33f92717332a4a041542faea42ee68b63eae0822806513e05f03d66335b10e9b29bdfb63cf454ab611f3e4407b0ad0720da8b3b
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# shodanx
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/shodanx)
|
3
4
|
[](https://travis-ci.org/ninoseki/shodanx)
|
4
5
|
[](https://coveralls.io/github/ninoseki/shodanx?branch=master)
|
5
6
|
|
@@ -31,12 +32,52 @@ api = Shodan::API.new
|
|
31
32
|
# or you can set it manually
|
32
33
|
api = Shodan::API.new(key: "YOUR_API_KEY")
|
33
34
|
|
35
|
+
# Shodan Search Methods
|
34
36
|
api.host.get_by_ip("104.25.89.97")
|
35
37
|
api.host.count("nginx")
|
36
38
|
api.host.count("nginx", facets: { country: 10 })
|
37
39
|
api.host.search("nginx")
|
38
40
|
api.host.search("ftp", port: 21, facets: { country: 10 })
|
39
41
|
api.host.tokens("nginx")
|
42
|
+
api.ports
|
43
|
+
|
44
|
+
# Shodan On-Demand Scanning
|
45
|
+
api.protocols
|
46
|
+
api.scan.crawl("1.1.1.1")
|
47
|
+
api.scan.get_by_id("SCAN_ID")
|
48
|
+
|
49
|
+
# Shodan Network Alerts
|
50
|
+
api.alert.get_by_id("ALERT_ID")
|
51
|
+
api.alert.info
|
52
|
+
api.alert.triggers
|
53
|
+
api.alert.create(name: "Test alert", ip: "198.20.88.0/24")
|
54
|
+
api.alert.delete_by_id("ALERT_ID")
|
55
|
+
|
56
|
+
# Shodan Directory Methods
|
57
|
+
api.query.list
|
58
|
+
api.query.search("nginx")
|
59
|
+
api.query.tags
|
60
|
+
|
61
|
+
# Account Methods
|
62
|
+
api.account.profile
|
63
|
+
|
64
|
+
# DNS Methods
|
65
|
+
api.dns.resolve("google.com")
|
66
|
+
api.dns.reverse("1.1.1.1")
|
67
|
+
|
68
|
+
# Utility Methods
|
69
|
+
api.tools.http_headers
|
70
|
+
api.tools.my_ip
|
71
|
+
|
72
|
+
# API Status Methods
|
73
|
+
api.info
|
74
|
+
|
75
|
+
# Experimental Methods
|
76
|
+
api.labs.honeyscore("1.1.1.1")
|
77
|
+
|
78
|
+
# Shodan Exploits Methods
|
79
|
+
api.exploits.search("python")
|
80
|
+
api.exploits.count("python")
|
40
81
|
```
|
41
82
|
|
42
83
|
See `/spec` for more.
|
@@ -74,6 +115,7 @@ See `/spec` for more.
|
|
74
115
|
| PUT | /org/member/{user} | N/A |
|
75
116
|
| DELETE | /org/member/{user} | N/A |
|
76
117
|
| GET | /account/profile | `api.account.profile` |
|
118
|
+
| GET | /dns/domain/{domain} | `api.dns.domain(domain)` |
|
77
119
|
| GET | /dns/resolve | `api.dns.resolve(**hostnames)` |
|
78
120
|
| GET | /dns/reverse | `api.dns.reverse(**ips)` |
|
79
121
|
| GET | /tools/httpheaders | `api.tools.http_headers` |
|
data/lib/shodan/clients/dns.rb
CHANGED
@@ -13,6 +13,11 @@ module Shodan
|
|
13
13
|
def reverse(*ips)
|
14
14
|
get("/dns/reverse", ips: ips.join(","))
|
15
15
|
end
|
16
|
+
|
17
|
+
# Get all the subdomains and other DNS entries for the given domain. Uses 1 query credit per lookup.
|
18
|
+
def domain(domain)
|
19
|
+
get("/dns/domain/#{domain}")
|
20
|
+
end
|
16
21
|
end
|
17
22
|
end
|
18
23
|
end
|
data/lib/shodan/version.rb
CHANGED
data/lib/shodanx.rb
ADDED
data/shodanx.gemspec
CHANGED
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
29
|
spec.add_development_dependency "rake", "~> 12.3"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.8"
|
31
|
-
spec.add_development_dependency "vcr", "~>
|
32
|
-
spec.add_development_dependency "webmock", "~> 3.
|
31
|
+
spec.add_development_dependency "vcr", "~> 5.0"
|
32
|
+
spec.add_development_dependency "webmock", "~> 3.6"
|
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.
|
4
|
+
version: 0.2.0
|
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-
|
11
|
+
date: 2019-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,28 +72,28 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '5.0'
|
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: '
|
82
|
+
version: '5.0'
|
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.6'
|
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.6'
|
97
97
|
description: Yet another Shodan API wrapper for Ruby
|
98
98
|
email:
|
99
99
|
- manabu.niseki@gmail.com
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- lib/shodan/clients/tools.rb
|
126
126
|
- lib/shodan/error.rb
|
127
127
|
- lib/shodan/version.rb
|
128
|
+
- lib/shodanx.rb
|
128
129
|
- shodanx.gemspec
|
129
130
|
homepage: https://github.com/ninoseki/shodanx
|
130
131
|
licenses:
|