Skip to content

Instantly share code, notes, and snippets.

@kawaxi
Created August 8, 2016 22:15
Show Gist options
  • Save kawaxi/83f881bb1734f35c1d364a6a703b5e1c to your computer and use it in GitHub Desktop.
Save kawaxi/83f881bb1734f35c1d364a6a703b5e1c to your computer and use it in GitHub Desktop.
Small script to Initiate session on a VPN
#!/usr/bin/expect -f
cd "lab-connection"
spawn openvpn OS-213**-OSCP.ovpn
expect "Enter Auth Username:" {
send "OS-213**\n"
}
expect "Enter Auth Password:" {
send "mypass\n"
}
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment