Yusin commited on
Commit
b118ff5
·
1 Parent(s): a0f7f16

Update aberconnect.sh

Browse files
Files changed (1) hide show
  1. aberconnect.sh +12 -16
aberconnect.sh CHANGED
@@ -1,16 +1,12 @@
1
- #!/usr/bin/expect -f
2
-
3
- set timeout -1
4
-
5
- set username [email protected]
6
- set password cyx21301
7
- #set OTP [lindex $argv 2]
8
-
9
- spawn ./openconnect --protocol=gp gp-vpn.icts.unitn.it --user=$username
10
-
11
- expect "Password:*"
12
- send -- "$password\r"
13
-
14
- #expect "*OTP:*"
15
- #send -- $OTP\r"
16
- expect eof
 
1
+ #!/bin/bash
2
+ /usr/bin/expect <<EOF
3
+ set timeout -1
4
+ set username [email protected]
5
+ set password cyx521301
6
+ spawn ./openconnect --protocol=gp gp-vpn.icts.unitn.it --user=$username
7
+ expect {
8
+ "Password:*" {
9
+ send -- "$password\r"
10
+ }
11
+ }
12
+ EOF