Created
January 2, 2017 18:58
-
-
Save uruskan/5447e8c2b3f6bec2b74efb2970237afb to your computer and use it in GitHub Desktop.
OpenVpn Otomatik Bash Giriş
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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