Skip to content

Instantly share code, notes, and snippets.

@dadevel
Last active January 23, 2025 08:32
Show Gist options
  • Select an option

  • Save dadevel/4e7c7f6c3a54b3b91219d44a03cdb36d to your computer and use it in GitHub Desktop.

Select an option

Save dadevel/4e7c7f6c3a54b3b91219d44a03cdb36d to your computer and use it in GitHub Desktop.
Shodan InternetDB Recon
#!/usr/bin/env bash
set -euo pipefail
# usage: cat ./subnets.txt | mapcidr | inetdb-recon
xargs -I {} -n 1 -P 16 -r -- curl -sS https://internetdb.shodan.io/{} | \
jq -r 'select(.ip!=null)|[.ip,(.hostnames|join(",")),(.ports|join(",")),(.cpes|join(",")),(.tags|join(","))]|@tsv' | \
sort -Vu | \
column -ts $'\t'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment