goto GetPrompt
GetPrompt:
send ""
expect {
">" send "enable"
"word:" send "0000"
"config)#" goto addlist1
"config-if)#" send "exit"
"#" send "config terminal"
}
addlist1:
send "access-list 100 deny tcp host 111.111.111.111 eq 10 host 111.111.111.1"
expect {
"config)#" goto addlist2
timeout 3 exit
}
addlist2:
send "access-list 100 deny udp any 1.1.1.1 0.0.0.0"
expect {
"config)#" goto addlist3
timeout 3 exit
}