Author Topic: Shodan save and format IPs list script  (Read 3809 times)


  • Newbie
  • *
  • Posts: 4
    • View Profile
on: November 27, 2015, 11:15:35 AM
This script uses the Shodan API to get a list of IP addresses with their proper formatting.
It saves them in a text file which you later can run through Hydra or something.

First you need the Shodan CLI installed:

easy_install shodan

then to get an API KEY sign up to Shodan, then click here

shodan init YOUR_API_KEY

I'm only new to Linux and SH scripting so this version probably a bit buggy
but I intend to make a version which automates the cracking process
(testing for default user/passes for the methods in the above list)
if I can wrap my head around it.

Code: [Select]
echo "Welcome 2 Shodan Niqqa app"
echo ""
echo "Display search ideas? Y/N"
read ideas
if [ $ideas = y ]
echo "Search Ideas:"
echo "|[search] 200 OK|"
echo "|last-modified|"
echo "|last-modified www-authenticate (no encryption|"
echo "| Prismview Player | (Billboards) 'Their site suggests you use a Windows client to update the billboard itself, and the username/password is optional…' |"
echo "| Loxone |('Smart' House) default username/pass admin admin "
echo "| P372 | (USA Automatic Number Plate Recognition: ANPR) - telnet has no password"
echo "| PIPS Technology ALPR Processors | (Alternative to above; not as good)"
echo '| title:"xzeres wind" | (Wind Turbines; MyTurbine, m442+SRt)'
echo "| port:23 country:GB | (Dedicated Micros DVRs)"
echo '| "default 1234" (Banner heads with default creds for routers, ip cams; whatever)'
echo '| title:"Monroe Electronics | root dasdec1 / Admin dasdec'
echo "Okay,"
echo "What do you want to search for?"
read search
echo "Searching..." && shodan count $search && echo "Results found for $search"
echo "Would you like to download them to the current folder? (y) or (n)"
read download
if [ $download = y ]
echo "Okay downloading.." && set -- $search && mkdir $1 && cd $1 && shodan download $search $1 &&
shodan parse --fields ip_str,port --separator : "$1"".json.gz" | sed s'/.$//' >> $1.txt && nano $1.txt
echo "Ok not downloading"