Created
September 8, 2016 18:57
-
-
Save micw/c88c4ab064870d1f67b6f0dafeddb535 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/expect | |
| set timeout 20 | |
| spawn telnet 192.168.1.250 | |
| expect "Login:" | |
| send "!!Huawei\n" | |
| expect "Password:" | |
| send "@HuaweiHgw\n" | |
| expect "ATP>" | |
| send "sh\n" | |
| expect "$ " | |
| send "su\n" | |
| expect "# " | |
| send "route del -net 169.0.0.0/8\n" | |
| expect "# " | |
| send "exit\n" | |
| expect "$ " | |
| send "exit\n" | |
| expect "ATP>" | |
| send "exit\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment