shodanx 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ad39eb54469dff1d133c73c328c9bea251fac93b72617bcf39e97dc227f135c
4
- data.tar.gz: ca3d2ee2b0e6f13e9b7d010843685e7361a803cdc2426ecccf34332981ec2c0d
3
+ metadata.gz: acbb54a8e36c25a9ef03f0b2646e5ea145e97dea895edce638347941511ea6f1
4
+ data.tar.gz: 84fbf32c7628af6dc881d41da1ac7abef47d9cf38030ec73442816172142558f
5
5
  SHA512:
6
- metadata.gz: e3b0767c08a4dfbecdbe07042f2c6849c76ea824e092af5b83785a2404a80f8d09beb1212aceae3d929260c60b8d126802057c1a497f91d372feba249de65bd8
7
- data.tar.gz: c29ea5022540ee9f40707b345d616b871bfedf9514da0d9e3728d37c594a372ef34fceca2b2bba1e64b290bfb8b597dbd3baab99196f0fe68a203e7fca613aee
6
+ metadata.gz: ffad336f780093a0250fe5cdbffbfdaaa8d124269a638722548f97fcf09f3b820638f5199d6b2bd2df0a1fedf569852f872531cd8fb3b73d51df8cfe7da9b5da
7
+ data.tar.gz: cff05a3cd0310e56b3fded2be33f92717332a4a041542faea42ee68b63eae0822806513e05f03d66335b10e9b29bdfb63cf454ab611f3e4407b0ad0720da8b3b
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # shodanx
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/shodanx.svg)](https://badge.fury.io/rb/shodanx)
3
4
  [![Build Status](https://travis-ci.org/ninoseki/shodanx.svg?branch=master)](https://travis-ci.org/ninoseki/shodanx)
4
5
  [![Coverage Status](https://coveralls.io/repos/github/ninoseki/shodanx/badge.svg?branch=master)](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` |
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Shodan
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "shodan"
@@ -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", "~> 4.0"
32
- spec.add_development_dependency "webmock", "~> 3.5"
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.1.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-04-30 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
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.5'
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.5'
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: