This commit is contained in:
illustris
2021-03-05 07:02:38 +05:30
commit 6c559efe66
8 changed files with 372 additions and 0 deletions

15
scripts/vpnpass Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env expect
set conf [lindex $argv 0];
set user [lindex $argv 1];
set pass_pw [lindex $argv 2];
set pass_otp [lindex $argv 3];
spawn sudo openvpn --config $conf
expect "Enter Auth Username:"
send "$user\n"
expect "Enter Auth Password:"
set pw [exec pass "$pass_pw"]
send "$pw\n"
expect "Enter Google Authenticator Code"
set otp [exec pass otp "$pass_otp"]
send "$otp\n"
interact