File size: 281 Bytes
bb5c8b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/expect -f

set timeout -1

set username yuxing.chen@unitn.it
set password cyx21301
#set OTP [lindex $argv 2]

spawn ./openconnect --protocol=gp gp-vpn.icts.unitn.it --user=$username

expect "Password:*"
send -- "$password\r"

#expect "*OTP:*"
#send -- $OTP\r"
expect eof