Skip to content

Instantly share code, notes, and snippets.

@c4ri0c4
Forked from kawaxi/vpn.sh
Created January 3, 2018 02:12
Show Gist options
  • Save c4ri0c4/06ea71dccd2da76742d6f7c2d98ec861 to your computer and use it in GitHub Desktop.
Save c4ri0c4/06ea71dccd2da76742d6f7c2d98ec861 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