Spaces:
Build error
Build error
Update aberconnect.sh
Browse files- aberconnect.sh +27 -12
aberconnect.sh
CHANGED
@@ -1,12 +1,27 @@
|
|
1 |
-
#!/bin/
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/expect -f
|
2 |
+
|
3 |
+
set timeout -1
|
4 |
+
|
5 |
+
set username yuxing.chen@unitn.it
|
6 |
+
set password cyx521301
|
7 |
+
|
8 |
+
spawn ./openconnect --protocol=gp vpn.icts.unitn.it --user=$username
|
9 |
+
|
10 |
+
expect "Password:*"
|
11 |
+
send -- "$password\r"
|
12 |
+
|
13 |
+
expect eof
|
14 |
+
|
15 |
+
|
16 |
+
##!/bin/bash
|
17 |
+
#/usr/bin/expect <<EOF
|
18 |
+
# set timeout -1
|
19 |
+
# set username yuxing.chen@unitn.it
|
20 |
+
# set password cyx521301
|
21 |
+
# spawn ./openconnect --protocol=gp vpn.icts.unitn.it --user=$username
|
22 |
+
# expect {
|
23 |
+
# "Password:*" {
|
24 |
+
# send -- "$password\r"
|
25 |
+
# }
|
26 |
+
# }
|
27 |
+
#EOF
|