Add VPN support

This commit is contained in:
poka 2020-03-26 23:18:29 +01:00
parent f508f38e17
commit 79e3106c08
3 changed files with 26 additions and 7 deletions

View File

@ -56,6 +56,15 @@ get_details() {
fi
}
vpn() {
[[ ! $(which nordvpn) ]] && echo "Installaling NordVPN client... && ./install.sh nordvpn"
vpn_citie=$(shuf -n1 .vpn/countries)
echo "Warning: trying to connect to random cities in the world via NordVPN. If you are connected to this machine via SSH, you will lost the connection..."
echo "VPN connection in 5 seconds, press CTRL+C to cancel..."
sleep 5
nordvpn c $vpn_citie
}
$1
[[ $err == 1 ]] && exit 1 || exit 0

View File

@ -1,7 +0,0 @@
#!/usr/bin/python3
import os
tata = "187364"
os.popen(f'cd data/tmp/torrents/ && mv caca.torrent {tata}.torrent')

17
tata.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
readWords() {
declare -i int="$1"
(( int == 0 )) && {
printf "%s\n" "$int is 0, cant find 0 words"
return 1
}
while read getWords;do
if [[ ${#getWords} -eq $int ]];then
printf "%s\n" "$getWords"
fi
done < /usr/share/dict/words
}
readWords 20