shodan 0.6.0 → 0.6.1

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.
Files changed (3) hide show
  1. data/lib/shodan/api.rb +26 -0
  2. data/lib/shodan/version.rb +1 -1
  3. metadata +4 -4
@@ -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,
@@ -1,3 +1,3 @@
1
1
  module Shodan
2
- Version = VERSION = '0.6.0'
2
+ Version = VERSION = '0.6.1'
3
3
  end
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: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
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-23 00:00:00 -07:00
18
+ date: 2012-08-26 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency