@cyberok-org/shodan
The JavaScript client for Shodan
Highlights
- TypeScript support.
- ESM modules only.
- Node.js >=14 support.
Install
$ yarn add @cyberok-org/shodan
# or
$ npm install @cyberok-org/shodan
Usage
The wrapper supports following filters:
- asn – filter search by asn.
- hostname – filter search by hostname.
- ip – filter search by ip.
- org –filter search by organization.
import Shodan, { ShodanQuery } from '@cyberok-org/shodan'
const client = new Shodan('API_KEY')
// ASN
const result = await client.search(ShodanQuery.asn('ASN_NAME'))
// Country
const result = await client.search(ShodanQuery.country('country'))
// Hostname
const result = await client.search(ShodanQuery.hostname('HOST'))
// IP
const result = await client.search(ShodanQuery.ip('IP'))
// Organization
const result = await client.search(ShodanQuery.org('ORGANIZATION_STRING'))