Skip to content

Instantly share code, notes, and snippets.

@Maysora
Last active November 12, 2017 10:31
Show Gist options
  • Save Maysora/419c3397aa8c33d7f9027a4914bb3fa8 to your computer and use it in GitHub Desktop.
Save Maysora/419c3397aa8c33d7f9027a4914bb3fa8 to your computer and use it in GitHub Desktop.
bash script to fetch ZTE F660 admin password
#!/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