diff --git a/4nonimizer b/4nonimizer index f7f57c4..589c50b 100755 --- a/4nonimizer +++ b/4nonimizer @@ -2,7 +2,7 @@ # Authors: vicente motos & carlos antonini function asciilogo { -version="1.05-beta" +version="1.14" clear CYAN='\e[34m' @@ -38,27 +38,21 @@ function check_ip_format () { function get_public_ip () { hash dig 2>/dev/null && { - PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) + PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null) } - if check_ip_format "$PUBLIC_IP"; then - echo "$PUBLIC_IP" - exit 1 - fi + if check_ip_format "$PUBLIC_IP"; then + echo "$PUBLIC_IP" + exit 1 + fi - for curl_ip in http://ipecho.net/plain http://ipinfo.io/ip http://ifconfig.me/ip http://curlmyip.com; do - PUBLIC_IP=$( curl -s $curl_ip ) - if check_ip_format "$PUBLIC_IP"; then - break - fi - done - - if ! check_ip_format "PUBLIC_IP"; then + PUBLIC_IP=$(curl -s http://whatismyip.akamai.com/) + if ! check_ip_format "$PUBLIC_IP"; then echo "Could not obtain your public IP address"; exit 1; fi - echo "$PUBLIC_IP" + echo $PUBLIC_IP } function start () { @@ -70,12 +64,29 @@ function start () { echo -e "\n${GREEN}[+]${NC} Starting 4nonimizer to hide your real IP...\n" ifconfig $(ls /sys/class/net/ | grep -E '^eth|^en|^wl' | head -1) up && sleep 5 sed -i '/auth-user-pass/d' /opt/4nonimizer/vpn/*/*.ovpn - sed -i "10iauth-user-pass pass.txt" /opt/4nonimizer/vpn/vpnbook/*.ovpn + sed -i "8iauth-user-pass pass.txt" /opt/4nonimizer/vpn/vpnbook/*.ovpn if [ -z "$SELECTOVPN" ]; then SELECTOVPN=$(ls /opt/4nonimizer/vpn/vpnbook/*.ovpn | shuf -n 1) fi - cd /opt/4nonimizer/vpn/vpnbook/ ; nohup openvpn $SELECTOVPN 2>/dev/null & - systemctl start tor + current_provider=`cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}'` + # Avoid DNS leaks + #sed -i '10s/^/block-outside-dns\n/' /opt/4nonimizer/vpn/vpnbook/*.ovpn + # providers which use certificates + if [ "$current_provider" == "vpnbook" ]; then + sed -i '/auth-user-pass/d' /opt/4nonimizer/vpn/7proxies/*.ovpn + fi + if [ "$current_provider" == "proxysh" ]; then + IFS=$'\n';for f in `find /opt/4nonimizer/vpn/proxysh/`; do file=$(echo $f | tr [:blank:] '_'); [ -e $f ] && [ ! -e $file ] && mv "$f" $file;done;unset IFS + if ls /opt/4nonimizer/vpn/proxysh/South_Korea* 1> /dev/null 2>&1; then + for f in South_Korea*; do mv "$f" "`echo $f | sed s/South_Korea/S.Korea/`"; done + fi + fi + cd /opt/4nonimizer/vpn/$current_provider/ ; nohup openvpn $SELECTOVPN 2>/dev/null & + + if [ -f "/etc/systemd/system/tor.service" ]; then + systemctl start tor + fi + comprobacion=$(ifconfig | grep tun | awk '{print $1}') while [ -z $comprobacion ] ; do for i in {0..1..30}; @@ -84,7 +95,6 @@ function start () { if [ $count1 -eq 30 ]; then clear echo -ne "\n${RED}[+]${NC} There is a problem starting openvpn. Please, check nohup.out for details\n\n" - current_provider=`cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}'` tail -n 30 /opt/4nonimizer/vpn/$current_provider/nohup.out echo "" exit 1 @@ -106,7 +116,9 @@ function start () { then clear asciilogo - echo -ne "\n${GREEN}[+]${NC} Starting logging process (VPN)..." + echo -ne "\n${GREEN}[+]${NC} Starting logging process (VPN)..." + IPVPN1=$(get_public_ip) + #echo -e "\n$IPVPN1 = `date`\n" >> /opt/4nonimizer/logs/log-vpn-`date +'%d-%m-%Y'`.log # esto para que es?? start_logs_vpn echo -ne "ok. \n" break @@ -116,6 +128,8 @@ function start () { clear asciilogo echo -ne "\n${GREEN}[+]${NC} Starting logging process (VPN+TOR)..." + IPVPN1=$(get_public_ip) + echo -e "$IPVPN1 = `date`\n" >> /opt/4nonimizer/logs/log-vpn-`date +'%d-%m-%Y'`.log start_logs_vpn start_logs_tor echo -ne "ok. \n" && sleep 3 @@ -124,13 +138,7 @@ function start () { done - echo -ne "\n${GREEN}[+]${NC} Starting DnsCrypt Service...\n" - enable-dnscrypt - sleep 3 - echo -ne "ok.\n" - sleep 1 - IP_provider2=$(get_public_ip) while [ $IP_provider1 = $IP_provider2 ] ; do IP_provider2=$(get_public_ip) @@ -142,8 +150,10 @@ function stop_nonet () { asciilogo checkifinstalled echo -e "\n${RED}[+]${NC} Stopping services\n" - systemctl stop tor - ps -uax | grep log- | awk '{print $2}' | xargs kill -9 + if [ ! -f "/etc/systemd/system/4non.service" ]; then + systemctl stop tor + fi + ps -uax | grep "log-vpn" | awk '{print $2}' | xargs kill -9 2> /dev/null ps -aux | grep openvpn | awk '{print $2}' | xargs kill -9 ifconfig $(ifconfig | egrep -io "tun\w") down 2> /dev/null #ifconfig $(ls /sys/class/net/ | grep -E '^eth|^en|^wl' | head -1) down @@ -151,14 +161,16 @@ function stop_nonet () { ifconfig $(ls /sys/class/net/ | grep -E '^en') down 2> /dev/null ifconfig $(ls /sys/class/net/ | grep -E '^eth') down 2> /dev/null echo -e "\n${RED}[+]${NC} Your network interfaces have been shutdown.\n" - echo -e "\n${RED}[!]${NC} Done!\n" + } function stop () { asciilogo checkifinstalled - systemctl stop tor - ps -uax | grep log- | awk '{print $2}' | xargs kill -9 2> /dev/null + if [ ! -f "/etc/systemd/system/4non.service" ]; then + systemctl stop tor + fi + ps -uax | grep "log-vpn" | awk '{print $2}' | xargs kill -9 2> /dev/nul ps -aux | grep openvpn | awk '{print $2}' | xargs kill -9 2> /dev/null ifconfig $(ifconfig | egrep -io "tun\w") down 2> /dev/null echo -e "\n${GREEN}Tunnel interfaces have been stopped!!!${NC}\n" @@ -175,46 +187,52 @@ function install () { echo -e "\n${RED}[*]${NC} 4nonimizer is already installed. Perhaps do you want reinstalling or updating the app?\n" exit 1 fi - if [ `lsb_release -i | awk '{print $3}'` = Kali ] || [ `lsb_release -i | awk '{print $3}'` = 4nonOS ] || [ `lsb_release -i | awk '{print $3}'` = Ubuntu ] || [ `lsb_release -i | awk '{print $3}'` = Debian ] || [ `lsb_release -i | awk '{print $3}'` = Parrot ] || [ `lsb_release -i | awk '{print $3}'` = Raspbian ]; then - echo -e "\n${GREEN}[+]${NC} Updating the system...\n" - apt-get update + if [ `lsb_release -i | awk '{print $3}'` = Kali ] || [ `lsb_release -i | awk '{print $3}'` = 4nonOS ] || [ `lsb_release -i | awk '{print $3}'` = neon ] || [ `lsb_release -i | awk '{print $3}'` = Ubuntu ] || [ `lsb_release -i | awk '{print $3}'` = Debian ] || [ `lsb_release -i | awk '{print $3}'` = Parrot ] || [ `lsb_release -i | awk '{print $3}'` = Raspbian ] || [ `lsb_release -i | awk '{print $3}'` = LinuxMint ]; then + #echo -e "\n${GREEN}[+]${NC} Updating the system...\n" + #apt-get update echo -e "\n${GREEN}[+]${NC} Installing dependences...\n" - apt-get install curl whois openvpn easy-rsa libcurl4-gnutls-dev dnscrypt-proxy librtmp-dev proxychains tor bzip2 nmap dos2unix unzip - else if [ `lsb_release -i | awk '{print $3}'` = ManjaroLinux ] || [ `lsb_release -i | awk '{print $3}'` = Arch ] ; then - echo -e "\n${GREEN}[+]${NC} Updating the system...\n" - pacman -Syu + apt-get install -y geoip-bin geoip-database curl whois openvpn easy-rsa libcurl4-gnutls-dev dnscrypt-proxy librtmp-dev proxychains tor bzip2 nmap dos2unix unzip sqlite3 imagemagick tesseract-ocr + else if [ `lsb_release -i | awk '{print $3}'` = ManjaroLinux ] || [ `lsb_release -i | awk '{print $3}'` = Arch ] || [ `lsb_release -i | awk '{print $3}'` = antergos ] ; then + #echo -e "\n${GREEN}[+]${NC} Updating the system...\n" + #pacman -Syu echo -e "\n${GREEN}[+]${NC} Installing dependences...\n" - pacman -S --noconfirm curl whois openvpn easy-rsa proxychains-ng tor bzip2 nmap dos2unix unzip dnscrypt-proxy + pacman -S --noconfirm geoip geoip-database curl whois openvpn easy-rsa proxychains-ng tor bzip2 nmap dos2unix unzip dnscrypt-proxy sqlite3 else echo "" echo -e "\n${RED}[*]${NC} Your distro is not supported\n" exit 1 fi fi - + echo -e "\n${GREEN}[+]${NC} Installing and linking the init service...\n" cp -r ../4nonimizer /opt/ ln -svf /opt/4nonimizer/4nonimizer /usr/bin/4nonimizer + chmod +x /opt/4nonimizer/vpn/*/*.sh + mkdir /opt/4nonimizer/logs 2> /dev/null cp /opt/4nonimizer/4non.service /etc/systemd/system/ - chmod +x /opt/4nonimizer/vpn/*/*.sh chmod +x /etc/systemd/system/4non.service - mkdir /opt/4nonimizer/logs 2> /dev/null systemctl enable tor systemctl start tor systemctl enable 4non.service + for i in {0..5..1}; do echo -en "."; sleep 1; done count=5 until [ $count -le 0 ] do asciilogo - echo -ne "\n${GREEN}[+]${NC} Enter \"A\" if you want to update all vpn profiles, or wait $count secs to update only the default one (VPNbook)..." + echo -ne "\n${GREEN}[+]${NC} Enter \"A\" if you want to update all vpn profiles, or wait $count secs to update only the default one (vpnbook)..." ((count--)) read -s -n 1 -t 1 key if [ $count -eq 0 ] then - echo -e "\n${GREEN}[+]${NC} Obtaining Credentials and config files of default vpn (VpnBook)\n" - cd /opt/4nonimizer/vpn/vpnbook && ./vpn-get-ovpn.sh && ./vpn-get-pass.sh + if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then + echo -e "\n${GREEN}[+]${NC} Obtaining Credentials and config files of default vpn (vpnbook)\n" + cd /opt/4nonimizer/vpn/vpnbook && ./vpn-get-ovpn.sh && ./vpn-get-pass.sh + else + echo "You do NOT have Internet connection. Abort!" + exit + fi break fi @@ -232,7 +250,7 @@ function install () { done sed -i '/auth-user-pass/d' /opt/4nonimizer/vpn/*/*.ovpn - sed -i "10iauth-user-pass pass.txt" /opt/4nonimizer/vpn/*/*.ovpn + sed -i "8iauth-user-pass pass.txt" /opt/4nonimizer/vpn/*/*.ovpn asciilogo echo -e "\n${GREEN}[+]${NC} 4nonimizer has been installed. Use '4nonimizer start' or '4nonimizer help'.\n" } @@ -264,6 +282,7 @@ function vpn_list () { num=`expr $num + 1` fileovpns=$(head -n1 /opt/4nonimizer/vpn/$lista/vpn-get-ovpn.sh) filecreds=$(head -n1 /opt/4nonimizer/vpn/$lista/vpn-get-pass.sh) + filetrial="/opt/4nonimizer/vpn/$lista/trialnote.txt" cd /opt/4nonimizer/vpn/$lista if [ "$autokey" == "$fileovpns" ] && [ "$autokey" == "$filecreds" ] ; then echo "["$num"] - "$lista "(Auto-get OVPN) (Auto-pass Login)" @@ -271,6 +290,9 @@ function vpn_list () { echo "["$num"] - "$lista "(Auto-pass Login)" elif [ "$autokey" == "$fileovpns" ] ; then echo "["$num"] - "$lista "(Auto-get OVPN)" + elif [ -f $filetrial ]; then + trialtime=$(head -n1 /opt/4nonimizer/vpn/$lista/trialnote.txt) + echo "["$num"] - "$lista "(TRIAL for $trialtime)" else echo "["$num"] - "$lista fi @@ -284,7 +306,7 @@ function change_provider () { if [ ! -d "/opt/4nonimizer/vpn/" ]; then echo -e "\n${RED} Install 4nonimizer first! (./4nonimizer install)\n${NC}" else - current_provider=`cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}'` + current_provider=`cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}'` echo -e "\n${GREEN} Currently you're using the $current_provider provider\n${NC}" echo -e "\n${GREEN} Select the new VPN provider to change\n${NC}" vpn_list @@ -292,20 +314,20 @@ function change_provider () { read new files=$(ls /opt/4nonimizer/vpn/${LISTADO[$new]}/*.ovpn 2> /dev/null | wc -l) if [ "$files" = "0" ] ; then - echo -e "\n${RED}[*]${NC} There are not config files for the requested provider. Please, use '4nonimizer update_vpns' first.\n" + echo -e "\n${RED}[*]${NC} The provider does not exist or there are not config files for the requested provider. Please, use '4nonimizer update_vpns' first.\n" exit 1 fi if [ $current_provider = ${LISTADO[$new]} ] ; then echo -e "\n${RED}You cannot change to the same provider. If you want to change only the ip use '4nonymizer change_ip'${NC}\n" exit 1 fi - if [ "$new" -lt "$num" ] ; then - old=`cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}'` + if [ "$new" -le "$num" ] ; then + old=`cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}'` echo "" echo -e "${GREEN}[+]${NC} Changing vpn $old to ${LISTADO[$new]} ..." - sed -i '73 s/'$old'/'${LISTADO[$new]}'/g' /opt/4nonimizer/4nonimizer - sed -i '75 s/'$old'/'${LISTADO[$new]}'/g' /opt/4nonimizer/4nonimizer - sed -i '77 s/'$old'/'${LISTADO[$new]}'/g' /opt/4nonimizer/4nonimizer + sed -i '67 s/'$old'/'${LISTADO[$new]}'/g' /opt/4nonimizer/4nonimizer + sed -i '69 s/'$old'/'${LISTADO[$new]}'/g' /opt/4nonimizer/4nonimizer + sed -i '71 s/'$old'/'${LISTADO[$new]}'/g' /opt/4nonimizer/4nonimizer sleep 1 stop IP_provider1=$(get_public_ip) @@ -327,7 +349,8 @@ function change_ip () { asciilogo checkifinstalled killall openvpn - cd /opt/4nonimizer/vpn/$(cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')/ ; nohup openvpn $(ls *.ovpn | shuf -n 1 ) 2> /dev/null & + #SHUF_OVPN=$(ls *.ovpn | shuf -n 1 ) + cd /opt/4nonimizer/vpn/$(cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')/ ; nohup openvpn $(ls *.ovpn | shuf -n 1 ) 2> /dev/null & echo -e "\n${GREEN}[+]${NC} Changing vpn IP Address ...\n" IP_provider1=$(get_public_ip) for i in {0..5..1}; do echo -en "."; sleep 1; done @@ -337,17 +360,18 @@ function change_ip () { IP_provider2=$(get_public_ip) done vpn_status - echo -e "\n${GREEN}[!]${NC} Done!" } function uninstall () { asciilogo checkifinstalled + echo -e "\n${GREEN}[+]${NC} Stopping and disabling 4non & tor services\n" systemctl stop 4non.service systemctl disable 4non.service systemctl stop tor systemctl disable tor + echo -e "\n${GREEN}[+]${NC} Deleting /opt/4nonimizer dir\n" rm -rf /etc/systemd/system/4non.service rm -rfv /opt/4nonimizer >& /dev/null @@ -364,26 +388,31 @@ function reinstall () { } function start_logs_vpn () { -# IPREAL=172.124.22.55 SECS=300 - sleep 5 - IPVPN=$(get_public_ip) - -# if [ $IPREAL == $IPVPN ] || [ $IPREAL == $IPTOR ]; then -# ifconfig $(ifconfig | grep Ethernet -n3 | egrep -io "1-\w+" | awk -F'-' '{print $2}') down 2> /dev/null -# ifconfig $(ifconfig | egrep -io "tun\w") down 2> /dev/null -# echo "PRIVACY ALARM!" >> /opt/4nonimizer/logs/log-vpn-`date +'%d-%m-%Y'`.log -# echo "PRIVACY ALARM!" >> /opt/4nonimizer/logs/log-tor-`date +'%d-%m-%Y'`.log -# exit 1 -# fi - cd /opt/4nonimizer/logs; ls /opt/4nonimizer/logs/ | egrep -v "`date "+%d-%m-%Y"`.log$" | egrep -v "*.bz2" | xargs bzip2 2> /dev/null - while true;do echo $IPVPN = `date` >> /opt/4nonimizer/logs/log-vpn-`date +'%d-%m-%Y'`.log && sleep $SECS ; done & + sleep 3 + #cd /opt/4nonimizer/logs; ls /opt/4nonimizer/logs/ | egrep -v "`date "+%d-%m-%Y"`.db$" | egrep -v "*.bz2" | xargs bzip2 2> /dev/null + while true; do + country=$(curl -s https://whatismycountry.com/ 2>/dev/null | grep "Thank you" | awk -F',' '{print $1}' | awk -F'"' '{print $5}' | awk -F'\' '{print $1}' | grep -Eio "m\s\w.*" | grep -Eio "\s.*") + IPVPN2=$(get_public_ip) + if [ "$IPVPN1" == "$IPVPN2" ] ; then + if [ -f /opt/4nonimizer/logs/logs-vpn-$(date +%d-%m-%Y).db ] ; then + cd /opt/4nonimizer/logs/; sqlite3 logs-vpn-$(date +%d-%m-%Y).db "insert into tdate (date,country,ip,provider) values ('$(date +%a-%b-%y-%H:%M:%S-%Z-%Y)','$(echo $country)','$(get_public_ip)','$(cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')')" + sleep $SECS + IPVPN1=$(echo $IPVPN2) + else + cd /opt/4nonimizer/logs/; sqlite3 logs-vpn-$(date +%d-%m-%Y).db "Create table tdate (id INTEGER PRIMARY KEY, date TEXT, country TEXT, ip TEXT, provider TEXT);" + cd /opt/4nonimizer/logs/; sqlite3 logs-vpn-$(date +%d-%m-%Y).db "insert into tdate (date,country,ip,provider) values ('$(date +%a-%b-%y-%H:%M:%S-%Z-%Y)','$(echo $country)','$(get_public_ip)','$(cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')')" + sleep $SECS + fi + + fi + done & } function start_logs_tor () { SECS=300 sleep 5 - IPTOR=$(proxychains curl ipecho.net/plain 2> /dev/null) + IPTOR=$(proxychains curl icanhazip.com 2> /dev/null) cd /opt/4nonimizer/logs; ls /opt/4nonimizer/logs/ | egrep -v "`date "+%d-%m-%Y"`.log$" | egrep -v "*.bz2" | xargs bzip2 2> /dev/null while true;do echo $IPTOR = `date` >> /opt/4nonimizer/logs/log-tor-`date +'%d-%m-%Y'`.log && sleep $SECS ; done & } @@ -393,7 +422,7 @@ function update_app () { echo -e "\n${RED}[*]${NC} Updating repository from Git\n" cd /opt/4nonimizer/ ; git pull origin master; - packages_array=( curl whois openvpn easyrsa proxychains tor bzip2 nmap dos2unix unzip dnscrypt-proxy ) + packages_array=( curl whois openvpn easy-rsa proxychains tor bzip2 nmap dos2unix unzip dnscrypt-proxy ) echo -e "\n${RED}[*]${NC} Checking if exist new packages in the system:" for i in "${packages_array[@]}" do @@ -413,41 +442,45 @@ function update_app () { function vpn_status () { asciilogo checkifinstalled - count=5 + echo -e "\n${GREEN}[+]${NC} We're going to confirm if your browsing IP has changed..." + echo -e "\n${GREEN}[*]${NC} Checking IP assigned:\n" + comprobacion=$(ifconfig | grep tun | awk '{print $1}') + if [ -z "$comprobacion" ] ;then + echo -e "\n${RED}[*]${NC} You're NOT using a tunnel, probably your IP is not masked!!\n" + exit 1 + else + echo -e "VPN Provider: \t $(cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')" + currentip=$(curl -s icanhazip.com) + echo -e "IP: \t\t$currentip" + if hash geoiplookup 2>/dev/null; then + echo -e "Country:\t$(geoiplookup $currentip | sed -n 1p | sed 's/.*, //')" + else + country=`curl -s https://whatismycountry.com/ 2>/dev/null | grep "Thank you" | awk -F',' '{print $1}' | awk -F'"' '{print $5}' | awk -F'\' '{print $1}' | grep -Eio "m\s\w.*" | grep -Eio "\s.*"` + echo -e "Country:\t$country" + fi + fi + echo -e "\n${WHITE} [-]${NC} Enter \"T\" if you want to check also IP through TOR (using proxychains), or wait\n" + count=3 until [ $count -le 0 ] do - clear - asciilogo - echo -e "\n${GREEN}[+]${NC} We're going to confirm if your browsing IP has changed..." - echo -e "\n${WHITE} [-]${NC} Enter \"T\" if you want to check also IP through TOR (using proxychains), or wait $count secs." + echo -n "." ((count--)) read -s -n 1 -t 1 key if [ "$key" == "T" ]; then - echo -e "\n${GREEN}[*]${NC} Checking IP assigned:\n" - echo -e "VPN Provider: \t $(cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')" - echo -e "IP: \t\t$(curl -s ipecho.net/plain)" - echo -e "Country:\t$(curl -s http://whatismycountry.com/ | sed -n 's|.*,\(.*\)|\1|p')" echo -e "\nTOR (using proxychains):" - proxychains curl -s ipecho.net/plain 2> /dev/null - proxychains curl -s http://whatismycountry.com/ 2>/dev/null | sed -n 's|.*,\(.*\)|\1|p' + echo -e "IP: \t\t$(proxychains curl -s icanhazip.com 2> /dev/null | sed -n '2p')" + country=`curl -s https://whatismycountry.com/ 2>/dev/null | grep "Thank you" | awk -F',' '{print $1}' | awk -F'"' '{print $5}' | awk -F'\' '{print $1}' | grep -Eio "m\s\w.*" | grep -Eio "\s.*"` + echo -e "Country:\t$country" + echo -e "\ndone!\n" break fi if [ $count -eq 0 ] then - comprobacion=$(ifconfig | grep tun | awk '{print $1}') - if [ -z "$comprobacion" ] ;then - echo -e "\n${RED}[*]${NC} You're NOT using a tunnel, probably your IP is not masked!!\n" - exit 1 - else - echo -e "\n${GREEN}[*]${NC} Checking IP assigned:\n" - echo -e "VPN Provider: \t $(cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}')" - echo -e "IP: \t\t$(curl -s ipecho.net/plain)" - echo -e "Country:\t$(curl -s http://whatismycountry.com/ | sed -n 's|.*,\(.*\)|\1|p')\n" - echo -e "DNSCrypt:\n$(nslookup www.google.es | awk 'NR==1,NR==2')\n" + echo -e "done!\n" + #echo -e "DNSCrypt:\n$(nslookup www.google.es | awk 'NR==1,NR==2')\n" break - fi - fi + fi done } @@ -530,7 +563,7 @@ function browser () cd /root/.mozilla/firefox 2> /dev/null tar xvzf rdpy967e.4nonimizer-profile.tar.gz 2> /dev/null rm -rf rdpy967e.4nonimizer-profile.tar.gz 2> /dev/null - firefox -P 4nonimizer-profile --private-window ipecho.net/plain 2> /dev/null + firefox -P 4nonimizer-profile --private-window icanhazip.com 2> /dev/null } function test_availability () @@ -548,20 +581,13 @@ function test_availability () fi cd /opt/4nonimizer/vpn/$lista dos2unix * &> /dev/null - for file in $(ls *.ovpn) + for file in $(ls *.ovpn 2> /dev/null) do checkedprotocol=$(grep -v '#' $file | grep -m 1 proto | awk '{print $2}') checkedip=$(grep -v '#' $file | grep -m 1 remote | awk '{print $2}') checkedport=$(grep -v '#' $file | grep -m 1 remote | awk '{print $3}') if [[ $checkedprotocol = *"tcp"* ]] then - #option 1 - #result=$(nc -zv -w3 $checkedip $checkedport 2>&1 | grep succeeded); - #if [ -n "$result" ]; then - #option 2 - #/dev/null) fi + #codecountry=$(curl ipinfo.io/$ip | grep country | awk -F "\"" '{print $4}') codecountry=$(whois $ip | awk -F':[ \t]+' 'tolower($1) ~ /^country$/ { print toupper($2) ;exit;}') country=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$codecountry -F $'\t' '$1 == r' | awk -F $'\t' '{print $5}'| tr -d '[:space:]') @@ -632,28 +659,53 @@ function locate_offline () { read new if [[ " ${rangonumcont[@]} " =~ " ${new} " ]]; then - echo "estas seleccionando continente ${CONT[$new]}" + echo "you're selected the continent ${CONT[$new]}" continentname=${CONT[$new]} if [[ "$continentname" == "unknown" ]]; then /opt/4nonimizer/4nonimizer change_ip break fi tocontinentcode - #echo -e "\n$continentcode" - for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'_' '{print $2}' | cut -d'.' -f1 | sort -u); - do - continentcode2=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$lista -F $'\t' '$1 == r' | awk -F $'\t' '{print $9}') + if [ "$provider" == "nordvpn" ]; then + lista=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | cut -c1-2 | sort -u | awk '{print toupper($0)}'); + elif [ "$provider" == "airvpn" ]; then + lista=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'-' '{print $1}' | sed 's/^.*\_//' | sort -u); + elif [ "$provider" == "vyprvpn" ]; then + lista=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F' -' '{print $1}' | cut -d'.' -f1 | sort -u); + elif [ "$provider" == "ipvanish" ]; then + lista=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'-' '{print $2}' | sort -u); + elif [ "$provider" == "proxysh" ]; then + lista=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'_' '{print $1}' | sort -u); + else + lista=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'_' '{print $2}' | cut -d'.' -f1 | sort -u); + fi - if [[ "$continentcode" == "$continentcode2" ]] ; then - array2+=($lista) + for l in $lista; + do + if [ -n $l ]; then + if [ "$provider" == "vyprvpn" ] || [ "$provider" == "proxysh" ]; then + l=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$l -F $'\t' '$5 == r' | awk -F $'\t' '{print $1}' | sed 's/ //g' ) + fi + continentcode2=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$l -F $'\t' '$1 == r' | awk -F $'\t' '{print $9}') + if [ -n "$continentcode2" ]; then + if [[ "$continentcode" == "$continentcode2" ]]; then + #echo $l + array2+=($l) + fi + fi fi done - - #echo "${array2[@]}" + countryselected=$(for el in "${array2[@]}"; do echo $el; done | shuf | head -1) - #echo $countryselected && sleep 10 - SELECTOVPN=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | grep $countryselected | shuf -n 1) + + if [ "$provider" == "proxysh" ]; then + countryselected=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countryselected -F $'\t' '$1 == r' | awk -F $'\t' '{print $5}') + fi + + echo -e "\n\n${RED}[*] Select country: $countryselected ${NC}" && sleep 2 + + SELECTOVPN=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | grep -i $countryselected | shuf -n 1) echo -e "\n\n${RED}[*] 4nonimizer is going to use the $SELECTOVPN file. ${NC}\n" sleep 3 restart @@ -665,10 +717,8 @@ function locate_offline () { /opt/4nonimizer/4nonimizer change_ip break fi - #echo ${PAISES[$new]} - #cd /opt/4nonimizer/vpn/$provider/ ; openvpn "$(ls *.ovpn | grep ${PAISES[$new]} | shuf -n 1)" - - SELECTOVPN=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | grep ${PAISES[$new]} | shuf -n 1) + + SELECTOVPN=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | grep ${PAISES[$new]} | shuf -n 1 2>/dev/null) echo -e "\n\n${RED}[*] 4nonimizer is going to use the $SELECTOVPN file. ${NC}\n" sleep 3 restart @@ -734,8 +784,6 @@ function locate_online () { done - - #echo "${array2[@]}" countryselected=$(for el in "${array2[@]}"; do echo $el; done | shuf | head -1) SELECTOVPN=$(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | grep $countryselected | shuf -n 1) @@ -764,12 +812,95 @@ function locate_online () { function location () { asciilogo checkifinstalled - provider=$(cat /opt/4nonimizer/4nonimizer | awk 'NR==73' | awk -F';' '{print $1}' | awk -F'/' '{print $5}') + provider=$(cat /opt/4nonimizer/4nonimizer | awk 'NR==67' | awk -F';' '{print $1}' | awk -F'/' '{print $5}') echo -e "\nVPN Provider: \t $provider\n" case $provider in + cyberghost) + locate_online + ;; + expressvpn) + locate_online + ;; freevpn) locate_online + ;; + protonvpn) + locate_online + ;; + proxysh) + num=0 + echo -e "\n${RED}[*] Please, select the country from which you want to connect: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'_' '{print $1}' | sort -u); + do + num=`expr $num + 1` + if [[ $lista == *"United"* ]] + then + lista="United_Kingdom"; + fi + if [[ $lista == *"Czech"* ]] + then + lista="Czechia"; + fi + if [[ $lista == *"Costa"* ]] + then + lista="Costa_Rica"; + fi + if [[ $lista == *"Hong"* ]] + then + lista="Hong_Kong"; + fi + if [[ $lista == *"Isle"* ]] + then + lista="Isle_of_Man"; + fi + if [[ $lista == *"New"* ]] + then + lista="New_Zeland"; + fi + if [[ $lista == *"South"* ]] + then + lista="South_Africa"; + fi + country=$lista + if [ -z "$country" ] ; then country="unknown"; fi + echo -ne " ["$num"]-"$country + PAISES[$num]=$lista + done + + array=() + echo -e "\n\n${RED}[*] or if you prefer select the continent: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'_' '{print $1}' | sort -u); + do + if [[ $lista == *"United"* ]] + then + lista="UnitedKingdom"; + fi + if [[ $lista == *"U.S."* ]] + then + lista="UnitedStates"; + fi + continentcode=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$lista -F $'\t' '$5 == r' | awk -F $'\t' '{print $9}') + tocontinentname + if [ -z "$continent" ] ; then country="unknown"; fi + array+=($continent) + done + + + sorted_unique_continents=$(echo "${array[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + + + for i in ${sorted_unique_continents[@]} + do + num=`expr $num + 1` + echo -ne " ["$num"]-"$i + rangonumcont+=($num) + CONT[$num]=$i + + done + + locate_offline + ;; hidemyass) @@ -809,7 +940,175 @@ function location () { locate_offline - ;; + ;; + vyprvpn) + + num=0 + echo -e "\n${RED}[*] Please, select the country from which you want to connect: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F' -' '{print $1}' | cut -d'.' -f1 | sed 's/ //g' | sort -u); + do + num=`expr $num + 1` + country=$lista + if [ -z "$country" ] ; then country="unknown"; fi + echo -ne " ["$num"]-"$country + PAISES[$num]=$lista + done + + array=() + echo -e "\n\n${RED}[*] or if you prefer select the continent: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'.' '{print $1}' | sort -u); + do + continentcode=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$lista -F $'\t' '$5 == r' | awk -F $'\t' '{print $9}') + tocontinentname + if [ -z "$continent" ] ; then country="unknown"; fi + array+=($continent) + done + + + sorted_unique_continents=$(echo "${array[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + + + for i in ${sorted_unique_continents[@]} + do + num=`expr $num + 1` + echo -ne " ["$num"]-"$i + rangonumcont+=($num) + CONT[$num]=$i + + done + + locate_offline + + ;; + + ipvanish) + + num=0 + echo -e "\n${RED}[*] Please, select the country from which you want to connect: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'-' '{print $2}' | sort -u); + do + num=`expr $num + 1` + countrycode=$(echo $lista) + countryname=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countrycode -F $'\t' '$1 == r' | awk -F $'\t' '{print $5}') + country=$countryname + if [ -z "$country" ] ; then country="unknown"; fi + echo -ne " ["$num"]-"$country + PAISES[$num]=$lista + done + + array=() + echo -e "\n\n${RED}[*] or if you prefer select the continent: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'-' '{print $2}' | sort -u); + do + countrycode=$(echo $lista) + continentcode=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countrycode -F $'\t' '$1 == r' | awk -F $'\t' '{print $9}') + tocontinentname + if [ -z "$continent" ] ; then country="unknown"; fi + array+=($continent) + done + + + sorted_unique_continents=$(echo "${array[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + + + for i in ${sorted_unique_continents[@]} + do + num=`expr $num + 1` + echo -ne " ["$num"]-"$i + rangonumcont+=($num) + CONT[$num]=$i + + done + + locate_offline + + ;; + + airvpn) + + num=0 + echo -e "\n${RED}[*] Please, select the country from which you want to connect: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'-' '{print $1}' | sed 's/^.*\_//' | sort -u); + do + num=`expr $num + 1` + countrycode=$(echo $lista) + countryname=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countrycode -F $'\t' '$1 == r' | awk -F $'\t' '{print $5}') + country=$countryname + if [ -z "$country" ] ; then country="unknown"; fi + echo -ne " ["$num"]-"$country + PAISES[$num]=$lista + done + + array=() + echo -e "\n\n${RED}[*] or if you prefer select the continent: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | awk -F'-' '{print $1}' | sed 's/^.*\_//' | sort -u); + do + countrycode=$(echo $lista) + continentcode=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countrycode -F $'\t' '$1 == r' | awk -F $'\t' '{print $9}') + tocontinentname + if [ -z "$continent" ] ; then country="unknown"; fi + array+=($continent) + done + + + sorted_unique_continents=$(echo "${array[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + + + for i in ${sorted_unique_continents[@]} + do + num=`expr $num + 1` + echo -ne " ["$num"]-"$i + rangonumcont+=($num) + CONT[$num]=$i + + done + + locate_offline + + ;; + + nordvpn) + + num=0 + echo -e "\n${RED}[*] Please, select the country from which you want to connect: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | cut -c1-2 | sort -u); + do + num=`expr $num + 1` + countrycode=$(echo $lista | awk '{print toupper($0)}') + countryname=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countrycode -F $'\t' '$1 == r' | awk -F $'\t' '{print $5}') + country=$countryname + if [ -z "$country" ] ; then country="unknown"; fi + echo -ne " ["$num"]-"$country + PAISES[$num]=$lista + done + + array=() + echo -e "\n\n${RED}[*] or if you prefer select the continent: ${NC}\n" + for lista in $(cd /opt/4nonimizer/vpn/$provider/; ls *.ovpn | cut -c1-2 | sort -u); + do + countrycode=$(echo $lista | awk '{print toupper($0)}') + continentcode=$(cat /opt/4nonimizer/countryInfo.txt | awk -v r=$countrycode -F $'\t' '$1 == r' | awk -F $'\t' '{print $9}') + tocontinentname + if [ -z "$continent" ] ; then country="unknown"; fi + array+=($continent) + done + + + sorted_unique_continents=$(echo "${array[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + + + for i in ${sorted_unique_continents[@]} + do + num=`expr $num + 1` + echo -ne " ["$num"]-"$i + rangonumcont+=($num) + CONT[$num]=$i + + done + + locate_offline + + ;; torguard) locate_online ;; @@ -852,6 +1151,10 @@ function location () { ;; vpnbook) + locate_online + ;; + 7proxies) + locate_online ;; vpngate) @@ -902,6 +1205,9 @@ function location () { cryptostorm) locate_online ;; + slickvpn) + locate_online + ;; pia) array_pais=() echo -e "\n${RED}[*] Please, select the country from which you want to connect: ${NC}\n" @@ -1112,7 +1418,16 @@ disableboot(){ fi } -enable-dnscrypt(){ +disable_dns(){ + echo -ne "\n${GREEN}[+]${NC} Stoping DnsCrypt Service...\n" + systemctl stop dnscrypt-proxy.service + systemctl stop dnscrypt-proxy.socket + echo "nameserver 8.8.8.8" > /etc/resolv.conf + echo -ne "\n${GREEN}[+]${NC} Done!\n" +} + +enable_dns(){ + echo -ne "\n${GREEN}[+]${NC} Starting DnsCrypt Service...\n" if [ -f "/etc/systemd/system/multi-user.target.wants/dnscryp-proxy.service" ]; then systemctl restart dnscrypt-proxy sleep 3 @@ -1123,6 +1438,7 @@ enable-dnscrypt(){ sleep 3 netstat -putona | egrep -e dnscrypt -e 53 | egrep -E 53 | awk '{print $4}' | sort -u | cut -d':' -f1 | awk '{print "nameserver "$1}' > /etc/resolv.conf fi + echo -ne "\n${GREEN}[+]${NC} Done!\n" } @@ -1131,11 +1447,11 @@ asciilogo complete -F autocom -o default 4nonimizer if [ `id | egrep -io "uid=\w+" | awk -F'=' '{print $2}'` != 0 ] ; then - echo -e "\n${RED}[*]${NC} You aren't root , please execute the installer with root permisions\n" + echo -e "\n${RED}[*]${NC} You aren't root , please execute the program with root permisions\n" else case $1 in - start|stop|stop_nonet|install|reinstall|uninstall|change_provider|change_ip|restart|update_vpns|update_app|vpn_status|privoxy|proxychains4|browser|test_availability|location|disableboot|enableboot) + start|stop|stop_nonet|install|reinstall|uninstall|change_provider|change_ip|restart|update_vpns|update_app|vpn_status|privoxy|proxychains4|browser|test_availability|location|disableboot|enableboot|enable_dns|disable_dns) "$1" ;; help|-h|--help) @@ -1157,9 +1473,11 @@ case $1 in echo -e " ${CYAN}proxychains4${NC}: Install and configure proxychains4 by default in the system" echo -e " ${CYAN}browser${NC}: Fire up a firefox browser with profile privoxy -> tor" echo -e " ${CYAN}test_availability${NC}: Check peers availability and delete ovpn file if the IP/service is unreachable" - echo -e " ${CYAN}location${NC}: ${RED}NEW!${NC} Now you can select a specific country or continent of the vpn peer" - echo -e " ${CYAN}enableboot${NC}: ${RED}NEW!${NC} You can enable service in boot" - echo -e " ${CYAN}disableboot${NC}: ${RED}NEW!${NC} You can disable service in boot" + echo -e " ${CYAN}location${NC}: Now you can select a specific country or continent of the vpn peer" + echo -e " ${CYAN}enableboot${NC}: You can enable service in boot" + echo -e " ${CYAN}disableboot${NC}: You can disable service in boot" + echo -e " ${CYAN}enable_dns${NC}: Enable dnscrypt service" + echo -e " ${CYAN}disable_dns${NC}: Disable dnscrypt service" echo -e " ${CYAN}help${NC}: Help (this screen)" echo "" diff --git a/README.md b/README.md index 7ce1712..03a5135 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,25 @@ + +![4nonimizer logo](./images/logo.png) + + +### If you like the 4nonimizer, please help us with whatever you want! + +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=24U9T8TTDXA24&lc=US&item_name=4nonimizer¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) + + # What is 4nonimizer? -It is a bash script for anonymizing the public IP used to browsing Internet, managing the connection to TOR network and to different VPNs providers (OpenVPN), whether free or paid. By default, it includes several pre-configured VPN connections to different peers (.ovpn files) and download the credentials. Also, it records each used IP that we use every 300 seconds in log files. +It is a bash script for anonymizing the public IP used to browsing Internet, managing the connection to TOR network and to different VPNs providers (OpenVPN), whether free or paid. By default, it includes several pre-configured VPN connections to different peers (.ovpn files) and download the credentials (if the corresponding provider support it). Also, it records each used IP that we use every 300 seconds in log files. This script is enabled as a service in systemd systems and uses a default vpn (VPNBook) at system startup. -Since version 1.05 the dns resolution are throught DnsCrypt. +Since version 1.06 the dns resolution requests are done throught DnsCrypt (enable and disable with option enable_dns or disable_dns) + +Since version 1.12 the logs of connections vpn saved in sqlite in /logs/ + +# Attention VPN Providers! + +If you are a provider, you support OpenVPN and want your VPN to be integrated into 4nonimizer contact the developers at hackplayers @ ymail.com. # Installation @@ -24,7 +39,7 @@ Once installed 4nonymizer, enter the command **4nonimizer help** to get the help \___ | | | | (_) | | | | | | | | | | |/ / __/ | |_/_| |_|\___/|_| |_|_|_| |_| |_|_/___\___|_| By Carlos Antonini & Vicente Motos - Version: 1.04-beta + Version: 1.06-beta Usage: 4nonymizer **\**      **install**: Install the script in run services @@ -45,6 +60,8 @@ Usage: 4nonymizer **\**      **location**: Now you can select a specific country or continent of the vpn peer      **enableboot**: You can enable service in boot      **disableboot**: You can disable service in boot +      **enable_dnscrypt**: Enable dnscrypt service +      **disable_dnscrypt**: Disable dnscrypt service      **help**: Help (this screen) @@ -53,25 +70,47 @@ Usage: 4nonymizer **\** Currently it supports the following VPN providers: -\- HideMyAss +\- 7Proxies -\- TorGuard +\- AirVPN -\- VPNBook (by default) +\- Cryptostorm -\- VPNGate +\- Cyberghost -\- VPNMe +\- ExpressVPN -\- VPNKeys +\- FreeVPN -\- FreeVPN +\- HideMyAss -\- TunnelBear +\- IpPVanish -\- Cryptostrom +\- NordVPN -\- PIA +\- PIA + +\- ProntonVPN + +\- Proxy.sh + +\- SlickVPN + +\- StrongVPN + +\- TorGuard + +\- TunnelBear + +\- VPNBook (por defecto) + +\- VPNGate + +\- VPNKeys + +\- VPNMe + +\- Vyprvpn # Install a new VPN @@ -123,6 +162,16 @@ If the VPN provider allows automation of credential and/or .ovpn files getting, \- http://www.kitploit.com/2016/10/4nonimizer-bash-script-for-anonymizing_10.html \- https://www.digitalmunition.me/2016/10/4nonimizer-bash-script-anonymizing-public-ip-managing-connection-tor-different-vpns-providers/ +# Videos + +\- Instalar 4nonimizer Kali Linux +\- 4nonimizer Navegando de manera segura VPN (Kali Linux 2016.2) +\- devenir anonyme sur kali linux (4nonimizer) +\- Anonymizer - How To Hide Your IP address on Kali Linux 2016.2 (Change IP) +\- Become Anonymous on kali linux 2016.2 +\- Auto Hide IP with 4nonimizer on KALI Linux 2017 +\- Kali Linux - 4nonimizer | Surf Anonymously + # Versions Number | codename | date @@ -131,22 +180,48 @@ If the VPN provider allows automation of credential and/or .ovpn files getting, 1.02-beta | .evol-time | 11/10/2016 1.03-beta | .using-latin-i | 17/10/2016 1.04-beta | .locateit | 22/12/2016 - 1.05-beta | .encrypting | 03/01/2017 + 1.05-beta | .encrypting | 03/01/2017 + 1.06-beta | .1st-trial | 18/01/2017 + 1.07-beta | .noname | 03/05/2017 + 1.08-beta | .falcon | 15/08/2017 + 1.09-beta | .rabbit | 09/11/2017 + 1.10 | .fresh_air| 27/02/2018 + 1.11 | .shhh| 17/05/2018 + 1.12 | .sqliting| 18/05/2018 -¡4nonimize the world! +¡4nonimize the world! + +# TODO + +\- migrate to Python and make the tool multiplatform +\- make the code cleaner and more versatile +\- save the logs in a bd sqlite +\- standardize the names of the ovpn files: read the IP (remote line), get the country and rename the ovpn file accordingly ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # SPANISH TRANSLATION ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +![4nonimizer logo](./images/logo.png) + + +### Te gusta 4nonimizer, por favor ayudanos con lo que quieras! + +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=24U9T8TTDXA24&lc=US&item_name=4nonimizer¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) + # ¿Que es 4nonimizer? -Es un script en bash cuyo objetivo es anonimizar (de momento) la IP pública con la que salimos a Internet mediante la gestión del proceso de conexión a TOR y a distintos proveedores VPNs (OpenVPN), ya sean gratuitos o de pago. Por defecto incluye preconfiguradas varias VPN gratuitas automatizando la conexión a distintos peers y la descarga de credenciales correspondientes. Además por defecto registra en ficheros logs la IP que usamos cada 300 segundos. +Es un script en bash cuyo objetivo es anonimizar (de momento) la IP pública con la que salimos a Internet mediante la gestión del proceso de conexión a TOR y a distintos proveedores VPNs (OpenVPN), ya sean gratuitos o de pago. Por defecto incluye preconfiguradas varias VPN automatizando la conexión a distintos peers y la descarga de credenciales correspondientes (si el proveedor lo soporta). Además por defecto registra en ficheros logs la IP que usamos cada 300 segundos. Este script se habilita como servicio en sistemas systemd y levanta la vpn por defecto (VPNBook) en el inicio del sistema. -Desde la version 1.05 las resoluciones DNS se hacen a traver de DnsCrypt +Desde la version 1.06 las resoluciones DNS se hacen a través de DnsCrypt (habilitarlo y desabilitarlo con la opcion enable_dns o disable_dns). + +Desde la versión 1.12 los registros de las conexiones vpn se guardan en sqlite en /logs/ +# ¡Atención proveedores de VPN! + +Si eres un proveedor, soportas OpenVPN y quieres que tu VPN sea integrada en 4nonimizer contacta con los desarroladores en hackplayers @ ymail.com. # Instalación @@ -169,7 +244,7 @@ Once installed 4nonymizer, enter the command **4nonimizer help** to get the help \___ | | | | (_) | | | | | | | | | | |/ / __/ | |_/_| |_|\___/|_| |_|_|_| |_| |_|_/___\___|_| By Carlos Antonini & Vicente Motos - Version: 1.04-beta + Version: 1.06-beta Usage: 4nonymizer **\**      **install**: Install the script in run services @@ -189,7 +264,9 @@ Usage: 4nonymizer **\**      **test_availability**: Check peers availability and delete ovpn file if the IP/service is unreachable      **location**: Now you can select a specific country or continent of the vpn peer      **enableboot**: You can enable service in boot -      **disableboot**: You can disable service in boot +      **disableboot**: You can disable service in boot +      **enable_dnscrypt*: Enable dnscrypt service +      **disable_dnscrypt**: Disable dnscrypt service      **help**: Help (this screen) @@ -198,26 +275,47 @@ Usage: 4nonymizer **\** Actualmente se soportan los siguientes proveedores VPN: -\- HideMyAss +\- 7Proxies -\- TorGuard +\- AirVPN -\- VPNBook (por defecto) +\- Cryptostorm -\- VPNGate +\- Cyberghost -\- VPNMe +\- ExpressVPN -\- VPNKeys +\- FreeVPN -\- FreeVPN +\- HideMyAss -\- TunnelBear +\- IpPVanish -\- Cryptostrom +\- NordVPN \- PIA +\- ProntonVPN + +\- Proxy.sh + +\- SlickVPN + +\- StrongVPN + +\- TorGuard + +\- TunnelBear + +\- VPNBook (por defecto) + +\- VPNGate + +\- VPNKeys + +\- VPNMe + +\- Vyprvpn # Instalar una nueva VPN @@ -271,6 +369,16 @@ Si el proveedor correspondiente permite la automatización de la obtención de c \- http://www.kitploit.com/2016/10/4nonimizer-bash-script-for-anonymizing_10.html \- https://www.digitalmunition.me/2016/10/4nonimizer-bash-script-anonymizing-public-ip-managing-connection-tor-different-vpns-providers/ +# Videos + +\- Instalar 4nonimizer Kali Linux +\- 4nonimizer Navegando de manera segura VPN (Kali Linux 2016.2) +\- devenir anonyme sur kali linux (4nonimizer) +\- Anonymizer - How To Hide Your IP address on Kali Linux 2016.2 (Change IP) +\- Become Anonymous on kali linux 2016.2 +\- Auto Hide IP with 4nonimizer on KALI Linux 2017 +\- Kali Linux - 4nonimizer | Surf Anonymously + # Versiones Number | codename | date @@ -279,7 +387,21 @@ Si el proveedor correspondiente permite la automatización de la obtención de c 1.02-beta | .evol-time | 11/10/2016 1.03-beta | .using-latin-i | 17/10/2016 1.04-beta | .locateit | 22/12/2016 - 1.05-beta | .encrypting | 03/01/2017 - + 1.05-beta | .encrypting | 03/01/2017 + 1.06-beta | .1st-trial | 18/01/2017 + 1.07-beta | .noname | 03/05/2017 + 1.08-beta | .falcon | 15/08/2017 + 1.09-beta | .rabbit | 09/11/2017 + 1.10 | .fresh_air| 27/02/2018 + 1.11 | .shhh| 17/05/2018 + 1.12 | .sqliting| 18/05/2018 + ¡4nonimiza el mundo! +# TODO + +\- migrar a Python y hacer la herramienta multiplataforma +\- hacer el código más limpio y versátil +\- guardar los logs en una bd sqlite +\- estandarizar los nombres de los ficheros ovpn: leer la ip o el fqdn de la linea remote, obtener el país y renombrar el fichero ovpn en consecuencia +\- forzar la resoluciób DNS a través del túnel VPN diff --git a/TODO.md b/TODO.md index c037de2..ad844ba 100644 --- a/TODO.md +++ b/TODO.md @@ -3,9 +3,8 @@ #NEW FEATURES \- Add Docker compatibility -\- Generate an alarm if the real IP is used (because tun interface is down) -\- Sets up iptables and tor to route all services and traffic including DNS through the tor network. - -#HISTORY - -\- 05/10/2016 - Initial release v1.0-beta +\- Generate an alarm if the real IP is used (because tun interface is down) +\- Sets up iptables and tor to route all services and traffic including DNS through the tor network. +\- Add compatibility with sysv (generate two sources, 1 for systemd ,2 sysV) +\- Add Macchanger option +\- Migrate code to Python diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 932cd8b..0000000 --- a/changelog.md +++ /dev/null @@ -1,17 +0,0 @@ -\- **Version 1.05** -\* Add DnsCrypt for dns resolution -\- **Version 1.04** -\* Add Location function -\* Add enable and disable in boot functions -\- **Version 1.03** -\* Add test_availability function -\- **Version 1.02** -\* Add tunnelbear and freevpn in VPNs supported by default -\* Add in BETA support for privoxy -\* Performed improvements in functions vpn_list and update_vpns -\* Add optionally install proxychains4 from git -\* Add browser firefox with profile 4nonimizer - - -\- **Version 1.0** -\* Initial Release diff --git a/countryInfo.txt b/countryInfo.txt index 7f8ea1b..18617c4 100644 --- a/countryInfo.txt +++ b/countryInfo.txt @@ -1,6 +1,6 @@ #ISO ISO3 ISO-Numeric fips Country Capital Area(in sq km) Population Continent tld CurrencyCode CurrencyName Phone Postal Code Format Postal Code Regex Languages geonameid neighbours EquivalentFipsCode AD AND 020 AN Andorra Andorra la Vella 468 84000 EU .ad EUR Euro 376 AD### ^(?:AD)*(\d{3})$ ca 3041565 ES,FR -AE ARE 784 AE United Arab Emirates Abu Dhabi 82880 4975593 AS .ae AED Dirham 971 ar-AE,fa,en,hi,ur 290557 SA,OM +AE ARE 784 AE UnitedArabEmirates Abu Dhabi 82880 4975593 AS .ae AED Dirham 971 ar-AE,fa,en,hi,ur 290557 SA,OM AF AFG 004 AF Afghanistan Kabul 647500 29121286 AS .af AFN Afghani 93 fa-AF,ps,uz-AF,tk 1149361 TM,CN,IR,TJ,PK,UZ AG ATG 028 AC Antigua and Barbuda St. John's 443 86754 NA .ag XCD Dollar +1-268 en-AG 3576396 AI AIA 660 AV Anguilla The Valley 102 13254 NA .ai XCD Dollar +1-264 en-AI 3573511 @@ -75,7 +75,7 @@ FM FSM 583 FM Micronesia Palikir 702 107708 OC .fm USD Dollar 691 ##### ^(\d{5}) FO FRO 234 FO Faroe Islands Torshavn 1399 48228 EU .fo DKK Krone 298 FO-### ^(?:FO)*(\d{3})$ fo,da-FO 2622320 FR FRA 250 FR France Paris 547030 64768389 EU .fr EUR Euro 33 ##### ^(\d{5})$ fr-FR,frp,br,co,ca,eu,oc 3017382 CH,DE,BE,LU,IT,AD,MC,ES GA GAB 266 GB Gabon Libreville 267667 1545255 AF .ga XAF Franc 241 fr-GA 2400553 CM,GQ,CG -GB GBR 826 UK United Kingdom London 244820 62348447 EU .uk GBP Pound 44 @# #@@|@## #@@|@@# #@@|@@## #@@|@#@ #@@|@@#@ #@@|GIR0AA ^((?:(?:[A-PR-UWYZ][A-HK-Y]\d[ABEHMNPRV-Y0-9]|[A-PR-UWYZ]\d[A-HJKPS-UW0-9])\s\d[ABD-HJLNP-UW-Z]{2})|GIR\s?0AA)$ en-GB,cy-GB,gd 2635167 IE +GB GBR 826 UK UnitedKingdom London 244820 62348447 EU .uk GBP Pound 44 @# #@@|@## #@@|@@# #@@|@@## #@@|@#@ #@@|@@#@ #@@|GIR0AA ^((?:(?:[A-PR-UWYZ][A-HK-Y]\d[ABEHMNPRV-Y0-9]|[A-PR-UWYZ]\d[A-HJKPS-UW0-9])\s\d[ABD-HJLNP-UW-Z]{2})|GIR\s?0AA)$ en-GB,cy-GB,gd 2635167 IE GD GRD 308 GJ Grenada St. George's 344 107818 NA .gd XCD Dollar +1-473 en-GD 3580239 GE GEO 268 GG Georgia Tbilisi 69700 4630000 AS .ge GEL Lari 995 #### ^(\d{4})$ ka,ru,hy,az 614540 AM,AZ,TR,RU GF GUF 254 FG French Guiana Cayenne 91000 195506 SA .gf EUR Euro 594 ##### ^((97|98)3\d{2})$ fr-GF 3381670 SR,BR @@ -231,8 +231,9 @@ TW TWN 158 TW Taiwan Taipei 35980 22894384 AS .tw TWD Dollar 886 ##### ^(\d{5})$ TZ TZA 834 TZ Tanzania Dodoma 945087 41892895 AF .tz TZS Shilling 255 sw-TZ,en,ar 149590 MZ,KE,CD,RW,ZM,BI,UG,MW UA UKR 804 UP Ukraine Kiev 603700 45415596 EU .ua UAH Hryvnia 380 ##### ^(\d{5})$ uk,ru-UA,rom,pl,hu 690791 PL,MD,HU,SK,BY,RO,RU UG UGA 800 UG Uganda Kampala 236040 33398682 AF .ug UGX Shilling 256 en-UG,lg,sw,ar 226074 TZ,KE,SS,CD,RW -UM UMI 581 United States Minor Outlying Islands 0 0 OC .um USD Dollar 1 en-UM 5854968 -US USA 840 US United States Washington 9629091 310232863 NA .us USD Dollar 1 #####-#### ^\d{5}(-\d{4})?$ en-US,es-US,haw,fr 6252001 CA,MX,CU +UM UMI 581 UnitedStates Minor Outlying Islands 0 0 OC .um USD Dollar 1 en-UM 5854968 +US2 USA 840 US2 U.S. Washington 9629091 310232863 NA .us USD Dollar 1 #####-#### ^\d{5}(-\d{4})?$ en-US,es-US,haw,fr 6252001 +US USA 840 US UnitedStates Washington 9629091 310232863 NA .us USD Dollar 1 #####-#### ^\d{5}(-\d{4})?$ en-US,es-US,haw,fr 6252001 CA,MX,CU UY URY 858 UY Uruguay Montevideo 176220 3477000 SA .uy UYU Peso 598 ##### ^(\d{5})$ es-UY 3439705 BR,AR UZ UZB 860 UZ Uzbekistan Tashkent 447400 27865738 AS .uz UZS Som 998 ###### ^(\d{6})$ uz,ru,tg 1512440 TM,AF,KG,TJ,KZ VA VAT 336 VT Vatican Vatican City 0.44 921 EU .va EUR Euro 379 ##### ^(\d{5})$ la,it,fr 3164670 IT diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..81e89b0 Binary files /dev/null and b/images/logo.png differ diff --git a/nohup.out b/nohup.out deleted file mode 100644 index f00298c..0000000 --- a/nohup.out +++ /dev/null @@ -1,498 +0,0 @@ -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn367495263_KR.ovpn -Use --help for more information. -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn637199404_ES.ovpn -Use --help for more information. -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn648330587_JP.ovpn -Use --help for more information. -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn244744791_AT.ovpn -Use --help for more information. -OpenVPN 2.3.13 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Nov 3 2016 - -General Options: ---config file : Read configuration options from file. ---help : Show options. ---version : Show copyright and version information. - -Tunnel Options: ---local host : Local host name or ip address. Implies --bind. ---remote host [port] : Remote host name or ip address. ---remote-random : If multiple --remote options specified, choose one randomly. ---remote-random-hostname : Add a random string to remote DNS name. ---mode m : Major mode, m = 'p2p' (default, point-to-point) or 'server'. ---proto p : Use protocol p for communicating with peer. - p = udp (default), tcp-server, or tcp-client ---proto-force p : only consider protocol p in list of connection profiles. - p = udp6, tcp6-server, or tcp6-client (ipv6) ---connect-retry n : For --proto tcp-client, number of seconds to wait - between connection retries (default=5). ---connect-timeout n : For --proto tcp-client, connection timeout (in seconds). ---connect-retry-max n : Maximum connection attempt retries, default infinite. ---http-proxy s p [up] [auth] : Connect to remote host - through an HTTP proxy at address s and port p. - If proxy authentication is required, - up is a file containing username/password on 2 lines, or - 'stdin' to prompt from console. Add auth='ntlm' if - the proxy requires NTLM authentication. ---http-proxy s p 'auto[-nct]' : Like the above directive, but automatically - determine auth method and query for username/password - if needed. auto-nct disables weak proxy auth methods. ---http-proxy-retry : Retry indefinitely on HTTP proxy errors. ---http-proxy-timeout n : Proxy timeout in seconds, default=5. ---http-proxy-option type [parm] : Set extended HTTP proxy options. - Repeat to set multiple options. - VERSION version (default=1.0) - AGENT user-agent ---socks-proxy s [p] [up] : Connect to remote host through a Socks5 proxy at - address s and port p (default port = 1080). - If proxy authentication is required, - up is a file containing username/password on 2 lines, or - 'stdin' to prompt for console. ---socks-proxy-retry : Retry indefinitely on Socks proxy errors. ---resolv-retry n: If hostname resolve fails for --remote, retry - resolve for n seconds before failing (disabled by default). - Set n="infinite" to retry indefinitely. ---float : Allow remote to change its IP address/port, such as through - DHCP (this is the default if --remote is not used). ---ipchange cmd : Run command cmd on remote ip address initial - setting or change -- execute as: cmd ip-address port# ---port port : TCP/UDP port # for both local and remote. ---lport port : TCP/UDP port # for local (default=1194). Implies --bind. ---rport port : TCP/UDP port # for remote (default=1194). ---bind : Bind to local address and port. (This is the default unless - --proto tcp-client or --http-proxy or --socks-proxy is used). ---nobind : Do not bind to local address and port. ---dev tunX|tapX : tun/tap device (X can be omitted for dynamic device. ---dev-type dt : Which device type are we using? (dt = tun or tap) Use - this option only if the tun/tap device used with --dev - does not begin with "tun" or "tap". ---dev-node node : Explicitly set the device node rather than using - /dev/net/tun, /dev/tun, /dev/tap, etc. ---lladdr hw : Set the link layer address of the tap device. ---topology t : Set --dev tun topology: 'net30', 'p2p', or 'subnet'. ---tun-ipv6 : Build tun link capable of forwarding IPv6 traffic. ---iproute cmd : Use this command instead of default /usr/bin/ip. ---ifconfig l rn : TUN: configure device to use IP address l as a local - endpoint and rn as a remote endpoint. l & rn should be - swapped on the other peer. l & rn must be private - addresses outside of the subnets used by either peer. - TAP: configure device to use IP address l as a local - endpoint and rn as a subnet mask. ---ifconfig-ipv6 l r : configure device to use IPv6 address l as local - endpoint (as a /64) and r as remote endpoint ---ifconfig-noexec : Don't actually execute ifconfig/netsh command, instead - pass --ifconfig parms by environment to scripts. ---ifconfig-nowarn : Don't warn if the --ifconfig option on this side of the - connection doesn't match the remote side. ---route network [netmask] [gateway] [metric] : - Add route to routing table after connection - is established. Multiple routes can be specified. - netmask default: 255.255.255.255 - gateway default: taken from --route-gateway or --ifconfig - Specify default by leaving blank or setting to "nil". ---route-ipv6 network/bits [gateway] [metric] : - Add IPv6 route to routing table after connection - is established. Multiple routes can be specified. - gateway default: taken from --route-ipv6-gateway or --ifconfig ---max-routes n : Specify the maximum number of routes that may be defined - or pulled from a server. ---route-gateway gw|'dhcp' : Specify a default gateway for use with --route. ---route-metric m : Specify a default metric for use with --route. ---route-delay n [w] : Delay n seconds after connection initiation before - adding routes (may be 0). If not specified, routes will - be added immediately after tun/tap open. On Windows, wait - up to w seconds for TUN/TAP adapter to come up. ---route-up cmd : Run command cmd after routes are added. ---route-pre-down cmd : Run command cmd before routes are removed. ---route-noexec : Don't add routes automatically. Instead pass routes to - --route-up script using environmental variables. ---route-nopull : When used with --client or --pull, accept options pushed - by server EXCEPT for routes and dhcp options. ---allow-pull-fqdn : Allow client to pull DNS names from server for - --ifconfig, --route, and --route-gateway. ---redirect-gateway [flags]: Automatically execute routing - commands to redirect all outgoing IP traffic through the - VPN. Add 'local' flag if both OpenVPN servers are directly - connected via a common subnet, such as with WiFi. - Add 'def1' flag to set default route using using 0.0.0.0/1 - and 128.0.0.0/1 rather than 0.0.0.0/0. Add 'bypass-dhcp' - flag to add a direct route to DHCP server, bypassing tunnel. - Add 'bypass-dns' flag to similarly bypass tunnel for DNS. ---redirect-private [flags]: Like --redirect-gateway, but omit actually changing - the default gateway. Useful when pushing private subnets. ---client-nat snat|dnat network netmask alias : on client add 1-to-1 NAT rule. ---push-peer-info : (client only) push client info to server. ---setenv name value : Set a custom environmental variable to pass to script. ---setenv FORWARD_COMPATIBLE 1 : Relax config file syntax checking to allow - directives for future OpenVPN versions to be ignored. ---ignore-unkown-option opt1 opt2 ...: Relax config file syntax. Allow - these options to be ignored when unknown ---script-security level: Where level can be: - 0 -- strictly no calling of external programs - 1 -- (default) only call built-ins such as ifconfig - 2 -- allow calling of built-ins and scripts - 3 -- allow password to be passed to scripts via env ---shaper n : Restrict output to peer to n bytes per second. ---keepalive n m : Helper option for setting timeouts in server mode. Send - ping once every n seconds, restart if ping not received - for m seconds. ---inactive n [bytes] : Exit after n seconds of activity on tun/tap device - produces a combined in/out byte count < bytes. ---ping-exit n : Exit if n seconds pass without reception of remote ping. ---ping-restart n: Restart if n seconds pass without reception of remote ping. ---ping-timer-rem: Run the --ping-exit/--ping-restart timer only if we have a - remote address. ---ping n : Ping remote once every n seconds over TCP/UDP port. ---multihome : Configure a multi-homed UDP server. ---fast-io : (experimental) Optimize TUN/TAP/UDP writes. ---remap-usr1 s : On SIGUSR1 signals, remap signal (s='SIGHUP' or 'SIGTERM'). ---persist-tun : Keep tun/tap device open across SIGUSR1 or --ping-restart. ---persist-remote-ip : Keep remote IP address across SIGUSR1 or --ping-restart. ---persist-local-ip : Keep local IP address across SIGUSR1 or --ping-restart. ---persist-key : Don't re-read key files across SIGUSR1 or --ping-restart. ---passtos : TOS passthrough (applies to IPv4 only). ---tun-mtu n : Take the tun/tap device MTU to be n and derive the - TCP/UDP MTU from it (default=1500). ---tun-mtu-extra n : Assume that tun/tap device might return as many - as n bytes more than the tun-mtu size on read - (default TUN=0 TAP=32). ---link-mtu n : Take the TCP/UDP device MTU to be n and derive the tun MTU - from it. ---mtu-disc type : Should we do Path MTU discovery on TCP/UDP channel? - 'no' -- Never send DF (Don't Fragment) frames - 'maybe' -- Use per-route hints - 'yes' -- Always DF (Don't Fragment) ---mtu-test : Empirically measure and report MTU. ---fragment max : Enable internal datagram fragmentation so that no UDP - datagrams are sent which are larger than max bytes. - Adds 4 bytes of overhead per datagram. ---mssfix [n] : Set upper bound on TCP MSS, default = tun-mtu size - or --fragment max value, whichever is lower. ---sndbuf size : Set the TCP/UDP send buffer size. ---rcvbuf size : Set the TCP/UDP receive buffer size. ---mark value : Mark encrypted packets being sent with value. The mark value - can be matched in policy routing and packetfilter rules. ---txqueuelen n : Set the tun/tap TX queue length to n (Linux only). ---memstats file : Write live usage stats to memory mapped binary file. ---mlock : Disable Paging -- ensures key material and tunnel - data will never be written to disk. ---up cmd : Run command cmd after successful tun device open. - Execute as: cmd tun/tap-dev tun-mtu link-mtu \ - ifconfig-local-ip ifconfig-remote-ip - (pre --user or --group UID/GID change) ---up-delay : Delay tun/tap open and possible --up script execution - until after TCP/UDP connection establishment with peer. ---down cmd : Run command cmd after tun device close. - (post --user/--group UID/GID change and/or --chroot) - (command parameters are same as --up option) ---down-pre : Run --down command before TUN/TAP close. ---up-restart : Run up/down commands for all restarts including those - caused by --ping-restart or SIGUSR1 ---user user : Set UID to user after initialization. ---group group : Set GID to group after initialization. ---chroot dir : Chroot to this directory after initialization. ---cd dir : Change to this directory before initialization. ---daemon [name] : Become a daemon after initialization. - The optional 'name' parameter will be passed - as the program name to the system logger. ---syslog [name] : Output to syslog, but do not become a daemon. - See --daemon above for a description of the 'name' parm. ---inetd [name] ['wait'|'nowait'] : Run as an inetd or xinetd server. - See --daemon above for a description of the 'name' parm. ---log file : Output log to file which is created/truncated on open. ---log-append file : Append log to file, or create file if nonexistent. ---suppress-timestamps : Don't log timestamps to stdout/stderr. ---writepid file : Write main process ID to file. ---nice n : Change process priority (>0 = lower, <0 = higher). ---echo [parms ...] : Echo parameters to log output. ---verb n : Set output verbosity to n (default=1): - (Level 3 is recommended if you want a good summary - of what's happening without being swamped by output). - : 0 -- no output except fatal errors - : 1 -- startup info + connection initiated messages + - non-fatal encryption & net errors - : 2,3 -- show TLS negotiations & route info - : 4 -- show parameters - : 5 -- show 'RrWw' chars on console for each packet sent - and received from TCP/UDP (caps) or tun/tap (lc) - : 6 to 11 -- debug messages of increasing verbosity ---mute n : Log at most n consecutive messages in the same category. ---status file n : Write operational status to file every n seconds. ---status-version [n] : Choose the status file format version number. - Currently, n can be 1, 2, or 3 (default=1). ---disable-occ : Disable options consistency check between peers. ---gremlin mask : Special stress testing mode (for debugging only). ---comp-lzo : Use fast LZO compression -- may add up to 1 byte per - packet for uncompressible data. ---comp-noadapt : Don't use adaptive compression when --comp-lzo - is specified. ---management ip port [pass] : Enable a TCP server on ip:port to handle - management functions. pass is a password file - or 'stdin' to prompt from console. - To listen on a unix domain socket, specific the pathname - in place of ip and use 'unix' as the port number. ---management-client : Management interface will connect as a TCP client to - ip/port rather than listen as a TCP server. ---management-query-passwords : Query management channel for private key - and auth-user-pass passwords. ---management-query-proxy : Query management channel for proxy information. ---management-query-remote : Query management channel for --remote directive. ---management-hold : Start OpenVPN in a hibernating state, until a client - of the management interface explicitly starts it. ---management-signal : Issue SIGUSR1 when management disconnect event occurs. ---management-forget-disconnect : Forget passwords when management disconnect - event occurs. ---management-up-down : Report tunnel up/down events to management interface. ---management-log-cache n : Cache n lines of log file history for usage - by the management channel. ---management-client-user u : When management interface is a unix socket, only - allow connections from user u. ---management-client-group g : When management interface is a unix socket, only - allow connections from group g. ---management-client-auth : gives management interface client the responsibility - to authenticate clients after their client certificate - has been verified. ---management-client-pf : management interface clients must specify a packet - filter file for each connecting client. ---plugin m [str]: Load plug-in module m passing str as an argument - to its initialization function. - -Multi-Client Server options (when --mode server is used): ---server network netmask : Helper option to easily configure server mode. ---server-ipv6 network/bits : Configure IPv6 server mode. ---server-bridge [IP netmask pool-start-IP pool-end-IP] : Helper option to - easily configure ethernet bridging server mode. ---push "option" : Push a config file option back to the peer for remote - execution. Peer must specify --pull in its config file. ---push-reset : Don't inherit global push list for specific - client instance. ---ifconfig-pool start-IP end-IP [netmask] : Set aside a pool of subnets - to be dynamically allocated to connecting clients. ---ifconfig-pool-linear : Use individual addresses rather than /30 subnets - in tun mode. Not compatible with Windows clients. ---ifconfig-pool-persist file [seconds] : Persist/unpersist ifconfig-pool - data to file, at seconds intervals (default=600). - If seconds=0, file will be treated as read-only. ---ifconfig-ipv6-pool base-IP/bits : set aside an IPv6 network block - to be dynamically allocated to connecting clients. ---ifconfig-push local remote-netmask : Push an ifconfig option to remote, - overrides --ifconfig-pool dynamic allocation. - Only valid in a client-specific config file. ---ifconfig-ipv6-push local/bits remote : Push an ifconfig-ipv6 option to - remote, overrides --ifconfig-ipv6-pool allocation. - Only valid in a client-specific config file. ---iroute network [netmask] : Route subnet to client. ---iroute-ipv6 network/bits : Route IPv6 subnet to client. - Sets up internal routes only. - Only valid in a client-specific config file. ---disable : Client is disabled. - Only valid in a client-specific config file. ---client-cert-not-required : Don't require client certificate, client - will authenticate using username/password. ---username-as-common-name : For auth-user-pass authentication, use - the authenticated username as the common name, - rather than the common name from the client cert. ---auth-user-pass-verify cmd method: Query client for username/password and - run command cmd to verify. If method='via-env', pass - user/pass via environment, if method='via-file', pass - user/pass via temporary file. ---opt-verify : Clients that connect with options that are incompatible - with those of the server will be disconnected. ---auth-user-pass-optional : Allow connections by clients that don't - specify a username/password. ---no-name-remapping : Allow Common Name and X509 Subject to include - any printable character. ---client-to-client : Internally route client-to-client traffic. ---duplicate-cn : Allow multiple clients with the same common name to - concurrently connect. ---client-connect cmd : Run command cmd on client connection. ---client-disconnect cmd : Run command cmd on client disconnection. ---client-config-dir dir : Directory for custom client config files. ---ccd-exclusive : Refuse connection unless custom client config is found. ---tmp-dir dir : Temporary directory, used for --client-connect return file and plugin communication. ---hash-size r v : Set the size of the real address hash table to r and the - virtual address table to v. ---bcast-buffers n : Allocate n broadcast buffers. ---tcp-queue-limit n : Maximum number of queued TCP output packets. ---tcp-nodelay : Macro that sets TCP_NODELAY socket flag on the server - as well as pushes it to connecting clients. ---learn-address cmd : Run command cmd to validate client virtual addresses. ---connect-freq n s : Allow a maximum of n new connections per s seconds. ---max-clients n : Allow a maximum of n simultaneously connected clients. ---max-routes-per-client n : Allow a maximum of n internal routes per client. ---stale-routes-check n [t] : Remove routes with a last activity timestamp - older than n seconds. Run this check every t - seconds (defaults to n). ---port-share host port [dir] : When run in TCP mode, proxy incoming HTTPS - sessions to a web server at host:port. dir specifies an - optional directory to write origin IP:port data. - -Client options (when connecting to a multi-client server): ---client : Helper option to easily configure client mode. ---auth-user-pass [up] : Authenticate with server using username/password. - up is a file containing the username on the first line, - and a password on the second. If either the password or both - the username and the password are omitted OpenVPN will prompt - for them from console. ---pull : Accept certain config file options from the peer as if they - were part of the local config file. Must be specified - when connecting to a '--mode server' remote host. ---auth-retry t : How to handle auth failures. Set t to - none (default), interact, or nointeract. ---static-challenge t e : Enable static challenge/response protocol using - challenge text t, with e indicating echo flag (0|1) ---server-poll-timeout n : when polling possible remote servers to connect to - in a round-robin fashion, spend no more than n seconds - waiting for a response before trying the next server. ---explicit-exit-notify [n] : On exit/restart, send exit signal to - server/remote. n = # of retries, default=1. - -Data Channel Encryption Options (must be compatible between peers): -(These options are meaningful for both Static Key & TLS-mode) ---secret f [d] : Enable Static Key encryption mode (non-TLS). - Use shared secret file f, generate with --genkey. - The optional d parameter controls key directionality. - If d is specified, use separate keys for each - direction, set d=0 on one side of the connection, - and d=1 on the other side. ---auth alg : Authenticate packets with HMAC using message - digest algorithm alg (default=SHA1). - (usually adds 16 or 20 bytes per packet) - Set alg=none to disable authentication. ---cipher alg : Encrypt packets with cipher algorithm alg - (default=BF-CBC). - Set alg=none to disable encryption. ---prng alg [nsl] : For PRNG, use digest algorithm alg, and - nonce_secret_len=nsl. Set alg=none to disable PRNG. ---keysize n : Size of cipher key in bits (optional). - If unspecified, defaults to cipher-specific default. ---engine [name] : Enable OpenSSL hardware crypto engine functionality. ---no-replay : Disable replay protection. ---mute-replay-warnings : Silence the output of replay warnings to log file. ---replay-window n [t] : Use a replay protection sliding window of size n - and a time window of t seconds. - Default n=64 t=15 ---no-iv : Disable cipher IV -- only allowed with CBC mode ciphers. ---replay-persist file : Persist replay-protection state across sessions - using file. ---test-crypto : Run a self-test of crypto features enabled. - For debugging only. - -TLS Key Negotiation Options: -(These options are meaningful only for TLS-mode) ---tls-server : Enable TLS and assume server role during TLS handshake. ---tls-client : Enable TLS and assume client role during TLS handshake. ---key-method m : Data channel key exchange method. m should be a method - number, such as 1 (default), 2, etc. ---ca file : Certificate authority file in .pem format containing - root certificate. ---capath dir : A directory of trusted certificates (CAs and CRLs). ---dh file : File containing Diffie Hellman parameters - in .pem format (for --tls-server only). - Use "openssl dhparam -out dh1024.pem 1024" to generate. ---cert file : Local certificate in .pem format -- must be signed - by a Certificate Authority in --ca file. ---extra-certs file : one or more PEM certs that complete the cert chain. ---key file : Local private key in .pem format. ---tls-version-min ['or-highest'] : sets the minimum TLS version we - will accept from the peer. If version is unrecognized and 'or-highest' - is specified, require max TLS version supported by SSL implementation. ---tls-version-max : sets the maximum TLS version we will use. ---pkcs12 file : PKCS#12 file containing local private key, local certificate - and optionally the root CA certificate. ---x509-username-field : Field in x509 certificate containing the username. - Default is CN in the Subject field. ---verify-hash : Specify SHA1 fingerprint for level-1 cert. ---tls-cipher l : A list l of allowable TLS ciphers separated by : (optional). - : Use --show-tls to see a list of supported TLS ciphers. ---tls-timeout n : Packet retransmit timeout on TLS control channel - if no ACK from remote within n seconds (default=2). ---reneg-bytes n : Renegotiate data chan. key after n bytes sent and recvd. ---reneg-pkts n : Renegotiate data chan. key after n packets sent and recvd. ---reneg-sec n : Renegotiate data chan. key after n seconds (default=3600). ---hand-window n : Data channel key exchange must finalize within n seconds - of handshake initiation by any peer (default=60). ---tran-window n : Transition window -- old key can live this many seconds - after new key renegotiation begins (default=3600). ---single-session: Allow only one session (reset state on restart). ---tls-exit : Exit on TLS negotiation failure. ---tls-auth f [d]: Add an additional layer of authentication on top of the TLS - control channel to protect against DoS attacks. - f (required) is a shared-secret passphrase file. - The optional d parameter controls key directionality, - see --secret option for more info. ---askpass [file]: Get PEM password from controlling tty before we daemonize. ---auth-nocache : Don't cache --askpass or --auth-user-pass passwords. ---crl-verify crl ['dir']: Check peer certificate against a CRL. ---tls-verify cmd: Run command cmd to verify the X509 name of a - pending TLS connection that has otherwise passed all other - tests of certification. cmd should return 0 to allow - TLS handshake to proceed, or 1 to fail. (cmd is - executed as 'cmd certificate_depth subject') ---tls-export-cert [directory] : Get peer cert in PEM format and store it - in an openvpn temporary file in [directory]. Peer cert is - stored before tls-verify script execution and deleted after. ---verify-x509-name name: Accept connections only from a host with X509 subject - DN name. The remote host must also pass all other tests - of verification. ---ns-cert-type t: Require that peer certificate was signed with an explicit - nsCertType designation t = 'client' | 'server'. ---x509-track x : Save peer X509 attribute x in environment for use by - plugins and management interface. ---remote-cert-ku v ... : Require that the peer certificate was signed with - explicit key usage, you can specify more than one value. - value should be given in hex format. ---remote-cert-eku oid : Require that the peer certificate was signed with - explicit extended key usage. Extended key usage can be encoded - as an object identifier or OpenSSL string representation. ---remote-cert-tls t: Require that peer certificate was signed with explicit - key usage and extended key usage based on RFC3280 TLS rules. - t = 'client' | 'server'. - -PKCS#11 Options: ---pkcs11-providers provider ... : PKCS#11 provider to load. ---pkcs11-protected-authentication [0|1] ... : Use PKCS#11 protected authentication - path. Set for each provider. ---pkcs11-private-mode hex ... : PKCS#11 private key mode mask. - 0 : Try to determind automatically (default). - 1 : Use Sign. - 2 : Use SignRecover. - 4 : Use Decrypt. - 8 : Use Unwrap. ---pkcs11-cert-private [0|1] ... : Set if login should be performed before - certificate can be accessed. Set for each provider. ---pkcs11-pin-cache seconds : Number of seconds to cache PIN. The default is -1 - cache until token is removed. ---pkcs11-id-management : Acquire identity from management interface. ---pkcs11-id serialized-id 'id' : Identity to use, get using standalone --show-pkcs11-ids - -SSL Library information: ---show-ciphers : Show cipher algorithms to use with --cipher option. ---show-digests : Show message digest algorithms to use with --auth option. ---show-engines : Show hardware crypto accelerator engines (if available). ---show-tls : Show all TLS ciphers (TLS used only as a control channel). - -Generate a random key (only for non-TLS static key encryption mode): ---genkey : Generate a random key to be used as a shared secret, - for use with the --secret option. ---secret file : Write key to file. - -Tun/tap config mode (available with linux 2.4+): ---mktun : Create a persistent tunnel. ---rmtun : Remove a persistent tunnel. ---dev tunX|tapX : tun/tap device ---dev-type dt : Device type. See tunnel options above for details. ---user user : User to set privilege to. ---group group : Group to set privilege to. - -PKCS#11 standalone options: ---show-pkcs11-ids [provider] [cert_private] : Show PKCS#11 available ids. - --verb option can be added *BEFORE* this. - -General Standalone Options: ---show-gateway : Show info about default gateway. -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn556528734_HK.ovpn -Use --help for more information. -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn820455832_RU.ovpn -Use --help for more information. -Options error: In [CMD-LINE]:1: Error opening configuration file: vpn451511822_PS.ovpn -Use --help for more information. diff --git a/vpn/7proxies/7proxies.com-freevpn.ovpn b/vpn/7proxies/7proxies.com-freevpn.ovpn new file mode 100644 index 0000000..a9f752a --- /dev/null +++ b/vpn/7proxies/7proxies.com-freevpn.ovpn @@ -0,0 +1,76 @@ +client +proto udp +remote 104.193.226.135 1194 +dev tun +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +verify-x509-name server_bl7QmTVWRrF2sNfJ name +auth SHA256 +auth-nocache +cipher AES-128-GCM +tls-client +tls-version-min 1.2 +tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256 +setenv opt block-outside-dns # Prevent Windows 10 DNS leak +verb 3 + +-----BEGIN CERTIFICATE----- +MIIBwTCCAWegAwIBAgIJAP4uc123yxlFMAoGCCqGSM49BAMCMB4xHDAaBgNVBAMM +E2NuX25NSzZKNmplbUdOYWVrbnIwHhcNMTkwNjIzMjEzNTU1WhcNMjkwNjIwMjEz +NTU1WjAeMRwwGgYDVQQDDBNjbl9uTUs2SjZqZW1HTmFla25yMFkwEwYHKoZIzj0C +AQYIKoZIzj0DAQcDQgAExvcR6ez9rh7g10sutK/7VF1NhnM5s9V6EZ7l+OXge6Rq +ZkCT/B50cKE9e1Tb19wE962pJLiwNdoyRfknoKwvzKOBjTCBijAdBgNVHQ4EFgQU +ZeGW9naJ+W6Pw5OHctWIBpdhhKowTgYDVR0jBEcwRYAUZeGW9naJ+W6Pw5OHctWI +BpdhhKqhIqQgMB4xHDAaBgNVBAMME2NuX25NSzZKNmplbUdOYWVrbnKCCQD+LnNd +t8sZRTAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAKBggqhkjOPQQDAgNIADBF +AiEAigq72cbyaNHSu+yYvoxFeP0bbHxswEH8o9plV1gsdHgCIGhFOndKXE9vi4nQ +STzW+uXAMMH0GsjVWwpC03KUxk2L +-----END CERTIFICATE----- + + +-----BEGIN CERTIFICATE----- +MIIB1TCCAXqgAwIBAgIRAMYF27cF0trFhZSXoLAPkCQwCgYIKoZIzj0EAwIwHjEc +MBoGA1UEAwwTY25fbk1LNko2amVtR05hZWtucjAeFw0xOTA2MjMyMjQ4NDVaFw0y +MjA2MDcyMjQ4NDVaMBcxFTATBgNVBAMMDGZyZWU3cHJveGllczBZMBMGByqGSM49 +AgEGCCqGSM49AwEHA0IABPV4fMNP31PaKWgdBeAYtq8KzYTdkluUKlpWxTznePwj +1l0GOgOMquUSUMBcpTKb0P+Fx78tfSRamNqfhLh+6vqjgZ8wgZwwCQYDVR0TBAIw +ADAdBgNVHQ4EFgQUL1UD4DgSL/I7XT7740+2eFqa1S8wTgYDVR0jBEcwRYAUZeGW +9naJ+W6Pw5OHctWIBpdhhKqhIqQgMB4xHDAaBgNVBAMME2NuX25NSzZKNmplbUdO +YWVrbnKCCQD+LnNdt8sZRTATBgNVHSUEDDAKBggrBgEFBQcDAjALBgNVHQ8EBAMC +B4AwCgYIKoZIzj0EAwIDSQAwRgIhAJcvVKtZln5c5Q0TIKMFELDuG0UnQYvbK5c2 +c5kcxWgAAiEA11NDluLRqeVPlnYlRKB6DhHT+Bk/7791mVmBFydc7mI= +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUbM6O5l2fQSh2tu4 +7bR7c6szIsOgywcM2ctwNWLaisWhRANCAAT1eHzDT99T2iloHQXgGLavCs2E3ZJb +lCpaVsU853j8I9ZdBjoDjKrlElDAXKUym9D/hce/LX0kWpjan4S4fur6 +-----END PRIVATE KEY----- + + +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +03ea8913e615495d08b82d03c35f7313 +badb0e5f904ce2c1d8c326159deb9531 +46426ab2124dfc9a1877b525b2e33b49 +bcddd2a302d590de6db19d81b49da9dd +b36e752637385c0e8b4f86bebdd4bf2e +4d7ef88dfb2b9e521a63fcaca0568209 +e27d4abc63ade1a04330efddaff7aafa +8fc1d4b16e8b7238998367ebf85829d4 +572fb5fcbddff0a06aba815a44871288 +a9759d06a7d3c526f17dc12c2227b953 +5edc883f6d8866a519e36844dad3cc90 +ba1d42f2a56b3ede3abee13f7b4d30aa +fc838d3920a2ad77d265ebb145f86073 +874405f3726f694efe9df43f492b13e4 +db170c5f27b21e4a200af6116a165ae0 +417e41a84e1c29bd2936cad14f279a79 +-----END OpenVPN Static key V1----- + diff --git a/vpn/7proxies/trialnote.txt b/vpn/7proxies/trialnote.txt new file mode 100644 index 0000000..b0bd099 --- /dev/null +++ b/vpn/7proxies/trialnote.txt @@ -0,0 +1 @@ +lifetime free. diff --git a/vpn/7proxies/vpn-get-ovpn.sh b/vpn/7proxies/vpn-get-ovpn.sh new file mode 100644 index 0000000..e69de29 diff --git a/vpn/7proxies/vpn-get-pass.sh b/vpn/7proxies/vpn-get-pass.sh new file mode 100644 index 0000000..e69de29 diff --git a/vpn/airvpn/pass.txt b/vpn/airvpn/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/airvpn/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/airvpn/vpn-get-ovpn.sh b/vpn/airvpn/vpn-get-ovpn.sh new file mode 100755 index 0000000..121e420 --- /dev/null +++ b/vpn/airvpn/vpn-get-ovpn.sh @@ -0,0 +1,2 @@ +#m4nual +echo "This provider does not permit downloading ovpn files in an automatic way." diff --git a/vpn/airvpn/vpn-get-pass.sh b/vpn/airvpn/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/airvpn/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/cyberghost/pass.txt b/vpn/cyberghost/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/cyberghost/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/cyberghost/vpn-get-ovpn.sh b/vpn/cyberghost/vpn-get-ovpn.sh new file mode 100755 index 0000000..121e420 --- /dev/null +++ b/vpn/cyberghost/vpn-get-ovpn.sh @@ -0,0 +1,2 @@ +#m4nual +echo "This provider does not permit downloading ovpn files in an automatic way." diff --git a/vpn/cyberghost/vpn-get-pass.sh b/vpn/cyberghost/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/cyberghost/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/expressvpn/pass.txt b/vpn/expressvpn/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/expressvpn/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/expressvpn/vpn-get-ovpn.sh b/vpn/expressvpn/vpn-get-ovpn.sh new file mode 100755 index 0000000..d2461ab --- /dev/null +++ b/vpn/expressvpn/vpn-get-ovpn.sh @@ -0,0 +1,5 @@ +#m4nual +echo "This provider does not permit downloading ovpn files in an automatic way." +#Note: You can download automatically all .ovpn files previous login as you can view below (use your own cookie and CODE): +#for i in {70..75}; do wget -qO- --load-cookies cookies.txt 'https://www.expressvpn.com/custom_installer?cluster_id=$i&code=CODE&os=linux&source=web&ovpn_use_username_auth=1' > $i.ovpn; done +#find . -size 0 -delete diff --git a/vpn/expressvpn/vpn-get-pass.sh b/vpn/expressvpn/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/expressvpn/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/freevpn/vpn-get-ovpn.sh b/vpn/freevpn/vpn-get-ovpn.sh index 2b73046..5fc1f36 100755 --- a/vpn/freevpn/vpn-get-ovpn.sh +++ b/vpn/freevpn/vpn-get-ovpn.sh @@ -1,3 +1,3 @@ #4uto -wget http://freevpn.me/OpenVPN-Certificate-Bundle-Server1.zip 2> /dev/null -unzip OpenVPN-Certificate-Bundle-Server1.zip && cd OpenVPN-Certificate-Bundle-Server1 && mv ./* ../ && cd ../ && rm ./OpenVPN-Certificate-Bundle-Server1.zip && rm -r ./OpenVPN-Certificate-Bundle-Server1 +wget https://freevpn.me/FreeVPN.me-OpenVPN-Bundle.zip --no-check-certificate 2> /dev/null +unzip FreeVPN.me-OpenVPN-Bundle.zip && cd FreeVPN.me-OpenVPN-Bundle && find . -mindepth 2 -type f -print -exec mv {} ../ \; && cd ../ && rm ./FreeVPN.me-OpenVPN-Bundle.zip && rm -r ./FreeVPN.me-OpenVPN-Bundle diff --git a/vpn/ipvanish/pass.txt b/vpn/ipvanish/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/ipvanish/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/ipvanish/vpn-get-ovpn.sh b/vpn/ipvanish/vpn-get-ovpn.sh new file mode 100755 index 0000000..fa8f01a --- /dev/null +++ b/vpn/ipvanish/vpn-get-ovpn.sh @@ -0,0 +1,3 @@ +#4uto +wget https://www.ipvanish.com/software/configs/configs.zip 2> /dev/null +unzip -j configs.zip && rm configs.zip diff --git a/vpn/ipvanish/vpn-get-pass.sh b/vpn/ipvanish/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/ipvanish/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/nordvpn/pass.txt b/vpn/nordvpn/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/nordvpn/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/nordvpn/vpn-get-ovpn.sh b/vpn/nordvpn/vpn-get-ovpn.sh new file mode 100755 index 0000000..b3719a2 --- /dev/null +++ b/vpn/nordvpn/vpn-get-ovpn.sh @@ -0,0 +1,5 @@ +#4uto +rm *.ovpn 2> /dev/null +#wget https://nordvpn.com/api/static/ca_and_tls_auth_certificates.zip +wget https://nordvpn.com/api/files/zip +unzip \*zip && rm *zip diff --git a/vpn/nordvpn/vpn-get-pass.sh b/vpn/nordvpn/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/nordvpn/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/protonvpn/pass.txt b/vpn/protonvpn/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/protonvpn/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/protonvpn/vpn-get-ovpn.sh b/vpn/protonvpn/vpn-get-ovpn.sh new file mode 100755 index 0000000..d2461ab --- /dev/null +++ b/vpn/protonvpn/vpn-get-ovpn.sh @@ -0,0 +1,5 @@ +#m4nual +echo "This provider does not permit downloading ovpn files in an automatic way." +#Note: You can download automatically all .ovpn files previous login as you can view below (use your own cookie and CODE): +#for i in {70..75}; do wget -qO- --load-cookies cookies.txt 'https://www.expressvpn.com/custom_installer?cluster_id=$i&code=CODE&os=linux&source=web&ovpn_use_username_auth=1' > $i.ovpn; done +#find . -size 0 -delete diff --git a/vpn/protonvpn/vpn-get-pass.sh b/vpn/protonvpn/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/protonvpn/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/proxysh/pass.txt b/vpn/proxysh/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/proxysh/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/proxysh/vpn-get-ovpn.sh b/vpn/proxysh/vpn-get-ovpn.sh new file mode 100755 index 0000000..4984057 --- /dev/null +++ b/vpn/proxysh/vpn-get-ovpn.sh @@ -0,0 +1,3 @@ +#m4nual +echo "This provider does not permit downloading ovpn files in an automatic way." +echo "Copy ./psh-ovpn-large/Mac, Linux & Android Configs/Individual Servers/*.ovpn in vpn/proxysh dir" diff --git a/vpn/proxysh/vpn-get-pass.sh b/vpn/proxysh/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/proxysh/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/slickvpn/pass.txt b/vpn/slickvpn/pass.txt new file mode 100644 index 0000000..e69de29 diff --git a/vpn/slickvpn/vpn-get-ovpn.sh b/vpn/slickvpn/vpn-get-ovpn.sh new file mode 100644 index 0000000..d457f5a --- /dev/null +++ b/vpn/slickvpn/vpn-get-ovpn.sh @@ -0,0 +1,7 @@ +#4uto +for i in $(wget https://www.slickvpn.com/locations/ -q -O -); do + ovpnfile=$(echo "$i" | grep OpenVPN | cut -d '"' -f2) + if [ "$ovpnfile" ]; then + wget $ovpnfile 2> /dev/null + fi +done diff --git a/vpn/slickvpn/vpn-get-pass.sh b/vpn/slickvpn/vpn-get-pass.sh new file mode 100755 index 0000000..3f0d070 --- /dev/null +++ b/vpn/slickvpn/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac + diff --git a/vpn/strongvpn/ca.crt b/vpn/strongvpn/ca.crt new file mode 100644 index 0000000..23c8d19 --- /dev/null +++ b/vpn/strongvpn/ca.crt @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIExzCCA6+gAwIBAgIJAKl5ZQ8Me/ZNMA0GCSqGSIb3DQEBBQUAMIGdMQswCQYD +VQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbi1GcmFuY2lzY28xHDAa +BgNVBAoTE3JlbGlhYmxlaG9zdGluZy5jb20xHzAdBgNVBAMTFnJlbGlhYmxlaG9z +dGluZy5jb20gQ0ExKjAoBgkqhkiG9w0BCQEWG3RlY2hpZXNAcmVsaWFibGVob3N0 +aW5nLmNvbTAeFw0xNTEwMjMxNTQ5MzZaFw0yNTEwMjAxNTQ5MzZaMIGdMQswCQYD +VQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbi1GcmFuY2lzY28xHDAa +BgNVBAoTE3JlbGlhYmxlaG9zdGluZy5jb20xHzAdBgNVBAMTFnJlbGlhYmxlaG9z +dGluZy5jb20gQ0ExKjAoBgkqhkiG9w0BCQEWG3RlY2hpZXNAcmVsaWFibGVob3N0 +aW5nLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJx5vDc0L95X +zPP06ISdY2aWNsocGaO0FzaH7Ke3k7Uh20vwrSaK7yHL4W6tgdw+MKJ0TS0TjFXc +K38ddx4RWBNnGZhrl/GPLssyZvdkKO8ckuOBh5lNu/A8+UY4GCWZkZwUw415ikzr +CdlJ4v0ipdCB4PvbXlK++3wmR7jXX7teqhSqM/WCHN1rA63eysZQAtvLwirc0XAr +LlNx6asoWQHgWYx3QH+AxnRJOZ+K2qhh296Y0VgXQRlkrpEbEn8PQ6Ecxi+SrwXD +bnwt8ZnO/z4K9L/6+9vC9Hyq1ToYlGXWNPukDAmftHYp9Kyqwr2rlnAUu8mgzpZi +B+2zGW9qIdcCAwEAAaOCAQYwggECMB0GA1UdDgQWBBSZ/VBp9M7s0Z8ubQWQAJr7 +XnKcODCB0gYDVR0jBIHKMIHHgBSZ/VBp9M7s0Z8ubQWQAJr7XnKcOKGBo6SBoDCB +nTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1TYW4tRnJhbmNp +c2NvMRwwGgYDVQQKExNyZWxpYWJsZWhvc3RpbmcuY29tMR8wHQYDVQQDExZyZWxp +YWJsZWhvc3RpbmcuY29tIENBMSowKAYJKoZIhvcNAQkBFht0ZWNoaWVzQHJlbGlh +YmxlaG9zdGluZy5jb22CCQCpeWUPDHv2TTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3 +DQEBBQUAA4IBAQBWhVIokYb4eqBIs9eLfOWkxDUsv5yGMBIoX8s+cAsU6ESbxiGV +tRN5I1MQrnXaZEPnbMt9d1Qmog6VIBhUi8GxSJeKd1knF69+r9FqhJk0esWfirJm +ra/gEl5xJiuoy8pPfA9iHqwTJmzvE3Z/F1Z7+NbFkXJDRQw/8RcI1YC15wKWpIiU +Xfm9Jvd85Ft1YhoMZoN4R3Oltg4gf7pFe04KloxYQzpnV2vzQ504oGM5ZTwVvtZ6 +AlDsZr+jR9C/JXR1sr6sM34gbs2uIRvP1Vn6tkRnpeZaM/+z72dtFunHEfEQgscK +NXJRRRLmvDIWzH7BH4HhIqZz3HMHXSrTGF0j +-----END CERTIFICATE----- \ No newline at end of file diff --git a/vpn/strongvpn/pass.txt b/vpn/strongvpn/pass.txt new file mode 100644 index 0000000..13b6940 --- /dev/null +++ b/vpn/strongvpn/pass.txt @@ -0,0 +1,2 @@ +manual +manual diff --git a/vpn/strongvpn/ta.key b/vpn/strongvpn/ta.key new file mode 100644 index 0000000..f092939 --- /dev/null +++ b/vpn/strongvpn/ta.key @@ -0,0 +1,18 @@ +-----BEGIN OpenVPN Static key V1----- +0581c4b7bdd32608258ac97b4b1f6f00 +cc746c0c724c4ab4ca441d6e2b816e98 +6b8ac6703ad513811a3030d4a56a6a71 +c5b1e3785e23e17ea64e79a117d2d162 +14a46e8f9738eee45d104bd79be2544a +0cd27b7f0213abbc4fdde15ad05fc0b4 +79d17cdf67848f356225564525163c08 +8a9a18c72cc38af0c8d011c7a8663c79 +55adcb4ca1f5a958ef25a43db3ace977 +3be08bf85442d6902b42ae3389be8804 +c2746ed807072bf818c1bf9b763b0941 +2b7bd2fcf488505c860ca98d614f098a +09c0cf2260d8e8aaea76cf9ef6621faf +a779bea202bb639040884dc3b6253c11 +0638b3566fe1735fa24f08c1cb455c46 +38968820e082c4c6ba4d1b9d36e7c9cc +-----END OpenVPN Static key V1----- \ No newline at end of file diff --git a/vpn/strongvpn/vpn-get-ovpn.sh b/vpn/strongvpn/vpn-get-ovpn.sh new file mode 100755 index 0000000..121e420 --- /dev/null +++ b/vpn/strongvpn/vpn-get-ovpn.sh @@ -0,0 +1,2 @@ +#m4nual +echo "This provider does not permit downloading ovpn files in an automatic way." diff --git a/vpn/strongvpn/vpn-get-pass-indiv.sh b/vpn/strongvpn/vpn-get-pass-indiv.sh new file mode 100755 index 0000000..7bac89b --- /dev/null +++ b/vpn/strongvpn/vpn-get-pass-indiv.sh @@ -0,0 +1,7 @@ +#m4nual +echo "You must provide an individual login for this OpenVPN peer:" +read -p 'Username: ' uservar +stty echo +read -p 'Password: ' passvar +stty echo +echo $uservar > pass.txt && echo $passvar >> pass.txt diff --git a/vpn/strongvpn/vpn-get-pass.sh b/vpn/strongvpn/vpn-get-pass.sh new file mode 100755 index 0000000..f85040a --- /dev/null +++ b/vpn/strongvpn/vpn-get-pass.sh @@ -0,0 +1,2 @@ +#m4nual +echo "Warning! You must give a different login for each OpenVPN server of this provider." diff --git a/vpn/vpnbook/vpn-get-ovpn.sh b/vpn/vpnbook/vpn-get-ovpn.sh index 570f568..32fd841 100755 --- a/vpn/vpnbook/vpn-get-ovpn.sh +++ b/vpn/vpnbook/vpn-get-ovpn.sh @@ -1,5 +1,5 @@ #4uto rm *.ovpn 2> /dev/null -wget -r -np -l 1 -A zip http://www.vpnbook.com/#openvpn 2> /dev/null +wget -r -np -l 1 -A zip http://www.vpnbook.com/#openvpn --no-check-certificate 2> /dev/null mv ./www.vpnbook.com/free-openvpn-account/*.zip . unzip \*.zip && rm *.zip && rm -rf ./www.vpnbook.com diff --git a/vpn/vpnbook/vpn-get-pass.sh b/vpn/vpnbook/vpn-get-pass.sh index 5209688..f73afb0 100755 --- a/vpn/vpnbook/vpn-get-pass.sh +++ b/vpn/vpnbook/vpn-get-pass.sh @@ -1,3 +1,91 @@ +#!/bin/bash #4uto -echo "vpnbook" > /opt/4nonimizer/vpn/vpnbook/pass.txt -curl www.vpnbook.com/#openvpn 2> /dev/null | grep -E "Password" | awk '{print $2}' | cut -d'<' -f1 | sort -u >> /opt/4nonimizer/vpn/vpnbook/pass.txt +read -r -p "Would you like to attempt to automatically get credentials? [Y/n] " resp + +tmpDir="/tmp/vpnPass/" +workDir="/opt/4nonimizer/vpn/vpnbook/" + +case $resp in + [yY][eE][sS]|[yY]) + userVar=$(curl https://www.vpnbook.com/freevpn 2> /dev/null | grep -E -m1 "Username" | awk '/Username/ {print $2;}' | sed -e 's/<[^>]*>//g') + echo "Username: " $userVar + echo $userVar > $workDir/pass.txt + + # Make our temporary work directory + if [ ! -d $tmpDir ]; then + mkdir $tmpDir + fi + if [ -d $tmpDir ]; then + rm -rf $tmpDir + mkdir $tmpDir + fi + + ############# + # GET IMAGE # + ############# + passLoc=$(curl https://www.vpnbook.com/freevpn 2> /dev/null | grep -E -m1 "Password" | awk '/Password/ {print $3;}' | sed 's/src="//g') + $(wget -O $tmpDir/password.png https://www.vpnbook.com/$passLoc 2> /dev/null) + + $(convert $tmpDir/password.png $tmpDir/pass.tif &> /dev/null) + $(tesseract $tmpDir/pass.tif $tmpDir/pass &> /dev/null) + passText=$(cat $tmpDir/pass.txt) + + ############################### + # Check if missing characters # + ############################### + if [[ $passText == *"?"* ]]; then + echo "Extracted password: " $passText + echo "Please reference this password: " $passText + echo "With the Image I am opening" + $(xdg-open $tmpDir/password.png &> /dev/null &) + read -r -p "Please verify the missing character: " char + sed -i "s/?/$char/g" $tmpDir/pass.txt + userPass=$(sed "s/ //g" $tmpDir/pass.txt) + echo "New Password: " $userPass + read -r -p "Is this correct? [y/N] " answer + case $answer in + [yY][eE][sS]|[yY]) + echo $userPass >> $workDir/pass.txt + ;; + *) + exit 1 + ;; + esac + else + echo $(sed "s/ //g" $tmpDir/pass.txt) >> $workDir/pass.txt + fi + sed -i 's/ //g' $workDir/pass.txt + + +############ +# Clean Up # +############ +rm -rf $tmpDir + + +############### +# Finish Case # +############## + echo "Password updated!" + ;; + *) + exit 1 + ;; +esac + +#m4nual +#read -r -p "Visit https://www.vpnbook.com/#openvpn to get credentials. Do you want to continue [y/N] " response +# +#case $response in +# [yY][eE][sS]|[yY]) +# read -p 'Username: ' uservar +# stty -echo +# read -p 'Password: ' passvar +# stty echo +# echo "" +# echo $uservar > pass.txt && echo $passvar >> pass.txt +# ;; +# *) +# exit 1 +# ;; +#esac diff --git a/vpn/vyprvpn/vpn-get-ovpn.sh b/vpn/vyprvpn/vpn-get-ovpn.sh new file mode 100755 index 0000000..510808d --- /dev/null +++ b/vpn/vyprvpn/vpn-get-ovpn.sh @@ -0,0 +1,6 @@ +#4uto +rm *.ovpn 2> /dev/null +wget https://www.goldenfrog.com/openvpn/VyprVPNOpenVPNFiles.zip 2> /dev/null +unzip VyprVPNOpenVPNFiles.zip +cd GFVyprVPNOpenVPNFiles/VyprVPNOpenVPNFiles/OpenVPN256 && mv ./* ../../.. +cd ../../.. && rm ./VyprVPNOpenVPNFiles.zip && rm -r ./GFVyprVPNOpenVPNFiles diff --git a/vpn/vyprvpn/vpn-get-pass.sh b/vpn/vyprvpn/vpn-get-pass.sh new file mode 100755 index 0000000..4acd756 --- /dev/null +++ b/vpn/vyprvpn/vpn-get-pass.sh @@ -0,0 +1,17 @@ +#m4nual +read -r -p "Do you have a login for this vpn provider [y/N] " response + +case $response in + [yY][eE][sS]|[yY]) + read -p 'Username: ' uservar + stty -echo + read -p 'Password: ' passvar + stty echo + echo "" + echo $uservar > pass.txt && echo $passvar >> pass.txt + ;; + *) + exit 1 + ;; +esac +