CiscoTool_v1/netmiko_Api/utils/break/41break-password.sh

3 lines
406 B
Bash

#!/usr/bin/expect
spawn telnet 172.16.20.7 2009
sleep 2
send "
"
send "
"
send "flash_init
"
sleep 15
expect "MORE"
send " "
sleep 50
send "
"
send "
"
expect "switch:"
send "delete flash:config.text
"
expect "?"
send "y
"
send "
"
expect "switch:"
send "delete flash:private-config.text
"
expect "?"
send "y
"
send "
"
expect "switch:"
sleep 5
send "
"
send "
"
sleep 5
send "boot
"
sleep 5
send "boot
"