Skip to content

Commit

Permalink
support for page arg in search
Browse files Browse the repository at this point in the history
  • Loading branch information
codex committed Apr 8, 2012
1 parent 983886a commit b916c16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/main.coffee
Expand Up @@ -21,7 +21,11 @@ class Shodan
baseurl: 'http://www.shodanhq.com'

info: (cb) -> @raw 'info', null, cb
search: (query, cb) -> @raw 'search', {q: query}, cb
search: (query, page, cb) ->
if page and not cb
cb = page
page = undefined
@raw 'search', {q: query, page: page}, cb
host: (ip, cb) -> @raw 'host', {ip: ip}, cb
fingerprint: (banner, cb) -> @raw 'fingerprint', {banner: banner}, cb
locations: (query, cb) -> @raw 'locations', {q: query}, cb
Expand Down Expand Up @@ -59,4 +63,4 @@ class Shodan

download: (id, cb) -> @raw 'msf/download', {id: id}, cb

module.exports = Shodan
module.exports = Shodan
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name":"shodanapi",
"description":"Shodan API for node",
"version":"0.0.1",
"version":"0.0.2",
"homepage":"http://github.com/wearefractal/node-shodan",
"repository":"git://github.com/wearefractal/node-shodan.git",
"author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
Expand Down

0 comments on commit b916c16

Please sign in to comment.