Advertisement
Guest User

Untitled

a guest
Jan 29th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/bin/expect --
  2.  
  3. spawn telnet 10.6.0.250
  4.  
  5. expect "Username:"
  6. send "watchdog\r"
  7.  
  8.  
  9. expect "Password:"
  10. send "AAAAAAAAAA\r"
  11.  
  12. expect "#"
  13. send "conf t\r"
  14.  
  15. expect "(config)#"
  16. send "int eth1/0/25\r"
  17.  
  18. expect "(config-if)#"
  19. send "shutdown\r"
  20.  
  21. sleep 5
  22.  
  23. expect "(config-if)#"
  24. send "no shutdown\r"
  25.  
  26. expect "(config-if)#"
  27. send "exit\r"
  28.  
  29. expect "(config)#"
  30. send "exit\r"
  31.  
  32. expect "#"
  33. send "exit\r"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement