shodan 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shodan/api.rb +26 -0
- data/lib/shodan/version.rb +1 -1
- metadata +4 -4
data/lib/shodan/api.rb
CHANGED
@@ -71,6 +71,32 @@ module Shodan
|
|
71
71
|
params[:q] = query
|
72
72
|
return request('search', params)
|
73
73
|
end
|
74
|
+
|
75
|
+
# Find how many results there are for a search term.
|
76
|
+
#
|
77
|
+
# Arguments:
|
78
|
+
# query - search query; same format as the website (string)
|
79
|
+
#
|
80
|
+
# Returns a hash containing the total number of search results
|
81
|
+
def count(query)
|
82
|
+
return request('count', {:q => query})
|
83
|
+
end
|
84
|
+
|
85
|
+
# Get a greater list of all cities and countries where the devices
|
86
|
+
# are located.
|
87
|
+
#
|
88
|
+
# Arguments:
|
89
|
+
# query - search query; same format as the website (string)
|
90
|
+
#
|
91
|
+
# Returns a hash containing the search results
|
92
|
+
def locations(query)
|
93
|
+
return request('locations', {:q => query})
|
94
|
+
end
|
95
|
+
|
96
|
+
# Returns information about the current API key.
|
97
|
+
def info(query)
|
98
|
+
return request('info', {})
|
99
|
+
end
|
74
100
|
end
|
75
101
|
|
76
102
|
# The DatalossDB class shouldn't be used independently,
|
data/lib/shodan/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shodan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Matherly
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-08-
|
18
|
+
date: 2012-08-26 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|