Last active
November 12, 2017 10:31
-
-
Save Maysora/419c3397aa8c33d7f9027a4914bb3fa8 to your computer and use it in GitHub Desktop.
bash script to fetch ZTE F660 admin password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Simple script to fetch F660 admin password which occasionally changed by telkom | |
# | |
# OSX 10.13 (High Sierra) no longer have telnet, workaround: https://forums.developer.apple.com/thread/91472 | |
# | |
# usage: | |
# $ ./f660_pass 192.168.1.1 | |
# | |
ip=${1:-"192.168.1.1"} | |
sh << EOF | telnet $ip | awk "/admin/,/Password/" | |
sleep 0.2 | |
echo root | |
sleep 0.01 | |
echo "Zte521" | |
sleep 0.01 | |
echo "sendcmd 1 DB p UserInfo" | |
sleep 0.1 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment