Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/expect -f
- spawn telnet 10.15.160.69 #using a test IP, later it will read IP's from a list.
- expect {
- "Login: " {
- send "ABCr"
- exp_continue
- }
- "Password: " {
- send "ABCr"
- exp_continue
- }
- "> " {
- send "passwdr"
- expect "Username: "
- send "ABCr"
- expect "Password: "
- send "ABCr"
- expect "New Password: "
- send "n3wp@ssr"
- expect "Confirm New Password: "
- send "n3wp@ssr"
- expect "> "
- send "saver"
- }
- }
- Trying 10.15.160.69...
- Connected to 10.15.160.69.
- Escape character is '^]'.
- BCM96816 Broadband Router
- Login:
- Password:
- Login incorrect. Try again.
- Login:
- Password:
- Login incorrect. Try again.
- Login:
- Password:
- Authorization failed after trying 3 times!!!.
- Login: Password:
- Login incorrect. Try again.
- Login:
- Password:
- Login incorrect. Try again.
- Login:
- Password:
- Authorization failed after trying 3 times!!!.
- Login:
- Password:
- Login incorrect. Try again.
- #!/bin/bash
- for host in $(cat ipnmap.txt);do
- echo "${host}";
- /usr/bin/expect passchange1.sh $host
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement