code:
#!/bin/bash

dir_user="./userDIR"
if [[ -e /etc/openvpn/server.conf ]]; then
 if [[ -e /etc/openvpn/openvpn-status.log ]]; then
OPENVPN="on"
 fi
fi

meu_ip () {
MEU_IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
MEU_IP2=$(wget -qO- ipv4.icanhazip.com)
if [[ "$MEU_IP" != "$MEU_IP2" ]]; then
IP="$MEU_IP2"
 else
IP="$MEU_IP"
fi
#PREENXE A VARIAVEL $IP
}

paygen () {
meu_ip
valor1="$1" #Entrada Host
valor2="$IP" #Entrada IP
valor3="$2" #Metodo Requisicao
valor4="$3" #Metodo Conexao
[[ "$valor2" = "" ]] && valor2="127.0.0.1"
#VERIFICA VALOR3
if [ "$valor3" = "1" ]; then
req="GET"
elif [ "$valor3" = "2" ]; then
req="CONNECT"
elif [ "$valor3" = "3" ]; then
req="PUT"
elif [ "$valor3" = "4" ]; then
req="OPTIONS"
elif [ "$valor3" = "5" ]; then
req="DELETE"
elif [ "$valor3" = "6" ]; then
req="HEAD"
elif [ "$valor3" = "7" ]; then
req="TRACE"
elif [ "$valor3" = "8" ]; then
req="PROPATCH"
elif [ "$valor3" = "9" ]; then
req="PATCH"
else
req="GET"
fi
#VERIFICA VALOR4
if [ "$valor4" = "1" ]; then
in="realData"
elif [ "$valor4" = "2" ]; then
in="netData"
elif [ "$valor4" = "3" ]; then
in="raw"
else
in="netData"
fi

name=$(echo $valor1 | awk -F "/" '{print $2'})
[[ "$name" = "" ]] && name=$(echo $valor1 | awk -F "/" '{print $1'})
esquelet="/etc/adm-lite/payloads"
sed -s "s;realData;abc;g" $esquelet > $HOME/$name.txt
sed -i "s;netData;abc;g" $HOME/$name.txt
sed -i "s;raw;abc;g" $HOME/$name.txt
sed -i "s;abc;$in;g" $HOME/$name.txt
sed -i "s;get;$req;g" $HOME/$name.txt
sed -i "s;mhost;$valor1;g" $HOME/$name.txt
sed -i "s;mip;$valor2;g" $HOME/$name.txt
if [[ "$(cat $HOME/$name.txt | egrep -o "$valor1")" = "" ]]; then
rm $HOME/$name.txt
return 1
else
mv -f $HOME/$name.txt $HOME/payloads.txt
return 0
fi
}

minhas_portas () {
unset portavar
portas_var="/tmp/portas"
porta_var="/tmp/portas2"
lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN" > $portas_var
while read port; do
var1=$(echo $port | awk '{print $1}')
var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
 if [ ! -e "$porta_var" ]; then
 echo -e "$var1 $var2" > $porta_var
 fi
 if [ "$(cat $porta_var | grep "$var1" | grep "$var2")" = "" ]; then
 echo -e "$var1 $var2" >> $porta_var
 fi
done < $portas_var
i=1
while read pts; do
[[ "$pts" = "" ]] && break
service_porta[$i]=$(echo "$pts" | awk '{print $2}')
service_serv[$i]=$(echo "$pts" | awk '{print $1}')
portavar+="${service_serv[$i]} ${service_porta[$i]}\n"
i=$(($i+1))
done < $porta_var
rm $portas_var
rm $porta_var
}

infovps () {
meu_ip
minhas_portas
ipvps="$IP\nLISTEN:"
echo -e "IP: $ipvps\n$portavar" > ./infovps-txt
}

fun_sem () {
sed -e "s;auth-user-pass;<auth-user-pass>\n$1\n$2\n</auth-user-pass>;g" $HOME/$1.ovpn > $HOME/teste.ovpn && mv -f $HOME/teste.ovpn $HOME/$1.ovpn
zip $HOME/$1.zip $HOME/$1.ovpn
rm $HOME/$1.ovpn
}

newclient () {
# Generates the custom client.ovpn
cp /etc/openvpn/client-common.txt ~/$1.ovpn
echo "<ca>" >> ~/$1.ovpn
cat /etc/openvpn/easy-rsa/pki/ca.crt >> ~/$1.ovpn
echo "</ca>" >> ~/$1.ovpn
echo "<cert>" >> ~/$1.ovpn
cat /etc/openvpn/easy-rsa/pki/issued/$1.crt >> ~/$1.ovpn
echo "</cert>" >> ~/$1.ovpn
echo "<key>" >> ~/$1.ovpn
cat /etc/openvpn/easy-rsa/pki/private/$1.key >> ~/$1.ovpn
echo "</key>" >> ~/$1.ovpn
echo "<tls-auth>" >> ~/$1.ovpn
cat /etc/openvpn/ta.key >> ~/$1.ovpn
echo "</tls-auth>" >> ~/$1.ovpn
}

open_1 () {
CLIENT="$1"
senha="$2"
daysrnf="$3"
limit="$4"
sen="$5"
cd /etc/openvpn/easy-rsa/
./easyrsa build-client-full $CLIENT nopass
newclient "$CLIENT"
echo ""
echo "$CLIENT KEY" ~/"$CLIENT.ovpn"
valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
datexp=$(date "+%d/%m/%Y" -d "+ $daysrnf days")
useradd -M -s /bin/false -d /home/ovpn/ $CLIENT -e $valid
usermod -p $(openssl passwd -1 $senha) $CLIENT
if [[ "$sen" = "s" || "$sen" = "S" ]]; then
fun_sem $CLIENT $senha
fi
cd /etc/adm-lite
echo "senha: $senha" > $dir_user/$CLIENT
echo "limite: $limit" >> $dir_user/$CLIENT
echo "data: $valid" >> $dir_user/$CLIENT
}

open_2 () {
CLIENT="$1"
cd /etc/openvpn/easy-rsa/
./easyrsa --batch revoke $CLIENT
./easyrsa gen-crl
rm -rf pki/reqs/$CLIENT.req
rm -rf pki/private/$CLIENT.key
rm -rf pki/issued/$CLIENT.crt
rm -rf /etc/openvpn/crl.pem
cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/crl.pem
chown nobody:$GROUPNAME /etc/openvpn/crl.pem
echo ""
userdel --force $CLIENT
cd /etc/adm-lite
if [ -e $dir_user/$CLIENT ]; then
rm $dir_user/$CLIENT
fi
}

function_dropb () {
  if which tput >/dev/null 2>&1; then
      ncolors=$(tput colors)
  fi
  if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
    RED="$(tput setaf 1)"
    GREEN="$(tput setaf 2)"
    YELLOW="$(tput setaf 3)"
    BLUE="$(tput setaf 4)"
    BOLD="$(tput bold)"
    NORMAL="$(tput sgr0)"
  else
    RED=""
    GREEN=""
    YELLOW=""
    BLUE=""
    BOLD=""
    NORMAL=""
  fi
port_dropbear=`ps aux | grep dropbear | awk NR==1 | awk '{print $17;}'`
log=/var/log/auth.log
loginsukses='Password auth succeeded'
clear
printf "${BLUE}${BOLD}"
echo ' '
printf "${NORMAL}"
printf "${BLUE}${BOLD}"
pids=`ps ax |grep dropbear |grep  " $port_dropbear" |awk -F" " '{print $1}'`
for pid in $pids
do
    pidlogs=`grep $pid $log |grep "$loginsukses" |awk -F" " '{print $3}'`
    i=0
    for pidend in $pidlogs
    do
      let i=i+1
    done
    if [ $pidend ];then
       login=`grep $pid $log |grep "$pidend" |grep "$loginsukses"`
       PID=$pid
       user=`echo $login |awk -F" " '{print $10}' | sed -r "s/'/ /g"`
       waktu=`echo $login |awk -F" " '{print $2"-"$1,$3}'`
       while [ ${#waktu} -lt 13 ]; do
           waktu=$waktu" "
       done
       while [ ${#user} -lt 16 ]; do
           user=$user" "
       done
       while [ ${#PID} -lt 8 ]; do
           PID=$PID" "
       done
		printf "${YELLOW}${BOLD}"
       echo "$user $PID $waktu"
		printf "${BLUE}${BOLD}"
    fi
done
echo ""
printf "${NORMAL}"
return
}

fun_ovpn_onl () {
for userovpn in `cat /etc/passwd | grep ovpn | awk -F: '{print $1}'`; do
us=$(cat /etc/openvpn/openvpn-status.log | grep $userovpn | wc -l)
if [ "$us" != "0" ]; then
echo "$userovpn"
fi
done
}

criarusr () {
name="$1"
if [ -z $name ]; then
return 1
fi
if cat /etc/passwd |grep $name: |grep -vi [a-z]$name |grep -v [0-9]$name > /dev/null; then
return 1
fi
pass="$2"
daysrnf="$3"
limit="$4"
if [ "$OPENVPN" = "on" ]; then
open_1 $name $pass $daysrnf $limit s
return 0
fi
valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
useradd -M -s /bin/false $name -e $valid
(echo $pass; echo $pass)|passwd $name 2>/dev/null
echo "senha: $pass" > $dir_user/$name
echo "limite: $limit" >> $dir_user/$name
echo "data: $valid" >> $dir_user/$name
echo "$name $pass $datexp $limit" > ./criarusr-txt
return 0
}

userdelete () {
name="$1"
[[ "$name" = "" ]] && return 1
if [ "$OPENVPN" = "on" ]; then
open_2 $name
return
fi
userdel --force $name > /dev/null 2>/dev/null
kill -9 `ps aux |grep -vi '[a-z]$name' |grep -vi '$name[a-z]' |grep -v '[1-9]$name' |grep -v '$name[1-9]' |grep $name |awk {'print $2'}` 2> /dev/null
if [ -e $dir_user/$name ]; then
rm $dir_user/$name
fi
return 0
}

infousers () {
for namer in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |grep -v "nobody" |grep -vi polkitd |grep -vi system-`; do
[[ "$namer" = "" ]] && break
if [ -e $dir_user/$namer ]; then
_sen=$(cat $dir_user/$namer | grep "senha" | awk '{print $2}')
_limit=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
else
_limit="Null"
_sen="Null"
fi
[[ -z "$_limit" ]] && _limit="Null"
[[ -z "$_sen" ]] && _sen="Null"
data_sec=$(date +%s)
data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
if [ "$data_user" != " never" ]; then
data_user_sec=$(date +%s --date="$data_user")
 if [ "$data_sec" -gt "$data_user_sec" ]; then
dias_user="Null"
else
variavel_soma=$(($data_user_sec - $data_sec))
dias_use=$(($variavel_soma / 86400))
dias_user="$dias_use"
 fi
fi
[[ "$data_user" = " never" ]] && dias_user="Null"
userinfo+="$namer $_sen $_limit $dias_user\n"
done
echo -e "$userinfo" > ./infousers-txt
return 0
}

onlines () {
_data_now=$(date +%s)
for user in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |grep -v "nobody" |grep -vi polkitd |grep -vi system-`; do
ssh_open=$(ps -u $user | grep sshd | wc -l)
ssh_drop=$(function_dropb | grep "$user" | wc -l)
if [ "$OPENVPN" = "on" ]; then
ssh_ovpn=$(fun_ovpn_onl | grep "$user" | wc -l)
 else
ssh_ovpn="0"
fi
u_pid=$(($ssh_open + $ssh_drop))
user_pid=$(($u_pid + $ssh_ovpn))
if [ "$user_pid" -gt "0" ]; then
varbot+="$user $user_pid\n"
fi
done
echo -e "$varbot" > ./onlines-txt
return 0
}

$1 "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"

license: unknown


code:
#!/bin/bash
fun_bar () {
comando[0]="$1"
comando[1]="$2"
 (
[[ -e $HOME/fim ]] && rm $HOME/fim
${comando[0]} -y > /dev/null 2>&1
${comando[1]} -y > /dev/null 2>&1
touch $HOME/fim
 ) > /dev/null 2>&1 &
sp="/-\|"
unset a
while [[ ! -e $HOME/fim ]]; do
  for((i=0; i<5; i++)); do
    echo -ne "\033[1;33m ["
    a+="#"
    echo -ne "\033[1;31m${a}"
    echo -ne "\033[1;33m]"
    echo -ne " - \033[1;33m[\033[1;32m"
    echo -ne "${sp:i%${#sp}:1}"
    echo -e "\033[1;33m]"
    sleep 1
    tput cuu1
    tput dl1
  done
done
echo -e " \033[1;33m[\033[1;31m${a}\033[1;33m] - \033[1;33m[\033[1;32m100%\033[1;33m]\033[0m"
rm $HOME/fim
}
instalar_fun () {
cor[2]="\033[1;37m"
text=$(source trans -b pt:${id} "Instalando")
echo -e "${cor[2]} $text Curl"
fun_bar 'apt-get install screen' 'apt-get install python'
echo -e "${cor[2]} $text Nmap"
fun_bar 'apt-get install lsof' 'apt-get install python3-pip'
echo -e "${cor[2]} $text Lsof"
fun_bar 'apt-get install python' 'apt-get install unzip'
echo -e "${cor[2]} $text Python3"
fun_bar 'apt-get install zip' 'apt-get install apache2'
echo -e "${cor[2]} $text Unzip"
fun_bar 'apt-get install ufw' 'apt-get install nmap'
echo -e "${cor[2]} $text Screen"
fun_bar 'apt-get install figlet' 'apt-get install bc'
echo -e "${cor[2]} $text Apache2"
fun_bar 'apt-get install lynx' 'apt-get install curl'
sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf
service apache2 restart > /dev/null 2>&1
}
    [[ "$1" = "--instalar" ]] && {
    instalar_fun
    exit 0
    }
remover_adm () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[209]}"
read -p " [ s / n ]: " certe_za
[[ "$certe_za" = @(s|S|y|Y) ]] && {
[[ -e /etc/openvpn/server.conf ]] && remover_ovpn & > /dev/null 2>&1
echo -e "${cor[5]} Unistaling python${cor[0]}"
fun_bar 'apt-get purge python' 'apt-get purge python3-pip'
echo -e "${cor[5]} Unistaling Nmap${cor[0]}"
fun_bar 'apt-get purge screen' 'apt-get purge nmap'
echo -e "${cor[5]} Unistaling curl${cor[0]}"
fun_bar 'apt-get purge figlet' 'apt-get purge zip'
echo -e "${cor[5]} Unistaling Dropbear/Squid${cor[0]}"
fun_bar 'apt-get purge bc' 'apt-get purge lynx'
echo -e "${cor[5]} Unistaling Apache2${cor[0]}"
fun_bar 'apt-get purge curl' 'apt-get purge squid'
echo -e "${cor[5]} Unistaling Libs${cor[0]}"
fun_bar 'apt-get purge squid3' 'apt-get purge dropbear'
echo -e "${cor[5]} Unistaling Scripts${cor[0]}"
fun_bar 'apt-get purge apache2' 'apt-get purge php5 libapache2-mod-php5 php5-mcrypt'
apt-get autoremove -y > /dev/null 2>&1
echo -e "${cor[5]} SUCESS! :D${cor[0]}"
[[ -e /etc/adm-lite ]] && rm -rf /etc/adm-lite
echo -e "\033[0m"
 echo -e "${cor[1]} =================================== ${cor[0]}"
 exit
  } || {
 echo -e "${cor[1]} ${txt[210]} ${cor[0]}"
 echo -e "${cor[1]} =================================== ${cor[0]}"
 return
 }
}
clear
#DECLARACAO DE VARIAVEIS
_tmp="./usuarios_cache"
_tmp2="./usuarios_cache2"
_tmp3="./usuarios_cache3"
_tmp4="./usuarios_cache4"
_tmp5="./version"
_cacheDIR="./autoonline"
_dr="./idioma"
dir_user="./userDIR"
dir="/etc/adm-lite"
tempousers="./tempo_conexao"
_modulos="./modulos"
_cores="./cores"

#ARQUIVOS TEMPORARIOS
[[ -e $_tmp ]] && rm $_tmp
[[ -e $_tmp2 ]] && rm $_tmp2
[[ -e $_tmp3 ]] && rm $_tmp3
[[ -e $_tmp4 ]] && rm $_tmp4
[[ -e $_tmp5 ]] && rm $_tmp5
[[ -e $_cacheDIR ]] && rm $_cacheDIR
[[ ! -d "$dir_user" ]] && mkdir $dir_user

#SISTEMADEMODULOS
unset OPENVPN
unset limiter_on
[[ -e /etc/openvpn/server.conf ]] && {
[[ -e /etc/openvpn/openvpn-status.log ]] && OPENVPN="on" || echo -e "OPENVPN ERROR"
}
[[ -e "$_modulos" ]] && {
 while read _module; do
 [[ "$_module" = "OPENSSH" ]] && OPENSSH="on"
 [[ "$_module" = "DROPBEAR" ]] && DROPBEAR="on"
 [[ "$_module" = "VERIFICAR" ]] && VERIFICAR="on"
 done < $_modulos
 } || {
touch $_modulos
}
[[ $(ps x|grep -v grep|grep limiter.sh|awk '{print $1}') ]] &&  limiter_on="\033[1;32mON"
[[ $VERIFICAR = "on" ]] && limiter_on="\033[1;32mON"

#TEXTOS
[[ "$(echo ${txt[0]})" = "" ]] && source idioma_geral
_system=$(cat -n /etc/issue |grep 1 |cut -d' ' -f6,7,8 |sed 's/1//' |sed 's/      //')
[[ "$_os" = "" ]] && system[1]=$(echo $_system) && system[2]=$(echo ${system[1]} | awk '{print $1, $2}') && _os="\033[1;31m${system[2]}"
_on="\033[1;32m${txt[10]}"
_off="\033[1;31m${txt[11]}"

#PIDSVARIAVEIS
unset pid_badvpn && pid_badvpn=$(netstat -nlpt | egrep -o udpgw)
unset fail2_ban && fail2_ban=$(dpkg -l | grep fail2ban | grep ii)
[[ "$pid_badvpn" != "" ]] && _badvpn="$_on" || _badvpn="$_off"
[[ `grep -c "^#ADM" /etc/sysctl.conf` -eq 0 ]] && _tcpspeed="$_off" || _tcpspeed="$_on"
[[ "$fail2_ban" = "" ]] && fail_b="$_off" || fail_b="$_on"
[[ "$VERIFICAR" = "on" ]] && VERIFICAR_PID="$_on" || VERIFICAR_PID="$_off"
[[ -e ./onlines ]] && __onlines="\033[1;31m$(cat ./onlines)" || __onlines="\033[1;31m0"
[[ -e ./vencidos ]] && __vencidos="\033[1;31m$(cat ./vencidos)" || __vencidos="\033[1;31m0"
[[ "$(ps x | grep "ultimatebot" | grep -v "grep")" != "" ]] && bot="$_on" || bot="$_off"
[[ ! -e /etc/adm-lite/versao_script ]] && echo 1 > /etc/adm-lite/versao_script
P_SERVER="80.211.59.63"
v1=$(curl -sSL "${P_SERVER}:81/versaoatt")
v2=$(cat /etc/adm-lite/versao_script)
if [ -e /etc/squid/squid.conf ]; then
squid_var="/etc/squid/squid.conf"
elif [ -e /etc/squid3/squid.conf ]; then
squid_var="/etc/squid3/squid.conf"
fi
[[ -e $squid_var ]] && {
teste_cache="#CACHE DO SQUID"
[[ `grep -c "^$teste_cache" $squid_var` -eq 0 ]] && _cachesquid="$_off" || _cachesquid="$_on"
}

#FUNCOES
funcao_addcores () {
if [ "$1" = "0" ]; then
cor[$2]="\033[0m"
elif [ "$1" = "1" ]; then
cor[$2]="\033[1;31m"
elif [ "$1" = "2" ]; then
cor[$2]="\033[1;32m"
elif [ "$1" = "3" ]; then
cor[$2]="\033[1;33m"
elif [ "$1" = "4" ]; then
cor[$2]="\033[1;34m"
elif [ "$1" = "5" ]; then
cor[$2]="\033[1;35m"
elif [ "$1" = "6" ]; then
cor[$2]="\033[1;36m"
elif [ "$1" = "7" ]; then
cor[$2]="\033[1;37m"
fi
}

funcao_cores1 () {
if [ "$6" = "" ]; then
echo -e "${cor[5]} ${txt[24]} ${cor[0]}"
sleep 2s
return
fi
echo "0" > $1
funcao_cores2 $2 $1
funcao_cores2 $3 $1
funcao_cores2 $4 $1
funcao_cores2 $5 $1
funcao_cores2 $6 $1
funcao_cores2 $7 $1
}

funcao_cores2 () {
if [ "$1" = "1" ]; then
echo -e "\033[1;31m${txt[25]}"
sleep 1s
echo "1" >> $2
elif [ "$1" = "2" ]; then
echo -e "\033[1;32m${txt[25]}"
sleep 1s
echo "2" >> $2
elif [ "$1" = "3" ]; then
echo -e "\033[1;33m${txt[25]}"
sleep 1s
echo "3" >> $2
elif [ "$1" = "4" ]; then
echo -e "\033[1;34m${txt[25]}"
sleep 1s
echo "4" >> $2
elif [ "$1" = "5" ]; then
echo -e "\033[1;35m${txt[25]}"
sleep 1s
echo "5" >> $2
elif [ "$1" = "6" ]; then
echo -e "\033[1;36m${txt[25]}"
sleep 1s
echo "6" >> $2
elif [ "$1" = "7" ]; then
echo -e "\033[1;37m${txt[25]}"
sleep 1s
echo "7" >> $2
elif [ "$1" -gt "7" ]; then
rm $2
funcao_cores1
fi
}

funcao_cores () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[21]}"
echo -e "${cor[1]} • AABBCCDDEEFF"
echo -e "${cor[2]} • AABBCCDDEEFF"
echo -e "${cor[3]} • AABBCCDDEEFF"
echo -e "${cor[4]} • AABBCCDDEEFF"
echo -e "${cor[5]} • AABBCCDDEEFF"
echo -e "${cor[6]} • AABBCCDDEEFF"
ncor[1]="\033[1;31m"
ncor[2]="\033[1;32m"
ncor[3]="\033[1;33m"
ncor[4]="\033[1;34m"
ncor[5]="\033[1;35m"
ncor[6]="\033[1;36m"
ncor[7]="\033[1;37m"
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${ncor[1]} [1]•AA ${ncor[2]} [2]•AA ${ncor[3]} [3]•AA"
echo -e "${ncor[4]} [4]•AA ${ncor[5]} [5]•AA ${ncor[6]} [6]•AA"
echo -e "${ncor[7]} [7]•AA"
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[22]}"
unset ncor
read -p " ${txt[23]} " _cores_
funcao_cores1 $_cores $_cores_
}

[[ -e $_cores ]] && {
_cont="0"
while read _cor; do
funcao_addcores ${_cor} ${_cont}
_cont=$(($_cont + 1))
done < $_cores
} || {
cor[0]="\033[0m"
cor[1]="\033[1;34m"
cor[2]="\033[1;32m"
cor[3]="\033[1;37m"
cor[4]="\033[1;36m"
cor[5]="\033[1;33m"
cor[6]="\033[1;35m"
}

vary_rex () {
echo -e $(echo "$1"| sed 's/../\\x&/g;s/$/ /') && return 0 || return 1
}

funcao_verificacao () {
if [[ $limiter_on = "" ]]; then
unset limiter_on
killall limiter.sh > /dev/null 2>&1
kill -9 $(ps x|grep -v grep|grep limiter.sh|awk '{print $1}')
fi
[[ ! -e $_modulos ]] && touch $_modulos
  [[ "$VERIFICAR" = "on" ]] && {
  active_verif=$(cat $_modulos | egrep -v "VERIFICAR")
  echo "$active_verif" > $_modulos
  for _pids_ in `atq | awk '{print $1}'`; do
   atrm $_pids_
  done
  [[ -e ./vencidos ]] && rm ./vencidos
  [[ -e ./onlines ]] && rm ./onlines
  } || {
  echo "VERIFICAR" >> $_modulos
  echo "at -f /bin/cron now + 1 min" > /bin/cron
  echo "/etc/adm-lite/verifica &" >> /bin/cron
  chmod 777 /bin/cron
  chmod 777 /etc/adm-lite/*
  bash /bin/cron
  }
unset VERIFICAR
unset __onlines
unset __vencidos
}

funcao_idioma () {
idioma[1]="en English"
idioma[2]="fr Franch"
idioma[3]="de German"
idioma[4]="it Italian"
idioma[5]="pt Portuguese"
idioma[6]="es Spanish"
i="1"
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[77]} ${txt[78]}
 ${txt[79]}"
echo -e "${cor[1]} =================================== ${cor[3]}"
while true; do
[[ "${idioma[$i]}" = "" ]] && break
a=$(echo ${idioma[$i]} | awk '{print $2}')
texto1=$(printf '%-20s' "[ $i ]-$a")
i=$(($i+1))
[[ "${idioma[$i]}" = "" ]] && break
a=$(echo ${idioma[$i]} | awk '{print $2}')
texto2=$(printf '%-20s' "[ $i ]-$a")
i=$(($i+1))
[[ "${idioma[$i]}" = "" ]] && break
a=$(echo ${idioma[$i]} | awk '{print $2}')
texto3=$(printf '%-20s' "[ $i ]-$a")
i=$(($i+1))
echo -e "$texto1 $texto2 $texto3"
done
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e " ${txt[82]}"
read -p " => " idiom
number_var $idiom > /dev/null 2>&1
if [ "$var_number" != "" ]; then
 [[ "${idioma[$idiom]}" != "" ]] && id=$(echo ${idioma[$idiom]} | awk '{print $1}')
else
 [[ "$(echo "$idiom" | wc -w)" -lt "3" ]] && {
  [[ "$(echo "${idioma[@]}"|grep "$idiom")" != "" ]] && id="$idiom"
 }
fi
[[ "$id" = "" ]] && {
 echo -e " Error!"
 sleep 1s
 source menu
 exit 0
 }
traduzir $id > /dev/null 2>&1 &
echo "$id" > /etc/adm-lite/idioma_menuinst
while true; do
echo -ne "${cor[2]}["
 for((q=1; q <= 20; q++)); do
 echo -ne "${cor[3]}X"
 sleep 0.5s
 done
if [ -e $HOME/fim ]; then
echo -ne "${cor[2]}] - \033[1;32m[OK][100%]"
rm $HOME/fim
break
 else
echo -ne "${cor[2]}] - ${cor[3]} ${txt[81]}"
echo ""
fi
done
echo ""
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "\033[0m"
unset idioma
exit 0
}

traduzir () {
apt-get install gawk -y > /dev/null 2>&1
[[ -e $_tmp4 ]] && rm $_tmp4
rm $_dr && rm $_idioma
cd /etc/adm-lite
wget https://raw.githubusercontent.com/CarlosPBric005/IDIOMA_VPS/master/$1/idioma
unset txt
touch $HOME/fim
exit 0
}

#PREENXE_VARIAVEL $select_name
select_users () {
_cont="1"
[[ -e $_tmp3 ]] && rm $_tmp3
touch $_tmp3
for u in `awk -F : '$3 > 900 { print $1 }' /etc/passwd | grep -v "nobody" |grep -vi polkitd |grep -vi system-`; do
echo "$_cont $u" >> $_tmp3
echo -e "${cor[2]} |$_cont| >${cor[5]} $u"
[[ "$u" = "" ]] && break
_cont=$(($_cont + 1))
done
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[42]}"
echo -ne "${cor[6]}"
read -p " ${txt[9]} " select_user
if [ "$select_user" = "" ]; then
echo -e "${cor[5]} ${txt[43]}"
return
 fi
 if [ "$select_user" -le "$_cont" ] 1> /dev/null 2> /dev/null
then
select_name=$(cat $_tmp3 | head -$select_user | tail -1 | awk '{print $2}')
echo -e "${cor[5]} $name"
 else
 if cat /etc/passwd |grep $select_user: > /dev/null
then
select_name="$select_user"
else
echo -e "${cor[5]} ${txt[44]}"
echo -e "${cor[5]} ${txt[49]}"
sleep 5s
return
  fi
 fi
unset select_user
}

#PREENXE A VARIAVEL $IP
meu_ip () {
MEU_IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
MEU_IP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" || IP="$MEU_IP"
}

ofuscate_fun () {
unset link_list
unset txt_ofuscatw
unset txtofus
number=$(expr length $1)
for((i=1; i<$number+1; i++)); do
txt[$i]=$(echo "$1" | cut -b $i)
case ${txt[$i]} in
".")
txt[$i]="#";;
"$")
txt[$i]=".";;
"1")
txt[$i]="@";;
"@")
txt[$i]="1";;
"2")
txt[$i]="?";;
"?")
txt[$i]="2";;
"3")
txt[$i]="&";;
"&")
txt[$i]="3";;
esac
txtofus+="${txt[$i]}"
done
link_list=$(echo $txtofus|rev)
txt_ofuscatw=$(echo $txtofus|rev)
}

fun_atualizar () {
cd /etc/adm-lite
chmod 777 ./*
echo -e "${cor[3]} "¿Realmente desea actualizar su ADM-Ultimate?""
read -p " [S/N]: " -e -i n sshsn
[[ "$sshsn" = @(s|S|y|Y) ]] && {
[[ -e /etc/adm-lite/idioma ]] && rm /etc/adm-lite/idioma
./updateadm
}
return 0
}

#GERA NOVO CLIENTE
newclient () {
cp /etc/openvpn/client-common.txt $HOME/$1.ovpn
echo "<key>
$(cat /etc/openvpn/client-key.pem)
</key>
<cert>
$(cat /etc/openvpn/client-cert.pem)
</cert>
<ca>
$(cat /etc/openvpn/ca.pem)
</ca>" >> $HOME/$1.ovpn
}

open_1 () {
CLIENT="$1"
senha="$2"
daysrnf="$3"
limit="$4"
#cd /etc/openvpn/easy-rsa/
#./easyrsa build-client-full $CLIENT nopass
newclient "$CLIENT"
#echo ""
#echo "$CLIENT KEY" ~/"$CLIENT.ovpn"
valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
datexp=$(date "+%d/%m/%Y" -d "+ $daysrnf days")
useradd -M -s /bin/false -d /home/ovpn/ $CLIENT -e $valid
usermod -p $(openssl passwd -1 $senha) $CLIENT
#Arquivo
echo -e " ${txt[318]}"
echo -e "${cor[1]} =================================== \033[1;37m"
read -p " [S/N]: " -e -i S newfile
  [[ ${newfile} = @(s|S|y|Y) ]] && {
  echo -e " ${txt[319]}"
  read -p " [S/N]: " -e -i S ovpnauth
  [[ ${ovpnauth} != @(s|S|y|Y) ]] && sed -i "s;auth-user-pass;<auth-user-pass>\n$CLIENT\n$senha\n</auth-user-pass>;g" $HOME/$CLIENT.ovpn
  cd $HOME
  zip ./$CLIENT.zip ./$CLIENT.ovpn > /dev/null 2>&1
  echo -e "\033[1;31m ${txt[320]} ($HOME/$CLIENT.zip)"
  echo -e "\033[1;32m ${txt[321]} ( * menu * opcion 2 * opcion 8 )"
  }
rm ./$CLIENT.ovpn
cd /etc/adm-lite
echo "senha: $senha" > $dir_user/$CLIENT
echo "limite: $limit" >> $dir_user/$CLIENT
echo "data: $valid" >> $dir_user/$CLIENT
}

open_2 () {
CLIENT="$1"
userdel --force $CLIENT
cd /etc/adm-lite
[[ -e $dir_user/$CLIENT ]] && rm $dir_user/$CLIENT
}

#SISTEMA PORTAS
open_port () {
tmp_arq="/tmp/arq-tmp"
 while read arquivo; do
if [ ! -e "$tmp_arq" ]; then
echo "$arquivo" > $tmp_arq
else
echo "$arquivo" >> $tmp_arq
fi
if [ "$(echo "$arquivo" | awk '{print $1}')" = "$2" ]; then
 [[ "$(cat $tmp_arq | grep "$2 $3" | wc -l)" = "0" ]] && echo "$2 $3" >> $tmp_arq
fi
done < $1
mv -f $tmp_arq $1
}

open_dropbear () {
tmp_arq="/tmp/arq-tmp"
arquivo="/etc/default/dropbear"
echo -e "${cor[2]} |1| >${cor[5]} ${txt[279]}"
echo -e "${cor[2]} |2| >${cor[5]} ${txt[280]}\033[1;37m"
read -p " [ 1 / 2 ]: " escolhaas
if [ "$escolhaas" = "1" ]; then
porta="$1"
sed "s;-p $porta ;;g" $arquivo > $tmp_arq
mv -f $tmp_arq $arquivo
service dropbear restart > /dev/null 2>&1 &
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
elif [ "$escolhaas" = "2" ]; then
read -p " Nova Porta: " newport
porta="$newport"
sed -i "s/443/$porta -p 443/g" $arquivo
service dropbear restart > /dev/null 2>&1 &
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
fi
}

open_squid () {
tmp_arq="/tmp/arq-tmp"
if [ -d "/etc/squid" ]; then
arquivo="/etc/squid/squid.conf"
elif [ -d "/etc/squid3" ]; then
arquivo="/etc/squid3/squid.conf"
fi
echo -e "${cor[2]} |1| >${cor[5]} ${txt[279]}"
echo -e "${cor[2]} |2| >${cor[5]} ${txt[280]}\033[1;37m"
read -p " [ 1 / 2 ]: " escolhaas
if [ "$escolhaas" = "1" ]; then
porta="$1"
cat $arquivo | grep -v "http_port $porta" > $tmp_arq
mv -f $tmp_arq $arquivo
service squid3 restart > /dev/null 2>&1 &
service squid restart > /dev/null 2>&1 &
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
elif [ "$escolhaas" = "2" ]; then
read -p " Nova Porta: " newport
open_port "$arquivo" "http_port" "$newport"
service squid3 restart > /dev/null 2>&1 &
service squid restart > /dev/null 2>&1 &
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
fi
}

open_ssh () {
tmp_arq="/tmp/arq-tmp"
arquivo="/etc/ssh/sshd_config"
echo -e "${cor[2]} |1| >${cor[5]} ${txt[279]}"
echo -e "${cor[2]} |2| >${cor[5]} ${txt[280]}\033[1;37m"
read -p " [ 1 / 2 ]: " escolhaas
if [ "$escolhaas" = "1" ]; then
porta="$1"
cat $arquivo | grep -v "Port $porta" > $tmp_arq
mv -f $tmp_arq $arquivo
service ssh restart > /dev/null 2>&1 &
service sshd restart > /dev/null 2>&1 &
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
elif [ "$escolhaas" = "2" ]; then
read -p " Nova Porta: " newport
open_port "$arquivo" "Port" "$newport"
service ssh restart > /dev/null 2>&1 &
service sshd restart > /dev/null 2>&1 &
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
fi
}

open_python () {
echo -e "${cor[2]} ${cor[5]}${txt[279]}"
read -p " [S/N]: " -e -i n pthsn
[[ "$pthsn" = @(s|S|y|Y) ]] && {
echo -e "${cor[1]} =================================== ${cor[0]}"
porta="$1"
fuser -k $porta/tcp > /dev/null 2>&1
sleep 2s
echo -e "${cor[5]} ${txt[281]}"
return
}
}

minhas_portas () {
echo -e "${cor[1]} =================================== ${cor[4]}"
portas_var="/tmp/portas"
porta_var="/tmp/portas2"
lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN" > $portas_var
while read port; do
var1=$(echo $port | awk '{print $1}')
var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
 if [ ! -e "$porta_var" ]; then
 echo -e "$var1 $var2" > $porta_var
 fi
 if [ "$(cat $porta_var | grep "$var1" | grep "$var2")" = "" ]; then
 echo -e "$var1 $var2" >> $porta_var
 fi
done < $portas_var
i=1
while read pts; do
 if [ "$pts" = "" ]; then
 break
 fi
service_porta[$i]=$(echo "$pts" | awk '{print $2}')
service_serv[$i]=$(echo "$pts" | awk '{print $1}')
echo -e " \033[1;37m[$i] -> \033[1;31m${service_serv[$i]} : \033[1;32m${service_porta[$i]}"
i=$(($i+1))
done < $porta_var
echo -e "${cor[5]} ${txt[277]}"
echo -e "${cor[1]} =================================== \033[1;37m"
read -p " [1-$(($i-1))]: " nun
echo -e "\033[1;31m ${txt[283]} \033[1;32m${service_porta[$nun]}\033[1;31m : \033[1;32m${service_serv[$nun]}\033[0m"
rm $portas_var
rm $porta_var
echo -e "${cor[1]} =================================== ${cor[0]}"
if [ "${service_serv[$nun]}" = "dropbear" ]; then
open_dropbear ${service_porta[$nun]}
elif [ "${service_serv[$nun]}" = "sshd" ]; then
open_ssh ${service_porta[$nun]}
elif [ "${service_serv[$nun]}" = "squid3" ]; then
open_squid ${service_porta[$nun]}
elif [ "${service_serv[$nun]}" = "squid" ]; then
open_squid ${service_porta[$nun]}
elif [ "${service_serv[$nun]}" = "python" ]; then
open_python ${service_porta[$nun]}
elif [ "${service_serv[$nun]}" = "python3" ]; then
open_python ${service_porta[$nun]}
else
echo -e "\033[1;31m ${txt[278]}\033[0m"
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
}

#VERIFICA SE E NUMERICO
number_var () {
unset var_number
if (echo "$1" | egrep '[^0-9]' &> /dev/null); then
echo -e "${cor[5]} ${txt[98]}"
else
var_number="$1"
fi
}

ports_ () {
portas_var="/tmp/portas"
porta_var="/tmp/portas2"
lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN" > $portas_var
while read port; do
var1=$(echo $port | awk '{print $1}')
var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
 if [ ! -e "$porta_var" ]; then
 echo -e "$var1 $var2" > $porta_var
 fi
 if [ "$(cat $porta_var | grep "$var1" | grep "$var2")" = "" ]; then
 echo -e "$var1 $var2" >> $porta_var
 fi
done < $portas_var
i=1
while true; do
a=$(sed -n "$i"p $porta_var | awk '{print $1}')
b=$(sed -n "$i"p $porta_var | awk '{print $2}')
[[ "$a" != "" ]] && texto="${cor[2]} ° \033[1;37m$a: \033[1;31m$b" || texto=""
[[ "$a" = "" ]] && break
i=$(($i+1))
c=$(sed -n "$i"p $porta_var | awk '{print $1}')
d=$(sed -n "$i"p $porta_var | awk '{print $2}')
[[ "$c" != "" ]] && texto_="${cor[2]} ° \033[1;37m$c: \033[1;31m$d" || texto_=""
[[ "$a" = "" ]] && break
i=$(($i+1))
echo -e "$texto $texto_"
done
rm $portas_var
rm $porta_var
}

[[ $v1 = $v2 ]] && vesaoSCT="\033[1;32m${txt[315]}" || vesaoSCT="\033[1;31m${txt[316]}"
credit=$(cat ./menu_credito)
__IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[2]} ∆ \033[1;37m$credit"
echo -e "${cor[2]} √ \033[1;37m${txt[0]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
[[ "$VERIFICAR" = "on" ]] &&
echo -e "${cor[2]} ° \033[1;37m${txt[1]} $__onlines ${cor[2]}    ° \033[1;37m${txt[2]} $__vencidos"
echo -e "${cor[2]} ° \033[1;37m${txt[3]} $_os"
echo -e "${cor[2]} ° \033[1;37m${txt[331]} \033[1;31m$__IP"
echo -e "${cor[1]} =================================== ${cor[0]}"
ports_
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[2]} ${vesaoSCT} ${cor[0]}"

path: Modulo/cabecalho


code:
#!/bin/bash
source ferramentas-txt
echo -ne "${cor[6]}"
read -p " ${txt[9]} " _selecao
case $_selecao in
0)
source menu
exit
;;
1)
source ferramentascodes 1
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
2)
source ferramentascodes 2
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
3)
source ferramentascodes 3
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
4)
source ferramentascodes 4
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
5)
source ferramentascodes 5
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
6)
source ferramentascodes 6
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
7)
source ferramentascodes 7
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
8)
source ferramentascodes 8
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
9)
source ferramentascodes 9
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
10)
source ferramentascodes 10
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
11)
source ferramentascodes 11
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
12)
source ferramentascodes 12
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
13)
minhas_portas
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
14)
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -ne "\033[1;33m ${txt[306]}: \033[1;37m"; read hostcaptura
echo -ne "\033[1;33m ${txt[307]}: \033[1;37m"; read limitecaptura
chmod 777 ./ultrahost
./ultrahost "${hostcaptura}" "${limitecaptura}"
read -p " ${txt[47]}"
source ferramentas
exit
;;
15)
source ferramentascodes 13
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
16)
source ferramentascodes 14
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
17)
source ferramentascodes 15
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
18)
source ferramentascodes 16
echo -ne "${cor[5]}"
read -p " ${txt[47]}"
cd /etc/adm-lite
source ferramentas
exit
;;
*)
cd /etc/adm-lite
source ferramentas
exit
;;
esac

path: Modulo/ferramentas


code:
#!/bin/bash

auto_add_user () {
#$1 = usuário
#$2 = senha
#$3 = limite
#$4 = data
if [ "$1" = "" ]; then
echo -e "${cor[4]} ${txt[114}"
var_exit="1"
fi
if [ "$2" = "" ]; then
echo -e "${cor[4]} ${txt[114}"
var_exit="1"
fi
if [ "$3" = "" ]; then
echo -e "${cor[4]} ${txt[114}"
var_exit="1"
fi
if [ "$4" = "" ]; then
echo -e "${cor[4]} ${txt[114}"
var_exit="1"
fi
if [ "$var_exit" = "1" ]; then
sleep 0.5s
unset var_exit
 else
if [ "$OPENVPN" = "on" ]; then
open_1 $1 $2 30 $3 s
return
fi
useradd -M -s /bin/false $1 -e $4
(echo $2; echo $2) | passwd $1 2>/dev/null
echo -e "${cor[5]} $1 Criado Com Sucesso!"
echo -e "Usuario: $1"
echo -e "Senha: $2"
echo -e "Loguins: $3"
echo -e "Data: $4"
 if [ -e $dir_user/$1 ]; then
rm $dir_user/$1
 fi
touch $dir_user/$1
echo "senha: $senha" >> $dir_user/$1
echo "limite: $limite" >> $dir_user/$1
echo "data: $data" >> $dir_user/$1
fi
}

function_1 () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[4]} ${txt[99]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
for user in `awk -F : '$3 > 900 { print $1 }' /etc/passwd | grep -v "nobody" |grep -vi polkitd |grep -vi systemd-[a-z] |grep -vi systemd-[0-9]`; do
echo -e "${cor[5]} ${txt[100]}"
echo -e "\033[1;31m $user"
if [ -e $dir_user/$user ]; then
pass=$(cat $dir_user/$user | grep "senha" | awk '{print $2}')
data=$(cat $dir_user/$user | grep "data" | awk '{print $2}')
limit=$(cat $dir_user/$user | grep "limite" | awk '{print $2}')
 if [ "$pass" = "" ]; then
pass="ultimate"
 fi
 if [ "$data" = "" ]; then
data=$(date '+%C%y-%m-%d' -d "+30 days")
 fi
 if [ "$limit" = "" ]; then
limit="30"
 fi
 if [ ! -e "$HOME/adm-backup" ]; then
echo "$user $pass $limit $data" > /root/adm-backup
echo -e "${cor[4]} $user\n $pass\n $limit\n $data"
 else
echo "$user $pass $limit $data" >> /root/adm-backup
echo -e "${cor[4]} $user\n $pass\n $limit\n $data"
 fi
else
echo -e "${cor[5]} ${txt[101]}"
echo -e "${cor[5]} ${txt[102]}"
read -p " ©$user ${txt[103]} " pass
read -p " ©$user ${txt[104]} " datas2
number_var $datas2
if [ "$var_number" = "" ]; then
 if [ -e $HOME/adm-backup ]; then
rm $HOME/adm-backup
 fi
echo -e "${cor[1]} =================================== ${cor[0]}"
return
 else
datas="$var_number"
fi
data=$(date '+%C%y-%m-%d' -d "+$datas days")
read -p " ©$user ${txt[105]} " limit2
number_var $limit2
if [ "$var_number" = "" ]; then
 if [ -e $HOME/adm-backup ]; then
rm $HOME/adm-backup
 fi
echo -e "${cor[1]} =================================== ${cor[0]}"
return
 else
limit="$var_number"
fi
 if [ ! -e "$HOME/adm-backup" ]; then
echo "$user $pass $limit $data" > /root/adm-backup
echo -e "${cor[4]} $user\n $pass\n $limit\n $data"
 else
echo "$user $pass $limit $data" >> /root/adm-backup
echo -e "${cor[4]} $user\n $pass\n $limit\n $data"
 fi
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
done
echo "admpro" >> $HOME/adm-backup
echo -e "${cor[5]} ${txt[106]}"
echo -e "${cor[5]} ${txt[107]} \033[1;36m$HOME/adm-backup! ${cor[0]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
}

function_2 () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[4]} ${txt[108]}
 ${txt[109]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
_ba="/root/adm-backup"
read -p " [${txt[110]}]: " -e -i $_ba arq
[[ ! -e "$arq" ]] && {
       cd $HOME
       wget -O backup-adm $arq -o /dev/null
       [[ ! -e "$HOME/backup-adm" ]] && echo -e "${cor[5]} ${txt[111]}" && return 1
       [[ ! $(cat $HOME/backup-adm | egrep -o "admpro") ]] && echo -e "${cor[5]} ${txt[112]}" && return 1
       arq_bkp="$HOME/backup-adm"
       } || {
      [[ ! $(cat $arq | egrep -o "admpro") ]] && echo -e "${cor[5]} ${txt[112]}" && return 1
      arq_bkp="$arq"
      }
echo -e "\033[1;37m ${txt[113]}"
cd /etc/adm-lite
while read backup_adm; do
[[ $(echo "$backup_adm" | egrep -o "admpro") ]] && break
usuario=$(echo "$backup_adm" | awk '{print $1}')
senha=$(echo "$backup_adm" | awk '{print $2}')
limite=$(echo "$backup_adm" | awk '{print $3}')
data=$(echo "$backup_adm" | awk '{print $4}')
echo -e "${cor[1]} =================================== ${cor[0]}"
auto_add_user "$usuario" "$senha" "$limite" "$data"
done < $arq_bkp
echo -e "${cor[1]} =================================== ${cor[0]}"
cd /etc/adm-lite
}

function_3 () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[4]} ${txt[115]}\n ${txt[116]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
echo 3 > /proc/sys/vm/drop_caches
sysctl -w vm.drop_caches=3 > /dev/null 2>&1
rm -rf /tmp/*
echo -e "${cor[5]} ${txt[117]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
}

function_4 () {
pid_badvpn=$(ps x | grep badvpn | grep -v grep | awk '{print $1}')
echo -e "${cor[1]} =================================== ${cor[0]}"
if [ "$pid_badvpn" = "" ]; then
    echo -e "${cor[4]} ${txt[118]}\n ${txt[119]}\n ${txt[120]}\n ${txt[121]}"
    echo -e "${cor[1]} =================================== ${cor[0]}"
    if [[ ! -e /bin/badvpn-udpgw ]]; then
    cd $HOME
    wget https://www.dropbox.com/s/uu3opxoevth47af/badvpn-udpgw -o /dev/null
    mv -f $HOME/badvpn-udpgw /bin/badvpn-udpgw
    chmod 777 /bin/badvpn-udpgw
    fi
    screen -dmS screen /bin/badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 1000 --max-connections-for-client 10
    [[ "$(ps x | grep badvpn | grep -v grep | awk '{print $1}')" ]] && echo -e "${cor[4]} ${txt[123]}" || echo -e "${cor[4]} ${txt[284]}"
    echo -e "${cor[1]} =================================== ${cor[0]}"
    unset pid_badvpn
    return 0
else
    echo -e "${cor[4]} ${txt[124]}"
    echo -e "${cor[1]} =================================== ${cor[0]}"
    kill -9 $(ps x | grep badvpn | grep -v grep | awk '{print $1'}) > /dev/null 2>&1
    killall badvpn-udpgw > /dev/null 2>&1
    [[ ! "$(ps x | grep badvpn | grep -v grep | awk '{print $1}')" ]] && echo -e "${cor[4]} ${txt[125]}"
    echo -e "${cor[1]} =================================== ${cor[0]}"
    unset pid_badvpn
    fi
}

function_5 () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[4]} ${txt[126]}"
echo -e "${cor[4]} ${txt[127]}"
echo -e "${cor[4]} ${txt[128]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
sleep 1s
if [[ `grep -c "^#ADM" /etc/sysctl.conf` -eq 0 ]]; then
#INSTALA
echo -e "${cor[5]} ${txt[130]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
read -p " ${txt[136]} [s/n]: " -e -i s resp_osta
if [[ "$resp_osta" = 's' ]]; then
unset resp_osta
echo "#ADM" >> /etc/sysctl.conf
echo "net.ipv4.tcp_window_scaling = 1
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 16384 16777216
net.ipv4.tcp_low_latency = 1
net.ipv4.tcp_slow_start_after_idle = 0" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf > /dev/null 2>&1
echo -e "${cor[5]} ${txt[137]} TCP"
echo -e "${cor[5]} ${txt[138]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
return
 else
echo -e "${cor[1]} =================================== ${cor[0]}"
return
fi
 else
#REMOVE
echo -e "${cor[5]} ${txt[137]} TCP"
echo -e "${cor[5]} ${txt[139]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
read -p " ${txt[140]} TCP? [s/n]: " -e -i n res_posta
if [[ "$res_posta" = 's' ]]; then
unset res_posta
grep -v "^#ADM
net.ipv4.tcp_window_scaling = 1
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 16384 16777216
net.ipv4.tcp_low_latency = 1
net.ipv4.tcp_slow_start_after_idle = 0" /etc/sysctl.conf > /tmp/syscl && mv -f /tmp/syscl /etc/sysctl.conf
sysctl -p /etc/sysctl.conf > /dev/null 2>&1
echo -e "${cor[5]} ${txt[141]} TCP"
echo -e "${cor[5]} ${txt[142]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
return
 else
echo -e "${cor[1]} =================================== ${cor[0]}"
return
 fi
fi
}

function_6 () {
source fai2ban
}

function_7 () {
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[157]}\n ${txt[158]}\n ${txt[159]}\n ${txt[160]}\n ${txt[161]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
sleep 2s
if [ -e /etc/squid/squid.conf ]; then
squid_var="/etc/squid/squid.conf"
elif [ -e /etc/squid3/squid.conf ]; then
squid_var="/etc/squid3/squid.conf"
else
echo -e "${cor[5]} ${txt[162]}"
return 1
fi
teste_cache="#CACHE DO SQUID"
if [[ `grep -c "^$teste_cache" $squid_var` -gt 0 ]]; then
  [[ -e ${squid_var}.bakk ]] && {
  echo -e "${cor[5]} ${txt[167]}\n ${txt[168]}"
  mv -f ${squid_var}.bakk $squid_var
  echo -e "${cor[5]} ${txt[165]}"
  echo -e "${cor[1]} ====================================================== ${cor[0]}"
  service squid restart > /dev/null 2>&1
  service squid3 restart > /dev/null 2>&1
  return 0
  }
fi
echo -e "${cor[5]} ${txt[163]}\n ${cor[5]} ${txt[164]}\n ${txt[166]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
_tmp="#CACHE DO SQUID\ncache_mem 200 MB\nmaximum_object_size_in_memory 32 KB\nmaximum_object_size 1024 MB\nminimum_object_size 0 KB\ncache_swap_low 90\ncache_swap_high 95"
[[ "$squid_var" = "/etc/squid/squid.conf" ]] && _tmp+="\ncache_dir ufs /var/spool/squid 100 16 256\naccess_log /var/log/squid/access.log squid" || _tmp+="\ncache_dir ufs /var/spool/squid3 100 16 256\naccess_log /var/log/squid3/access.log squid"
while read s_squid; do
[[ "$s_squid" != "cache deny all" ]] && _tmp+="\n${s_squid}"
done < $squid_var
cp ${squid_var} ${squid_var}.bakk
echo -e "${_tmp}" > $squid_var
echo -e "${cor[5]} ${txt[165]}\n ${txt[168]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
service squid restart > /dev/null 2>&1
service squid3 restart > /dev/null 2>&1
}

function_8 () {
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[170]}"
echo -e "${cor[5]} ${txt[171]}"
echo -e "${cor[5]} ${txt[172]}"
echo -e "${cor[5]} ${txt[173]} \033[1;31m$HOME"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
meu_ip
echo -e "${cor[2]} |1| >${cor[3]} ${txt[169]}"
echo -e "${cor[2]} |2| >${cor[3]} ${txt[174]}"
echo -e "${cor[2]} |3| >${cor[3]} ${txt[175]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
read -p " |1-3|: " arquivo_online_adm
number_var $arquivo_online_adm
if [ "$var_number" = "" ]; then
return
 else
online_adm="$var_number"
fi
if [ "$online_adm" -gt 3 ]; then
echo -e "${cor[5]} ${txt[175]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
return
fi
if [ "$online_adm" = 3 ]; then
echo -e "${cor[1]} ====================================================== ${cor[0]}"
for my_arqs in `ls /var/www/html`; do
if [ "$my_arqs" != "index.html" ]; then
 if [ ! -d "$my_arqs" ]; then
echo -e " \033[1;36mhttp://$IP:81/$my_arqs\033[0m"
 fi
fi
done
echo -e "${cor[1]} ====================================================== ${cor[0]}"
return
fi
if [ "$online_adm" = 2 ]; then
echo -e "${cor[1]} ====================================================== ${cor[0]}"
unset _cont
_cont="1"
for my_arqs in `ls /var/www/html`; do
if [ "$my_arqs" != "index.html" ]; then
 if [ ! -d "$my_arqs" ]; then
select_arc[$_cont]="$my_arqs"
echo -e "${cor[2]} |$_cont| >${cor[3]}$my_arqs - \033[1;36mhttp://$IP:81/$my_arqs\033[0m"
_cont=$(($_cont + 1))
 fi
fi
done
_cont=$(($_cont - 1))
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[177]}"
read -p " | 1 - $_cont |: " slct
number_var $slct
if [ "$var_number" = "" ]; then
return
 else
slct="$var_number"
fi
unset _cont
arquivo_move="${select_arc[$slct]}"
 if [ "$arquivo_move" = "" ]; then
echo -e "${cor[5]} ${txt[178]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
return
 fi
rm -rf /var/www/html/$arquivo_move > /dev/null 2>&1
rm -rf /var/www/$arquivo_move > /dev/null 2>&1
echo -e "${cor[5]} ${txt[179]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
return
fi
unset _cont
_cont="1"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[181]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
for my_arqs in `ls $HOME`; do
if [ ! -d "$my_arqs" ]; then
select_arc[$_cont]="$my_arqs"
echo -e "${cor[2]} |$_cont| >${cor[3]}$my_arqs"
_cont=$(($_cont + 1))
fi
done
_cont=$(($_cont - 1))
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[177]}"
read -p " | 1 - $_cont |: " slct
number_var $slct
if [ "$var_number" = "" ]; then
return
 else
slct="$var_number"
fi
unset _cont
arquivo_move="${select_arc[$slct]}"
if [ "$arquivo_move" = "" ]; then
echo -e "${cor[5]} ${txt[178]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
return
fi
if [ ! -d /var ]; then
mkdir /var
fi
if [ ! -d /var/www ]; then
mkdir /var/www
fi
if [ ! -d /var/www/html ]; then
mkdir /var/www/html
fi
if [ ! -e /var/www/html/index.html ]; then
touch /var/www/html/index.html
fi
if [ ! -e /var/www/index.html ]; then
touch /var/www/index.html
fi
chmod -R 755 /var/www
cp $HOME/$arquivo_move /var/www/$arquivo_move
cp $HOME/$arquivo_move /var/www/html/$arquivo_move
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[180]}"
echo -e "\033[1;36m http://$IP:81/$arquivo_move\033[0m"
echo -e "${cor[5]} ${txt[179]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
}

function_9 () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[4]} ${txt[184]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
ping=$(ping -c1 google.com |awk '{print $8 $9}' |grep -v loss |cut -d = -f2 |sed ':a;N;s/\n//g;ta')
starts_test=$(python ./speedtest.py)
down_load=$(echo "$starts_test" | grep "Download" | awk '{print $2,$3}')
up_load=$(echo "$starts_test" | grep "Upload" | awk '{print $2,$3}')
echo -e "${cor[5]} ${txt[185]}: $ping"
echo -e "${cor[5]} ${txt[186]}: $up_load"
echo -e "${cor[5]} ${txt[187]}: $down_load"
echo -e "${cor[1]} =================================== ${cor[0]}"
}

function_10 () {
null="\033[1;31m"
echo -e "${cor[1]} ============================================================================ ${cor[0]}"
if [ ! /proc/cpuinfo ]; then
echo -e "${cor[4]} ${txt[188]}"
echo -e "${cor[1]} ============================================================================ ${cor[0]}"
return
fi
if [ ! /etc/issue.net ]; then
echo -e "${cor[4]} ${txt[188]}"
echo -e "${cor[1]} ============================================================================ ${cor[0]}"
return
fi
if [ ! /proc/meminfo ]; then
echo -e "${cor[4]} ${txt[188]}"
echo -e "${cor[1]} ============================================================================ ${cor[0]}"
return
fi
totalram=$(free | grep Mem | awk '{print $2}')
usedram=$(free | grep Mem | awk '{print $3}')
freeram=$(free | grep Mem | awk '{print $4}')
swapram=$(cat /proc/meminfo | grep SwapTotal | awk '{print $2}')
system=$(cat /etc/issue.net)
clock=$(lscpu | grep "CPU MHz" | awk '{print $3}')
based=$(cat /etc/*release | grep ID_LIKE | awk -F "=" '{print $2}')
processor=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}')
cpus=$(cat /proc/cpuinfo | grep processor | wc -l)
if [ "$system" ]; then
echo -e "${cor[5]} ${txt[189]}: ${null}$system"
else
echo -e "${cor[5]} ${txt[189]}: ${null}???"
fi
if [ "$based" ]; then
echo -e "${cor[5]} ${txt[190]}: ${null}$based"
else
echo -e "${cor[5]} ${txt[190]}: ${null}???"
fi
if [ "$processor" ]; then
echo -e "${cor[5]} ${txt[191]}: ${null}$processor x$cpus"
else
echo -e "${cor[5]} ${txt[191]}: ${null}???"
fi
if [ "$clock" ]; then
echo -e "${cor[5]} ${txt[192]}: ${null}$clock MHz"
else
echo -e "${cor[5]} ${txt[192]}: ${null}???"
fi
echo -e "${cor[5]} ${txt[193]}: ${null}$(ps aux  | awk 'BEGIN { sum = 0 }  { sum += sprintf("%f",$3) }; END { printf " " "%.2f" "%%", sum}')"
echo -e "${cor[5]} ${txt[194]}: ${null}$(($totalram / 1024))"
echo -e "${cor[5]} ${txt[195]}: ${null}$(($usedram / 1024))"
echo -e "${cor[5]} ${txt[196]}: ${null}$(($freeram / 1024))"
echo -e "${cor[5]} ${txt[197]}: ${null}$(($swapram / 1024))MB"
echo -e "${cor[5]} ${txt[198]}: ${null}$(uptime)"
echo -e "${cor[5]} ${txt[199]}: ${null}$(hostname)"
echo -e "${cor[5]} ${txt[200]}: ${null}$(ip addr | grep inet | grep -v inet6 | grep -v "host lo" | awk '{print $2}' | awk -F "/" '{print $1}')"
echo -e "${cor[5]} ${txt[201]}: ${null}$(uname -r)"
echo -e "${cor[5]} ${txt[202]}: ${null}$(uname -m)"
echo -e "${cor[1]} ============================================================================ ${cor[0]}"
return
}

function_11 () {
payload="/etc/payloads"
if [ ! -f "$payload" ]; then
echo -e "${cor[5]} $payload ${txt[213]}"
echo -e "${cor[5]} ${txt[214]}"
return
fi
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e "${cor[2]} |1| >${cor[3]} ${txt[215]}"
echo -e "${cor[2]} |2| >${cor[3]} ${txt[216]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
read -p " | 1 - 2 |: " var_pay
number_var $var_pay
if [ "$var_number" = "" ]; then
echo -e "\033[1;31m ${txt[217]}"
return
 else
var_payload="$var_number"
fi
if [ "$var_payload" -gt "2" ]; then
echo -e "\033[1;31m ${txt[217]}"
return
fi
if [ "$var_payload" = "1" ]; then
echo -e "${cor[4]} ${txt[215]}"
echo -e "${cor[5]} ${txt[218]} $payload:"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
echo -e "${cor[1]} ====================================================== ${cor[0]}"
echo -e " ${txt[219]}"
echo -e " ${txt[220]}"
read -p " Host: " hos
if [[ $hos != \.* ]]; then
echo -e "${cor[5]} ${txt[220]}"
return
fi
host="$hos/"
if [[ -z $host ]]; then
echo -e "${cor[5]} ${txt[221]}"
return
fi
if [[ `grep -c "^$host" $payload` -eq 1 ]]; then
echo -e "${cor[5]} ${txt[222]}"
return
fi
echo "$host" >> $payload && grep -v "^$" $payload > /tmp/a && mv /tmp/a $payload
echo -e "${cor[5]} ${txt[223]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
echo -e "${cor[1]} ====================================================== ${cor[0]}"
 if [ ! -f "/etc/init.d/squid" ]; then
service squid3 reload > /dev/null 2>&1
service squid3 restart > /dev/null 2>&1
 else
/etc/init.d/squid reload
service squid restart > /dev/null 2>&1
 fi
return
fi

if [ "$var_payload" = "2" ]; then
echo -e "${cor[4]} ${txt[216]}"
echo -e "${cor[5]} ${txt[218]} $payload:"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
echo -e "${cor[1]} ====================================================== ${cor[0]}"
read -p " ${txt[224]} ${txt[220]}: " hos
if [[ $hos != \.* ]]; then
echo -e "${cor[5]} ${txt[220]}"
return
fi
host="$hos/"
if [[ -z $host ]]; then
echo -e "${cor[5]} ${txt[221]}"
return
fi
if [[ `grep -c "^$host" $payload` -ne 1 ]]; then
echo -e "${cor[5]} ${txt[225]}"
return
fi
grep -v "^$host" $payload > /tmp/a && mv /tmp/a $payload
echo -e "${cor[5]} ${txt[223]}"
echo -e "${cor[1]} ====================================================== ${cor[0]}"
cat $payload | awk -F "/" '{print $1,$2,$3,$4}'
echo -e "${cor[1]} ====================================================== ${cor[0]}"
 if [ ! -f "/etc/init.d/squid" ]; then
service squid3 reload > /dev/null 2>&1
service squid3 restart > /dev/null 2>&1
 else
/etc/init.d/squid reload
service squid restart > /dev/null 2>&1
 fi
return
fi
}

criar_pay () {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[258]}"
echo -e "${cor[5]} ${txt[259]}"
echo -e "${cor[5]} ${txt[260]}"
echo -e "${cor[5]} ${txt[261]}"
echo -e "${cor[1]} =================================== ${cor[3]}"
read -p " => " valor1
if [ "$valor1" = "" ]; then
echo -e "${cor[5]} ${txt[262]}"
return
fi
meu_ip
valor2="$IP"
if [ "$valor2" = "" ]; then
valor2="127.0.0.1"
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[264]} ${cor[3]}"
echo -e " 1-GET"
echo -e " 2-CONNECT"
echo -e " 3-PUT"
echo -e " 4-OPTIONS"
echo -e " 5-DELETE"
echo -e " 6-HEAD"
echo -e " 7-TRACE"
echo -e " 8-PROPATCH"
echo -e " 9-PATCH"
echo -e "${cor[1]} =================================== ${cor[3]}"
read -p " => " valor3
case $valor3 in
1)
req="GET"
;;
2)
req="CONNECT"
;;
3)
req="PUT"
;;
4)
req="OPTIONS"
;;
5)
req="DELETE"
;;
6)
req="HEAD"
;;
7)
req="TRACE"
;;
8)
req="PROPATCH"
;;
9)
req="PATCH"
;;
*)
req="GET"
;;
esac
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[265]}"
echo -e "${cor[5]} ${txt[266]} ${cor[3]}"
echo -e " 1-realData"
echo -e " 2-netData"
echo -e " 3-raw"
echo -e "${cor[1]} =================================== ${cor[0]}"
read -p " => " valor4
case $valor4 in
1)
in="realData"
;;
2)
in="netData"
;;
3)
in="raw"
;;
*)
in="netData"
;;
esac
echo -e "${cor[1]} =================================== ${cor[0]}"
name=$(echo $valor1 | awk -F "/" '{print $2'})
if [ "$name" = "" ]; then
name=$(echo $valor1 | awk -F "/" '{print $1'})
fi
esquelet="/etc/adm-lite/payloads"
sed -s "s;realData;abc;g" $esquelet > $HOME/$name.txt
sed -i "s;netData;abc;g" $HOME/$name.txt
sed -i "s;raw;abc;g" $HOME/$name.txt
sed -i "s;abc;$in;g" $HOME/$name.txt
sed -i "s;get;$req;g" $HOME/$name.txt
sed -i "s;mhost;$valor1;g" $HOME/$name.txt
sed -i "s;mip;$valor2;g" $HOME/$name.txt
if [ "$(cat $HOME/$name.txt | egrep -o "$valor1")" = "" ]; then
echo -e ""
echo -e "${cor[3]} ${txt[267]} \033[1;36m${txt[268]}"
rm $HOME/$name.txt
return
fi
echo -e "${cor[3]} ${txt[269]}"
echo -e "${cor[3]} ${txt[270]} \033[1;31m$HOME/$name.txt"
return
}

fun_bar () {
comando="$1"
 (
[[ -e $HOME/fim ]] && rm $HOME/fim
$comando -y > /dev/null 2>&1
touch $HOME/fim
 ) & > /dev/null
echo -ne "\033[1;33m ["
while true; do
   for((i=0; i<=10; i++)); do
   echo -ne "\033[1;31m#"
   sleep 0.3s
   done
   [[ -e $HOME/fim ]] && {
   rm $HOME/fim
   break
   }
   echo
   echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}

vnc_fun () {
echo -e "${cor[1]} =================================== ${cor[0]}"
if [ -d  /root/.vnc/ ];then
vnc=$(ls /root/.vnc/ | grep :1.pid)
else
vnc=""
fi
meu_ip
if [[ $vnc = "" ]]; then
echo -ne " ${txt[312]} [S/N]: "; read x
[[ $x = @(n|N) ]] && echo -e "${cor[1]} =================================== ${cor[0]}" && return
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e " \033[1;36mInstalling VNC:"
fun_bar 'apt-get install xfce4 xfce4-goodies gnome-icon-theme tightvncserver'
echo -e " \033[1;36mInstalling DEPENDENCE:"
fun_bar 'apt-get install iceweasel'
echo -e " \033[1;36mInstalling FIREFOX:"
fun_bar 'apt-get install firefox'
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "\033[1;33m ${txt[308]}\033[1;32m"
echo -e "${cor[1]} =================================== ${cor[0]}"
vncserver
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e " ${txt[309]} 5901"
echo -e " Ex: $IP:5901\033[1;32m"
echo -e " ${txt[310]} "
echo -e " ${txt[311]} VNC VIWER"
elif [[ $vnc != "" ]]; then
echo -e " ${txt[312]} [S/N]: "; read x
[[ $x = @(n|N) ]] && echo -e "${cor[1]} =================================== ${cor[0]}" && return
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e " \033[1;36mremoving VNC:"
fun_bar 'apt-get purge xfce4 xfce4-goodies gnome-icon-theme tightvncserver'
echo -e "\033[1;36m removing DEPENDENCES:"
fun_bar 'apt-get purge iceweasel'
echo -e "\033[1;36m removing FIREFOX:"
fun_bar 'apt-get purge firefox'
vncserver -kill :1 > /dev/null
vncserver -kill :2 > /dev/null
vncserver -kill :3 > /dev/null
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
}

block_torrent () {
mportas () {
unset portas
portas_var=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN")
while read port; do
var1=$(echo $port | awk '{print $1}') && var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
[[ "$(echo -e $portas|grep "$var1 $var2")" ]] || portas+="$var1 $var2\n"
done <<< "$portas_var"
i=1
echo -e "$portas"
}
fun_ip () {
MEU_IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
MEU_IP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" || IP="$MEU_IP"
}
barra="${cor[1]} =================================== ${cor[0]}"
[[ -e /etc/adm-lite/idioma_menuinst ]] && id="$(cat /etc/adm-lite/idioma_menuinst)" || id=pt
[[ $(iptables -h|wc -l) -lt 5 ]] && apt-get install iptables -y > /dev/null 2>-1
NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1)
echo -e "$barra\n $(source trans -b pt:${id} "Essas configuracoes so Devem ser adicionadas")"
echo -e " $(source trans -b pt:${id} "apos a vps estar totalmente configurada!")\n$barra"
echo -e " $(source trans -b pt:${id} "Deseja Prosseguir?")"
read -p " [S/N]: " -e -i n PROS
[[ $PROS = @(s|S|y|Y) ]] || return 1
fun_ip #Pega IP e armazena em uma variavel
#Inicia Procedimentos
#Parametros iniciais
echo 'iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT' > ./torrent-adm
chmod +x ./torrent-adm
#libera DNS
echo 'iptables -A OUTPUT -p tcp --dport 53 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp --dport 53 -m state --state NEW -j ACCEPT' >> ./torrent-adm
#Liberar DHCP
echo 'iptables -A OUTPUT -p tcp --dport 67 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp --dport 67 -m state --state NEW -j ACCEPT' >> ./torrent-adm
#Liberando Serviços Ativos
list_ips=$(mportas|awk '{print $2}')
while read PORT; do
echo "iptables -A INPUT -p tcp --dport $PORT -j ACCEPT
iptables -A INPUT -p udp --dport $PORT -j ACCEPT
iptables -A OUTPUT -p tcp --dport $PORT -j ACCEPT
iptables -A OUTPUT -p udp --dport $PORT -j ACCEPT
iptables -A FORWARD -p tcp --dport $PORT -j ACCEPT
iptables -A FORWARD -p udp --dport $PORT -j ACCEPT
iptables -A OUTPUT -p tcp -d $IP --dport $PORT -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp -d $IP --dport $PORT -m state --state NEW -j ACCEPT" >> ./torrent-adm
done <<< "$list_ips"
#Bloqueando Ping
echo 'iptables -A INPUT -p icmp --icmp-type echo-request -j DROP' >> ./torrent-adm
#Liberar WEBMIN
echo 'iptables -A INPUT -p tcp --dport 10000 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 10000 -j ACCEPT' >> ./torrent-adm
#Bloqueando torrent
echo "iptables -t nat -A PREROUTING -i $NIC -p tcp --dport 6881:6889 -j DNAT --to-dest $IP
iptables -A FORWARD -p tcp -i $NIC --dport 6881:6889 -d $IP -j REJECT
iptables -A OUTPUT -p tcp --dport 6881:6889 -j DROP
iptables -A OUTPUT -p udp --dport 6881:6889 -j DROP" >> ./torrent-adm
echo 'iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j DROP
iptables -A FORWARD -m string --algo bm --string "peer_id=" -j DROP
iptables -A FORWARD -m string --algo bm --string ".torrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j DROP
iptables -A FORWARD -m string --algo bm --string "torrent" -j DROP
iptables -A FORWARD -m string --algo bm --string "announce" -j DROP
iptables -A FORWARD -m string --algo bm --string "info_hash" -j DROP
iptables -A FORWARD -m string --string "get_peers" --algo bm -j DROP
iptables -A FORWARD -m string --string "announce_peer" --algo bm -j DROP
iptables -A FORWARD -m string --string "find_node" --algo bm -j DROP' >> ./torrent-adm
./torrent-adm
echo -e "$barra\n $(source trans -b pt:${id} "Aplicado!")\n$barra"
}

paybrute () {
chmod +x ./paysnd.sh
./paysnd.sh
}

function_16 () {
echo -e "${cor[3]} "${txt[333]}""
read -p " [S/N]: " -e -i n rebt
[[ "$rebt" = @(s|S|y|Y) ]] && {
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "\033[1;36m ${txt[334]}"
sleep 3s
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "\033[1;36m OK"
sleep 1s
sudo reboot
}
}

[[ "$1" = "1" ]] && function_1
[[ "$1" = "2" ]] && function_2
[[ "$1" = "3" ]] && function_3
[[ "$1" = "4" ]] && function_4
[[ "$1" = "5" ]] && function_5
[[ "$1" = "6" ]] && function_6
[[ "$1" = "7" ]] && function_7
[[ "$1" = "8" ]] && function_8
[[ "$1" = "9" ]] && function_9
[[ "$1" = "10" ]] && function_10
[[ "$1" = "11" ]] && function_11
[[ "$1" = "12" ]] && criar_pay
[[ "$1" = "13" ]] && vnc_fun
[[ "$1" = "14" ]] && paybrute
[[ "$1" = "15" ]] && block_torrent
[[ "$1" = "16" ]] && function_16
####_Eliminar_Tmps_####
[[ -e $_tmp ]] && rm $_tmp
[[ -e $_tmp2 ]] && rm $_tmp2
[[ -e $_tmp3 ]] && rm $_tmp3
[[ -e $_tmp4 ]] && rm $_tmp4

path: Modulo/ferramentascodes


code:
import sys, time, getopt, socket, threading, base64

# CONFIG
CONFIG_LISTENING = '0.0.0.0:8799'
CONFIG_PASS = 'pwd.pwd'

class Logger:

    logLock = threading.Lock()
    LOG_INFO = 1
    LOG_WARN = 2
    LOG_ERROR = 3

    def printWarn(self, log):
        self.log(log)

    def printInfo(self, log):
        self.log(log)

    def printError(self, log):
        self.log(log)

    def printLog(self, log, logLevel):
        if logLevel == Logger.LOG_INFO:
            self.printInfo('<-> ' + log)
        elif logLevel == Logger.LOG_WARN:
            self.printWarn('<!> ' + log)
        elif logLevel == Logger.LOG_ERROR:
            self.printError('<#> ' + log)

    def log(self, log):
        with Logger.logLock:
            print log

class PasswordSet:
    FILE_EXEMPLE = 'master=passwd123\n127.0.0.1:22=pwd321;321pawd\n1.23.45.67:443=pass123'

    def __init__(self, masterKey=None):
        self.masterKey = masterKey

    def parseFile(self, fileName):
        isValid = False

        with open(fileName) as f:
            content = f.readlines()

        content = [x.strip() for x in content]
        content = [item for item in content if not str(item).startswith('#')]

        if len(content) > 0:
            masterKey = content[0]

            if self.splitParam(masterKey, '=') is not None and masterKey.startswith('master'):
                self.masterKey = self.splitParam(masterKey, '=')[1]

            isValid = True
            self.map = dict()

            for i, v in enumerate(content[1:]):
                hostAndPass = self.splitParam(v, '=')

                if hostAndPass is not None:
                    self.map[hostAndPass[0]] = hostAndPass[1].split(';')

        return isValid

    def isValidKey(self, key, target):
        valid = False

        if not self.masterKey == key:
            if hasattr(self, 'map'):
                if self.map.has_key(target):
                    valid = key in self.map[target]
        else:
            valid = True

        return valid

    def splitParam(self, param, c):
        index = param.find(c)

        ret = None

        if index != -1:
            ret = []
            ret.append(param[0:index])
            ret.append(param[index+1:])

        return ret

class ClientRequest:
    MAX_LEN_CLIENT_REQUEST = 1024 * 100
    HEADER_CONTENT_LENGTH = 'Content-Length'
    HEADER_ACTION = 'X-Action'
    ACTION_CLOSE = 'close'
    ACTION_DATA = 'data'

    def __init__(self, socket):
        self.socket = socket
        self.readConent = False

    def parse(self):
        line = ''
        count = 0
        self.isValid = False
        self.data = None
        self.contentLength = None
        self.action = None

        while line != '\r\n' and count < ClientRequest.MAX_LEN_CLIENT_REQUEST:
            line = self.readHttpLine()

            if line is None:
                break

            if line.startswith(ClientRequest.HEADER_ACTION):
                self.action = self.getHeaderVal(line)

                if not self.action is None:
                    if self.action == ClientRequest.ACTION_CLOSE or self.action == ClientRequest.ACTION_DATA:
                        self.isValid = True

            count += len(line)

        if self.readConent:
            if self.contentLength > 0 and self.contentLength < ClientRequest.MAX_LEN_CLIENT_REQUEST:
                self.data = self.readFully(self.contentLength)

        return self.isValid

    def readHttpLine(self):
        line = ''
        count = 0
        socket = self.socket

        b = socket.recv(1)

        if not b:
            return None

        while count < ClientRequest.MAX_LEN_CLIENT_REQUEST:
            count += 1
            line += b

            if b == '\r':
                b = socket.recv(1)
                count += 1

                if not b:
                    break

                line += b

                if b == '\n':
                    break

            b = socket.recv(1)

            if not b:
                break

        if not b:
            return None

        return line

    def getHeaderVal(self, header):
        ini = header.find(':')

        if ini == -1:
            return None

        ini += 2

        fim = header.find('\r\n')

        if fim == -1:
            header = header[ini:]

        return header[ini:fim]

    def readFully(self, n):
        count = 0
        data = ''

        while count < n:
            packet = self.socket.recv(n - count)

            if not packet:
                break

            count += len(packet)
            data += packet

class Client(threading.Thread):
    ACTION_DATA = 'data'
    BUFFER_SIZE = 4096

    def __init__(self, id, readSocket, target):
        super(Client, self).__init__()
        self.targetHostPort = target
        self.id = id
        self.readSocket = readSocket
        self.logger = Logger()
        self.isStopped = False
        self.onCloseFunction = None
        self.closeLock = threading.Lock()
        self.threadEndCount = 0
        self.writeSocket = None

    def connectTarget(self):
        aux = self.targetHostPort.find(':')

        host = self.targetHostPort[:aux]
        port = int(self.targetHostPort[aux + 1:])

        self.target = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.target.connect((host, port))

    def run(self):
        try:
            self.connectTarget()

            request = ClientRequest(self.readSocket)
            request.readConent = False

            if not request.parse() or not Client.ACTION_DATA == request.action:
                raise Exception('client sends invalid request')

            threadRead = ThreadRelay(self.readSocket, self.target, self.finallyClose)
            threadRead.logFunction = self.log
            threadRead.start()

            threadWrite = ThreadRelay(self.target, self.writeSocket, self.finallyClose)
            threadWrite.logFunction = self.log
            threadWrite.start()
        except Exception as e:
            self.log('connection error - ' + str(type(e)) + ' - ' + str(e), Logger.LOG_ERROR)
            self.close()

    def finallyClose(self):
        with self.closeLock:
            self.threadEndCount += 1

            if self.threadEndCount == 2:
                self.close()

    def close(self):
        if not self.isStopped:
            self.isStopped = True

            if hasattr(self, 'target'):
                try:
                    self.target.close()
                except:
                    pass

            if hasattr(self, 'writeSocket'):
                try:
                    self.writeSocket.close()
                except:
                    pass

            if hasattr(self, 'readSocket'):
                try:
                    self.readSocket.close()
                except:
                    pass

            self.onClose()
            self.log('closed', Logger.LOG_INFO)

    def onClose(self):
        if not self.onCloseFunction is None:
            self.onCloseFunction(self)

    def log(self, msg, logLevel):
        msg = 'Client ' + str(self.id) + ': ' + msg
        self.logger.printLog(msg, logLevel)

class ThreadRelay(threading.Thread):
    def __init__(self, readSocket, writeSocket, closeFunction=None):
        super(ThreadRelay, self).__init__()
        self.readSocket = readSocket
        self.writeSocket = writeSocket
        self.logFunction = None
        self.closeFuntion = closeFunction

    def run(self):
        try:
            while True:
                data = self.readSocket.recv(Client.BUFFER_SIZE)
                if not data:
                    break
                self.writeSocket.sendall(data)

            self.writeSocket.shutdown(socket.SHUT_WR)
        except Exception as e:
            if not self.logFunction is None:
                self.logFunction('threadRelay error: ' + str(type(e)) + ' - ' + str(e), Logger.LOG_ERROR)
        finally:
            if not self.closeFuntion is None:
                self.closeFuntion()

class AcceptClient(threading.Thread):
    MAX_QTD_BYTES = 5000
    HEADER_BODY = 'X-Body'
    HEADER_ACTION = 'X-Action'
    HEADER_TARGET = 'X-Target'
    HEADER_PASS = 'X-Pass'
    HEADER_ID = 'X-Id'
    ACTION_CREATE = 'create'
    ACTION_COMPLETE = 'complete'
    MSG_CONNECTION_CREATED = 'Created'
    MSG_CONNECTION_COMPLETED = 'Completed'

    ID_COUNT = 0
    ID_LOCK = threading.Lock()

    def __init__(self, socket, server, passwdSet=None):
        super(AcceptClient, self).__init__()
        self.server = server
        self.passwdSet = passwdSet
        self.socket = socket

    def run(self):
        needClose = True

        try:
            head = self.readHttpRequest()

            bodyLen = self.getHeaderVal(head, AcceptClient.HEADER_BODY)
            if not bodyLen is None:
                try:
                    self.readFully(int(bodyLen))
                except ValueError:
                    pass

            action = self.getHeaderVal(head, AcceptClient.HEADER_ACTION)

            if action is None:
                self.log('client sends no action header', Logger.LOG_WARN)
                self.socket.sendall('HTTP/1.1 400 NoActionHeader!\r\nServer: GetTunnelServer\r\n\r\n')
                return

            if action == AcceptClient.ACTION_CREATE:
                target = self.getHeaderVal(head, AcceptClient.HEADER_TARGET)

                if not self.passwdSet is None:
                    passwd = self.getHeaderVal(head, AcceptClient.HEADER_PASS)

                    try:
                        passwd = base64.b64decode(passwd)
                    except:
                        passwd = None
                        pass

                    if passwd is None or not self.passwdSet.isValidKey(passwd, target):
                        self.log('client sends wrong key', Logger.LOG_WARN)
                        self.socket.sendall('HTTP/1.1 403 Forbidden\r\nServer: GetTunnelServer\r\n\r\n')
                        return

                if target is not None and self.isValidHostPort(target):
                    id = self.generateId()

                    client = Client(id, self.socket, target)
                    client.onCloseFunction = self.server.removeClient
                    self.server.addClient(client)
                    self.socket.sendall('HTTP/1.1 200 '+ AcceptClient.MSG_CONNECTION_CREATED + '\r\nServer: GetTunnelServer\r\nX-Id: ' + str(id) + '\r\nContent-Type: text/plain\r\nContent-Length: 0\r\nConnection: Keep-Alive\r\n\r\n')
                    self.log('connection created - ' + str(id), Logger.LOG_INFO)
                    needClose = False
                else:
                    self.log('client sends no valid target', Logger.LOG_WARN)
                    self.socket.sendall('HTTP/1.1 400 Target!\r\nServer: GetTunnelServer\r\n\r\n')

            elif action == AcceptClient.ACTION_COMPLETE:
                id = self.getHeaderVal(head, AcceptClient.HEADER_ID)

                if not id is None:
                    client = self.server.getClient(id)

                    if not client is None:
                        client.writeSocket = self.socket

                        self.log('connection completed - ' + str(id), Logger.LOG_INFO)
                        self.socket.sendall('HTTP/1.1 200 ' + AcceptClient.MSG_CONNECTION_COMPLETED + '\r\nServer: GetTunnelServer\r\nConnection: Keep-Alive\r\n\r\n')

                        client.start()
                        needClose = False
                    else:
                        self.log('client try to complete non existing connection', Logger.LOG_WARN)
                        self.socket.sendall('HTTP/1.1 400 CreateFirst!\r\nServer: GetTunnelServer\r\n\r\n')
                else:
                    self.log('client sends no id header', Logger.LOG_WARN)
                    self.socket.sendall('HTTP/1.1 400 NoID!\r\nServer: GetTunnelServer\r\n\r\n')
            else:
                self.log('client sends invalid action', Logger.LOG_WARN)
                self.socket.sendall('HTTP/1.1 400 InvalidAction!\r\nServer: GetTunnelServer\r\n\r\n')

        except Exception as e:
            self.log('connection error - ' + str(type(e)) + ' - ' + str(e), Logger.LOG_ERROR)
        finally:
            if needClose:
                try:
                    self.socket.close()
                except:
                    pass

    def log(self, msg, logLevel):
        self.server.log(msg, logLevel)

    def readHttpRequest(self):
        request = ''
        linha = ''
        count = 0

        while linha != '\r\n' and count < AcceptClient.MAX_QTD_BYTES:
            linha = self.readHttpLine()

            if linha is None:
                break

            request += linha
            count += len(linha)

        return request

    def readHttpLine(self):
        line = ''
        count = 0
        socket = self.socket

        b = socket.recv(1)

        if not b:
            return None

        while count < AcceptClient.MAX_QTD_BYTES:
            count += 1
            line += b

            if b == '\r':
                b = socket.recv(1)
                count += 1

                if not b:
                    break

                line += b

                if b == '\n':
                    break

            b = socket.recv(1)

            if not b:
                break

        if not b:
            return None

        return line

    def getHeaderVal(self, head, header):
        if not head.startswith('\r\n'):
            header = '\r\n' + header

        if not header.endswith(': '):
            header = header + ': '

        ini = head.find(header)

        if ini == -1:
            return None

        end = head.find('\r\n', ini+2)

        ini += len(header)

        if end == -1 or ini > end or ini >= len(head):
            return None

        return head[ini:end]

    def readFully(self, n):
        count = 0

        while count < n:
            packet = self.socket.recv(n - count)

            if not packet:
                break

            count += len(packet)

    def isValidHostPort(self, hostPort):
        aux = hostPort.find(':')

        if aux == -1 or aux >= len(hostPort) -1:
            return False

        try:
            int(hostPort[aux+1:])
            return True
        except ValueError:
            return False

    def generateId(self):
        with AcceptClient.ID_LOCK:
            AcceptClient.ID_COUNT += 1
            return AcceptClient.ID_COUNT

class Server(threading.Thread):

    def __init__(self, listening, passwdSet=None):
        super(Server, self).__init__()
        self.listening = listening
        self.passwdSet = passwdSet
        self.running = False
        self.logger = Logger()
        self.isStopped = False
        self.clientsLock = threading.Lock()
        self.clients = []

    def run(self):
        try:
            self.soc = socket.socket(socket.AF_INET)
            self.soc.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
            self.soc.settimeout(2)
            self.soc.bind((self.listening[:self.listening.find(':')], int(self.listening[self.listening.find(':') + 1:])))
            self.soc.listen(0)

            self.log('running on ' + self.listening, Logger.LOG_INFO)

            self.running = True
            while self.running:
                try:
                    c, addr = self.soc.accept()
                    c.setblocking(1)

                    self.log('opennig connection - ' + str(addr), Logger.LOG_INFO)
                    self.acceptClient(c)
                except socket.timeout:
                    continue
        except Exception as e:
            self.log('connection error - ' + str(type(e)) + ' - ' + str(e), Logger.LOG_ERROR)
        finally:
            self.running = False
            self.close()

    def acceptClient(self, socket):
        accept = AcceptClient(socket, self, self.passwdSet)
        accept.start()

    def addClient(self, client):
        with self.clientsLock:
            self.clients.append(client)

    def removeClient(self, client):
        with self.clientsLock:
            self.clients.remove(client)

    def getClient(self, id):
        client = None
        with self.clientsLock:
            for c in self.clients:
                if str(c.id) == str(id):
                    client = c
                    break
        return client

    def close(self):
        if not self.isStopped:
            self.isStopped = True

            if hasattr(self, 'soc'):
                try:
                    self.soc.close()
                except:
                    pass

            with self.clientsLock:
                clientsCopy = self.clients[:]

            for c in clientsCopy:
                c.close()

            self.log('closed', Logger.LOG_INFO)

    def log(self, msg, logLevel):
        msg = 'Server: ' + msg
        self.logger.printLog(msg, logLevel)

def print_usage():
    print '\nUsage  : python get.py -b listening -p pass'
    print 'Ex.    : python get.py -b 0.0.0.0:80 -p pass123'
    print '       : python get.py -b 0.0.0.0:80 -p passFile.pwd\n'
    print '___Password file ex.:___'
    print PasswordSet.FILE_EXEMPLE

def parse_args(argv):
    global CONFIG_LISTENING
    global CONFIG_PASS

    try:
        opts, args = getopt.getopt(argv, "hb:p:", ["bind=", "pass="])
    except getopt.GetoptError:
        print_usage()
        sys.exit(2)
    for opt, arg in opts:
        if opt == '-h':
            print_usage()
            sys.exit()
        elif opt in ('-b', '--bind'):
            CONFIG_LISTENING = arg
        elif opt in ('-p', '--pass'):
            CONFIG_PASS = arg

def main():
    print '\n-->GetTunnelPy - Server v.' + '25/06/2017' + '\n'
    print '-->Listening: ' + CONFIG_LISTENING

    pwdSet = None

    if not CONFIG_PASS is None:
        if CONFIG_PASS.endswith('.pwd'):
            pwdSet = PasswordSet()

            try:
                isValidFile = pwdSet.parseFile(CONFIG_PASS)
            except IOError as e:
                print '--#Error reading file: ' + str(type(e)) + ' - ' + str(e)
                sys.exit()

            if not isValidFile:
                print '--#Error on parsing file!\n'
                print_usage()
                return

            print '-->Pass file: ' + CONFIG_PASS + '\n'
        else:
            if (len(CONFIG_PASS) > 0):
                print '-->Pass     : yes\n'
                pwdSet = PasswordSet(CONFIG_PASS)
            else:
                print '-->Pass     : no\n'

    server = Server(CONFIG_LISTENING)
    server.passwdSet = pwdSet
    server.start()

    while True:
        try:
            time.sleep(2)
        except KeyboardInterrupt:
            print '<-> Stopping server...'
            server.running = False
            break

if __name__ == '__main__':
    parse_args(sys.argv[1:])
    main()

path: Modulo/get


code:
#!/bin/bash

if [[ -e $_dr ]]; then
n=0
while read line; do
txt[$n]="$line"
n=$(($n+1))
done < $_dr
unset n
[[ ${txt[0]} = "" ]] && rm $_dr && exit 1
else
txt[0]="ADM-MANAGER-ULTIMATE"
txt[1]="EN LÍNEA:"
txt[2]="EXPIRADOS:"
txt[3]="SU SISTEMA:"
txt[4]="¡BIENVENIDO AL MENÚ!"
txt[5]="GESTIONAR USUARIOS"
txt[6]="HERRAMIENTAS"
txt[7]="ACTUALIZAR"
txt[8]="REMOVER ADM-ULTIMATE"
txt[9]="OPCIÓN:"
txt[10]="[ACTIVADO]"
txt[11]="[DESACTIVADO]"
txt[12]="CAMBIAR COLORES DEL SCRIPT"
txt[13]="[VOLVER / SALIR]"
txt[14]="MENÚ USUARIOS"
txt[15]="CREAR USUARIOS"
txt[16]="REMOVER USUARIOS"
txt[17]="MODIFICAR USUARIOS"
txt[18]="DETALLES DE LOS USUARIOS"
txt[19]="VERIFICAR USUARIOS ONLINE"
txt[20]="CONTROL DE USUARIOS"
txt[21]="SUS COLORES USADOS ACTUALMENTE"
txt[22]="Elija en orden, 1 2 3 4 5 6"
txt[23]="¿Cuál es la secuencia de colores ?:"
txt[24]="No se han seleccionado seis colores!"
txt[25]="¡Aplicando el color seleccionado! ..."
txt[26]="CAMBIAR IDIOMA DEL SCRIPT"
txt[27]="CREADOR DE USUARIOS ADM-ULTIMATE"
txt[28]="Nombre del nuevo usuario:"
txt[29]="Nombre nulo"
txt[30]="Usuario ya existente!"
txt[31]="Contraseña para el usuario"
txt[32]="Duración para el Usuario"
txt[33]="Límite de conexión para el usuario"
txt[34]="Usuario:"
txt[35]="Contraseña:"
txt[36]="Límite:"
txt[37]="Validez:"
txt[38]="LISTA DE USUARIOS REGISTRADOS"
txt[39]="REMOVER USUARIOS"
txt[40]="Eliminar 1 Usuario"
txt[41]="Eliminar todos los usuarios"
txt[42]="Seleccione el usuario o escriba el nombre"
txt[43]="Ningún usuario ha sido seleccionado"
txt[44]="Usuario no existente!"
txt[45]="eliminado"
txt[46]="eliminar"
txt[47]="¡Enter, para volver!"
txt[48]="EDITOR DE USUARIOS"
txt[49]="Ningún usuario ha seleccionado"
txt[50]="Que opción va a editar de:"
txt[51]="Numero de logins de:"
txt[52]="Fecha de expiración de:"
txt[53]="Cambiar contraseña de:"
txt[54]="¿Cuál es el nuevo límite de inicio de sesión:"
txt[55]="¡Límite no cambiado!"
txt[56]="Límite cambiado"
txt[57]="¿Cuántos días debe durar?"
txt[58]="Fecha no modificada"
txt[59]="Cambiado!"
txt[60]="¿Cuál es la nueva contraseña para:"
txt[61]="Contraseña no cambiada!"
txt[62]="Nueva contraseña aplicada"
txt[63]="No se ha seleccionado Ninguna opción!"
txt[64]="Usuario"
txt[65]="Contraseña"
txt[66]="Límite"
txt[67]="Tiempo"
txt[68]="??"
txt[69]="Ilimitado"
txt[70]="Caducado"
txt[71]="Tú tienes:"
txt[72]="Usuarios en su servidor"
txt[73]="días"
txt[74]="USUARIOS"
txt[75]="CONEXIÓN"
txt[76]="TIEMPO"
txt[77]="Ese Herramienta va a Traducir"
txt[78]="Todo el contenido de ADM-ULTIMATE"
txt[79]="Seleccione el número de idioma, o utilice las iniciales del idioma."
txt[80]=""
txt[81]="Traduciendo el sistema..."
txt[82]="Introduzca un idioma:"
txt[83]="horas"
txt[84]="acta"
txt[85]="uso"
txt[86]="No hay ningún usuario en línea"
txt[87]="ELIMINAR USUARIOS VENCIDOS"
txt[88]="No hay Usuarios Vencidos!"
txt[89]="MENÚ HERRAMIENTAS"
txt[90]="CREAR BACKUP"
txt[91]="RESTAURAR BACKUP"
txt[92]="LIMPIAR CACHE"
txt[93]="BAD UDP"
txt[94]="TCP SPEED"
txt[95]="FAILBAN"
txt[96]="SQUID CACHE"
txt[97]="COMPARTIR ARCHIVO ONLINE"
txt[98]="Escriba sólo valores numérico"
txt[99]="INICIANDO BACKUP"
txt[100]="Copia de seguridad de usuarios"
txt[101]="Usuario no registrado en ADM-ULTIMATE"
txt[102]="Introduzca la información del usuario."
txt[103]="Contraseña actual:"
txt[104]="Días De Duración:"
txt[105]="Límite de conexión:"
txt[106]="Copia de seguridad completa"
txt[107]="Back UDP disponible en la carpeta"
txt[108]="Ingresar el directorio de la copia de seguridad"
txt[109]="o bien, Introduzca un vínculo de una copia de seguridad"
txt[110]="Archivo o enlace"
txt[111]="¡Archivo o enlace no válido!"
txt[112]="Copia de seguridad incompatible con ADM"
txt[113]="Restauración ..."
txt[114]="Usuario no restaurado"
txt[115]="Esta Herramienta va a Limpiar Caches"
txt[116]="y eliminar los archivos temporales"
txt[117]="Procedimiento completado"
txt[118]="BADVPN se instalará"
txt[119]="que no es más que un programa"
txt[120]="que libera puertos UDP en el servidor"
txt[121]="y así permitir el servicio VOIP!"
txt[122]="Inicio"
txt[123]="BADVPN iniciado con éxito"
txt[124]="Deteniendo servicio BADVPN ..."
txt[125]="BADVPN detenido con éxito"
txt[126]="Este Script fue proyectado"
txt[127]="Para Mejorar La Latencia"
txt[128]="y velocidad del servidor!"
txt[129]="analizar"
txt[130]="Este es un script experimental"
txt[131]="¡Utilice por su propia cuenta y riesgo!"
txt[132]="Este script cambiará algunas"
txt[133]="configuraciones de red"
txt[134]="del sistema para reducir"
txt[135]="la latencia y mejorar la velocidad"
txt[136]="Continuar con la instalación?"
txt[137]="Configuración de red"
txt[138]="se han agregado con éxito"
txt[139]="ya se han agregado en el sistema!"
txt[140]="Desea quitar la configuración"
txt[141]="Configuración de red"
txt[142]="se han eliminado con éxito"
txt[143]="¿Por qué no?"
txt[144]="desinstalación"
txt[145]="Ver registro"
txt[146]="Este es el FAILBAN PROTECTION"
txt[147]="Hecho únicamente para proteger la seguridad del"
txt[148]="Sistema, su objetivo es analizar"
txt[149]="LOGS DE ACCESO y bloquear toda"
txt[150]="acción sospechosa"
txt[151]="aumentando en un 70% de su seguridad."
txt[152]="¿Desea instalar Fail2Ban?"
txt[153]="Fail2ban Sera Instalado"
txt[154]="Siguientes Servicios"
txt[155]="¿Confirma la elección?"
txt[156]="Instalación finalizada"
txt[157]="Caché de Squid no es más Que"
txt[158]="Un historial de navegación en Squid"
txt[159]="Que ahorrará datos al abrir sitios"
txt[160]="Alojados en su caché"
txt[161]="¡El script hará una breve comprobación!"
txt[162]="No se ha identificado Squid!"
txt[163]="¡Squid esta Activo en tu sistema!"
txt[164]="No hay servicio de caché en el Squid!"
txt[165]="Reiniciando Servicios Espera!"
txt[166]="Activando el servicio SquidCache!"
txt[167]="Desactivando SquidCache !!"
txt[168]="esperar!"
txt[169]="COLOCAR ARCHIVO ONLINE"
txt[170]="OPCION PARA COLOCAR"
txt[171]="CUALQUIER ARCHIVO ONLINE"
txt[172]="QUE ESTE ARCHIVO"
txt[173]="EN EL DIRECTORIO"
txt[174]="REMOVER ARCHIVO ONLINE"
txt[175]="VER MIS ARCHIVOS ONLINE"
txt[176]="Opción invalida"
txt[177]="Seleccione un archivo"
txt[178]="Ningún archivo ha sido seleccionado"
txt[179]="Procedimiento Hecho Con Éxito"
txt[180]="ACCESO AL ARCHIVO ATRAVES DEL ENLACE"
txt[181]="Sus archivos en la carpeta"
txt[182]="TESTEAR SU VELOCIDAD"
txt[183]="INFORMACIÓN VPS"
txt[184]="Inicio de pruebas, espere ..."
txt[185]="Tiempo de respuesta Ping"
txt[186]="Velocidad de carga"
txt[187]="Velocidad de descarga"
txt[188]="Error al procesar información"
txt[189]="Su Sistema"
txt[190]="basado"
txt[191]="Procesador Físico"
txt[192]="Frecuencia de funcionamiento"
txt[193]="Uso del procesador"
txt[194]="Memoria Virtual Total"
txt[195]="Memoria Virtual En uso"
txt[196]="Memoria Virtual Libre"
txt[197]="Memoria Virtual Swap"
txt[198]="Tiempo en línea"
txt[199]="Nombre de la máquina"
txt[200]="Dirección De la Maquina"
txt[201]="Versiones del kernel"
txt[202]="Arquitectura"
txt[203]="analizar"
txt[204]="expediente"
txt[205]="actualizado"
txt[206]="Archivos actualizados"
txt[207]="Valida! Actualizando ..."
txt[208]="¡Expirada o invalida Saliendo!"
txt[209]="¿Esta seguro de esto?"
txt[210]="Desinstalación cancelada por el usuario"
txt[211]="Creado por @Teamadmmanager"
txt[212]="AGREGAR / REMOVER HOST-SQUID"
txt[213]="no encontrado"
txt[214]="O Squid no instalado"
txt[215]="Añadir Host a Squid"
txt[216]="Quitar el host de Squid"
txt[217]="Opción Invalida"
txt[218]="Dominios actuales en el archivo"
txt[219]="Escriba el Host-Squid que desea agregar"
txt[220]="Iniciando con un ., ejemplo: .bughost.com"
txt[221]="¡Esta vacío, no ha escrito nada!"
txt[222]="El dominio ya existe en el archivo"
txt[223]="¡Éxito, Archivo Actualizado!"
txt[224]="Escriba el dominio que desea quitar"
txt[225]="dominio no encontrado"
txt[226]="Introduzca el texto para el BANNER"
txt[227]="verde"
txt[228]="rojo"
txt[229]="azul"
txt[230]="amarillo"
txt[231]="púrpura"
txt[232]="Introduzca el mensaje principal"
txt[233]="Quiere Añadir Más Textos"
txt[234]="BANNER COLORIDO"
txt[235]="Dependencias No instaladas, ¿Desea instalar?"
txt[236]="Instalando dependencias para proxy-socks ..."
txt[237]="Deteniendo proxy-sock ..."
txt[238]="Proxy-sock detenido!"
txt[239]="Seleccione la puerto que va a girar"
txt[240]="Su Proxy Sockets:"
txt[241]="Opa, Esta siendo Usada por:"
txt[242]="Desactive este servicio para usar"
txt[243]="El puerto:"
txt[244]="Para el SOCKS"
txt[245]="Enter, para seleccionar otro puerto!"
txt[246]="Escriba un texto, para el estado 200OK"
txt[247]="Escoja el tipo de sock a utilizar"
txt[248]="PROXY SOCKET EN PYTHON"
txt[249]="PROXY SOCKET EN PYTHON3"
txt[250]="Algo salió mal, Socks No Iniciado!"
txt[251]="perfecto"
txt[252]="BRUTE FORCE PAYLOAD"
txt[253]="ACTIVAR PROXY SOCKET"
txt[254]="LIMITADOR DE CONEXIÓN SIMULTÁNEA"
txt[255]="VER PROXY PYTHON"
txt[256]="MENÚ DE INSTALACIÓN"
txt[257]="NINGUNO PROXY SOCKS ESTA ACTIVO"
txt[258]="DIGITE UN HOST PARA CREAR"
txt[259]="¡PAYLOADS GENERICAS!"
txt[260]="CREADOR DE PAYLOADS"
txt[261]="DIGITE EL HOST"
txt[262]="No anadir nada."
txt[263]="GENERADOR DE PAYLOAD"
txt[264]="ELEGIR EL METODO DE REQUISITOS"
txt[265]="Y POR ULTIMO"
txt[266]="¡METODO DE INYECCIÓN!"
txt[267]="ALGO ESTA"
txt[268]="MAL!"
txt[269]="EXITO!, PAYLOADS GENERADAS"
txt[270]="DIRECTORIO:"
txt[271]="ACTIVAR PROXY GETTUNEL"
txt[272]="¿Cuál es el puerto que desea para el GetTUNNEL"
txt[273]="Puerto Usada Por:"
txt[274]="CLAVE DEL GETTUNEL:"
txt[275]="¡GETTUNEL INICIADO CON ÉXITO!"
txt[276]="¡GETTUNEL NO INICIO!"
txt[277]="Seleccione el servicio para gestionar puertos"
txt[278]="Ningún Servicio Elegido, O El Servicio Elegido No es Soportado"
txt[279]="¿Desea cerrar el puerto actual?"
txt[280]="O Abrir un nuevo puerto en el servicio?"
txt[281]="Procedimiento, Terminado!"
txt[282]="GESTION DE PUERTAS"
txt[283]="Servicio y puerto elegidos:"
txt[284]="Arquitectura no soportada!"
txt[285]="USO APROXIMADO"
txt[286]="CONSUMO TOTAL"
txt[287]="USUARIOS"
txt[288]="MONITOR DE CONSUMO"
txt[289]="Verificación no está activada, o no existe información"
txt[290]="BOT TELEGRAM"
txt[291]="SHADOWSOCKS / SSL stunnel"
txt[292]="SHADOWSOCKS Y SSL"
txt[293]="seleccione un puerto de redirección"
txt[294]="seleccione un puerto"
txt[295]="¡Puerto Invalida!"
txt[296]="No hay Puertos Internos Abiertos!"
txt[297]="Puerto De Su SSL Externa! Ingresar puerto en la aplicación inyector"
txt[298]="Puerto en uso!"
txt[299]="¡Responda las Preguntas Correctamente!"
txt[300]="Medios de Encriptación"
txt[301]="Seleccione la encriptación"
txt[302]="¡Encriptación no seleccionada!"
txt[303]="Contraseña:"
txt[304]="TCP OVER"
txt[305]="ULTRA HOST (SCANNER DE SUBDOMINIOS)"
txt[306]="HOST"
txt[307]="LÍMITE DE CAPTURA"
txt[308]="INGRESAR UNA CONTRASEÑA y DESPUÉS CONFIRMARLA"
txt[309]="VNC se conecta usando el ip de la vps en el puerto"
txt[310]="Para acceder a la interfaz gráfica"
txt[311]="Descargar de la PlayStore:"
txt[312]="VNC no Esta activo ¿Desea activar?"
txt[313]="VNC esta activo ¿Desea deshabilitar?"
txt[314]="VNC SERVER"
txt[315]="¡SU VERSIÓN ESTA ACTUALIZADA!"
txt[316]="¡ADM-ULTIMATE NECESITA ACTUALIZARSE!"
txt[317]="APLICAR BLOQUEO TORRENT"
txt[318]="Crear un nuevo archivo OpenVPN?"
txt[319]="Crear archivo con autenticación (usuario y contraseña)?"
txt[320]="Archivo generado en:"
txt[321]="Para dejarlo en línea:"
txt[322]="Ejecución Automática"
txt[323]="AUTENTICACIÓN DE PROXY SQUID"
txt[324]="Error al generar contraseña, la autenticación de squid no se inició!"
txt[325]="AUTENTICACIÓN DEL PROXY SQUID INICIADO."
txt[326]="Proxy squid no instalado, no puede continuar."
txt[327]="AUTENTICACIÓN DEL PROXY SQUID DESACTIVADO."
txt[328]="El usuario no puede ser nulo."
txt[329]="¿Desea habilitar la autenticación de proxy squid?"
txt[330]="¿Desea desactivar la autenticación de proxy squid?"
txt[331]="SU IP:"
txt[332]="REINICIAR VPS (REBOOT)"
txt[333]="¿Realmente desea Reiniciar la VPS?"
txt[334]="Preparando para reiniciando VPS."
txt[335]="MENÚ INSTALACIÓN"
txt[336]="INSTALAR"
txt[337]="CONFIGURAR"
txt[338]="Seleccione un opción"
echo "${txt[0]}" > $_dr
for((_cont=1; _cont<${#txt[@]}; _cont++)); do
echo "${txt[$_cont]}" >> $_dr
done
fi


code:
#!/bin/bash
ve="\033[1;32m";am="\033[1;33m";ver="\033[1;31m";az="\033[1;36m";f="\033[0m"

meu_ip () {
MEU_IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
MEU_IP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MEU_IP" != "$MEU_IP2" ]] && ip="$MEU_IP2" || ip="$MEU_IP"
}

apt-get install figlet -y > /dev/null 2>&1
meu_ip
echo -e "${az}"
figlet ADM.PRO ULTIMATE
echo -e "${f}"
sleep 2
echo
echo -e "${ver}            +++++ ATENÇÃO +++++${am}
TODAS AS SENHA A SEGUIR COLOQUE SEMPRE A MESMA${f}"
read -p "Enter, Para Prosseguir!"
apt-get install php5 libapache2-mod-php5 php5-mcrypt -y
apt-get install mysql-server php5-mysql -y
mysql_install_db
echo ""
echo -e "${am}Sempre que solicitado${ver}[Y/N]${am}escolha a opção${ver}Y${am} e de ${ve}OK.${am} para tudo que pedir.
...
${am}O proximo procedimento de instalaçao vai te pedir uma senha
ai vcs digita a senha que digitou antes e reconfirma ela ai depois do ir apertando ${ver}Y${f}"
read -p "Enter, Para Prosseguir!"
mysql_secure_installation
echo -e "${az}AGUARDE A INSTALAÇÃO${f}"
sleep 2
apt-get install phpmyadmin -y
php5enmod mcrypt
service apache2 restart
echo ""
stty -echo
tput setaf 7 ; tput bold ; read -p "Digita a mesma senha (MySQL Password): " var7 ; tput sgr0
echo ""
stty echo ; echo
mysql -h localhost -u root -p$var7 -e "CREATE DATABASE adm"
echo -e "${ver}ATENÇÃO - LOGIN ASEGUIR É PESSOAL NAO DIVULGUEM ${f}"
echo ""
echo -e "${am}Agora vamos colocar um LOGIN e SENHA de acesso a pagina de upload${ve}"
	read -p "Login: " var2
	read -p "Senha: " var3
	echo -ne "${f}"

cd /var/www/
   rm -rf index.html > /dev/null 2>&1
   cp /etc/adm-lite/painel.zip /var/www/
   unzip painel.zip > /dev/null 2>&1
   rm -rf painel.zip > /dev/null 2>&1
   chmod -R 777 /var/www/adm > /dev/null 2>&1
sed -i "s;123;$var7;g" /var/www/adm/system/seguranca.php > /dev/null 2>&1

cd /var/www/html/
   rm -rf index.html > /dev/null 2>&1
   cp /etc/adm-lite/painel.zip /var/www/html/
   unzip painel.zip > /dev/null 2>&1
   rm -rf painel.zip > /dev/null 2>&1
   chmod -R 777 /var/www/html/adm > /dev/null 2>&1
sed -i "s;123;$var7;g" /var/www/html/adm/system/seguranca.php > /dev/null 2>&1

[[ ! -d /var/www/temp ]] && mkdir /var/www/temp
cd /var/www/temp && cp /etc/adm-lite/dados.zip /var/www/temp/
unzip dados.zip > /dev/null 2>&1

sed -i "s;adm123;$var2;g" ./banco_de_dados.sql > /dev/null 2>&1
sed -i "s;adm4321;$var3;g" ./banco_de_dados.sql > /dev/null 2>&1

mysql -h localhost -u root -p$var7 adm < banco_de_dados.sql > /dev/null 2>&1
rm -rf /var/www/temp

echo -e "${am}PAINEL DE UPLOAD DE EHI INSTALADO PARA ENTRAR NO SEU PAINEL ACESSE
${az}-------------------------------------------------------------------
${ver}Url: ${ve}$ip:81/login.php
${am}Login: ${ve}$var2
${am}Senha: ${ve}$var3
${am}LINK PAGINA INICIAL ${ve}( $ip:81 )
${az}-------------------------------------------------------------------${f}"
echo -e "${am}"
read -p "Aperte ENTER, Para continuar" naoa
sleep 2
echo -e "${f}"
exit