Skip to content

Instantly share code, notes, and snippets.

@RPHAELLA
Last active January 7, 2021 09:07
Show Gist options
  • Save RPHAELLA/a644f812e620035975c50c080e6b4e5f to your computer and use it in GitHub Desktop.
Save RPHAELLA/a644f812e620035975c50c080e6b4e5f to your computer and use it in GitHub Desktop.
#!/usr/bin/expect
#
# Automate OpenVPN Authentication
# Copyright (C) 2017
#
# This program can be redistributed and/or modified under the terms of the
# GNU General Public License, either version 3 of the License, or (at your
# option) any later version.
#
set username ""
set password ""
spawn openvpn <input>.ovpn
expect "Enter Auth Username:"
send $username
expect "Enter Auth Password:"
send $password
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment