This commit is contained in:
2024-10-14 00:08:40 +02:00
parent dbfba56f66
commit 1462d52e13
4572 changed files with 2658864 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
#!/usr/bin/expect
set USER [lindex $argv 0]
set PASSWD [lindex $argv 1]
set SSHHOST [lindex $argv 2]
spawn ssh $SSHHOST -l $USER
expect "password"
send "$PASSWD\r"
expect "continue"
send "\r"
expect "#"
send "conf\r"
expect "#"
send "ip authorized-managers 130.35.0.77 255.255.255.255 access manager\r"
expect "#"
send "ip authorized-managers 130.35.0.84 255.255.255.255 access manager\r"
expect "#"
send "ip authorized-managers 130.35.0.92 255.255.255.255 access manager\r"
expect "#"
send "ip authorized-managers 130.35.0.205 255.255.255.255 access manager\r"
expect "#"
send "ip authorized-managers 10.10.12.32 255.255.255.240 access manager\r"
expect "#"
send "wr mem"
expect "#"
send "logout\r"
expect "log out"
send "y\r"
expect eof
exit