Skip to content

Instantly share code, notes, and snippets.

@uruskan
Created January 2, 2017 18:58
Show Gist options
  • Save uruskan/5447e8c2b3f6bec2b74efb2970237afb to your computer and use it in GitHub Desktop.
Save uruskan/5447e8c2b3f6bec2b74efb2970237afb to your computer and use it in GitHub Desktop.
OpenVpn Otomatik Bash Giriş
#!/bin/sh
exec 3<>/dev/tcp/127.0.0.1/3030
username=xxxxxxxxx # kullanıcı_adı
password=yyyyyyyyy # sifre
while read -r -u 3; do
if [[ $(echo $REPLY | grep ">PASSWORD:Need 'Auth' username/password") ]]; then
echo "username \"Auth\" $username" >&3
echo "password \"Auth\" $password" >&3
else
echo "Ignoring message: $REPLY" >&2
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment