Skip to content

Instantly share code, notes, and snippets.

@micw
Created September 8, 2016 18:57
Show Gist options
  • Select an option

  • Save micw/c88c4ab064870d1f67b6f0dafeddb535 to your computer and use it in GitHub Desktop.

Select an option

Save micw/c88c4ab064870d1f67b6f0dafeddb535 to your computer and use it in GitHub Desktop.
#!/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