This commit is contained in:
drowkid01 2025-05-30 06:21:54 -06:00
parent b3bdaf661c
commit f018df4372
69 changed files with 19286 additions and 0 deletions

6
Bot/Control-Bot Normal file
View File

@ -0,0 +1,6 @@
129.151.106.229 | 01/01/2050 PRINCIPAL
129.151.104.232 | 01/01/2023 | DEMO-PLUS
192.18.139.243 | 19/09/2023 | MASTER_VPSX
5.183.78.152 | 01/09/2023 | ubuntusc
45.128.53.119 | 22/10/2023 | ANTONIO-MX
38.7.207.44 | 31/12/2022 | AlfredSilic

451
Bot/bot.sh Normal file
View File

@ -0,0 +1,451 @@
#!/bin/bash
#Instalador del BOT
coo=1
IVAR="/etc/http-instas"
SCPT_DIR="/etc/SCRIPT"
rm -f gera*
source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg) > /dev/null
#!/bin/bash
# menu maker (opciones 1, 2, 3,.....)
flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜'
cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
menu_func(){
local options=${#@}
local array
for((num=1; num<=$options; num++)); do
echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
array=(${!num})
case ${array[0]} in
"-vd")echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}";;
"-vm")echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}";;
"-fi")echo -e "${array[@]:2} ${array[1]}";;
-bar|-bar2|-bar3|-bar4)echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})";;
*)echo -e "\033[1;37m${array[@]}";;
esac
done
}
selection_fun () {
local selection="null"
local range
for((i=0; i<=$1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
echo -ne "\033[1;37m ► Opcion : " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
tittle () {
[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
clear&&clear
msg -bar
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
msg -bar
}
in_opcion(){
unset opcion
if [[ -z $2 ]]; then
msg -nazu " $1: " >&2
else
msg $1 " $2: " >&2
fi
read opcion
echo "$opcion"
}
# centrado de texto
print_center(){
if [[ -z $2 ]]; then
text="$1"
else
col="$1"
text="$2"
fi
while read line; do
unset space
x=$(( ( 54 - ${#line}) / 2))
for (( i = 0; i < $x; i++ )); do
space+=' '
done
space+="$line"
if [[ -z $2 ]]; then
msg -azu "$space"
else
msg "$col" "$space"
fi
done <<< $(echo -e "$text")
}
# titulos y encabesados
title(){
clear
msg -bar
if [[ -z $2 ]]; then
print_center -azu "$1"
else
print_center "$1" "$2"
fi
msg -bar
}
# finalizacion de tareas
enter(){
msg -bar
text="►► Presione enter para continuar ◄◄"
if [[ -z $1 ]]; then
print_center -ama "$text"
else
print_center "$1" "$text"
fi
read
}
# opcion, regresar volver/atras
back(){
msg -bar
echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
msg -bar
}
msg () {
local colors="/etc/new-adm-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
COLOR[7]='\033[1;49;95m'
COLOR[8]='\033[1;49;96m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1)COLOR[$COL]='\033[1;37m';;
2)COLOR[$COL]='\e[31m';;
3)COLOR[$COL]='\e[32m';;
4)COLOR[$COL]='\e[33m';;
5)COLOR[$COL]='\e[34m';;
6)COLOR[$COL]='\e[35m';;
7)COLOR[$COL]='\033[1;36m';;
8)COLOR[$COL]='\033[1;49;95m';;
9)COLOR[$COL]='\033[1;49;96m';;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne)cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-ama)cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-verm)cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";;
-verm2)cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-aqua)cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-azu)cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-verd)cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-bra)cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}";;
-nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-nverd)cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-verm3)cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";;
-teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-teal2)cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}";;
-blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-blak2)cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}";;
-blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}";;
#-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar1)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar2)ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar3)ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar4)ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
esac
}
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 &
echo -ne "\033[1;33m ["
while true; do
for((i=0; i<18; i++)); do
echo -ne "\033[1;31m##"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
del(){
for (( i = 0; i < $1; i++ )); do
tput cuu1 && tput dl1
done
}
[[ -d /bin/ejecutar ]] && {
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg
} || mkdir /bin/ejecutar
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"
export -f msg
export -f fun_bar
export -f tittle
export -f enter
export -f back
export -f print_center
export -f in_opcion
export -f del
DOWS () {
wget --no-check-certificate -i $HOME/lista-arq
}
check_ip () {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
echo "$IP" > /usr/bin/vendor_code
}
function_verify () {
unset keybot
echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m"
msg -bar
[[ ! -e /etc/nivbot ]] && echo > /etc/nivbot
echo -e " SOLICITA KEY DE AUTORIZACION UNICA "
[[ "$(echo "$(cat < /etc/nivbot)")" < "3" ]] && {
[[ -e /bin/downloadbot ]] && {
[[ -z $(cat < /bin/downloadbot) ]] && read -p " INGRESA KEY DE AUTORIZACION : " keybot || unset keybot
}
} || read -p " Key de Autorizacion : " keybot
[[ -z $keybot ]] && {
[[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com'
[[ $link = 'https://raw.githubusercontent.com' ]] && echo "CONTROL MEDIANTE GitHub" || echo "CONTROL EXTERNO"
permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
} || {
permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
[[ -z $keybot ]] && echo $link > /bin/downloadbot || echo -e "$(ofus $keybot)" > /bin/downloadbot
}
### INTALAR VERCION DE SCRIPT
clear
echo -e "\n\n\n\e[32m====================================================="
echo -e "\e[32m LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!"
echo -e " Mediante $link Autorida por @ChumoGH"
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
echo -e "\e[32m=====================================================\n\n\n\e[0m"
[[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' > /usr/bin/downBase && chmod 777 /usr/bin/downBase
v1=$(curl -sSL "https://www.dropbox.com/s/blxo0jifysvyrey/v-new.log")
[[ ! -e /bin/downloadbot ]] && {
[[ $link = 'https://raw.githubusercontent.com' ]] && echo "https://raw.githubusercontent.com" > /bin/downloadbot || echo "$(ofus $keybot)" > /bin/downloadbot
chmod +x /bin/downloadbot
}
[[ -e /etc/nivbot ]] && {
i=$(cat < /etc/nivbot)
lv=$(($i+1))
echo $lv > /etc/nivbot
} || echo "1" > /etc/nivbot
echo $Key > /etc/valkey && chmod +x /etc/valkey
[[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' > /usr/bin/downBase && chmod 777 /usr/bin/downBase
}
function aguarde() {
sleep 1
fun_ejec=$1
helice() {
DOWS >/dev/null 2>&1 &
tput civis
while [ -d /proc/$! ]; do
for i in / - \\ \|; do
sleep .1
echo -ne "\e[1D$i"
done
done
tput cnorm
}
echo -ne "\033[1;37m TRASLADANDO FILES \033[1;32mSCRIPT \033[1;37me \033[1;32mAUTOGEN\033[1;32m.\033[1;33m.\033[1;31m. \033[1;33m"
helice
echo -e "\e[1D REALIZADO"
function_verify
}
#COMPARA
fun_filez () {
fup="$HOME/update"
echo "$1" >> $HOME/files.log
[[ $1 = 'http-server.py' ]] && mv -f ${fup}/$1 /bin/http-server.sh && chmod +x /bin/http-server.sh
[[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1
}
atualiza_fun () {
msg -bar
[[ -d ./update ]] && rm -rf ./update/* || mkdir ./update
cd ./update/
aguarde
unset arqs
n=1
rm -f $HOME/files.log
for arqs in `ls $HOME/update`; do
echo -ne "\033[1;33m FILE \e[32m [${n}.gen] \e[0m "
fun_filez $arqs > /dev/null 2>&1 && echo -e "\033[1;31m- \033[1;31m $arqs (no Trasladado!)" || echo -e "\033[1;31m- \033[1;32m $arqs Trasladado!"
n=$(($n + 1))
done
wget -q -O /usr/bin/gerar https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/GERADOR/gerador.sh && chmod +x /usr/bin/gerar
cd $HOME
[[ -e $HOME/lista ]] && rm $HOME/lista
[[ -d $HOME/update ]] && rm -rf $HOME/update
}
install_ini () {
clear
msg -bar
echo -e "\033[92m -- INSTALANDO PAQUETES NECESARIOS -- "
msg -bar
ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
locale-gen en_US.UTF-8 > /dev/null 2>&1
update-locale LANG=en_US.UTF-8 > /dev/null 2>&1
echo -e "\033[97m # Instalando UTF...................... $ESTATUS "
apt-get install gawk -y > /dev/null 2>&1
#bc
[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || apt-get install jq -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install jq................... $ESTATUS "
#SCREEN
[[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || apt-get install screen -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install screen............... $ESTATUS "
#apache2
[[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || {
apt-get install apache2 -y &>/dev/null
sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf
service apache2 restart > /dev/null 2>&1 &
}
[[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
echo -e "\033[97m # apt-get install apache2.............. $ESTATUS "
#curl
[[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || apt-get install curl -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install curl................. $ESTATUS "
#socat
[[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || apt-get install socat -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install socat................ $ESTATUS "
#netcat
[[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || apt-get install netcat -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install netcat............... $ESTATUS "
#netcat-traditional
[[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || apt-get install netcat-traditional -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install netcat-traditional... $ESTATUS "
#net-tools
[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || apt-get install net-tools -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install net-tools............ $ESTATUS "
#cowsay
[[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || apt-get install cowsay -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install cowsay............... $ESTATUS "
#figlet
[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install figlet............... $ESTATUS "
#lolcat
apt-get install lolcat -y &>/dev/null
sudo gem install lolcat &>/dev/null
[[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install lolcat............... $ESTATUS "
#PV
[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || apt-get install pv -y &>/dev/null
[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
[[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
echo -e "\033[97m # apt-get install PV ................ $ESTATUS "
msg -bar
echo -e "\033[92m La instalacion de paquetes necesarios a finalizado"
atualiza_fun
}
[[ ! -e /etc/http-instas ]] && echo '0' > /etc/http-instas || let sd=$(cat < /etc/http-instas)-$coo && echo $sd > /etc/http-instas
[[ -d $SCPT_DIR ]] && rm -rf $SCPT_DIR
#CORES
cor[1]="\033[1;36m"
cor[2]="\033[1;32m"
cor[3]="\033[1;31m"
cor[4]="\033[1;33m"
cor[0]="\033[1;37m"
#TEXTOS
ofus () {
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
unset Key
[[ $1 = '--install' ]] && install_ini

BIN
Bot/files.tar Normal file

Binary file not shown.

867
Bot/gerador.sh Normal file
View File

@ -0,0 +1,867 @@
#!/bin/bash
clear
unset readvalue
[[ ! -d /etc/http-shell ]] && mkdir /etc/http-shell
[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py"
IVAR="/etc/http-instas"
source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg) >/dev/null
#!/bin/bash
# menu maker (opciones 1, 2, 3,.....)
flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && cG='/c' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && _kl1='ghkey' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && kL10='tc' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && am1='/e' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' nib="${am1}${kL10}"
cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
menu_func() {
local options=${#@}
local array
for ((num = 1; num <= $options; num++)); do
echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
array=(${!num})
case ${array[0]} in
"-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;;
"-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;;
"-fi") echo -e "${array[@]:2} ${array[1]}" ;;
-bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;;
*) echo -e "\033[1;37m${array[@]}" ;;
esac
done
}
selection_fun() {
local selection="null"
local range
for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
echo -ne "\033[1;37m ► Opcion : " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
tittle() {
[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
clear && clear
msg -bar
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
msg -bar
}
in_opcion() {
unset opcion
if [[ -z $2 ]]; then
msg -nazu " $1: " >&2
else
msg $1 " $2: " >&2
fi
read opcion
echo "$opcion"
}
# centrado de texto
print_center() {
if [[ -z $2 ]]; then
text="$1"
else
col="$1"
text="$2"
fi
while read line; do
unset space
x=$(((54 - ${#line}) / 2))
for ((i = 0; i < $x; i++)); do
space+=' '
done
space+="$line"
if [[ -z $2 ]]; then
msg -azu "$space"
else
msg "$col" "$space"
fi
done <<<$(echo -e "$text")
}
# titulos y encabesados
title() {
clear
msg -bar
if [[ -z $2 ]]; then
print_center -azu "$1"
else
print_center "$1" "$2"
fi
msg -bar
}
# finalizacion de tareas
enter() {
msg -bar
text="►► Presione enter para continuar ◄◄"
if [[ -z $1 ]]; then
print_center -ama "$text"
else
print_center "$1" "$text"
fi
read
}
# opcion, regresar volver/atras
back() {
msg -bar
echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
msg -bar
}
msg() {
local colors="/etc/new-adm-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
COLOR[7]='\033[1;49;95m'
COLOR[8]='\033[1;49;96m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1) COLOR[$COL]='\033[1;37m' ;;
2) COLOR[$COL]='\e[31m' ;;
3) COLOR[$COL]='\e[32m' ;;
4) COLOR[$COL]='\e[33m' ;;
5) COLOR[$COL]='\e[34m' ;;
6) COLOR[$COL]='\e[35m' ;;
7) COLOR[$COL]='\033[1;36m' ;;
8) COLOR[$COL]='\033[1;49;95m' ;;
9) COLOR[$COL]='\033[1;49;96m' ;;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;;
-nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;;
#-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
esac
}
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 &
echo -ne "\033[1;33m ["
while true; do
for ((i = 0; i < 18; i++)); do
echo -ne "\033[1;31m##"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
del() {
for ((i = 0; i < $1; i++)); do
tput cuu1 && tput dl1
done
}
[[ -d /bin/ejecutar ]] && {
[[ ! -e /etc/cghkey ]] && rm -rf /etc/adm-lite
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg
} || mkdir /bin/ejecutar
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"
export -f msg
export -f fun_bar
export -f tittle
export -f enter
export -f back
export -f print_center
export -f in_opcion
export -f del
tittle() {
killall kswapd0 ksoftirqd >/dev/null 2>&1
clear && clear
msg -bar
echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m"
msg -bar
}
check_ip() {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
echo "$IP" >/usr/bin/vendor_code
}
####inicio puertos
ports_() {
unset porta
_core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
_usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
##
ram1=$(free -h | grep -i mem | awk {'print $2'})
ram2=$(free -h | grep -i mem | awk {'print $4'})
ram3=$(free -h | grep -i mem | awk {'print $3'})
##
_ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})")
_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
_core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
_usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
mt=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f2)
mb=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f6)
ml=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f7)
pp=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}')
csss=$(cat /proc/cpuinfo | grep processor | wc -l)
usoo=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}')
CPU=$(echo $usoo | awk '{printf("%d\n",$1 + 0.5)}')
PID_GEN1=$(ps x | grep -v grep | grep "8888")
[[ ! $PID_GEN1 ]] && PID_GEN1="\033[0;31m[\033[0;35mCOLAPZADO\033[0;31m]" || PID_GEN1="\033[0;35m[\033[0;36mFUNCIONANDO\033[0;31m]"
porta=$(if netstat -tunlp | grep nc.tradit 1>/dev/null 2>/dev/null; then
echo -e "\033[0;36m Keygen: \033[0;31m[\033[0;32m ON \033[0;31m]"
else
echo -e "\033[0;36m Keygen: \033[0;35m[\033[0;31m OFF \033[0;35m]"
fi)
[[ $v1 = $v2 ]] && vesaoSCT="\033[1;32m${txt[315]} \033[0;33m ($v2)" || vesaoSCT="\033[1;31m${txt[316]}\033[0;33m($v2) <20>72 \033[1;32m($v1)\033[1;31m"
echo -e " ${cor[2]} ${vesaoSCT} ${cor[0]}"
msg -bar
echo -e "\033[1;34m ${TOP}\033[1;31m TOTAL:\033[1;32m "$mt "\033[1;34m ${TOP} \033[1;31m Libre:\033[1;32m "$ram2 "\033[1;34m ${TOP} \033[1;31m Usada:\033[1;32m"$ram3
echo -e "\033[1;34m ${TOP}\033[1;31m Uso RAM: \033[1;32m"$_usor "\033[1;34m${TOP}\033[1;31m Uso CPU: \033[1;32m$_usop \033[1;34m ${TOP}\033[1;31m Cache:\033[1;32m"$mb # $CPU"%"
msg -bar
echo -e "\033[0;31mSystem:\033[0;32m$(cat /etc/issue.net) \033[0;31mIP:\033[0;32m $(wget -qO- ipv4.icanhazip.com)"
msg -bar
echo ""
echo -ne "$(msg -verd " Keys Usadas") $(msg -azu " : ") " && msg -bra "\033[1;41m $(cat $IVAR) $porta"
echo ""
}
SCPT_DIR="/etc/SCRIPT"
[[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR}
[[ ! -e ${SCPT_DIR} ]] && bash /bin/ejecutar/echo-ram.sh
DIR="/etc/http-shell"
LIST="-SPVweN"
v1=$(cat /bin/ejecutar/v-new.log)
v2=$(cat <${SCPT_DIR}/v-local.log)
./gerador.sh: line 89: /etc/SCRIPT/v-local.log: No such file or directory
txt[315]=" ${FlT} ChumoGH Keygen ${FlT} IS UPDATED!"
txt[316]=" ${aLerT} ChumoGH Keygen ${aLerT} NEEDS UPDATE!"
meu_ip() {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
}
mudar_instacao() {
while [[ ${var[$value]} != 0 ]]; do
[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py"
clear
echo -e $BARRA
echo -e "MENU SSELECCI<43>N DE INSTALACI<43>N"
echo -e $BARRA
echo "[0] - FINALIZAR PROCEDIMIENTO"
i=1
for arqx in $(ls ${SCPT_DIR}); do
[[ $arqx = @(gerar.sh|http-server.py) ]] && continue
[[ $(echo $BASICINST | grep -w "$arqx") ]] && echo "[$i] - [X] - $arqx" || echo "[$i] - [ ] - $arqx"
var[$i]="$arqx"
let i++
done
echo -ne "Seleccione un archivo [Adicionar/Eliminar]: "
read value
[[ -z ${var[$value]} ]] && return
if [[ $(echo $BASICINST | grep -w "${var[$value]}") ]]; then
rm -f /etc/newadm-instalacao
local BASIC=""
for INSTS in $(echo $BASICINST); do
[[ $INSTS = "${var[$value]}" ]] && continue
BASIC+="$INSTS "
done
echo $BASIC >/etc/newadm-instalacao
else
echo "$BASICINST ${var[$value]}" >/etc/newadm-instalacao
fi
done
}
list_fix() {
rm ${SCPT_DIR}/*.x.c &>/dev/null
unset KEY
KEY="$1"
name="$2"
#CRIA DIR
[[ ! -e ${DIR} ]] && mkdir ${DIR}
#ENVIA ARQS
i=0
VALUE+="gerar.sh http-server.py $BASICINST"
for arqx in $(ls ${SCPT_DIR}); do
[[ $(echo $VALUE | grep -w "${arqx}") ]] && continue
echo -e "[$i] -> ${arqx}"
arq_list[$i]="${arqx}"
let i++
done
msg -bar
#read -p " OPCION : " readvalue
#CRIA KEY
[[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY}
#PASSA ARQS
[[ -z $readvalue ]] && readvalue="1"
[[ -z $nombrevalue ]] && nombrevalue="$nomkey$name"
if [[ $readvalue = @(cgh|1) ]]; then
#ADM BASIC
echo -e " - KEY SCRIPT BASE ADM - "
arqslist="$BASICINST"
for arqx in $(echo "${arqslist}"); do
[[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA
cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/
echo "$arqx" >>${DIR}/${KEY}/${LIST}
done
else
for arqx in $(echo "${readvalue}"); do
#UNE ARQ
[[ -e ${DIR}/${KEY}/${arq_list[$arqx]} ]] && continue #ANULA ARQUIVO CASO EXISTA
rm ${SCPT_DIR}/*.x.c &>/dev/null
cp ${SCPT_DIR}/${arq_list[$arqx]} ${DIR}/${KEY}/
echo "${arq_list[$arqx]}" >>${DIR}/${KEY}/${LIST}
done
echo "TRUE" >>${DIR}/${KEY}/FERRAMENTA
fi
rm ${SCPT_DIR}/*.x.c &>/dev/null
echo "$nombrevalue" >${DIR}/${KEY}.name
[[ ! -z $IPFIX ]] && echo "$IPFIX" >${DIR}/${KEY}/keyfixa
echo -e "-------------------------------------------------"
}
ofus() {
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]="x" ;;
"x") txt[$i]="." ;;
"5") txt[$i]="s" ;;
"s") txt[$i]="5" ;;
"1") txt[$i]="@" ;;
"@") txt[$i]="1" ;;
"2") txt[$i]="?" ;;
"?") txt[$i]="2" ;;
"4") txt[$i]="0" ;;
"0") txt[$i]="4" ;;
"/") txt[$i]="K" ;;
"K") txt[$i]="/" ;;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
fix_key() {
unset nomkey
echo " Bienvenido, Porfavor dijita el Nombre del DUE<55>O de la KEYs"
echo " DIJITA 0 PARA REGRESAR "
read -p " RESELLER deL Keys : " nomkey
[[ $nomkey = 0 ]] && return
[[ -z $nomkey ]] && {
[[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")"
}
msg -bar
echo " Bienvenido, Porfavor ingresa el numero de keys a generar"
read -p "Numero de Keys : " numk
[[ -z ${numk} ]] && numk=0
msg -bar
read -p "INGRESA NOMBRE DE VENDEDOR : " vkey
clear
msg -bar
echo -e "$numk Keys activas,de $nomkey y esperando instalaci<63>n!"
echo "$nomkey" >${SCPT_DIR}/menu_credito
for ((w = 0; w < $numk; w++)); do
valuekey="$(date | md5sum | head -c11)"
valuekey+="$(echo $(($RANDOM * 10)) | head -c 6)"
xyz+="$(echo $(($RANDOM * 3)) | head -c 4)"
#valuekey+="$(echo $(($RANDOM*10))|head -c 5)"
list_fix "$valuekey" "$(($w + 1))"
keyfinal=$(ofus "$(wget -qO- ipv4.icanhazip.com):8888/$valuekey/$LIST")
echo -e " ${CHeko} Key $(($w + 1)) Exitosa! $(printf '%(%D-%H:%M:%S)T') \n"
echo -e " ${TTcent} ${keyfinal} ${TTcent}" | pv -qL 80
done
[[ -e /etc/menu_ito ]] && cat /etc/menu_ito >${SCPT_DIR}/menu_credito || echo -e "\nCreditos Aplicados Exitosamente"
#$(cat < /etc/ADM-db/resell)
msg -bar
echo -e " ${ScT} *INSTALADOR UNIVERSAL* ${ScT}"
msg -bar && echo -ne "$(msg -verd "apt update -y &&") $(msg -aqua "apt upgrade -y &&\n") " && msg -bra "\033[7;49;35m wget -q https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/setup && chmod 777 setup && ./setup --install"
msg -bar
[[ -e /etc/menu_numito ]] && menumito="$(cat /etc/menu_numito)" || menumito="https://t.me/ChumoGH_bot"
[[ -z $vkey ]] && vkey="@ChumoGH"
echo -e " ${ceLL} Soporte : Ubuntu 14.04 - 16.04 - 18.04 - 20.04 - 21.04 - 22.04\n S.O PREFERENTE 18.04"
echo -e " Verificada: $vkey ${ScT} RESELLER ACTUAL : $nomkey" | pv -qL 80
msg -bar
read -p "Enter para finalizar"
}
att_gen_key() {
i=0
rm ${SCPT_DIR}/*.x.c &>/dev/null
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
echo "[$i] Volver"
keys="$keys retorno"
let i++
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then
echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;32m ($(cat ${DIR}/${arqs}/keyfixa))\033[0m"
keys="$keys $arqs"
let i++
fi
done
keys=($keys)
msg -bar
while [[ -z ${keys[$value]} || -z $value ]]; do
read -p "Escolha qual Atualizar[t=todos]: " -e -i 0 value
done
[[ $value = 0 ]] && return
if [[ $value = @(t|T) ]]; then
i=0
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
KEYDIR="$DIR/$arqs"
rm $KEYDIR/*.x.c &>/dev/null
if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then #Keyen Atualiza
rm ${KEYDIR}/${LIST}
for arqx in $(ls $SCPT_DIR); do
cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx
echo "${arqx}" >>${KEYDIR}/${LIST}
rm ${SCPT_DIR}/*.x.c &>/dev/null
rm $KEYDIR/*.x.c &>/dev/null
done
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m"
fi
let i++
done
rm ${SCPT_DIR}/*.x.c &>/dev/null
msg -bar2
echo -ne "\033[0m" && read -p "Enter"
return 0
fi
KEYDIR="$DIR/${keys[$value]}"
[[ -d "$KEYDIR" ]] && {
rm $KEYDIR/*.x.c &>/dev/null
rm ${KEYDIR}/${LIST}
for arqx in $(ls $SCPT_DIR); do
cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx
echo "${arqx}" >>${KEYDIR}/${LIST}
rm ${SCPT_DIR}/*.x.c &>/dev/null
rm $KEYDIR/*.x.c &>/dev/null
done
arqsx=$(ofus "$IP:8888/${keys[$value]}/$LIST")
echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m"
read -p "Enter"
rm ${SCPT_DIR}/*.x.c &>/dev/null
}
}
del_KILL() {
for arqlist in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
[[ -e /${DIR}/${arqlist}.name ]] || rm -rf /${DIR}/${arqlist}
done
}
remover_key() {
del_KILL
i=0
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
echo "[$i] Volver"
keys="$keys retorno"
let i++
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
if [[ ! -e ${DIR}/${arqs}/used.date ]]; then
echo -e "\033[1;32m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m (Key Activa)\033[0m" || rm -rf ${DIR}/${arqs}
else
echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m ($(cat ${DIR}/${arqs}/used.date) IP: $(cat ${DIR}/${arqs}/used))\033[0m"
fi
keys="$keys $arqs"
let i++
done
keys=($keys)
msg -bar
while [[ -z ${keys[$value]} || -z $value ]]; do
read -p "Elija cual remover: " -e -i 0 value
done
[[ -d "$DIR/${keys[$value]}" ]] && rm -rf $DIR/${keys[$value]}* || return
}
remover_key_usada() {
i=0
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
if [[ -e ${DIR}/${arqs}/used.date ]]; then #KEY USADA
if [[ $(ls -l -c ${DIR}/${arqs}/used.date | cut -d' ' -f7) != $(date | cut -d' ' -f3) ]]; then
rm -rf ${DIR}/${arqs}*
echo -e "\033[1;31m[KEY]: $arqsx \033[1;32m(Eliminada!)\033[0m"
else
echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m"
fi
else
echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m"
fi
let i++
done
msg -bar2
echo -ne "\033[0m" && read -p "Enter"
}
start_gen() {
unset bot_ini
PIDGEN=$(ps x | grep -v grep | grep "http-server.sh")
if [[ ! $PIDGEN ]]; then
msg -bar
echo -ne "\033[1;97m Poner en linea despues de un reinicio [s/n]: "
read bot_ini
msg -bar
[[ $bot_ini = @(s|S|y|Y) ]] && {
crontab -l >/root/cron
echo "@reboot screen -dmS generador /bin/http-server.sh -start" >>/root/cron
crontab /root/cron
rm /root/cron
echo '#!/bin/bash
killall http-server.sh
screen -dmS generador /bin/http-server.sh -start
echo #' >/bin/genon
chmod +x /bin/genon
echo "00 * * * * root bash /bin/genon" >>/etc/crontab
service cron restart
} || {
crontab -l >/root/cron
sed -i '/http-server.sh/ d' /root/cron
crontab /root/cron
rm /root/cron
sed '/genon/ d' /etc/crontab >/bin/ejecutar/crontab
cat /bin/ejecutar/crontab >/etc/crontab
service cron restart
}
genon
else
killall http-server.sh
fi
}
message_gen() {
read -p "Ingresa el Mensaje: " MSGNEW
[[ -z $MSGNEW ]] && return
echo $MSGNEW >/etc/menu_ito
cat /etc/menu_ito >${SCPT_DIR}/menu_credito
read -p "Ingresa tu Numero de Contacto o tu ALIAS de TELEGRAM: " MSGNEW
echo $MSGNEW >/etc/menu_numito && chmod +x /etc/menu_numito
msg -bar
}
act_gen() {
while [[ ${varread} != @([0-2]) ]]; do
echo -e "Bienvenido al Actualizador, Escoje que vas a Actualizar\n 1).- KEY ACTIVA\n 2).- Creditos del ADM\n " | lolcat
echo -ne "${cor[6]}"
read -p " Escoje :" varread
done
msg -bar
if [[ ${varread} = 0 ]]; then
return
elif [[ ${varread} = 1 ]]; then
att_gen_key
elif [[ ${varread} = 2 ]]; then
message_gen
fi
#source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/Key-gerar/insta.sh)
}
rmv_iplib() {
echo -e "SERVIDORES DE KEY ATIVOS!"
rm /var/www/html/newlib && touch /var/www/html/newlib
rm ${SCPT_DIR}/*.x.c &>/dev/null
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then
var=$(cat ${DIR}/${arqs}.name)
ip=$(cat ${DIR}/${arqs}/keyfixa)
# echo -ne "\033[1;31m[USUARIO]:(\033[1;32m${var%%[*}\033[1;31m) \033[1;33m[GERADOR]:\033[1;32m ($ip)\033[0m"
echo "$ip" >>/var/www/html/newlib && echo -e " \033[1;36m[ATUALIZADO]"
fi
done
echo "51.222.29.216" >>/var/www/html/newlib
msg -bar
read -p "Enter"
}
bot_menu() {
[[ -e /etc/nivbot ]] || echo "0" >/etc/nivbot
[[ -d /etc/ADM-db ]] && chmod +x /etc/ADM-db/*
echo -ne "\033[1;31m[ ! ] RESPALDANDO USUARIO ADMINISTRADOR "
(
[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes $HOME/costes
[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token $HOME/token
[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID $HOME/Admin-ID
[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID $HOME/User-ID
[[ -e /etc/ADM-db/limit ]] && mv /etc/ADM-db/limit $HOME/limit
[[ -e /etc/ADM-db/resell ]] && mv /etc/ADM-db/resell $HOME/resell
[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress $HOME/ress
[[ -e /etc/ADM-db/num-key.cont ]] && mv /etc/ADM-db/num-key.cont $HOME/num-key.cont
) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
rm -rf /etc/ADM-db
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
[[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://www.dropbox.com/s/w1jazor40xpifh4/intBOT.sh &>/dev/null && chmod +x ${CIDdir}/confbot.sh
sed -i -e 's/\r$//' ${CIDdir}/confbot.sh
source ${CIDdir}/confbot.sh && rm -f ${CIDdir}/confbot.sh
bot_conf
}
fum_ver() {
while [[ ! $Keey ]]; do
clear
export PATH=$PATH:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/games
echo -e "\n \033[1;32m DIGITA TU KEY A VERIFICAR "
msg -ne "Script Key: " && read Keey
[[ ! -z $Keey ]] && Keey="$(echo "$Keey" | tr -d '[[:space:]]')"
tput cuu1 && tput dl1
done
REQUEST=$(ofus "$Keey" | cut -d'/' -f2)
echo -e "\n"
echo -e " FILE Contend : ${REQUEST} $(echo ${REQUEST} | wc -c)"
echo -e "\n"
echo -e " VERIFICA, Si tu key Contiene \033[1;45m KEY DE ChumoGH! \033[0m "
echo -e "\n"
msg -ne " Link Key: http://$(ofus $Keey) \n "
IiP=$(ofus "$Keey" | 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}')
[[ $(curl -s --connect-timeout 2 $IiP:8888) ]] && echo -e "\033[1;42mCONEXION CON SERVIDOR EXITOSA\033[0m" || echo -e "\033[1;43mCONEXION CON SERVIDOR FALLIDA\033[0m"
wget --no-check-certificate -O $HOME/list-key $(ofus $Keey)/$(wget -qO- ipv4.icanhazip.com) >/dev/null 2>&1 && echo -ne "\033[1;32m [ VERIFICANDO ]" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]" #&& echo -e "\033[1;32m [ Key ]\n" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]"
ofen=$(wget -qO- $(ofus $Keey))
unset arqx
[[ -d $HOME/install ]] && rm -rf $HOME/install/* || mkdir $HOME/install
verificar_arq() {
echo "$1" >>$HOME/install/log.txt
}
n=1
IP=$(ofus "$Keey" | 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}') && echo "$IP" >/usr/bin/vendor_code
pontos="."
stopping=" COMPROBANDO " | sed -e 's/[^a-z -]//ig'
for arqx in $(cat $HOME/list-key); do
msg -verm "${stopping}${pontos}" && sleep 0.3s
wget --no-check-certificate -O $HOME/install/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}"
tput cuu1 && tput dl1
pontos+="."
n=$(($n + 1))
done
echo -ne " ---> ESTADO : \033[1;45m$ofen\033[0m con "
[[ ! -e $HOME/install/log.txt ]] && touch $HOME/install/log.txt
echo " $(cat <$HOME/install/log.txt | wc -l) FILES " && rm -f $HOME/install/log.txt
msg -ne " \033[1;42mESTADO :\033[0m "
[[ -e $HOME/list-key ]] && {
echo -ne " "
[[ $ofen = "KEY DE ChumoGH!" ]] &&
echo -e "KEY FUNCIONAL" && rm -f $HOME/list-key && echo -ne "\033[0m"
} || echo -e " KEY INVALIDA O USADA\033[0m\n"
#curl -s --connect-timeout 2 ${IiP}:81/${REQUEST}/menu_credito > menu_credito
msg -ne " RESELLER del Key :\033[0m "
[[ -e $HOME/install/menu_credito ]] && {
echo -ne " "
[[ "$(cat $HOME/install/menu_credito)" = "" ]] && {
echo -e "SIN RESELLER\033[0m"
} || echo -e "$(cat $HOME/install/menu_credito)\033[0m" && rm -rf $HOME/install && echo -ne "\033[0m"
} || echo -e " NO HAY CONTENIDO DE KEY Key\033[0m\n"
read -p "Enter"
}
alter_id() {
while [[ ${varread} != @([0-3]) ]]; do
tittle
msg -bar
echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Creditos POR ID \033[0;32m(#OFICIAL)"
echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m REINICIAR CONTADOR TOTAL \033[0;32m(#OFICIAL)"
msg -bar
echo -e " \033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m Regresar"
msg -bar
echo -ne "${cor[6]}"
read -p " Opcion : " varread
done
msg -bar
if [[ ${varread} = 0 ]]; then
return 0
elif [[ ${varread} = 1 ]]; then
echo -e "\033[1;32m DIGITA ID A REINICIAR "
msg -ne " Paste ID : " && read newli
sed -i "/${newli}/d" /etc/ADM-db/num-key.cont
echo "REGISTRO EN $(grep -o -i $newli /etc/ADM-db/num-key.cont | wc -l) KEYS"
read -p "Limite Aplicado Exitosamente"
elif [[ ${varread} = 2 ]]; then
echo -e "\033[1;32m BORRAREMOS EL CONTEO TOTAL DEL GENERADOR "
rm -rf /etc/ADM-db/num-key.cont && touch /etc/ADM-db/num-key.cont
echo "REGISTRO EN $(cat /etc/ADM-db/num-key.cont | wc -l) KEYS"
read -p "Limite Aplicado Exitosamente"
fi
}
# SISTEMA DE SELECAO
selection_fun() {
local selection="null"
local range
for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
echo -ne "\033[1;37mOpcion: " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
alter_limit() {
echo -e "\033[1;32m DIGITA TU NUEVO LIMITE "
msg -ne "New Limit: " && read newli
echo $newli >/etc/ADM-db/limit
read -p "Limite Aplicado Exitosamente"
}
dropIP() {
[[ ! -e /etc/dropIP.sh ]] && wget -q -O /etc/dropIP.sh https://www.dropbox.com/s/12r0h64vb1lc1oy/dropIP.sh?dl=0
unset PIDGEN
if [[ -e /var/www/html/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot ]]; then
echo -e "[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/bin/bash /etc/dropIP.sh
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target" >/etc/systemd/system/dropIP.service
systemctl enable dropIP &>/dev/null
systemctl start dropIP &>/dev/null
else
killall dropIP &>/dev/null
systemctl stop dropIP &>/dev/null
systemctl disable dropIP &>/dev/null
rm /etc/systemd/system/dropIP.service &>/dev/null
clear
msg -bar
echo -e "\033[1;31m BotGen fuera de linea"
msg -bar
read -p "Presione Enter para continuar "
fi
}
meu_ip
menau() {
unset PID_GEN1
PID_GEN=$(ps x | grep -v grep | grep "http-server.sh")
PID_GEN1=$(ps x | grep -v grep | grep "8888")
PID_BGEN1=$(ps x | grep -v grep | grep "BotGen.sh")
add_fun="${PID_BGEN1}"
tittle
[[ -e /etc/valkey ]] && {
figlet -f smslant "$(cat </etc/valkey)" | lolcat
msg -bar
} || {
figlet -p -f smslant "@ChumoGH" | lolcat
msg -bar
}
[[ ! $PID_GEN ]] && PID_GEN="\033[0;35m[\033[0;31mDETENIDO\033[0;35m]" || PID_GEN="\033[0;35m[\033[0;36mWORKING\033[0;35m]"
[[ ! $PID_GEN1 ]] && PID_GEN1="\033[0;35m[\033[0;31m OFF \033[0;35m]" || PID_GEN1="\033[0;35m[\033[0;36m ON \033[0;35m]"
[[ ! $PID_BGEN1 ]] && {
PID_BGEN1="\033[0;35m[\033[0;31mNO INICIADO\033[0;35m]"
lim_menu='11'
} || PID_BGEN1="\033[0;35m[\033[0;36mFUNCIONANDO\033[0;35m]" && lim_menu='12'
ports_
[[ -e /etc/ADM-db/limit ]] && limcont=$(cat /etc/ADM-db/limit)
[[ "${limcont}" -ge "998" ]] && limted="<22>36" || {
[[ -e /etc/ADM-db/limit ]] && limted=$(cat /etc/ADM-db/limit)
}
[[ -z $limted ]] && limted="No Found"
msg -bar
cd ${SCPT_DIR}
echo -e "\033[0;35m |\033[0;32m $(find . -type f | wc -l) \033[0;35m|\033[0;33m Ficheros\033[0;32m >\033[1;31m ${SCPT_DIR} \033[0;34mcon\033[0;35m |\033[0;32m$(ls /etc/http-shell/ | grep name | wc -l)\033[0;35m|\033[0;33m\033[0;33m KEYs"
cd $HOME
msg -bar
meu_ip
[[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Limite del BOT ( $limted )" #$PID_GEN1\033[0m
echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m APAGAR/VER KEYS"
#echo -e "\033[0;35m[\033[0;36mx\033[0;35m] \033[0;34m<\033[0;33m ------------------------" #KEYS ( GENERADOR )"
echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m<\033[0;34m Generar Keys ALEATORIAS"
echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;34m<\033[0;33m INICIAR/PARAR KEYGEN $PID_GEN\033[0m"
echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;34m<\033[0;33m REGISTRO DE KEYS USADAS"
echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;34m<\033[0;33m Checar KEY ACTIVADA"
echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;34m<\033[0;33m ACTUALIZAR GENERADOR/KEY/CREDITOS "
echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;34m<\033[0;33m Actualizar KEY"
echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;34m<\033[0;33m CONFIGURAR BOT DE TELEGRAM $PID_BGEN1\033[0m"
[[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;34m<\033[0;33m + / - CREDITOS Por ID"
echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR"
msg -bar
}
while :; do
menau
selection=$(selection_fun $lim_menu)
case ${selection} in
0) cd $HOME && break ;;
1) alter_limit ;;
2) remover_key ;;
3) remover_key_usada ;;
4) fix_key ;;
5) start_gen ;;
6)
echo -ne "\033[1;36m"
echo -e "$(cat /etc/gerar-sh-log)" 2>/dev/null || echo "NINGUN LOG DE MOMENTO"
echo -ne "\033[0m" && read -p "Enter"
;;
7) fum_ver ;;
8) act_gen ;;
9) att_gen_key ;;
10) bot_menu ;;
11) alter_id ;;
esac
done

177
Bot/http-server.py Normal file
View File

@ -0,0 +1,177 @@
#!/bin/bash
IVAR="/etc/http-instas"
onliCHECK=/var/www/html/ChumoGH
LIST="$(echo "NewVPS-" | rev)"
[[ -d /var/www/html/ChumoGH ]] || mkdir ${onliCHECK}
install_fun () {
apt-get install netcat -y
}
fun_ip () {
_hora=$(printf '%(%D-%H:%M:%S)T')
if [[ -e /bin/ejecutar/IPcgh ]]; then
IP="$(cat /bin/ejecutar/IPcgh)"
else
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" && echo "$MEU_IP2" || IP="$MEU_IP" && echo "$MEU_IP"
echo "$MEU_IP2" > /bin/ejecutar/IPcgh
IP="$MEU_IP2"
fi
}
#OFUSCATE
ofus () {
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
# LISTEN
listen_fun () {
PORTA="8888"
PROGRAMA="/bin/http-server.sh"
while true; do
nc.traditional -l -p "$PORTA" -e "$PROGRAMA"
done
}
# SERVER
server_fun () {
fun_ip
PORTA="8888"
DIR="/etc/http-shell"
unset ENV_ARQ
if [[ ! -d $DIR ]]; then
mkdir $DIR
fi
read URL
KEYZ=($(echo $URL|cut -d ' ' -f2|awk -F "/" '{print $2, $3, $4, $5, $6, $7}'))
KEY=$(echo ${KEYZ[0]}) && [[ ! $KEY ]] && KEY="ERRO"
ARQ=$(echo ${KEYZ[1]}) && [[ ! $ARQ ]] && ARQ="ERRO"
USRIP=$(echo ${KEYZ[2]}) && [[ ! $USRIP ]] && USRIP="ERRO"
FILE2="${DIR}/${KEY}"
FILE="${DIR}/${KEY}/$ARQ"
if [[ -e ${FILE} ]]; then
STATUS_NUMBER="200"
STATUS_NAME="Found"
ENV_ARQ="True"
if [[ -e ${FILE2}/GERADOR ]]; then
if [[ ${USRIP} != "ERRO" ]]; then
FILE="${DIR}/ERROR-KEY"
echo "GERADOR KEY!" > ${FILE}
ENV_ARQ="False"
fi
else
if [[ ${USRIP} = "ERRO" ]]; then
FILE="${DIR}/ERROR-KEY"
echo "KEY DE ChumoGH!" > ${FILE}
ENV_ARQ="False"
fi
fi
else
FILE="${DIR}/ERROR-KEY"
echo "KEY INVALIDA!" > ${FILE}
STATUS_NUMBER="200"
STATUS_NAME="Found"
ENV_ARQ="False"
fi
cat << EOF
HTTP/1.1 $STATUS_NUMBER - $STATUS_NAME
Date: $(date)
Server: ShellHTTP
Content-Length: $(wc --bytes "$FILE" | cut -d " " -f1)
Connection: close
Content-Type: text/html; charset=utf-8
$(cat "$FILE")
EOF
if [[ $ENV_ARQ = "True" ]]; then
(
mkdir /var/www/html/$KEY
mkdir /var/www/$KEY
TIME="20+"
for arqs in `cat $FILE`; do
cp ${FILE2}/$arqs /var/www/html/$KEY/
cp ${FILE2}/$arqs /var/www/$KEY/
TIME+="1+"
done
_key="$(ofus ${IP}:${PORTA}/${KEY}/${LIST})"
echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" > /var/www/html/$KEY/checkIP.log
echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" > /var/www/$KEY/checkIP.log
RESELL="$(cat /var/www/$KEY/menu_credito)"
TIME=$(echo "${TIME}0"|bc)
sleep ${TIME}s
rm -rf /var/www/html/$KEY
rm -rf /var/www/$KEY
log="/etc/gerar-sh-log"
_hora=$(printf '%(%D-%H:%M:%S)T')
if [[ -d $FILE2 ]]; then
PERM="${DIR}/${KEY}/keyfixa"
if [[ -e $PERM ]]; then
if [[ $(cat $PERM) != "$USRIP" ]]; then
log="/etc/gerar-sh-log"
echo "$(cat ${FILE2}.name) | IP-FIJA:$USRIP | ${_key} | $_hora" >> $log
echo "$(cat ${FILE2}.name) | IP-FIJA:$USRIP | ${_key} | $_hora" >> ${onliCHECK}/checkIP.log && chmod +x ${onliCHECK}/checkIP.log
#cat /etc/gerar-sh-log > ${onliCHECK}/checkIP.log
rm -rf $FILE2
rm -f ${FILE2}.name
fi
else
echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" >> $log
echo "$(cat ${FILE2}.name) | $USRIP | ${_key} | $_hora" >> ${onliCHECK}/checkIP.log && chmod +x ${onliCHECK}/checkIP.log
[[ -e /etc/ADM-db/token ]] && {
ID="$(cat ${FILE2}.name)" && ID="$(echo $ID | awk '{print $1}' | sed -e 's/[^0-9]//ig')"
[[ ${ID} -lt '999' ]] && ID='576145089'
TOKEN="$(cat /etc/ADM-db/token)"
urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
MENSAJE=" =======================================\n"
MENSAJE+=" ========📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩========\n"
MENSAJE+=" =======================================\n"
MENSAJE+=" ${_key}\n"
MENSAJE+=" =========== ☝️ USADA ☝ ============\n"
#MENSAJE+=" ☝️ USADA ☝️ \n"
MENSAJE+=" API/KEY : ${RESELL}\n"
MENSAJE+=" ID/API: ${ID} ✅ NOTIFICADO \n"
MENSAJE+=" =======================================\n"
MENSAJE+=" IP : $USRIP <-> HORA : $_hora\n"
MENSAJE+=" =======================================\n"
MENSAJE+=' 🔰 Bot generador de key 🔰\n'
MENSAJE+=' ⚜ By @ChumoGH ⚜ \n'
MENSAJE+=" =======================================\n"
#curl -s -X POST $urlBOT -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null
curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null
}
rm -rf $FILE2
rm -f ${FILE2}.name
fi
num=$(cat ${IVAR})
if [[ $num = "" ]]; then
num=0
fi
let num++
echo $num > $IVAR
fi
) & > /dev/null
fi
}
[[ $1 = @(-[Ss]tart|-[Ss]|-[Ii]niciar) ]] && listen_fun && exit
[[ $1 = @(-[Ii]stall|-[Ii]|-[Ii]stalar) ]] && listen_fun && exit
server_fun

576
Bot/intBOT.sh Normal file
View File

@ -0,0 +1,576 @@
#!/bin/bash
[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg)
bar="$(msg -bar3)"
[[ -e /etc/systemd/system/btkill.service ]] && systemctl restart btkill.service &>/dev/null.
tr=${id}
ofus () {
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
# SISTEMA DE SELECAO
selection_fun () {
local selection="null"
local range
for((i=0; i<=$1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
echo -ne "\033[1;37mOpcion: " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
check_ip () {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
echo "$IP" > /usr/bin/vendor_code
}
function_verify () {
unset keybot
echo -e "\033[7;49;35m =====>>►► 🐲 GEN ChumoGH${TTcent}VPS 🐲 ◄◄<<===== \033[0m"
msg -bar
[[ "$(echo "$(cat < /etc/nivbot)")" -ge "5" ]] && {
[[ -e /bin/downloadbot ]] && {
[[ -z $(cat < /bin/downloadbot) ]] && read -p " Ingresa tu Key de Autorizacion : " keybot || unset keybot
} || read -p " Key de Autorizacion : " keybot
} || read -p " Key de Autorizacion : " keybot
[[ -z $keybot ]] && {
rm -f /bin/downloadbot
[[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com'
permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
} || {
permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
}
[[ $(echo $permited|grep "${IP}") = "" ]] && {
clear
echo -e "\n\n\n\e[31m====================================================="
echo -e "\e[31m ¡LA IP $(wget -qO- ipv4.icanhazip.com) FUE RECHAZADA!"
echo -e " $link No AUTORIZADA el ACCESO "
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
echo -e "\e[31m=====================================================\n\n\n\e[0m"
[[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh
exit 1
} || {
### INTALAR VERCION DE SCRIPT
clear
echo -e "\n\n\n\e[32m====================================================="
echo -e "\e[32m ¡LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!"
echo -e " Mediante $link Autorida por @ChumoGH"
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
echo -e "\e[32m=====================================================\n\n\n\e[0m"
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
[[ -e /etc/nivbot ]] && {
i=$(cat < /etc/nivbot)
lv=$(($i+1))
echo $lv > /etc/nivbot
} || echo "1" > /etc/nivbot
v1=$(curl -sSL "https://www.dropbox.com/s/8tizr516cvkwss6/v-new.log")
echo "$v1" > /etc/ADM-db/vercion
}
}
edit_cost () {
msg -bar
echo -e "\033[1;37mRECUERDA EDITAR LOS COSTOS O TIEMPOS\n Para Salir Ctrl + C o 0 Para Regresar\033[1;33m"
echo -e " \033[1;31m[ !!! ]\033[1;33m RECUERDA, UNA VEZ EDITADO NO PODRAS VOLVER A \n TENER EL ORIGINAL, A MENOS QUE REINSTALES \033[1;31m\033[1;33m"
msg -bar
echo -e " \033[1;31mLuego de editar Presiona Ctrl + O y Enter \033[1;33m \033[1;31m\033[1;33m"
echo -e " \033[1;31m Por Ultimo Ctrl + X \033[1;33m \033[1;31m\033[1;33m"
echo -ne "\033[1;37m"
read -p " Presiona Enter para Continuar "
nano /etc/ADM-db/sources/costes
systemctl restart BotGen-server &>/dev/null
echo -e " MODIFICADO EXITOSAMENTE"
bot_gen
}
change_pay () {
unset option
clear
echo -e "$bar"
echo -e " MENSAJE ACTUAL $(cat < /etc/mpayu)"
echo -e "$bar"
echo -e " \033[1;37mINGRESA TU METODO DE PAGO Y/O CORREO"
echo -e "$bar\n"
echo -e "Ingresa en este Orden o Secuencia \n PAYPAL : chumogh@gmail.com \n"
echo -e "$bar"
read -p "TEXTO: " opcion
[[ -z $opcion ]] && bot_gen && exit || echo "$opcion" > /etc/mpayu && echo "TOKEN APLICADO EXITOSAMENTE"
read -p " Enter para Continuar"
echo -e "$bar"
echo -e " \033[1;37m NUMERO DE CONTACTO ACTUAL $(cat < /etc/numctc) "
echo -e "$bar\n"
echo -e " Ingresa en este Orden o FORMATO \n 593987072611 \n"
echo -e "$bar"
read -p "TEXTO: " opcion1
opcion1="$(echo -e "$opcion1" | sed -e 's/[^0-9]//ig')"
[[ -z $opcion ]] && return || {
echo -e "$opcion1" > /etc/numctc
chmod +x /etc/numctc
echo "TOKEN APLICADO EXITOSAMENTE"
systemctl restart BotGen-server &>/dev/null
}
echo -e "$bar\n"
echo -e " AGREGA NUEVO URL DE CATALOGO / OPCIONAL \n https://shoppy.gg/@ChumoGH/ \n"
echo -e "$bar"
read -p "TEXTO: " nmsg
[[ -z $nmsg ]] && return || {
echo -e "$nmsg" > /etc/urlCT
chmod +x /etc/urlCT
echo "URL APLICADO EXITOSAMENTE"
systemctl restart BotGen-server &>/dev/null
}
echo -e "$bar\n"
echo -e " AGREGA NUEVO ENLACE PARA DONACIONES / OPCIONAL \n https://www.paypal.com/paypalme/ChumoGH \n"
echo -e "$bar"
read -p "TEXTO: " donat
[[ -z $donat ]] && return || {
echo -e "$donat" > /etc/urlDN
chmod +x /etc/urlDN
echo "URL APLICADO EXITOSAMENTE"
systemctl restart BotGen-server &>/dev/null
}
read -p " Enter para Continuar"
systemctl restart BotGen-server &>/dev/null
bot_gen
}
lim-bot () {
unset option
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese el Limite del Bot"
echo -e "$bar"
echo -n "Limite: "
read opcion
echo "$opcion" > ${CIDdir}/limit
echo "$opcion" > /etc/limit
unset PIDGEN
PIDGEN=$(ps aux|grep -v grep|grep "kill_drop.sh")
if [[ ! $PIDGEN ]]; then
msg -bar
echo -ne "\033[1;97m Poner en linea KILL ID [s/n]: "
read bot_ini
msg -bar
[[ $bot_ini = @(s|S|y|Y) ]] && {
echo -e "[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/bin/bash /etc/ADM-db/sources/kill_drop.sh
Restart=always
RestartSec=60s
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/btkill.service
systemctl enable btkill &>/dev/null
systemctl start btkill &>/dev/null
msg -bar
echo -e "\033[1;31m Bot ID KILL ACTIVADO"
msg -bar
}
else
killall kill_drop.sh &>/dev/null
systemctl stop btkill &>/dev/null
systemctl disable btkill &>/dev/null
rm /etc/systemd/system/btkill.service &>/dev/null
clear
msg -bar
echo -e "\033[1;31m Bot ID KILL fuera de linea"
msg -bar
fi
read -p "Presione Enter para continuar "
bot_gen
#echo "sed -i "s/1001282138571/0/g" /etc/gerar-sh-log
#echo '#!/bin/bash -e
#sleep 24h' > ${CIDdir}/sumlimit
#echo 'newq=$(cat < /etc/ADM-db/limit)
#opcion=$(cat < /etc/limit)
#newsum=$(($newq + $opcion))
#echo "$newsum" > /etc/ADM-db/limit
#screen -dmS sumlimit bash /etc/ADM-db/sumlimit&
#exit' >> ${CIDdir}/sumlimit
#echo -e "$bar"
#read -p "Presione Enter para continuar "
#screen -dmS sumlimit bash /etc/ADM-db/sumlimit&
#bot_gen
}
veryfy_fun () {
SRC="/etc/ADM-db/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC}
unset ARQ
case $1 in
"BotGen.sh")ARQ="/etc/ADM-db/";;
*)ARQ="/etc/ADM-db/sources/";;
esac
mv -f $HOME/update/$1 ${ARQ}/$1 && echo -e "\033[1;31m- \033[1;32mRecibido!" || echo -e "\033[1;31m- \033[1;31mFalla (no recibido!)"
chmod +x ${ARQ}/$1
}
download () {
clear
msg -bar
echo -e "\033[1;33mDescargando archivos... ESPERE "
msg -bar
wget -q --no-check-certificate -O $HOME/files.tar https://www.dropbox.com/s/pf3b054mts3zrj6/files.tar
[[ -d $HOME/update ]] && rm -rf $HOME/update/* || mkdir $HOME/update
[[ -e $HOME/files.tar ]] && tar xpf $HOME/files.tar -C $HOME/update && rm -f $HOME/files.tar
echo 999 > ${CIDdir}/limit
n=1
for arqx in `ls $HOME/update`; do
echo -ne "\033[1;33mFichero \033[1;31m[${n}.bot] "
[[ -e $HOME/update/$arqx ]] && veryfy_fun $arqx
n=$(($n + 1))
done
cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar
echo -ne "\033[1;31m[ ! ] RESTAUDANDO ADMINISTRADOR "
(
[[ -e $HOME/costes ]] && mv $HOME/costes /etc/ADM-db/sources/costes
[[ -e $HOME/token ]] && mv $HOME/token /etc/ADM-db/token
[[ -e $HOME/resell ]] && mv $HOME/resell /etc/ADM-db/resell
[[ -e $HOME/Admin-ID ]] && mv $HOME/Admin-ID /etc/ADM-db/Admin-ID
[[ -e $HOME/User-ID ]] && mv $HOME/User-ID /etc/ADM-db/User-ID
[[ -e $HOME/ress ]] && mv $HOME/ress /etc/ADM-db/ress
[[ -e $HOME/limit ]] && mv $HOME/limit /etc/ADM-db/limit
[[ -e $HOME/num-key.cont ]] && mv $HOME/num-key.cont /etc/ADM-db/num-key.cont
) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
[[ ! -e ${CIDdir}/resell ]] && echo "@ChumoGH" > ${CIDdir}/resell
[[ ! -e $(cat < /etc/mpayu) ]] && echo "Paypal : chumogh@outlook.com" > /etc/mpayu && echo "593987072611" > /etc/numctc
rm $HOME/lista-arq
systemctl restart BotGen-server &>/dev/null
bot_gen
}
ini_token () {
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese el token de su bot"
echo -e "$bar"
echo -n "TOKEN: "
read opcion
echo "$opcion" > ${CIDdir}/token
echo -e "$bar"
echo -e " \033[1;32mtoken se guardo con exito!" && echo -e "$bar" && echo -e " \033[1;37mPara tener acceso a todos los comandos del bot\n deve iniciar el bot en la opcion 2.\n desde su apps (telegram). ingresar al bot!\n digite el comando \033[1;31m/id\n \033[1;37mel bot le respodera con su ID de telegram.\n copiar el ID e ingresar el mismo en la opcion 3" && echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
ini_res () {
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese el Contacto de ADMIN de su bot"
echo -e "$bar"
echo -n "RESELLER: "
read opction
echo "$opction" > ${CIDdir}/resell
echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
ini_id () {
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese su ID de telegram"
echo -e "$bar"
echo -n "ID: "
read opcion
echo "$opcion" > ${CIDdir}/Admin-ID
echo -e "$bar"
echo -e " \033[1;32mID guardo con exito!" && echo -e "$bar" && echo -e " \033[1;37mdesde su apps (telegram). ingresar al bot!\n digite el comando \033[1;31m/menu\n \033[1;37mprueve si tiene acceso al menu extendido." && echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
start_bot () {
[[ ! -e "${CIDdir}/token" ]] && echo "null" > ${CIDdir}/token
unset PIDGEN
PIDGEN=$(ps aux|grep -v grep|grep "BotGen.sh")
if [[ ! $PIDGEN ]]; then
echo -e "[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/bin/bash ${CIDdir}/BotGen.sh -start
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/BotGen-server.service
systemctl enable BotGen-server &>/dev/null
systemctl start BotGen-server &>/dev/null
else
killall BotGen.sh &>/dev/null
systemctl stop BotGen-server &>/dev/null
systemctl disable BotGen-server &>/dev/null
rm /etc/systemd/system/BotGen-server.service &>/dev/null
clear
msg -bar
echo -e "\033[1;31m BotGen fuera de linea"
msg -bar
read -p "Presione Enter para continuar "
fi
bot_gen
}
ayuda_fun () {
clear
echo -e "$bar"
echo -e " \e[47m\e[30m Instrucciones rapidas \e[0m"
echo -e "$bar"
echo -e "\033[1;37m Es necesario crear un bot en \033[1;32m@BotFather "
echo -e "$bar"
echo -e "\033[1;32m1- \033[1;37mEn su apps telegram ingrese a @BotFather"
echo -e "\033[1;32m2- \033[1;37mDigite el comando \033[1;31m/newbot"
echo -e "\033[1;32m3- @BotFather \033[1;37msolicitara que\n asigne un nombre a su bot"
echo -e "\033[1;32m4- @BotFather \033[1;37msolicitara que asigne otro nombre,\n esta vez deve finalizar en bot eje: \033[1;31mXXX_bot"
echo -e "\033[1;32m5- \033[1;37mObtener token del bot creado.\n En \033[1;32m@BotFather \033[1;37mdigite el comando \033[1;31m/token\n \033[1;37mseleccione el bot y copie el token."
echo -e "\033[1;32m6- \033[1;37mIngrese el token\n en la opcion \033[1;32m[1] \033[1;31m> \033[1;37mTOKEN DEL BOT"
echo -e "\033[1;32m7- \033[1;37mPoner en linea el bot\n en la opcion \033[1;32m[2] \033[1;31m> \033[1;37mINICIAR/PARAR BOT"
echo -e "\033[1;32m8- \033[1;37mEn su apps telegram, inicie el bot creado\n digite el comando \033[1;31m/id \033[1;37mel bot le respondera\n con su ID de telegran (copie el ID)"
echo -e "\033[1;32m9- \033[1;37mIngrese el ID en la\n opcion \033[1;32m[3] \033[1;31m> \033[1;37mID DE USUARIO TELEGRAM"
echo -e "\033[1;32m10-\033[1;37mcomprueve que tiene acceso a\n las opciones avanzadas de su bot."
echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
bot_conf () {
[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token
[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID
check_ip
function_verify
instaled=/etc/ADM-db/sources && [[ ! -d ${instaled} ]] && download
}
msj_prueba () {
TOKEN="$(cat /etc/ADM-db/token)"
ID="$(cat /etc/ADM-db/Admin-ID)"
[[ -z $TOKEN ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el token\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
[[ -z $ID ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el ID\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
MENSAJE="---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n"
MENSAJE+="Esto es un mesaje de prueba!\n"
MENSAJE+="$bar\n"
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
curl -s -X POST $URL -d chat_id=$ID -d text="$MENSAJE" &>/dev/null
clear
echo -e "---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n"
echo -e "\033[1;37m Mensaje enviado Exitosamente...!"
echo -e "$bar"
sleep 3s
}
}
bot_gen
}
addnewmss() {
unset yesno
unset dnew
let foc++
echo -e "$bar"
echo -e " \033[1;37mINGRESA EL MENSAJE A ENVIAR"
echo -e "$bar"
read -p " $foc TEXTO: " addmss
MSS+="$addmss\n"
echo -e "${cor[3]} ¿DESEAS AÑADIR OTRO SMS ? "
read -p " [S/N]: " -e -i s sshsn
tput cuu1 && tput dl1
tput cuu1 && tput dl1
[[ "$sshsn" = @(s|S|y|Y) ]] && addnewmss
}
msj_ind () {
foc=1
TOKEN="$(cat /etc/ADM-db/token)"
echo -e "$bar"
echo -e " \033[1;37mIngrese su ID de telegram a Mensajear"
echo -e "$bar"
read -p "ID: " ID
[[ -z $ID ]] && ID="$(cat /etc/ADM-db/Admin-ID)"
[[ -z $TOKEN ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el token\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
[[ -z $ID ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el ID\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
MENSAJE="Hola, Mensale de Prueba del BotGen Generador!"
echo -e "$bar"
echo -e " \033[1;37mINGRESA EL MENSAJE A ENVIAR"
echo -e "$bar"
read -p " $foc TEXTO: " addmss
MSS+="$addmss\n"
echo -e "${cor[3]} ¿DESEAS AÑADIR OTRO SMS ? "
read -p " [S/N]: " -e -i s sshsn
tput cuu1 && tput dl1
tput cuu1 && tput dl1
[[ "$sshsn" = @(s|S|y|Y) ]] && addnewmss
MENSAJE=' ---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n'
MENSAJE+="$MSS \n "
echo -e "$bar"
echo -e " \033[1;37mPEGA RUTA DE IMAGEN"
echo -e "$bar"
read -p "IMG: " img
#[[ -z $img ]] && img="https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/favi.png"
#[[ -z $img ]] && img="/var/www/html/bot_vmess_qr.png"
[[ -z $MENSAJE ]] && MENSAJE="Hola, Mensale de Prueba del BotGen Generador!"
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
URG="https://api.telegram.org/bot$TOKEN/sendPhoto"
curl -s -X POST $URG -F chat_id=$ID -F photo="@$img" #-F caption="<code>New Script @ChumoGH</code>" #-F width="100" -F height="100"
curl -s -X POST $URL -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null
# clear
echo -e "@$img"
echo -e "$bar"
echo -e "\033[1;37m Mensaje enviado Exitosamente...!"
echo -e "$bar"
read -p "ENTER PARA Continuar"
}
}
bot_gen
}
act-bot () {
echo "Respaldando TOKEN y ADMINISTRADOR"
[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token
[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID
[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID /root/User-ID
[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress /root/ress
[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes /root/costes
[[ $(cat < /etc/ADM-db/resell) != "@ChumoGH" ]] && mv /etc/ADM-db/resell /root/resell
rm -rf /etc/ADM-db/sources/gerar_key && download
}
respon () {
[[ ! -e /etc/menu_ito ]] && credd=$(cat < /etc/SCRIPT/menu_credito) || credd=$(cat /etc/menu_ito )
[[ -e ${CIDdir}/ress ]] && {
echo -e "DESACTIVANDO RESELLER $credd FIJO EN BotGEN"
echo -e " AHORA SE FIJARA EL NOMBRE DE QUIEN GENERE LA KEY"
read -p "ENTER PARA VOLVER"
rm -f ${CIDdir}/ress
} || {
echo -e "ACTIVANDO RESELLER $credd FIJO EN BotGEN"
echo -e "AHORA SE FIJARA $credd EN TODAS LAS KEYS "
read -p "ENTER PARA VOLVER"
touch ${CIDdir}/ress
}
bot_gen
}
bot_gen () {
clear
unset PID_GEN
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
PID_GEN=$(ps x|grep -v grep|grep "BotGen.sh")
PID_on=$(ps x|grep -v grep|grep "modelid")
[[ ! $PID_on ]] && PID_on="\033[1;31mOFF" || PID_on="\033[1;32mON"
[[ ! -e /etc/systemd/system/btkill.service ]] && PID_kill="\033[1;31mOFF" || PID_kill="\033[1;32mON"
[[ ! $PID_GEN ]] && PID_GEN="\033[1;31mOFF" || PID_GEN="\033[1;32mON"
[[ -e ${CIDdir}/token ]] && tk="\033[1;32mOK" || tk="\033[1;31mNULL"
[[ -e /etc/numctc ]] && nm="\033[1;32mNUM" || nm="\033[1;31mNULL"
[[ -e /etc/urlDN ]] && dn="\033[1;32mDON" || dn="\033[1;31mNULL"
[[ -e /etc/urlCT ]] && ct="\033[1;32mCAT" || ct="\033[1;31mNULL"
[[ -e ${CIDdir}/Admin-ID ]] && adid="\033[1;32mOK" || adid="\033[1;31mNULL"
[[ -e ${CIDdir}/ress ]] && rfij="\033[1;32mRESELLER FIJO (Bot Personal )" || rfij="\033[1;31mRESELLER ALEATORIO ( Bot Custom )"
limcont=$(cat /etc/ADM-db/limit)
[[ "${limcont}" = "999" ]] && limted=" ∞ " || limted=$(cat /etc/ADM-db/limit)
msg -bar
echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN ChumoGH${TTcent}ADM $(cat ${CIDdir}/vercion) 🐲 ◄◄<=== \033[0m"
msg -bar
echo -e " - LIMITADOR \033[1;32m ( $limted ) \033[1;37m KILL ID VENCIDOS ${PID_kill} "
msg -bar
echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;35m> \033[1;37m TOKEN DEL BOT $tk "
echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;35m> \033[1;37m INICIAR/PARAR BOT $PID_GEN\033[0m"
echo -e "\033[0;35m[\033[0;36m3\033[0;35m] \033[0;35m> \033[1;37m ID DE USUARIO TELEGRAM $adid"
echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;35m> \033[1;37m Cambiar Contacto -> $(cat < ${CIDdir}/resell)"
echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;35m> \033[1;37m MENSAJE DE PRUEBA"
echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;36m> \033[1;37m MANUAL De Uso"
echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;35m> \033[1;37m Limite de KEYS "
echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;35m> \033[1;37m ENLACES $nm | $dn | $ct "
echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;35m> \033[1;37m $rfij"
echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;35m> \033[1;37m MSG POR ID"
echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;35m> \033[1;37m Modificar COSTES DEL BOT"
msg -bar
echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR"
msg -bar
selection=$(selection_fun 11)
case ${selection} in
0) gerar && exit ;;
1) ini_token;;
2) start_bot;;
3) ini_id;;
4) ini_res;;
5) msj_prueba;;
6) ayuda_fun;;
#7) source <(curl -sSL https://www.dropbox.com/s/f5mlwun3hkpq6k8/bot-permited.sh) ;;
#8) act-bot ;;
7) lim-bot ;;
8) change_pay;;
9) respon;;
10)msj_ind;;
11)edit_cost;;
*) bot_gen;;
esac
}

BIN
Bot/update.tar.gz Normal file

Binary file not shown.

BIN
Bot/update.tar/update.tar Normal file

Binary file not shown.

View File

@ -0,0 +1,278 @@
# -*- coding: utf-8 -*-
import socket, threading, thread, select, signal, sys, time, getopt, argparse
parser = argparse.ArgumentParser()
parser.add_argument("-l", "--local", help="Nombre de archivo a procesar")
parser.add_argument("-p", "--port", help="Nombre de archivo a procesar")
parser.add_argument("-c", "--contr", help="Nombre de archivo a procesar")
parser.add_argument("-r", "--response", help="Nombre de archivo a procesar")
parser.add_argument("-t", "--texto", help="Nombre de archivo a procesar")
args = parser.parse_args()
#==================================
LISTENING_ADDR = '0.0.0.0'
if args.port:
LISTENING_PORT = int(args.port)
else:
print " Deve ingresar el puerto que usara como socks..."
sys.exit()
if args.contr:
PASS = str(args.contr)
else:
PASS = str()
BUFLEN = 4096 * 4
TIMEOUT = 60
if args.local:
DEFAULT_HOST = '127.0.0.1:' + args.local
else:
print " Deve seleccionar un puerto existente para redireccionar el trafico..."
sys.exit()
if args.response:
STATUS_RESP = args.response
else:
STATUS_RESP = '200'
if args.texto:
STATUS_TXT = args.texto
elif STATUS_RESP == '101':
STATUS_TXT = '<font color="red">Switching Protocols</font>'
else:
STATUS_TXT = '<font color="red">Connection established</font>'
RESPONSE = str('HTTP/1.1 ' + STATUS_RESP + ' ' + STATUS_TXT + '\r\nContent-length: 0\r\n\r\nHTTP/1.1 200 Connection established\r\n\r\n')
class Server(threading.Thread):
def __init__(self, host, port):
threading.Thread.__init__(self)
self.running = False
self.host = host
self.port = port
self.threads = []
self.threadsLock = threading.Lock()
self.logLock = threading.Lock()
def run(self):
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.host, self.port))
self.soc.listen(0)
self.running = True
try:
while self.running:
try:
c, addr = self.soc.accept()
c.setblocking(1)
except socket.timeout:
continue
conn = ConnectionHandler(c, self, addr)
conn.start()
self.addConn(conn)
finally:
self.running = False
self.soc.close()
def printLog(self, log):
self.logLock.acquire()
print log
self.logLock.release()
def addConn(self, conn):
try:
self.threadsLock.acquire()
if self.running:
self.threads.append(conn)
finally:
self.threadsLock.release()
def removeConn(self, conn):
try:
self.threadsLock.acquire()
self.threads.remove(conn)
finally:
self.threadsLock.release()
def close(self):
try:
self.running = False
self.threadsLock.acquire()
threads = list(self.threads)
for c in threads:
c.close()
finally:
self.threadsLock.release()
class ConnectionHandler(threading.Thread):
def __init__(self, socClient, server, addr):
threading.Thread.__init__(self)
self.clientClosed = False
self.targetClosed = True
self.client = socClient
self.client_buffer = ''
self.server = server
self.log = 'Connection: ' + str(addr)
def close(self):
try:
if not self.clientClosed:
self.client.shutdown(socket.SHUT_RDWR)
self.client.close()
except:
pass
finally:
self.clientClosed = True
try:
if not self.targetClosed:
self.target.shutdown(socket.SHUT_RDWR)
self.target.close()
except:
pass
finally:
self.targetClosed = True
def run(self):
try:
self.client_buffer = self.client.recv(BUFLEN)
hostPort = self.findHeader(self.client_buffer, 'X-Real-Host')
if hostPort == '':
hostPort = DEFAULT_HOST
split = self.findHeader(self.client_buffer, 'X-Split')
if split != '':
self.client.recv(BUFLEN)
if hostPort != '':
passwd = self.findHeader(self.client_buffer, 'X-Pass')
if len(PASS) != 0 and passwd == PASS:
self.method_CONNECT(hostPort)
elif len(PASS) != 0 and passwd != PASS:
self.client.send('HTTP/1.1 400 WrongPass!\r\n\r\n')
elif hostPort.startswith('127.0.0.1') or hostPort.startswith('localhost'):
self.method_CONNECT(hostPort)
else:
self.client.send('HTTP/1.1 403 Forbidden!\r\n\r\n')
else:
print '- No X-Real-Host!'
self.client.send('HTTP/1.1 400 NoXRealHost!\r\n\r\n')
except Exception as e:
self.log += ' - error: ' + e.strerror
self.server.printLog(self.log)
pass
finally:
self.close()
self.server.removeConn(self)
def findHeader(self, head, header):
aux = head.find(header + ': ')
if aux == -1:
return ''
aux = head.find(':', aux)
head = head[aux+2:]
aux = head.find('\r\n')
if aux == -1:
return ''
return head[:aux];
def connect_target(self, host):
i = host.find(':')
if i != -1:
port = int(host[i+1:])
host = host[:i]
else:
if self.method=='CONNECT':
port = 443
else:
port = 80
port = 8080
port = 8799
port = 3128
(soc_family, soc_type, proto, _, address) = socket.getaddrinfo(host, port)[0]
self.target = socket.socket(soc_family, soc_type, proto)
self.targetClosed = False
self.target.connect(address)
def method_CONNECT(self, path):
self.log += ' - CONNECT ' + path
self.connect_target(path)
self.client.sendall(RESPONSE)
self.client_buffer = ''
self.server.printLog(self.log)
self.doCONNECT()
def doCONNECT(self):
socs = [self.client, self.target]
count = 0
error = False
while True:
count += 1
(recv, _, err) = select.select(socs, [], socs, 3)
if err:
error = True
if recv:
for in_ in recv:
try:
data = in_.recv(BUFLEN)
if data:
if in_ is self.target:
self.client.send(data)
else:
while data:
byte = self.target.send(data)
data = data[byte:]
count = 0
else:
break
except:
error = True
break
if count == TIMEOUT:
error = True
if error:
break
def main(host=LISTENING_ADDR, port=LISTENING_PORT):
print "\n:-------PythonProxy-------:\n"
print "Listening addr: " + LISTENING_ADDR
print "Listening port: " + str(LISTENING_PORT) + "\n"
print ":-------------------------:\n"
server = Server(LISTENING_ADDR, LISTENING_PORT)
server.start()
while True:
try:
time.sleep(2)
except KeyboardInterrupt:
print 'Stopping...'
server.close()
break
if __name__ == '__main__':
main()

View File

@ -0,0 +1,682 @@
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()

View File

@ -0,0 +1,313 @@
#!/usr/bin/env python
import sys
import httplib
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from threading import Lock, Timer
from cStringIO import StringIO
from urlparse import urlsplit
import socket
import select
import gzip
import zlib
import re
import traceback
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
address_family = socket.AF_INET
def handle_error(self, request, client_address):
print >>sys.stderr, '-'*40
print >>sys.stderr, 'Exception happened during processing of request from', client_address
traceback.print_exc()
print >>sys.stderr, '-'*40
class ThreadingHTTPServer6(ThreadingHTTPServer):
address_family = socket.AF_INET6
class SimpleHTTPProxyHandler(BaseHTTPRequestHandler):
global_lock = Lock()
conn_table = {}
timeout = 300
upstream_timeout = 300
proxy_via = None
def log_error(self, format, *args):
if format == "Request timed out: %r":
return
self.log_message(format, *args)
def do_CONNECT(self):
req = self
reqbody = None
req.path = "https://%s/" % req.path.replace(':443', '')
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
u = urlsplit(req.path)
address = (u.hostname, u.port or 443)
try:
conn = socket.create_connection(address)
except socket.error:
return
self.send_response(200, 'SOCKS5')
self.send_header('Connection', 'close')
self.end_headers()
conns = [self.connection, conn]
keep_connection = True
while keep_connection:
keep_connection = False
rlist, wlist, xlist = select.select(conns, [], conns, self.timeout)
if xlist:
break
for r in rlist:
other = conns[1] if r is conns[0] else conns[0]
data = r.recv(8192)
if data:
other.sendall(data)
keep_connection = True
conn.close()
def do_HEAD(self):
self.do_SPAM()
def do_GET(self):
self.do_SPAM()
def do_POST(self):
self.do_SPAM()
def do_SPAM(self):
req = self
content_length = int(req.headers.get('Content-Length', 0))
if content_length > 0:
reqbody = self.rfile.read(content_length)
else:
reqbody = None
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
elif replaced_reqbody is not None:
reqbody = replaced_reqbody
if 'Content-Length' in req.headers:
req.headers['Content-Length'] = str(len(reqbody))
self.remove_hop_by_hop_headers(req.headers)
if self.upstream_timeout:
req.headers['Connection'] = 'Keep-Alive'
else:
req.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(req.headers)
try:
res, resdata = self.request_to_upstream_server(req, reqbody)
except socket.error:
return
content_encoding = res.headers.get('Content-Encoding', 'identity')
resbody = self.decode_content_body(resdata, content_encoding)
replaced_resbody = self.response_handler(req, reqbody, res, resbody)
if replaced_resbody is True:
return
elif replaced_resbody is not None:
resdata = self.encode_content_body(replaced_resbody, content_encoding)
if 'Content-Length' in res.headers:
res.headers['Content-Length'] = str(len(resdata))
resbody = replaced_resbody
self.remove_hop_by_hop_headers(res.headers)
if self.timeout:
res.headers['Connection'] = 'Keep-Alive'
else:
res.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(res.headers)
self.send_response(res.status, res.reason)
for k, v in res.headers.items():
if k == 'set-cookie':
for value in self.split_set_cookie_header(v):
self.send_header(k, value)
else:
self.send_header(k, v)
self.end_headers()
if self.command != 'HEAD':
self.wfile.write(resdata)
with self.global_lock:
self.save_handler(req, reqbody, res, resbody)
def request_to_upstream_server(self, req, reqbody):
u = urlsplit(req.path)
origin = (u.scheme, u.netloc)
req.headers['Host'] = u.netloc
selector = "%s?%s" % (u.path, u.query) if u.query else u.path
while True:
with self.lock_origin(origin):
conn = self.open_origin(origin)
try:
conn.request(req.command, selector, reqbody, headers=dict(req.headers))
except socket.error:
self.close_origin(origin)
raise
try:
res = conn.getresponse(buffering=True)
except httplib.BadStatusLine as e:
if e.line == "''":
self.close_origin(origin)
continue
else:
raise
resdata = res.read()
res.headers = res.msg
if not self.upstream_timeout or 'close' in res.headers.get('Connection', ''):
self.close_origin(origin)
else:
self.reset_timer(origin)
return res, resdata
def lock_origin(self, origin):
d = self.conn_table.setdefault(origin, {})
if not 'lock' in d:
d['lock'] = Lock()
return d['lock']
def open_origin(self, origin):
conn = self.conn_table[origin].get('connection')
if not conn:
scheme, netloc = origin
if scheme == 'https':
conn = httplib.HTTPSConnection(netloc)
else:
conn = httplib.HTTPConnection(netloc)
self.reset_timer(origin)
self.conn_table[origin]['connection'] = conn
return conn
def reset_timer(self, origin):
timer = self.conn_table[origin].get('timer')
if timer:
timer.cancel()
if self.upstream_timeout:
timer = Timer(self.upstream_timeout, self.close_origin, args=[origin])
timer.daemon = True
timer.start()
else:
timer = None
self.conn_table[origin]['timer'] = timer
def close_origin(self, origin):
timer = self.conn_table[origin]['timer']
if timer:
timer.cancel()
conn = self.conn_table[origin]['connection']
conn.close()
del self.conn_table[origin]['connection']
def remove_hop_by_hop_headers(self, headers):
hop_by_hop_headers = ['Connection', 'Keep-Alive', 'Proxy-Authenticate', 'Proxy-Authorization', 'TE', 'Trailers', 'Trailer', 'Transfer-Encoding', 'Upgrade']
connection = headers.get('Connection')
if connection:
keys = re.split(r',\s*', connection)
hop_by_hop_headers.extend(keys)
for k in hop_by_hop_headers:
if k in headers:
del headers[k]
def modify_via_header(self, headers):
via_string = "%s %s" % (self.protocol_version, self.proxy_via)
via_string = re.sub(r'^HTTP/', '', via_string)
original = headers.get('Via')
if original:
headers['Via'] = original + ', ' + via_string
else:
headers['Via'] = via_string
def decode_content_body(self, data, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO(data)
with gzip.GzipFile(fileobj=io) as f:
body = f.read()
elif content_encoding == 'deflate':
body = zlib.decompress(data)
elif content_encoding == 'identity':
body = data
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return body
def encode_content_body(self, body, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO()
with gzip.GzipFile(fileobj=io, mode='wb') as f:
f.write(body)
data = io.getvalue()
elif content_encoding == 'deflate':
data = zlib.compress(body)
elif content_encoding == 'identity':
data = body
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return data
def split_set_cookie_header(self, value):
re_cookies = r'([^=]+=[^,;]+(?:;\s*Expires=[^,]+,[^,;]+|;[^,;]+)*)(?:,\s*)?'
return re.findall(re_cookies, value, flags=re.IGNORECASE)
def request_handler(self, req, reqbody):
pass
def response_handler(self, req, reqbody, res, resbody):
pass
def save_handler(self, req, reqbody, res, resbody):
pass
# Port
def test(HandlerClass=SimpleHTTPProxyHandler, ServerClass=ThreadingHTTPServer, protocol="HTTP/1.1"):
if sys.argv[1:]:
port = int(sys.argv[1])
else:
port = 80
server_address = ('', port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()
if __name__ == '__main__':
test()

View File

@ -0,0 +1,335 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Edit By GlEmYsSoN & @e8th4ever
from pprint import pprint
import sys
import http.client
from socketserver import ThreadingMixIn
from http.server import HTTPServer, BaseHTTPRequestHandler
from threading import Lock, Timer
from io import StringIO
from urllib.parse import urlsplit
import socket
import select
import gzip
import zlib
import re
import traceback
import subprocess
subprocess.call("clear",shell=True)
if sys.argv[2:]:
msg1 = sys.argv[2]
else:
msg1 = 'ADM-ULTIMATE'
if sys.argv[3:]:
server = sys.argv[3]
else:
server = "127.0.0.1"
msg2 = 'Server Forbidden'
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
address_family = socket.AF_INET
def handle_error(self, request, client_address):
print('-'*40, file=sys.stderr)
print('Exception happened during processing of request from', client_address, file=sys.stderr)
traceback.print_exc()
print('-'*40, file=sys.stderr)
class ThreadingHTTPServer6(ThreadingHTTPServer):
address_family = socket.AF_INET6
class SimpleHTTPProxyHandler(BaseHTTPRequestHandler):
global_lock = Lock()
conn_table = {}
timeout = 300
upstream_timeout = 300
proxy_via = None
def log_error(self, format, *args):
if format == "Request timed out: %r":
return
self.log_message(format, *args)
def do_CONNECT(self):
req = self
reqbody = None
if ':22' in req.path:
hostip = req.path.replace(':22', '')
elif ':443' in req.path:
hostip = req.path.replace(':443', '')
req.path = "https://%s/" % req.path.replace(':443', '')
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
u = urlsplit(req.path)
address = (u.hostname, u.port or 443)
try:
conn = socket.create_connection(address)
except socket.error:
return
self.send_response(200, msg1)
self.send_header('Connection', 'close')
self.end_headers()
conns = [self.connection, conn]
keep_connection = True
while keep_connection:
if not server.find(hostip) != -1:
self.send_error(403, msg2)
self.close_connection
keep_connection = False
rlist, wlist, xlist = select.select(conns, [], conns, self.timeout)
if xlist:
break
for r in rlist:
other = conns[1] if r is conns[0] else conns[0]
data = r.recv(8192)
if data:
other.sendall(data)
keep_connection = True
conn.close()
def do_HEAD(self):
self.do_SPAM()
def do_GET(self):
self.do_SPAM()
def do_POST(self):
self.do_SPAM()
def do_SPAM(self):
req = self
content_length = int(req.headers.get('Content-Length', 0))
if content_length > 0:
reqbody = self.rfile.read(content_length)
else:
reqbody = None
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
elif replaced_reqbody is not None:
reqbody = replaced_reqbody
if 'Content-Length' in req.headers:
req.headers['Content-Length'] = str(len(reqbody))
self.remove_hop_by_hop_headers(req.headers)
if self.upstream_timeout:
req.headers['Connection'] = 'Keep-Alive'
else:
req.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(req.headers)
try:
res, resdata = self.request_to_upstream_server(req, reqbody)
except socket.error:
return
content_encoding = res.headers.get('Content-Encoding', 'identity')
resbody = self.decode_content_body(resdata, content_encoding)
replaced_resbody = self.response_handler(req, reqbody, res, resbody)
if replaced_resbody is True:
return
elif replaced_resbody is not None:
resdata = self.encode_content_body(replaced_resbody, content_encoding)
if 'Content-Length' in res.headers:
res.headers['Content-Length'] = str(len(resdata))
resbody = replaced_resbody
self.remove_hop_by_hop_headers(res.headers)
if self.timeout:
res.headers['Connection'] = 'Keep-Alive'
else:
res.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(res.headers)
self.send_response(res.status, res.reason)
for k, v in list(res.headers.items()):
if k == 'set-cookie':
for value in self.split_set_cookie_header(v):
self.send_header(k, value)
else:
self.send_header(k, v)
self.end_headers()
if self.command != 'HEAD':
self.wfile.write(resdata)
with self.global_lock:
self.save_handler(req, reqbody, res, resbody)
def request_to_upstream_server(self, req, reqbody):
u = urlsplit(req.path)
origin = (u.scheme, u.netloc)
req.headers['Host'] = u.netloc
selector = "%s?%s" % (u.path, u.query) if u.query else u.path
while True:
with self.lock_origin(origin):
conn = self.open_origin(origin)
try:
conn.request(req.command, selector, reqbody, headers=dict(req.headers))
except socket.error:
self.close_origin(origin)
raise
try:
res = conn.getresponse(buffering=True)
except http.client.BadStatusLine as e:
if e.line == "''":
self.close_origin(origin)
continue
else:
raise
resdata = res.read()
res.headers = res.msg
if not self.upstream_timeout or 'close' in res.headers.get('Connection', ''):
self.close_origin(origin)
else:
self.reset_timer(origin)
return res, resdata
def lock_origin(self, origin):
d = self.conn_table.setdefault(origin, {})
if not 'lock' in d:
d['lock'] = Lock()
return d['lock']
def open_origin(self, origin):
conn = self.conn_table[origin].get('connection')
if not conn:
scheme, netloc = origin
if scheme == 'https':
conn = http.client.HTTPSConnection(netloc)
else:
conn = http.client.HTTPConnection(netloc)
self.reset_timer(origin)
self.conn_table[origin]['connection'] = conn
return conn
def reset_timer(self, origin):
timer = self.conn_table[origin].get('timer')
if timer:
timer.cancel()
if self.upstream_timeout:
timer = Timer(self.upstream_timeout, self.close_origin, args=[origin])
timer.daemon = True
timer.start()
else:
timer = None
self.conn_table[origin]['timer'] = timer
def close_origin(self, origin):
timer = self.conn_table[origin]['timer']
if timer:
timer.cancel()
conn = self.conn_table[origin]['connection']
conn.close()
del self.conn_table[origin]['connection']
def remove_hop_by_hop_headers(self, headers):
hop_by_hop_headers = ['Connection', 'Keep-Alive', 'Proxy-Authenticate', 'Proxy-Authorization', 'TE', 'Trailers', 'Trailer', 'Transfer-Encoding', 'Upgrade']
connection = headers.get('Connection')
if connection:
keys = re.split(r',\s*', connection)
hop_by_hop_headers.extend(keys)
for k in hop_by_hop_headers:
if k in headers:
del headers[k]
def modify_via_header(self, headers):
via_string = "%s %s" % (self.protocol_version, self.proxy_via)
via_string = re.sub(r'^HTTP/', '', via_string)
original = headers.get('Via')
if original:
headers['Via'] = original + ', ' + via_string
else:
headers['Via'] = via_string
def decode_content_body(self, data, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO(data)
with gzip.GzipFile(fileobj=io) as f:
body = f.read()
elif content_encoding == 'deflate':
body = zlib.decompress(data)
elif content_encoding == 'identity':
body = data
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return body
def encode_content_body(self, body, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO()
with gzip.GzipFile(fileobj=io, mode='wb') as f:
f.write(body)
data = io.getvalue()
elif content_encoding == 'deflate':
data = zlib.compress(body)
elif content_encoding == 'identity':
data = body
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return data
def split_set_cookie_header(self, value):
re_cookies = r'([^=]+=[^,;]+(?:;\s*Expires=[^,]+,[^,;]+|;[^,;]+)*)(?:,\s*)?'
return re.findall(re_cookies, value, flags=re.IGNORECASE)
def request_handler(self, req, reqbody):
pass
def response_handler(self, req, reqbody, res, resbody):
pass
def save_handler(self, req, reqbody, res, resbody):
pass
def test(HandlerClass=SimpleHTTPProxyHandler, ServerClass=ThreadingHTTPServer, protocol="HTTP/1.1"):
port = int(sys.argv[1])
server_address = ('', port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print("Servidor: " + str(sa[0]) + " Porta " + str(sa[1]))
httpd.serve_forever()
if __name__ == '__main__':
test()

View File

@ -0,0 +1,318 @@
#!/usr/bin/env python
import sys
import httplib
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from threading import Lock, Timer
from cStringIO import StringIO
from urlparse import urlsplit
import socket
import select
import gzip
import zlib
import re
import traceback
if sys.argv[2:]:
msg1 = sys.argv[2]
else:
msg1 = "ADM-ULTIMATE"
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
address_family = socket.AF_INET
def handle_error(self, request, client_address):
print >>sys.stderr, '-'*40
print >>sys.stderr, 'Exception happened during processing of request from', client_address
traceback.print_exc()
print >>sys.stderr, '-'*40
class ThreadingHTTPServer6(ThreadingHTTPServer):
address_family = socket.AF_INET6
class SimpleHTTPProxyHandler(BaseHTTPRequestHandler):
global_lock = Lock()
conn_table = {}
timeout = 300
upstream_timeout = 300
proxy_via = None
def log_error(self, format, *args):
if format == "Request timed out: %r":
return
self.log_message(format, *args)
def do_CONNECT(self):
req = self
reqbody = None
req.path = "https://%s/" % req.path.replace(':443', '')
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
u = urlsplit(req.path)
address = (u.hostname, u.port or 443)
try:
conn = socket.create_connection(address)
except socket.error:
return
self.send_response(200, msg1)
self.send_header('Connection', 'close')
self.end_headers()
conns = [self.connection, conn]
keep_connection = True
while keep_connection:
keep_connection = False
rlist, wlist, xlist = select.select(conns, [], conns, self.timeout)
if xlist:
break
for r in rlist:
other = conns[1] if r is conns[0] else conns[0]
data = r.recv(8192)
if data:
other.sendall(data)
keep_connection = True
conn.close()
def do_HEAD(self):
self.do_SPAM()
def do_GET(self):
self.do_SPAM()
def do_POST(self):
self.do_SPAM()
def do_SPAM(self):
req = self
content_length = int(req.headers.get('Content-Length', 0))
if content_length > 0:
reqbody = self.rfile.read(content_length)
else:
reqbody = None
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
elif replaced_reqbody is not None:
reqbody = replaced_reqbody
if 'Content-Length' in req.headers:
req.headers['Content-Length'] = str(len(reqbody))
self.remove_hop_by_hop_headers(req.headers)
if self.upstream_timeout:
req.headers['Connection'] = 'Keep-Alive'
else:
req.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(req.headers)
try:
res, resdata = self.request_to_upstream_server(req, reqbody)
except socket.error:
return
content_encoding = res.headers.get('Content-Encoding', 'identity')
resbody = self.decode_content_body(resdata, content_encoding)
replaced_resbody = self.response_handler(req, reqbody, res, resbody)
if replaced_resbody is True:
return
elif replaced_resbody is not None:
resdata = self.encode_content_body(replaced_resbody, content_encoding)
if 'Content-Length' in res.headers:
res.headers['Content-Length'] = str(len(resdata))
resbody = replaced_resbody
self.remove_hop_by_hop_headers(res.headers)
if self.timeout:
res.headers['Connection'] = 'Keep-Alive'
else:
res.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(res.headers)
self.send_response(res.status, res.reason)
for k, v in res.headers.items():
if k == 'set-cookie':
for value in self.split_set_cookie_header(v):
self.send_header(k, value)
else:
self.send_header(k, v)
self.end_headers()
if self.command != 'HEAD':
self.wfile.write(resdata)
with self.global_lock:
self.save_handler(req, reqbody, res, resbody)
def request_to_upstream_server(self, req, reqbody):
u = urlsplit(req.path)
origin = (u.scheme, u.netloc)
req.headers['Host'] = u.netloc
selector = "%s?%s" % (u.path, u.query) if u.query else u.path
while True:
with self.lock_origin(origin):
conn = self.open_origin(origin)
try:
conn.request(req.command, selector, reqbody, headers=dict(req.headers))
except socket.error:
self.close_origin(origin)
raise
try:
res = conn.getresponse(buffering=True)
except httplib.BadStatusLine as e:
if e.line == "''":
self.close_origin(origin)
continue
else:
raise
resdata = res.read()
res.headers = res.msg
if not self.upstream_timeout or 'close' in res.headers.get('Connection', ''):
self.close_origin(origin)
else:
self.reset_timer(origin)
return res, resdata
def lock_origin(self, origin):
d = self.conn_table.setdefault(origin, {})
if not 'lock' in d:
d['lock'] = Lock()
return d['lock']
def open_origin(self, origin):
conn = self.conn_table[origin].get('connection')
if not conn:
scheme, netloc = origin
if scheme == 'https':
conn = httplib.HTTPSConnection(netloc)
else:
conn = httplib.HTTPConnection(netloc)
self.reset_timer(origin)
self.conn_table[origin]['connection'] = conn
return conn
def reset_timer(self, origin):
timer = self.conn_table[origin].get('timer')
if timer:
timer.cancel()
if self.upstream_timeout:
timer = Timer(self.upstream_timeout, self.close_origin, args=[origin])
timer.daemon = True
timer.start()
else:
timer = None
self.conn_table[origin]['timer'] = timer
def close_origin(self, origin):
timer = self.conn_table[origin]['timer']
if timer:
timer.cancel()
conn = self.conn_table[origin]['connection']
conn.close()
del self.conn_table[origin]['connection']
def remove_hop_by_hop_headers(self, headers):
hop_by_hop_headers = ['Connection', 'Keep-Alive', 'Proxy-Authenticate', 'Proxy-Authorization', 'TE', 'Trailers', 'Trailer', 'Transfer-Encoding', 'Upgrade']
connection = headers.get('Connection')
if connection:
keys = re.split(r',\s*', connection)
hop_by_hop_headers.extend(keys)
for k in hop_by_hop_headers:
if k in headers:
del headers[k]
def modify_via_header(self, headers):
via_string = "%s %s" % (self.protocol_version, self.proxy_via)
via_string = re.sub(r'^HTTP/', '', via_string)
original = headers.get('Via')
if original:
headers['Via'] = original + ', ' + via_string
else:
headers['Via'] = via_string
def decode_content_body(self, data, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO(data)
with gzip.GzipFile(fileobj=io) as f:
body = f.read()
elif content_encoding == 'deflate':
body = zlib.decompress(data)
elif content_encoding == 'identity':
body = data
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return body
def encode_content_body(self, body, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO()
with gzip.GzipFile(fileobj=io, mode='wb') as f:
f.write(body)
data = io.getvalue()
elif content_encoding == 'deflate':
data = zlib.compress(body)
elif content_encoding == 'identity':
data = body
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return data
def split_set_cookie_header(self, value):
re_cookies = r'([^=]+=[^,;]+(?:;\s*Expires=[^,]+,[^,;]+|;[^,;]+)*)(?:,\s*)?'
return re.findall(re_cookies, value, flags=re.IGNORECASE)
def request_handler(self, req, reqbody):
pass
def response_handler(self, req, reqbody, res, resbody):
pass
def save_handler(self, req, reqbody, res, resbody):
pass
def test(HandlerClass=SimpleHTTPProxyHandler, ServerClass=ThreadingHTTPServer, protocol="HTTP/1.1"):
if sys.argv[1:]:
port = int(sys.argv[1])
else:
port = 8799
server_address = ('', port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()
if __name__ == '__main__':
test()

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,474 @@
#!/bin/bash
failtwoban=$(dpkg -l | grep fail2ban | grep ii)
apache=$(dpkg -l | grep apache2 | grep ii)
squid=$(dpkg -l | grep squid | grep ii)
dropbear=$(dpkg -l | grep dropbear | grep ii)
openssh=$(dpkg -l | grep openssh | grep ii)
if [ "$openssh" != "" ]; then
s1="ssh"
fi
if [ "$squid" != "" ]; then
s2="squid"
fi
if [ "$dropbear" != "" ]; then
s3="dropbear"
fi
if [ "$apache" != "" ]; then
s4="apache"
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
#FUN_BAR
fun_bar () {
comando="$1"
_=$(
$comando > /dev/null 2>&1
) & > /dev/null
pid=$!
while [[ -d /proc/$pid ]]; do
echo -ne " \033[1;33m["
for((i=0; i<10; i++)); do
echo -ne "\033[1;31m##"
sleep 0.2
done
echo -ne "\033[1;33m]"
sleep 1s
echo
tput cuu1
tput dl1
done
echo -e " \033[1;33m[\033[1;31m####################\033[1;33m] - \033[1;32m100%\033[0m"
sleep 1s
}
fail2ban_function () {
if [ "$failtwoban" != "" ]; then
echo -e "${cor[4]} ${txt[143]}"
echo -e "${cor[2]} |1| >${cor[3]} ${txt[144]}"
echo -e "${cor[2]} |2| >${cor[3]} ${txt[145]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
read -p " [1|2]: " lo_og
if [ "$lo_og" = "2" ]; then
cat /var/log/fail2ban.log
fi
if [ "$lo_og" = "1" ]; then
echo -e "${cor[1]} =================================== \033[1;37m"
fun_bar "apt-get remove fail2ban -y"
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
return
fi
echo -e "${cor[5]} ${txt[146]}"
echo -e "${cor[5]} ${txt[147]}"
echo -e "${cor[5]} ${txt[148]}"
echo -e "${cor[5]} ${txt[149]}"
echo -e "${cor[5]} ${txt[150]}"
echo -e "${cor[5]} ${txt[151]}"
echo -e "${cor[5]} ${txt[152]}"
echo -e "${cor[1]} =================================== \033[1;37m"
read -p " [S/N]: " fail2ban
if [[ "$fail2ban" = "s" || "$fail2ban" = "S" ]]; then
echo -e "${cor[1]} =================================== \033[1;37m"
fun_bar "apt-get install fail2ban -y"
cd $HOME
wget -O fail2ban https://github.com/ChumoGH/chumogh-gmail.com/raw/master/fail2ban-0.9.4.tar.gz -o /dev/null
tar -xf $HOME/fail2ban
cd $HOME/fail2ban-0.9.4
fun_bar "./setup.py install"
echo '[INCLUDES]
before = paths-debian.conf
[DEFAULT]
ignoreip = 127.0.0.1/8
# ignorecommand = /path/to/command <ip>
ignorecommand =
bantime = 1036800
findtime = 3600
maxretry = 5
backend = auto
usedns = warn
logencoding = auto
enabled = false
filter = %(__name__)s
destemail = root@localhost
sender = root@localhost
mta = sendmail
protocol = tcp
chain = INPUT
port = 0:65535
fail2ban_agent = Fail2Ban/%(fail2ban_version)s
banaction = iptables-multiport
banaction_allports = iptables-allports
action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]
action_mwl = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
action_xarf = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]
action_cf_mwl = cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"]
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
action_blocklist_de = blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]
action_badips = badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]
action_badips_report = badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]
action = %(action_)s' > /etc/fail2ban/jail.local
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[153]}"
echo -e "${cor[5]} ${txt[154]}"
if [ "$s1" != "" ]; then
echo -ne " $s1"
fi
if [ "$s2" != "" ]; then
echo -ne " $s2"
fi
if [ "$s3" != "" ]; then
echo -ne " $s3"
fi
if [ "$s4" != "" ]; then
echo -ne " $s4"
fi
echo -e ""
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[155]}"
read -p " [S/N]: " sim_nao
if [[ "$sim_nao" = "s" || "$sim_nao" = "S" ]]; then
if [ "$s1" != "" ]; then
echo '[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[sshd-ddos]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s' >> /etc/fail2ban/jail.local
else
echo '[sshd]
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[sshd-ddos]
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s' >> /etc/fail2ban/jail.local
fi
if [ "$s2" != "" ]; then
echo '[squid]
enabled = true
port = 80,443,3128,8080
logpath = /var/log/squid/access.log' >> /etc/fail2ban/jail.local
else
echo '[squid]
port = 80,443,3128,8080
logpath = /var/log/squid/access.log' >> /etc/fail2ban/jail.local
fi
if [ "$s3" != "" ]; then
echo '[dropbear]
enabled = true
port = ssh
logpath = %(dropbear_log)s
backend = %(dropbear_backend)s' >> /etc/fail2ban/jail.local
else
echo '[dropbear]
port = ssh
logpath = %(dropbear_log)s
backend = %(dropbear_backend)s' >> /etc/fail2ban/jail.local
fi
if [ "$s4" != "" ]; then
echo '[apache-auth]
enabled = true
port = http,https
logpath = %(apache_error_log)s' >> /etc/fail2ban/jail.local
else
echo '[apache-auth]
port = http,https
logpath = %(apache_error_log)s' >> /etc/fail2ban/jail.local
fi
echo '[selinux-ssh]
port = ssh
logpath = %(auditd_log)s
[apache-badbots]
port = http,https
logpath = %(apache_access_log)s
bantime = 172800
maxretry = 1
[apache-noscript]
port = http,https
logpath = %(apache_error_log)s
[apache-overflows]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-nohome]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-botsearch]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-fakegooglebot]
port = http,https
logpath = %(apache_access_log)s
maxretry = 1
ignorecommand = %(ignorecommands_dir)s/apache-fakegooglebot <ip>
[apache-modsecurity]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-shellshock]
port = http,https
logpath = %(apache_error_log)s
maxretry = 1
[openhab-auth]
filter = openhab
action = iptables-allports[name=NoAuthFailures]
logpath = /opt/openhab/logs/request.log
[nginx-http-auth]
port = http,https
logpath = %(nginx_error_log)s
[nginx-limit-req]
port = http,https
logpath = %(nginx_error_log)s
[nginx-botsearch]
port = http,https
logpath = %(nginx_error_log)s
maxretry = 2
[php-url-fopen]
port = http,https
logpath = %(nginx_access_log)s
%(apache_access_log)s
[suhosin]
port = http,https
logpath = %(suhosin_log)s
[lighttpd-auth]
port = http,https
logpath = %(lighttpd_error_log)s
[roundcube-auth]
port = http,https
logpath = %(roundcube_errors_log)s
[openwebmail]
port = http,https
logpath = /var/log/openwebmail.log
[horde]
port = http,https
logpath = /var/log/horde/horde.log
[groupoffice]
port = http,https
logpath = /home/groupoffice/log/info.log
[sogo-auth]
port = http,https
logpath = /var/log/sogo/sogo.log
[tine20]
logpath = /var/log/tine20/tine20.log
port = http,https
[drupal-auth]
port = http,https
logpath = %(syslog_daemon)s
backend = %(syslog_backend)s
[guacamole]
port = http,https
logpath = /var/log/tomcat*/catalina.out
[monit]
#Ban clients brute-forcing the monit gui login
port = 2812
logpath = /var/log/monit
[webmin-auth]
port = 10000
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[froxlor-auth]
port = http,https
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[3proxy]
port = 3128
logpath = /var/log/3proxy.log
[proftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(proftpd_log)s
backend = %(proftpd_backend)s
[pure-ftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(pureftpd_log)s
backend = %(pureftpd_backend)s
[gssftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(syslog_daemon)s
backend = %(syslog_backend)s
[wuftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(wuftpd_log)s
backend = %(wuftpd_backend)s
[vsftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(vsftpd_log)s
[assp]
port = smtp,465,submission
logpath = /root/path/to/assp/logs/maillog.txt
[courier-smtp]
port = smtp,465,submission
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[postfix]
port = smtp,465,submission
logpath = %(postfix_log)s
backend = %(postfix_backend)s
[postfix-rbl]
port = smtp,465,submission
logpath = %(postfix_log)s
backend = %(postfix_backend)s
maxretry = 1
[sendmail-auth]
port = submission,465,smtp
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[sendmail-reject]
port = smtp,465,submission
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[qmail-rbl]
filter = qmail
port = smtp,465,submission
logpath = /service/qmail/log/main/current
[dovecot]
port = pop3,pop3s,imap,imaps,submission,465,sieve
logpath = %(dovecot_log)s
backend = %(dovecot_backend)s
[sieve]
port = smtp,465,submission
logpath = %(dovecot_log)s
backend = %(dovecot_backend)s
[solid-pop3d]
port = pop3,pop3s
logpath = %(solidpop3d_log)s
[exim]
port = smtp,465,submission
logpath = %(exim_main_log)s
[exim-spam]
port = smtp,465,submission
logpath = %(exim_main_log)s
[kerio]
port = imap,smtp,imaps,465
logpath = /opt/kerio/mailserver/store/logs/security.log
[courier-auth]
port = smtp,465,submission,imap3,imaps,pop3,pop3s
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[postfix-sasl]
port = smtp,465,submission,imap3,imaps,pop3,pop3s
logpath = %(postfix_log)s
backend = %(postfix_backend)s
[perdition]
port = imap3,imaps,pop3,pop3s
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[squirrelmail]
port = smtp,465,submission,imap2,imap3,imaps,pop3,pop3s,http,https,socks
logpath = /var/lib/squirrelmail/prefs/squirrelmail_access_log
[cyrus-imap]
port = imap3,imaps
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[uwimap-auth]
port = imap3,imaps
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[named-refused]
port = domain,953
logpath = /var/log/named/security.log
[nsd]
port = 53
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
logpath = /var/log/nsd.log
[asterisk]
port = 5060,5061
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
logpath = /var/log/asterisk/messages
maxretry = 10
[freeswitch]
port = 5060,5061
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
logpath = /var/log/freeswitch.log
maxretry = 10
[mysqld-auth]
port = 3306
logpath = %(mysql_log)s
backend = %(mysql_backend)s
[recidive]
logpath = /var/log/fail2ban.log
banaction = %(banaction_allports)s
bantime = 604800 ; 1 week
findtime = 86400 ; 1 day
[pam-generic]
banaction = %(banaction_allports)s
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[xinetd-fail]
banaction = iptables-multiport-log
logpath = %(syslog_daemon)s
backend = %(syslog_backend)s
maxretry = 2
[stunnel]
logpath = /var/log/stunnel4/stunnel.log
[ejabberd-auth]
port = 5222
logpath = /var/log/ejabberd/ejabberd.log
[counter-strike]
logpath = /opt/cstrike/logs/L[0-9]*.log
# Firewall: http://www.cstrike-planet.com/faq/6
tcpport = 27030,27031,27032,27033,27034,27035,27036,27037,27038,27039
udpport = 1200,27000,27001,27002,27003,27004,27005,27006,27007,27008,27009,27010,27011,27012,27013,27014,27015
action = %(banaction)s[name=%(__name__)s-tcp, port="%(tcpport)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(udpport)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
[nagios]
logpath = %(syslog_daemon)s ; nrpe.cfg may define a different log_facility
backend = %(syslog_backend)s
maxretry = 1
[directadmin]
logpath = /var/log/directadmin/login.log
port = 2222
[portsentry]
logpath = /var/lib/portsentry/portsentry.history
maxretry = 1
[pass2allow-ftp]
# this pass2allow example allows FTP traffic after successful HTTP authentication
port = ftp,ftp-data,ftps,ftps-data
# knocking_url variable must be overridden to some secret value in filter.d/apache-pass.local
filter = apache-pass
# access log of the website with HTTP auth
logpath = %(apache_access_log)s
blocktype = RETURN
returntype = DROP
bantime = 3600
maxretry = 1
findtime = 1
[murmur]
port = 64738
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol=tcp, chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol=udp, chain="%(chain)s", actname=%(banaction)s-udp]
logpath = /var/log/mumble-server/mumble-server.log
[screensharingd]
logpath = /var/log/system.log
logencoding = utf-8
[haproxy-http-auth]
logpath = /var/log/haproxy.log' >> /etc/fail2ban/jail.local
service fail2ban restart > /dev/null 2>&1
echo -e "${cor[5]} ${txt[156]}"
fi
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
return
}
fail2ban_function
[[ -e $HOME/fail2ban ]] && rm $HOME/fail2ban
[[ -d $HOME/fail2ban-0.9.4 ]] && rm -rf $HOME/fail2ban-0.9.4

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
@ChumoGH - OFFICIAL

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,755 @@
----------------------------------------------------------------------------
[auth][auth]get http://ssh.proxy.ip/<ponte_conection_>mhost/
User-Agent: YES
[lf][raw][method] mhost:443 HTTP/1.1
Proxy-Authorization: Keep-Alive
Connection: Close
[realData][crlf]get mhost/ HTTP/1.1[crlf]CONNECT mhost[crlf][crlf][delay_split][auth][auth][auth][auth]GET mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET mhost/ HTTP/1.1[crlf][method] ecob.claro.com.br[crlf][crlf][delay_split]get mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://ecob.claro.com.br/ HTTP/1.1
User-Agent: YES
[lf][raw][method] mhost:443 HTTP/1.1
Proxy-Authorization: Keep-Alive
Connection: Close
[realData][crlf]get mhost/ HTTP/1.1[crlf]CONNECT ecob.claro.com.br[crlf][crlf][delay_split]
----------------------------------------------------------------------------
[auth][auth][auth][auth]get http://mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/<ponte_conection_>mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]get http://mhost/<ponte_conection_>mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/<ponte_conection_>mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/ HTTP/1.1
User-Agent: YES
[lf][raw][method] mhost:443 HTTP/1.1
Proxy-Authorization: Keep-Alive
Connection: Close
[realData][crlf][auth][auth][auth][auth][auth][auth][auth][auth][auth][auth][auth][lf]
----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1
User-Agent: [ua][crlf][host][crlf][crlf][split]CONNECT ip da. Vps :443 HTTP/1.0[crlf][crlf]CONNECT mhost:443 HTTP/1.1[crlf]CONNECT [host_port] HTTP/1.0[crlf][crlf]GET http://mhost/ HTTP/1.0
Host: mhost
Proxy-Authorization: basic: mhost
User-Agent: [ua]
Connection: close
Proxy-Connection: Keep-Alive [crlf][host][crlf][crlf][split]CONNECT [host_port] HTTP/1.0[crlf][crlf][crlf]GET http://mhost/ HTTP/1.0[crlf]Host: mhost/[crlf][host][crlf][crlf]CONNECT [host_port] HTTP/1.0[crlf][crlf][realData][crlf][crlf][crlf]
----------------------------------------------------------------------------
[method] mhost:443 HTTP/1.1[lf]CONNECT [host_port] [protocol][lf][lf]GET http://mhost/ HTTP/1.1\nHost: mhost\nConnection: close\nConnection: close\nUser-Agent:[ua][lf]Proxy-Connection: Keep-Alive[lf][host][crlf][lf][delay_split]CONNECT [host_port] [protocol][lf][lf]CONNECT [host_port] [protocol][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]User-Agent: KDDI[lf][host][lf][lf][lf][raw]CONNECT [host_port] [protocol][lf]CONNECT [ssh] HTTP/1.1[lf]CONNECT [host_port] [protocol][lf][lf]DELETE http://mhost/HTTP/1.1[lf]Host: m.opera.com[lf]Proxy-Authorization: basic: *[lf]User-Agent: KDDI[lf]Connection: close[lf]Proxy-Connection: Direct[lf][host][lf][lf][raw]CONNECT [host_port] [protocol][lf][lf][lf][raw][method] http://mhost[port] HTTP/1.1[lf]Host: [auth][lf][host][lf][lf]CONNECT [host] [protocol][lf][lf][raw]CONNECT [host] [protocol][lf][lf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf][netData][crlf][instant_split]MOVE http://mhost[delay_split][lf]__[crlf][crlf][netData][crlf][instant_split]MOVE http://mhost[delay_split][lf]__[crlf][crlf][netData][crlf][instant_split]MOVE http://mhost[delay_split][lf]__[crlf]X-Online-Host: mhost[crlf]Packet Length: Authorization[crlf]Packet Content: Authorization[crlf]Transfer-Encoding: chunked[crlf]Referer: mhost[lf]__[crlf]
----------------------------------------------------------------------------
[lf][lf]CONNECT [host_port]@mhost [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]User-Agent: [ua][lf][host]@mhost [protocol][crlf][crlf]
----------------------------------------------------------------------------
[immutable][method] [host_port] [delay_split]GET http://mhost HTTP/1.1[netData][crlf]HTTP:mip:80[crlf]X-GreenArrow-MtaID: smtp1-1[crlf]CONNECT http://mhost/ HTTP/1.1[crlf]CONNECT http://mhost/ HTTP/1.0[crlf][split]CONNECT http://mhost/ HTTP/1.1[crlf]CONNECT http://mhost/ HTTP/1.1[crlf][crlf]
-----------------------------------------------------------------------------
[method] [host_port]?[split]GET http://mhost:8080/[crlf][crlf]get [host_port]?[split]OPTIONS http://mhost/[crlf]Connection: Keep-Alive[crlf]User-Agent: Mozilla/5.0 (Android; Mobile; rv:35.0) Gecko/35.0 Firefox/35.0[crlf]CONNECT [host_port] [crlf]GET [host_port]?[split]get http://mhost/[crlf][crlf][method] mip:80[split]GET mhost/[crlf][crlf]: Cache-Control:no-store,no-cache,must-revalidate,post-check=0,pre-check=0[crlf]Connection:close[crlf]CONNECT [host_port]?[split]GET http://mhost:/[crlf][crlf]POST [host_port]?[split]GET
mhost:/[crlf]Content-Length: 999999999\r\n\r\n
-----------------------------------------------------------------------------
CONNECT [host_port] [protocol][crlf][delay_split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Referer: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port]GET http://mhost/ [protocol][lf][split]get mhost/ HTTP/1.1[lf][lf]
-----------------------------------------------------------------------------
CONNECT [host_port]get http://mhost/ [protocol][lf][split]GET http://mhost/ HTTP/1.1[lf]Host: navegue.vivo.ddivulga.com/pacote[lf][host_port]get http://mhost/ [protocol][lf][split]GET http://mhost/ HTTP/1.1[lf]Host: mhost[lf][host_port]GET http://mhost/ [protocol][lf][split]get http://mhost/ HTTP/1.1[lf]Host: mhost[lf][host_port]GET http://mhost/ [protocol][lf][split]get http://mhost/ HTTP/1.1[lf]Host: mhost[lf][host_port]GET http://mhost/ [protocol][lf][split]CONNECT [host_port]@mhost/ [protocol][crlf]Host: mhost/[crlf]GET mhost/ HTTP/1.1[crlf]HEAD mhost HTTP/1.1[crlf]TRACE mhost HTTP/1.1[crlf]OPTIONS mhost HTTP/1.1[crlf]PATCH mhost/ HTTP/1.1[crlf]PROPATCH mhost/ HTTP/1.1[crlf]DELETE mhost HTTP/1.1[crlf]PUT mhost/ HTTP/1.1[crlf]Host: mhost/[crlf]Host: mhost/[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]X-Forwarded-For: mhost[protocol][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port][split]get http://mhost HTTP/1.1[crlf]Host: mhost/[crlf]X-Forward-Host: mhost/[crlf]Connection: Keep-Alive[crlf]Connection: Close[crlf]User-Agent: [ua][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port][split]get mhost/ HTTP/1.1[crlf] [crlf][immutable]
-----------------------------------------------------------------------------
CONNECT [host_port] [split]get http://mhost/ EHTTP/1.1 200 OK[crlf]HTTP Host: speedtest.net;m.whatsapp.com;sonymobile.com.br;caixa.sp.gov;mhost.co.id;vivo.com.br;[crlf]Forwarded-For: m.whatsapp.com/speedtest.bet[crlf]Connection: Keep-Alive[crlf][crlf][raw][crlf][instant_split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Online-Host: mhost[crlf]ping-server: www.google.com[crlf]Connection: Close[crlf]Bandwith-Speed: 10GBps,lock,Keep-Alive[crlf]User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)[crlf][crlf]ping m.facebook.com[crlf]Content-Type: text/html; charset=utf-8X-[crlf]Content-Type: OptionsnosniffAccess-Control-Allow-Credentialstrueaccess-control-allow[split][method] OPTIONSExpiresSat, 01 Jan 2000 00:00:00 GMT0„2(6317d ago)X-FB-Debug1d4XXullTOxJZaZVk8PkrdpTcsyCcqDpHzZ6bFycC+ELii5hc8/lFzWhQ98EO/Cq2VJDnK2l5VTKEJISC++PbQ[crlf]Connection: close[crlf]Connection: Keep-Alive[crlf]Content-Length: 999999999999[crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port]@mhost [instant_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]get mhost/[crlf]Connection: close Keep-Alive[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf][immutable]
-----------------------------------------------------------------------------
CONNECT [host_port][split]GET mhost/ HTTP/1.1[crlf][crlf][immutable]
-----------------------------------------------------------------------------
CONNECT [host_port]@mhost/ [instant_split]get http://mhost/ HTTP/1.1[crlf]
-----------------------------------------------------------------------------
[immutable]get [host_port] [protocol][crlf][delay_split]CONNECT http://mhost/ HTTP/1.1[crlf]
-----------------------------------------------------------------------------
CONNECT [host_port] [instant_split]get http://mhost/ HTTP/1.1[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][crlf][instant_split]get http://mhost/
HTTP/1.1[ua][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTPS/2.0[auth][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [auth][crlf][crlf][delay_split]CONNECT [host_port] [protocol][crlf]JAZZ http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [protocol][crlf][crlf][delay_split]CONNECT [host_port] [method][cr]?[lf][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port] [protocol]\r
\r
get http://mhost HTTP/1.1\r
Host: mhost\r
X-Online-Host: mhost\r
X-Forward-Host: mhost\r
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-gb) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.9174AP\r
\r
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost
User-Agent: Yes
Connection: close
Proxy-Connection: Keep-Alive
[crlf][crlf]CONNECT [host_port][protocol][crlf][crlf][immutable]
-----------------------------------------------------------------------------
get [host_port][protocol][crlf][split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][raw][crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]UseDNS: Yes[crlf]Cache-Control: no-cache[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf] Access-Control-Allow-Credentials: true, true[lf] Access-Control-Allow-Headers: X-Requested-With,Content-Type, X-Requested-With,Content-Type[lf] Access-Control-Allow-Methods: GET,PUT,OPTIONS,POST,DELETE, GET,PUT,OPTIONS,POST,DELETE[lf] Age: 8, 8[lf] Cache-Control: max-age=86400[lf] public[lf] Connection: keep-alive[lf] Content-Type: text/html; charset=UTF-8[crlf]Content-Length: 9999999999999[crlf]UseDNS: Yes[crlf]Vary: Accept-Encoding[crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf] Access-Control-Allow-Credentials: true, true[lf] Access-Control-Allow-Headers: X-Requested-With,Content-Type, X-Requested-With,Content-Type[lf] Access-Control-Allow-Methods: GET,PUT,OPTIONS,POST,DELETE, GET,PUT,OPTIONS,POST,DELETE[lf] Age: 8, 8[lf] Cache-Control: max-age=86400[lf] public[lf] Connection: keep-alive[lf] Content-Type: text/html; charset=UTF-8[crlf]Content-Length: 9999999999999[crlf]Vary: Accept-Encoding[crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
[netData][split][raw][crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
GET http://mhost/ HTTP/1.1
Host: mhost/
User-Agent: Yes
Connection: close
Proxy-Connection: update
[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]host: http://mhost/[crlf]Connection: close update[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf][crlf][crlf]
-----------------------------------------------------------------------------
get [host_port][protocol][crlf][split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][raw][crlf][crlf]User-Agent: [ua][crlf]Connection: Close[crlf]Proxy-connection: Close[crlf]Proxy-Authorization: Basic[crlf]Cache-Control: no-cache[crlf]Connection: Keep-Alive[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Content-Type: text/html; charset=iso-8859-1[crlf]Connection: close[crlf][crlf][crlf]User-Agent: [ua][crlf][crlf]Referer: mhost[crlf]Cookie: mhost[crlf]Proxy-Connection: Keep-Alive [crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1
Host: mhost
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Linux; Android 5.1; LG-X220 Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: http://mhost
Accept-Encoding: gzip, deflate, sdch
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: _ga=GA1.2.2045323091.1494102805; _gid=GA1.2.1482137697.1494102805; tfp=80bcf53934df3482b37b54c954bd53ab; tpctmp=1494102806975; pnahc=0; _parsely_visitor={%22id%22:%22719d5f49-e168-4c56-b7c7-afdce6daef18%22%2C%22session_count%22:1%2C%22last_session_ts%22:1494102810109}; sc_is_visitor_unique=rx10046506.1494105143.4F070B22E5E94FC564C94CB6DE2D8F78.1.1.1.1.1.1.1.1.1
Connection: close
Proxy-Connection: Keep-Alive
[crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port][protocol][crlf][split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][raw][crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control: no-cache[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost[crlf] HTTP/1.1[crlf]Host: mhost[crlf]User-Agent: [ua][crlf]Connection: close [crlf]
Referer:http://mhost[crlf]
Content-Type: text/html; charset=iso-8859-1[crlf]Content-Length:0[crlf]Accept: text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost
User-Agent: null
Connection: close
Proxy-Connection: x-online-host
[lf][lf] CONNECT [host_port] [protocol] [netData][lf]Content-Length: 130 [lf][lf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf][crlf]User-Agent: Yes[lf]Accept-Encoding: gzip,deflate[lf]Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7[lf]Connection: Basic[lf]Referer: mhost[lf]Cookie: mhost [lf]Proxy-Connection: Keep-Alive[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Accept-Language: en-us,en;q=0.5[crlf]Accept-Encoding: gzip,deflate[crlf]Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7[crlf]Keep-Alive: 115[crlf]Connection: keep-alive[crlf]Referer: mhost[crlf]Cookie: mhost Proxy-Connection: Keep-Alive[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control: no-cache[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf][crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]CONNECT [host_port][method]HTTP/1.1[lf]HEAD http://mhost/ [protocol][lf]Host: mhost[lf]CONNECT [lf]DELETE http://mhost/ HTTP/1.1[crlf]CONNECT mhost [crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf][netData][crlf]@mip [crlf][crlf]http://mhost/ HTTP/1.1[crlf]mip[crlf][crlf] [crlf][crlf]http://mhost/ HTTP/1.1[crlf]Host@mip[crlf][crlf] [crlf][crlf] http://mhost/ HTTP/1.1[crlf]Host mhost/[crlf][crlf][netData][crlf] [crlf][crlf] http://mhost/ HTTP/1.1[crlf] [crlf][crlf][netData][crlf] [crlf][crlf] http://mhost/ HTTP/1.1[cr][lf] [crlf][crlf][netData][cr][lf] [crlf][crlf]CONNECT mip:22@http://mhost/ HTTP/1.1[crlf] [crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost HTTP/1.1[crlf][crlf]CONNECT http://mhost/ [protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: close[crlf]User-Agent: [ua][crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control : no-cache[crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port]@mhost HTTP/1.1[crlf][crlf]get http://mhost/ [protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: close[crlf]User-Agent: [ua][crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control : no-cache[crlf][crlf]
-----------------------------------------------------------------------------
get https://mhost/ HTTP/1.1
Host: mhost[crlf]User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: mhost
Cookie: mhost Proxy-Connection: Keep-Alive [crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost[crlf]User-Agent: Yes[lf]Accept-Encoding: gzip,deflate[lf]Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7[lf]Connection: Basic[lf]Referer: mhost[lf]Cookie: mhost [lf]Proxy-Connection: Keep-Alive[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][crlf][delay_split]CONNECT [host_port]@mhost [protocol][crlf][crlf]
----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]DATA: 2048B[lf]Host: mhost[lf]User-Agent: Yes[lf]Connection: close[lf]Accept-Encoding: gzip[lf]Non-Buffer: true[lf]Proxy: false[lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]CONNECT http://mhost/ HTTP/1.1[crlf]Host: http://mhost/[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: http://mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1
Host: mhost
Cache-Control=max-age=0
[crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Referer: mhost[crlf]GET /HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][raw][crlf][crlf][raw][crlf]Referer: mhost[crlf][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\nHost: mhost/\nUser-Agent: Yes\nConnection: close\nProxy-Connection: Keep-Alive\n\r\n\r\n[netData]\r\n \r\n\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: close Keep-Alive[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf][split]CONNECT mhost@[host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf][lf][realData][lf][lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf][split]CONNECT [host_port][protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Forward-Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port][protocol][crlf][crlf]
-----------------------------------------------------------------------------
[netData][crlf]
get http://mhost/[crlf]
Host: mhost[crlf][crlf]
CONNECT mhost[protocol][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\n
Host: mhost\r\nConnection: Keep-Alive\r\n
\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]
Host: mhost[crlf]
X-Online-Host: mhost[crlf][crlf]
CONNECT mhost [protocol][crlf]
[crlf]
-----------------------------------------------------------------------------
[netData][crlf]
get http://mhost/ HTTP/1.1[crlf]
Host: mhost[crlf]
CONNECT mhost[protocol][crlf]
-----------------------------------------------------------------------------
[netData] HTTP/1.0\r\n\r\n
get http://mhost/ HTTP/1.1\r\n
Host: mhost\r\n
Connection: Keep-Alive\r\n
CONNECT mhost\r\n
\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost HTTP/1.1[crlf]X-Real-IP:mip[crlf]X-Forwarded-For:http://mhost/ http://mhost/[crlf]X-Forwarded-Port:mhost[crlf]X-Forwarded-Proto:http[crlf]Connection:Keep-Alive[crlf][crlf][instant_split]CONNECT [ssh]HTTP/1.0[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host:mhost[crlf][crlf][split][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host:
mhost[crlf]Connection: Keep-Alive[crlf][crlf]
[lf][realData][crlf]CONNECT mhost HTTP/1.1[lf][lf]
-----------------------------------------------------------------------------
get [host_port] HTTP/1.1[crlf][crlf]GET http://mhost/ [protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]User-Agent: [ua][crlf][raw][crlf]
[crlf]
-----------------------------------------------------------------------------
get [host_port]http://mhost/[protocol][crlf][split]mhost:/ HTTP/1.1[crlf]Host: mhost:[crlf]X-Forward-Host: mhost:[crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]CONNECT mhost[crlf]Connection: close[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host:
http://mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\nHost:
mhost\r\n\r\n[netData]
\r\n\r\n\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\nX-Online-Host:mhost\r\n\r\nCONNECT mip:443
HTTP/1.0\r\n \r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\nGET: mhost\n\r\nCONNECT mip:443
HTTP/1.0\r\n \r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: close[crlf]CONNECT [host_port][protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[crlf]X-Forward-Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf]X-Forward-Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]mhost[lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Forward-Host: mhost[lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Connection: http://mhost[lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]CONNECT mhost@[port][protocol][lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Connection: Keep-Alive[crlf]mhost@[host_port][lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forwarded-For: mhost[crlf][netdata][crlf] [crlf]-Agent: mhost[ua][crlf]CONNECT mhost [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]User-Agent: mhost[ua][crlf]CONNECT mhost [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf][split]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]User-Agent: mhost[ua][crlf]Connection: close[crlf]CONNECT mhost [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost [host_port] [protocol][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost@[host_port] [protocol][crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]CONNECT http://mhost[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf]Connection: close[crlf][netData][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]CONNECT mhost@[host_port][protocol][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]GET http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]CONNECT mhost@[host_port][protocol][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]CONNECT http://mhost/[protocol]@[host_port][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf]Connection: close[crlf][netdata][crlf] [crlf][split]Connection: close[crlf]Content-Lenght: 20624[crlf]
[crlf][netData][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]GET http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf]
[crlf][netData][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost\r\nHost:mhost\r\n\r\n[netData]\r\n \r\n\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][lf]HEAD http://mhost[protocol][lf]Host: mhost lf]CONNECT mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf][crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]host: mhost[crlf][crlf][realData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost [crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost [host_port][protocol][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost[lf]Host: mhost[lf][lf]CONNECT mhost [host_port][lf]CONNECT mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost[lf]Host: mhost[lf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][lf]CONNECT mhost [host_port][lf]CONNECT mhost [lf]
-----------------------------------------------------------------------------
[realData][crlf][split]get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost[lf]Host: mhost[lf][lf]CONNECT mhost [host_port][lf]get mhost [lf]
-----------------------------------------------------------------------------
get [host_port]@mhost" HTTP/1.1[crlf][crlf]GET http://mhost"/ [protocol][crlf]Host: mhost"[crlf]X-Forward-Host: mhost"[crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][cr][crlf]X-Online-Host: mhost[crlf]Connection: [crlf]User-Agent: [ua][crlf]Content-Lenght: 99999999999[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]X-Online-Host: mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Authorization: Basic: Connection: X-Forward-Keep-AliveX-Online-Host: mhost[lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]host:frontend.claro.com.br[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: Multibanco.com.br[crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost [lf][lf]CONNECT [host_port][lf]CONNECT [lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf] Proxy-Authorization: Basic:Connection: X-Forward-Keep-AliveX-Online-Host:[lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf][instant_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf]Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]X-Online-Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf]X-Online-Host: mhost [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]X-Online-Host: http://mhost[crlf][crlf]CONNECT[host_port] [protocol][crlf]X-Online-Host: mhost [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost HTTP/1.1[crlf]Connect mip:443 [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost[protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost[crlf][crlf][split]get mhost HTTP/1.1[cr][lf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host:mhost[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf][instant_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf]get mip:443@mhost HTTP/1.1[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost User-Agent: Yes
Connection: close
Proxy-Connection: Keep-Alive Connection: Transfer-Encoding
[protocol][ua][port][auth][lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
#!/bin/bash
subdom () {
SUBDOM="$1"
[[ "$SUBDOM" = "" ]] && return
randomize="$RANDOM"
for sites in `cat $log`; do
[[ $(echo ${DNS[@]}|grep $sites) = "" ]] && DNS+=($sites)
[[ $(echo ${DNS[@]}|grep $sites) != "" ]] && cat $log|grep -v "$sites" > $log
done
while true; do
[[ "$(pidof lynx | wc -w)" -lt "20" ]] && break
done
(
HOST[$randomize]="$SUBDOM"
curl -sSL "${HOST[$randomize]}"|grep -Eoi '<a [^>]+>'|grep -Eo 'href="[^\"]+"'|grep -Eo '(http|https)://[a-zA-Z0-9./*]+'|sort -u|awk -F "://" '{print $2}' >> $log
) > /dev/null 2>&1 &
}
iniciar () {
SUB_DOM=$1
limite=$2
[[ ${SUB_DOM} = "" ]] && read -p "Site Alvo: " SUB_DOM
[[ ${limite} = "" ]] && limite="300"
#CRIA LOG
log="./loog" && touch $log
#INICIA PRIMEIRA BUSCA
_DOM=$(curl -sSL "$SUB_DOM"|grep -Eoi '<a [^>]+>'|grep -Eo 'href="[^\"]+"'|grep -Eo '(http|https)://[a-zA-Z0-9./*]+'|sort -u|awk -F "://" '{print $2}')
for _DOMS in `echo $_DOM`; do
[[ $(echo ${DNS[@]}|grep ${_DOMS}) = "" ]] && DNS+=(${_DOMS})
done
#INICIA THREADS
i=0
while true; do
DOMAIN=$(echo "${DNS[$i]}")
[[ $DOMAIN = "" ]] && break
if [[ $(echo -e "${PESQ[@]}"|grep "$DOMAIN") = "" ]]; then
subdom "$DOMAIN"
echo -e "\033[1;31m(Scan\033[1;32m $((${#PESQ[@]}+1))\033[1;31m de \033[1;32m${#DNS[@]}\033[1;31m) - Escaneando ---> \033[1;36mhttp://$DOMAIN\033[1;37m"
PESQ+=($DOMAIN)
fi
[[ "$(echo ${#DNS[@]})" -gt "$limite" ]] && break
i=$(($i+1))
sleep 1s
done
rm $log
echo -e "\033[1;31m====================================\n\033[1;32mScan Finalizado!, Iniciando Coleta de IPs\033[1;31m\n====================================\033[0m"
[[ -e $HOME/subresult ]] && rm $HOME/subresult
[[ ! -e $HOME/subresult ]] && touch $HOME/subresult
for result in $(echo "${DNS[@]}"); do
(
rand="$RANDOM"
dns[rand]="$result"
scan[rand]=$(echo ${result}|cut -d'/' -f1)
IP[rand]=$(nslookup "${scan[rand]}"|grep -Eo 'Address: [0-9.]+'|grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'|tail -1) > /dev/null 2>&1
echo -e "====================================\nDNS: ${dns[rand]}\nIP: ${IP[rand]}\n====================================" >> $HOME/subresult
unset IP
) &
done
while true; do
[[ $(pidof nslookup|wc -w) -lt "1" ]] && break
done
RSLT=$(($(cat $HOME/subresult|wc -l)/4)) && echo -e "\033[1;31m====================================\n\033[1;32m$RSLT Hosts Capturados\n\033[1;31m====================================\033[0m"
echo -ne "Desea Imprimir los Resultados? [S/N]: "; read yn
[[ $yn = @(s|S|y|Y) ]] && {
echo -ne "\033[1;32m"
cat $HOME/subresult|grep -v =
echo -e "\033[1;31m====================================\033[0m"
}
return 0
}
#INICIA SCRIPT
echo -e "\033[1;31m====================================\033[0m"
echo -e "\033[1;33m INICIALIZANDO PROCEDIMENTOS (SCAN)"
echo -e "\033[1;31m====================================\033[0m"
iniciar $1 $2
[[ $? = "0" ]] &&
echo -e "\033[1;32mRegistro Generado en : $HOME/subresult\033[0m" &&
echo -e "\033[1;31m====================================\033[0m"

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
V5.7U

View File

@ -0,0 +1,181 @@
#!/bin/bash
#CREADOR Henry Chumo | 06/06/2022
#Alias : @ChumoGH
# -*- ENCODING: UTF-8 -*-
dropbear_pids () {
port_dropbear=`ps aux|grep 'dropbear'|awk NR==1|awk '{print $17;}'`
log=/var/log/auth.log
loginsukses='Password auth succeeded'
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
echo "$user $PID $waktu"
fi
done
}
mostrar_usuarios () {
for u in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
echo "$u"
done
}
function_onlines () {
users=$(cat /etc/passwd|grep 'home'|grep 'false'|grep -v 'syslog'|awk -F ':' '{print $1}')
dpids=$(dropbear_pids)
time=$(date +%s)
[[ -e /etc/openvpn/openvpn-status.log ]] && ovpn_log=$(cat /etc/openvpn/openvpn-status.log)
n='0'
i='0'
conect='0'
for _user in $(mostrar_usuarios); do
[[ -z "$(ps -u $_user|grep sshd)" ]] && sqd=0 || sqd=1
[[ -z "$(echo $ovpn_log|grep -E ,"$_user",)" ]] && ovp=0 || ovp=1
[[ -z "$(echo $dpids|grep -w "$_user")" ]] && drop=0 || drop=1
conex=$(($sqd + $ovp + $drop))
[[ $conex -ne 0 ]] && let conect++
if [[ $(chage -l $_user |grep 'Account expires' |awk -F ': ' '{print $2}') != never ]]; then
[[ $time -gt $(date '+%s' -d "$(chage -l $_user |grep "Account expires" |awk -F ': ' '{print $2}')") ]] && let n++
fi
done
_tuser=$(echo "$users"|sed '/^$/d'|wc -l)
#echo "${conect}" > /etc/adm-lite/onlines
#echo "${n}" > /etc/adm-lite/vencidos
#echo "${_tuser}" > /etc/adm-lite/total
}
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)
[[ "$us" != "0" ]] && echo "$userovpn"
done
}
function_usertime () {
declare -A data
declare -A time
declare -A time2
declare -A timefinal
tempousers="./tempo_conexao"
usr_pids_var="./userDIR"
[[ ! -e $tempousers ]] && touch $tempousers
_data_now=$(date +%s)
for user in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
unset ssh
[[ -e $usr_pids_var/$user.pid ]] && source $usr_pids_var/$user.pid
ssh+="$(ps -u $user | grep sshd |wc -l)+"
ssh+="$(dropbear_pids | grep "$user" | wc -l)+"
[[ -e /etc/openvpn/server.conf ]] && ssh+="$(fun_ovpn_onl | grep "$user" | wc -l)+"
ssh+="0"
user_pid=$(echo $ssh|bc)
if [ "$user_pid" -gt "0" ]; then
[[ "${data[$user]}" = "" ]] && data[$user]="$_data_now"
fi
if [ "$user_pid" = "0" ]; then
unset data[$user]
[[ -e "$usr_pids_var/$user.pid" ]] && rm -f $usr_pids_var/$user.pid
[[ -e $usr_pids_var/$user.pid2 ]] && rm -f $usr_pids_var/$user.pid2
fi
if [ "${data[$user]}" != "" ]; then
time[$user]=$(($_data_now - ${data[$user]}))
time2[$user]=$(cat $tempousers | grep "$user" | awk '{print $2}')
[[ "${time2[$user]}" = "" ]] && time2[$user]="0"
timefinal[$user]=$((${time2[$user]} + ${time[$user]}))
_arquivo=$(cat $tempousers |grep -v "$user")
echo "$_arquivo" > $tempousers
echo "$user ${timefinal[$user]}" >> $tempousers
echo "data[$user]=$_data_now" > $usr_pids_var/$user.pid
fi
done
}
fun_net () {
(
log_1="/tmp/tcpdump"
log_2="/tmp/tcpdumpLOG"
usr_dir="/etc/adm-lite/userDIR/usr_cnx"
[[ -e "$log_1" ]] && mv -f $log_1 $log_2
[[ ! -e $usr_dir ]] && touch $usr_dir
#ENCERRA TCP
for pd in `ps x | grep tcpdump | grep -v grep | awk '{print $1}'`; do
kill -9 $pd &> /dev/null
done
#INICIA TCP
tcpdump -s 50 -n &> /dev/null
#ANALIZA USER
for user in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
touch /tmp/$user
ip_openssh $user > /dev/null 2>&1
ip_drop $user > /dev/null 2>&1
sed -i '/^$/d' /tmp/$user
pacotes=$(paste -sd+ /tmp/$user | bc)
rm /tmp/$user
if [ "$pacotes" != "" ]; then
if [ "$(cat $usr_dir | grep "$user")" != "" ]; then
pacotesuser=$(cat $usr_dir | grep "$user" | awk '{print $2}')
[[ $pacotesuser = "" ]] && pacotesuser=0
[[ $pacotesuser != +([0-9]) ]] && pacotesuser=0
ussrvar=$(cat $usr_dir | grep -v "$user")
echo "$ussrvar" > $usr_dir
pacotes=$(($pacotes+$pacotesuser))
echo -e "$user $pacotes" >> $usr_dir
else
echo -e "$user $pacotes" >> $usr_dir
fi
fi
unset pacotes
done
) &
}
ip_openssh () {
user="$1"
for ip in `lsof -u $user -P -n | grep "ESTABLISHED" | awk -F "->" '{print $2}' |awk -F ":" '{print $1}' | grep -v "127.0.0.1"`; do
packet=$(cat $log_2 | grep "$ip" | wc -l)
echo "$packet" >> /tmp/$user
unset packet
done
}
ip_drop () {
user="$1"
loguser='Password auth succeeded'
touch /tmp/drop
for ip in `cat /var/log/auth.log | tail -100 | grep "$user" | grep "$loguser" | awk -F "from" '{print $2}' | awk -F ":" '{print $1}'`; do
if [ "$(cat /tmp/drop | grep "$ip")" = "" ]; then
packet=$(cat $log_2 | grep "$ip" | wc -l)
echo "$packet" >> /tmp/$user
echo "$ip" >> /tmp/drop
fi
done
rm /tmp/drop
}
function_onlines > /dev/null 2>&1
#function_usertime > /dev/null 2>&1
#fun_net > /dev/null 2>&1
killall verifica > /dev/null 2>&1

278
Bot/update/PDirect.py Normal file
View File

@ -0,0 +1,278 @@
# -*- coding: utf-8 -*-
import socket, threading, thread, select, signal, sys, time, getopt, argparse
parser = argparse.ArgumentParser()
parser.add_argument("-l", "--local", help="Nombre de archivo a procesar")
parser.add_argument("-p", "--port", help="Nombre de archivo a procesar")
parser.add_argument("-c", "--contr", help="Nombre de archivo a procesar")
parser.add_argument("-r", "--response", help="Nombre de archivo a procesar")
parser.add_argument("-t", "--texto", help="Nombre de archivo a procesar")
args = parser.parse_args()
#==================================
LISTENING_ADDR = '0.0.0.0'
if args.port:
LISTENING_PORT = int(args.port)
else:
print " Deve ingresar el puerto que usara como socks..."
sys.exit()
if args.contr:
PASS = str(args.contr)
else:
PASS = str()
BUFLEN = 4096 * 4
TIMEOUT = 60
if args.local:
DEFAULT_HOST = '127.0.0.1:' + args.local
else:
print " Deve seleccionar un puerto existente para redireccionar el trafico..."
sys.exit()
if args.response:
STATUS_RESP = args.response
else:
STATUS_RESP = '200'
if args.texto:
STATUS_TXT = args.texto
elif STATUS_RESP == '101':
STATUS_TXT = '<font color="red">Switching Protocols</font>'
else:
STATUS_TXT = '<font color="red">Connection established</font>'
RESPONSE = str('HTTP/1.1 ' + STATUS_RESP + ' ' + STATUS_TXT + '\r\nContent-length: 0\r\n\r\nHTTP/1.1 200 Connection established\r\n\r\n')
class Server(threading.Thread):
def __init__(self, host, port):
threading.Thread.__init__(self)
self.running = False
self.host = host
self.port = port
self.threads = []
self.threadsLock = threading.Lock()
self.logLock = threading.Lock()
def run(self):
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.host, self.port))
self.soc.listen(0)
self.running = True
try:
while self.running:
try:
c, addr = self.soc.accept()
c.setblocking(1)
except socket.timeout:
continue
conn = ConnectionHandler(c, self, addr)
conn.start()
self.addConn(conn)
finally:
self.running = False
self.soc.close()
def printLog(self, log):
self.logLock.acquire()
print log
self.logLock.release()
def addConn(self, conn):
try:
self.threadsLock.acquire()
if self.running:
self.threads.append(conn)
finally:
self.threadsLock.release()
def removeConn(self, conn):
try:
self.threadsLock.acquire()
self.threads.remove(conn)
finally:
self.threadsLock.release()
def close(self):
try:
self.running = False
self.threadsLock.acquire()
threads = list(self.threads)
for c in threads:
c.close()
finally:
self.threadsLock.release()
class ConnectionHandler(threading.Thread):
def __init__(self, socClient, server, addr):
threading.Thread.__init__(self)
self.clientClosed = False
self.targetClosed = True
self.client = socClient
self.client_buffer = ''
self.server = server
self.log = 'Connection: ' + str(addr)
def close(self):
try:
if not self.clientClosed:
self.client.shutdown(socket.SHUT_RDWR)
self.client.close()
except:
pass
finally:
self.clientClosed = True
try:
if not self.targetClosed:
self.target.shutdown(socket.SHUT_RDWR)
self.target.close()
except:
pass
finally:
self.targetClosed = True
def run(self):
try:
self.client_buffer = self.client.recv(BUFLEN)
hostPort = self.findHeader(self.client_buffer, 'X-Real-Host')
if hostPort == '':
hostPort = DEFAULT_HOST
split = self.findHeader(self.client_buffer, 'X-Split')
if split != '':
self.client.recv(BUFLEN)
if hostPort != '':
passwd = self.findHeader(self.client_buffer, 'X-Pass')
if len(PASS) != 0 and passwd == PASS:
self.method_CONNECT(hostPort)
elif len(PASS) != 0 and passwd != PASS:
self.client.send('HTTP/1.1 400 WrongPass!\r\n\r\n')
elif hostPort.startswith('127.0.0.1') or hostPort.startswith('localhost'):
self.method_CONNECT(hostPort)
else:
self.client.send('HTTP/1.1 403 Forbidden!\r\n\r\n')
else:
print '- No X-Real-Host!'
self.client.send('HTTP/1.1 400 NoXRealHost!\r\n\r\n')
except Exception as e:
self.log += ' - error: ' + e.strerror
self.server.printLog(self.log)
pass
finally:
self.close()
self.server.removeConn(self)
def findHeader(self, head, header):
aux = head.find(header + ': ')
if aux == -1:
return ''
aux = head.find(':', aux)
head = head[aux+2:]
aux = head.find('\r\n')
if aux == -1:
return ''
return head[:aux];
def connect_target(self, host):
i = host.find(':')
if i != -1:
port = int(host[i+1:])
host = host[:i]
else:
if self.method=='CONNECT':
port = 443
else:
port = 80
port = 8080
port = 8799
port = 3128
(soc_family, soc_type, proto, _, address) = socket.getaddrinfo(host, port)[0]
self.target = socket.socket(soc_family, soc_type, proto)
self.targetClosed = False
self.target.connect(address)
def method_CONNECT(self, path):
self.log += ' - CONNECT ' + path
self.connect_target(path)
self.client.sendall(RESPONSE)
self.client_buffer = ''
self.server.printLog(self.log)
self.doCONNECT()
def doCONNECT(self):
socs = [self.client, self.target]
count = 0
error = False
while True:
count += 1
(recv, _, err) = select.select(socs, [], socs, 3)
if err:
error = True
if recv:
for in_ in recv:
try:
data = in_.recv(BUFLEN)
if data:
if in_ is self.target:
self.client.send(data)
else:
while data:
byte = self.target.send(data)
data = data[byte:]
count = 0
else:
break
except:
error = True
break
if count == TIMEOUT:
error = True
if error:
break
def main(host=LISTENING_ADDR, port=LISTENING_PORT):
print "\n:-------PythonProxy-------:\n"
print "Listening addr: " + LISTENING_ADDR
print "Listening port: " + str(LISTENING_PORT) + "\n"
print ":-------------------------:\n"
server = Server(LISTENING_ADDR, LISTENING_PORT)
server.start()
while True:
try:
time.sleep(2)
except KeyboardInterrupt:
print 'Stopping...'
server.close()
break
if __name__ == '__main__':
main()

682
Bot/update/PGet.py Normal file
View File

@ -0,0 +1,682 @@
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()

313
Bot/update/POpen.py Normal file
View File

@ -0,0 +1,313 @@
#!/usr/bin/env python
import sys
import httplib
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from threading import Lock, Timer
from cStringIO import StringIO
from urlparse import urlsplit
import socket
import select
import gzip
import zlib
import re
import traceback
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
address_family = socket.AF_INET
def handle_error(self, request, client_address):
print >>sys.stderr, '-'*40
print >>sys.stderr, 'Exception happened during processing of request from', client_address
traceback.print_exc()
print >>sys.stderr, '-'*40
class ThreadingHTTPServer6(ThreadingHTTPServer):
address_family = socket.AF_INET6
class SimpleHTTPProxyHandler(BaseHTTPRequestHandler):
global_lock = Lock()
conn_table = {}
timeout = 300
upstream_timeout = 300
proxy_via = None
def log_error(self, format, *args):
if format == "Request timed out: %r":
return
self.log_message(format, *args)
def do_CONNECT(self):
req = self
reqbody = None
req.path = "https://%s/" % req.path.replace(':443', '')
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
u = urlsplit(req.path)
address = (u.hostname, u.port or 443)
try:
conn = socket.create_connection(address)
except socket.error:
return
self.send_response(200, 'SOCKS5')
self.send_header('Connection', 'close')
self.end_headers()
conns = [self.connection, conn]
keep_connection = True
while keep_connection:
keep_connection = False
rlist, wlist, xlist = select.select(conns, [], conns, self.timeout)
if xlist:
break
for r in rlist:
other = conns[1] if r is conns[0] else conns[0]
data = r.recv(8192)
if data:
other.sendall(data)
keep_connection = True
conn.close()
def do_HEAD(self):
self.do_SPAM()
def do_GET(self):
self.do_SPAM()
def do_POST(self):
self.do_SPAM()
def do_SPAM(self):
req = self
content_length = int(req.headers.get('Content-Length', 0))
if content_length > 0:
reqbody = self.rfile.read(content_length)
else:
reqbody = None
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
elif replaced_reqbody is not None:
reqbody = replaced_reqbody
if 'Content-Length' in req.headers:
req.headers['Content-Length'] = str(len(reqbody))
self.remove_hop_by_hop_headers(req.headers)
if self.upstream_timeout:
req.headers['Connection'] = 'Keep-Alive'
else:
req.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(req.headers)
try:
res, resdata = self.request_to_upstream_server(req, reqbody)
except socket.error:
return
content_encoding = res.headers.get('Content-Encoding', 'identity')
resbody = self.decode_content_body(resdata, content_encoding)
replaced_resbody = self.response_handler(req, reqbody, res, resbody)
if replaced_resbody is True:
return
elif replaced_resbody is not None:
resdata = self.encode_content_body(replaced_resbody, content_encoding)
if 'Content-Length' in res.headers:
res.headers['Content-Length'] = str(len(resdata))
resbody = replaced_resbody
self.remove_hop_by_hop_headers(res.headers)
if self.timeout:
res.headers['Connection'] = 'Keep-Alive'
else:
res.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(res.headers)
self.send_response(res.status, res.reason)
for k, v in res.headers.items():
if k == 'set-cookie':
for value in self.split_set_cookie_header(v):
self.send_header(k, value)
else:
self.send_header(k, v)
self.end_headers()
if self.command != 'HEAD':
self.wfile.write(resdata)
with self.global_lock:
self.save_handler(req, reqbody, res, resbody)
def request_to_upstream_server(self, req, reqbody):
u = urlsplit(req.path)
origin = (u.scheme, u.netloc)
req.headers['Host'] = u.netloc
selector = "%s?%s" % (u.path, u.query) if u.query else u.path
while True:
with self.lock_origin(origin):
conn = self.open_origin(origin)
try:
conn.request(req.command, selector, reqbody, headers=dict(req.headers))
except socket.error:
self.close_origin(origin)
raise
try:
res = conn.getresponse(buffering=True)
except httplib.BadStatusLine as e:
if e.line == "''":
self.close_origin(origin)
continue
else:
raise
resdata = res.read()
res.headers = res.msg
if not self.upstream_timeout or 'close' in res.headers.get('Connection', ''):
self.close_origin(origin)
else:
self.reset_timer(origin)
return res, resdata
def lock_origin(self, origin):
d = self.conn_table.setdefault(origin, {})
if not 'lock' in d:
d['lock'] = Lock()
return d['lock']
def open_origin(self, origin):
conn = self.conn_table[origin].get('connection')
if not conn:
scheme, netloc = origin
if scheme == 'https':
conn = httplib.HTTPSConnection(netloc)
else:
conn = httplib.HTTPConnection(netloc)
self.reset_timer(origin)
self.conn_table[origin]['connection'] = conn
return conn
def reset_timer(self, origin):
timer = self.conn_table[origin].get('timer')
if timer:
timer.cancel()
if self.upstream_timeout:
timer = Timer(self.upstream_timeout, self.close_origin, args=[origin])
timer.daemon = True
timer.start()
else:
timer = None
self.conn_table[origin]['timer'] = timer
def close_origin(self, origin):
timer = self.conn_table[origin]['timer']
if timer:
timer.cancel()
conn = self.conn_table[origin]['connection']
conn.close()
del self.conn_table[origin]['connection']
def remove_hop_by_hop_headers(self, headers):
hop_by_hop_headers = ['Connection', 'Keep-Alive', 'Proxy-Authenticate', 'Proxy-Authorization', 'TE', 'Trailers', 'Trailer', 'Transfer-Encoding', 'Upgrade']
connection = headers.get('Connection')
if connection:
keys = re.split(r',\s*', connection)
hop_by_hop_headers.extend(keys)
for k in hop_by_hop_headers:
if k in headers:
del headers[k]
def modify_via_header(self, headers):
via_string = "%s %s" % (self.protocol_version, self.proxy_via)
via_string = re.sub(r'^HTTP/', '', via_string)
original = headers.get('Via')
if original:
headers['Via'] = original + ', ' + via_string
else:
headers['Via'] = via_string
def decode_content_body(self, data, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO(data)
with gzip.GzipFile(fileobj=io) as f:
body = f.read()
elif content_encoding == 'deflate':
body = zlib.decompress(data)
elif content_encoding == 'identity':
body = data
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return body
def encode_content_body(self, body, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO()
with gzip.GzipFile(fileobj=io, mode='wb') as f:
f.write(body)
data = io.getvalue()
elif content_encoding == 'deflate':
data = zlib.compress(body)
elif content_encoding == 'identity':
data = body
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return data
def split_set_cookie_header(self, value):
re_cookies = r'([^=]+=[^,;]+(?:;\s*Expires=[^,]+,[^,;]+|;[^,;]+)*)(?:,\s*)?'
return re.findall(re_cookies, value, flags=re.IGNORECASE)
def request_handler(self, req, reqbody):
pass
def response_handler(self, req, reqbody, res, resbody):
pass
def save_handler(self, req, reqbody, res, resbody):
pass
# Port
def test(HandlerClass=SimpleHTTPProxyHandler, ServerClass=ThreadingHTTPServer, protocol="HTTP/1.1"):
if sys.argv[1:]:
port = int(sys.argv[1])
else:
port = 80
server_address = ('', port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()
if __name__ == '__main__':
test()

335
Bot/update/PPriv.py Normal file
View File

@ -0,0 +1,335 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Edit By GlEmYsSoN & @e8th4ever
from pprint import pprint
import sys
import http.client
from socketserver import ThreadingMixIn
from http.server import HTTPServer, BaseHTTPRequestHandler
from threading import Lock, Timer
from io import StringIO
from urllib.parse import urlsplit
import socket
import select
import gzip
import zlib
import re
import traceback
import subprocess
subprocess.call("clear",shell=True)
if sys.argv[2:]:
msg1 = sys.argv[2]
else:
msg1 = 'ADM-ULTIMATE'
if sys.argv[3:]:
server = sys.argv[3]
else:
server = "127.0.0.1"
msg2 = 'Server Forbidden'
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
address_family = socket.AF_INET
def handle_error(self, request, client_address):
print('-'*40, file=sys.stderr)
print('Exception happened during processing of request from', client_address, file=sys.stderr)
traceback.print_exc()
print('-'*40, file=sys.stderr)
class ThreadingHTTPServer6(ThreadingHTTPServer):
address_family = socket.AF_INET6
class SimpleHTTPProxyHandler(BaseHTTPRequestHandler):
global_lock = Lock()
conn_table = {}
timeout = 300
upstream_timeout = 300
proxy_via = None
def log_error(self, format, *args):
if format == "Request timed out: %r":
return
self.log_message(format, *args)
def do_CONNECT(self):
req = self
reqbody = None
if ':22' in req.path:
hostip = req.path.replace(':22', '')
elif ':443' in req.path:
hostip = req.path.replace(':443', '')
req.path = "https://%s/" % req.path.replace(':443', '')
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
u = urlsplit(req.path)
address = (u.hostname, u.port or 443)
try:
conn = socket.create_connection(address)
except socket.error:
return
self.send_response(200, msg1)
self.send_header('Connection', 'close')
self.end_headers()
conns = [self.connection, conn]
keep_connection = True
while keep_connection:
if not server.find(hostip) != -1:
self.send_error(403, msg2)
self.close_connection
keep_connection = False
rlist, wlist, xlist = select.select(conns, [], conns, self.timeout)
if xlist:
break
for r in rlist:
other = conns[1] if r is conns[0] else conns[0]
data = r.recv(8192)
if data:
other.sendall(data)
keep_connection = True
conn.close()
def do_HEAD(self):
self.do_SPAM()
def do_GET(self):
self.do_SPAM()
def do_POST(self):
self.do_SPAM()
def do_SPAM(self):
req = self
content_length = int(req.headers.get('Content-Length', 0))
if content_length > 0:
reqbody = self.rfile.read(content_length)
else:
reqbody = None
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
elif replaced_reqbody is not None:
reqbody = replaced_reqbody
if 'Content-Length' in req.headers:
req.headers['Content-Length'] = str(len(reqbody))
self.remove_hop_by_hop_headers(req.headers)
if self.upstream_timeout:
req.headers['Connection'] = 'Keep-Alive'
else:
req.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(req.headers)
try:
res, resdata = self.request_to_upstream_server(req, reqbody)
except socket.error:
return
content_encoding = res.headers.get('Content-Encoding', 'identity')
resbody = self.decode_content_body(resdata, content_encoding)
replaced_resbody = self.response_handler(req, reqbody, res, resbody)
if replaced_resbody is True:
return
elif replaced_resbody is not None:
resdata = self.encode_content_body(replaced_resbody, content_encoding)
if 'Content-Length' in res.headers:
res.headers['Content-Length'] = str(len(resdata))
resbody = replaced_resbody
self.remove_hop_by_hop_headers(res.headers)
if self.timeout:
res.headers['Connection'] = 'Keep-Alive'
else:
res.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(res.headers)
self.send_response(res.status, res.reason)
for k, v in list(res.headers.items()):
if k == 'set-cookie':
for value in self.split_set_cookie_header(v):
self.send_header(k, value)
else:
self.send_header(k, v)
self.end_headers()
if self.command != 'HEAD':
self.wfile.write(resdata)
with self.global_lock:
self.save_handler(req, reqbody, res, resbody)
def request_to_upstream_server(self, req, reqbody):
u = urlsplit(req.path)
origin = (u.scheme, u.netloc)
req.headers['Host'] = u.netloc
selector = "%s?%s" % (u.path, u.query) if u.query else u.path
while True:
with self.lock_origin(origin):
conn = self.open_origin(origin)
try:
conn.request(req.command, selector, reqbody, headers=dict(req.headers))
except socket.error:
self.close_origin(origin)
raise
try:
res = conn.getresponse(buffering=True)
except http.client.BadStatusLine as e:
if e.line == "''":
self.close_origin(origin)
continue
else:
raise
resdata = res.read()
res.headers = res.msg
if not self.upstream_timeout or 'close' in res.headers.get('Connection', ''):
self.close_origin(origin)
else:
self.reset_timer(origin)
return res, resdata
def lock_origin(self, origin):
d = self.conn_table.setdefault(origin, {})
if not 'lock' in d:
d['lock'] = Lock()
return d['lock']
def open_origin(self, origin):
conn = self.conn_table[origin].get('connection')
if not conn:
scheme, netloc = origin
if scheme == 'https':
conn = http.client.HTTPSConnection(netloc)
else:
conn = http.client.HTTPConnection(netloc)
self.reset_timer(origin)
self.conn_table[origin]['connection'] = conn
return conn
def reset_timer(self, origin):
timer = self.conn_table[origin].get('timer')
if timer:
timer.cancel()
if self.upstream_timeout:
timer = Timer(self.upstream_timeout, self.close_origin, args=[origin])
timer.daemon = True
timer.start()
else:
timer = None
self.conn_table[origin]['timer'] = timer
def close_origin(self, origin):
timer = self.conn_table[origin]['timer']
if timer:
timer.cancel()
conn = self.conn_table[origin]['connection']
conn.close()
del self.conn_table[origin]['connection']
def remove_hop_by_hop_headers(self, headers):
hop_by_hop_headers = ['Connection', 'Keep-Alive', 'Proxy-Authenticate', 'Proxy-Authorization', 'TE', 'Trailers', 'Trailer', 'Transfer-Encoding', 'Upgrade']
connection = headers.get('Connection')
if connection:
keys = re.split(r',\s*', connection)
hop_by_hop_headers.extend(keys)
for k in hop_by_hop_headers:
if k in headers:
del headers[k]
def modify_via_header(self, headers):
via_string = "%s %s" % (self.protocol_version, self.proxy_via)
via_string = re.sub(r'^HTTP/', '', via_string)
original = headers.get('Via')
if original:
headers['Via'] = original + ', ' + via_string
else:
headers['Via'] = via_string
def decode_content_body(self, data, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO(data)
with gzip.GzipFile(fileobj=io) as f:
body = f.read()
elif content_encoding == 'deflate':
body = zlib.decompress(data)
elif content_encoding == 'identity':
body = data
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return body
def encode_content_body(self, body, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO()
with gzip.GzipFile(fileobj=io, mode='wb') as f:
f.write(body)
data = io.getvalue()
elif content_encoding == 'deflate':
data = zlib.compress(body)
elif content_encoding == 'identity':
data = body
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return data
def split_set_cookie_header(self, value):
re_cookies = r'([^=]+=[^,;]+(?:;\s*Expires=[^,]+,[^,;]+|;[^,;]+)*)(?:,\s*)?'
return re.findall(re_cookies, value, flags=re.IGNORECASE)
def request_handler(self, req, reqbody):
pass
def response_handler(self, req, reqbody, res, resbody):
pass
def save_handler(self, req, reqbody, res, resbody):
pass
def test(HandlerClass=SimpleHTTPProxyHandler, ServerClass=ThreadingHTTPServer, protocol="HTTP/1.1"):
port = int(sys.argv[1])
server_address = ('', port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print("Servidor: " + str(sa[0]) + " Porta " + str(sa[1]))
httpd.serve_forever()
if __name__ == '__main__':
test()

318
Bot/update/PPub.py Normal file
View File

@ -0,0 +1,318 @@
#!/usr/bin/env python
import sys
import httplib
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from threading import Lock, Timer
from cStringIO import StringIO
from urlparse import urlsplit
import socket
import select
import gzip
import zlib
import re
import traceback
if sys.argv[2:]:
msg1 = sys.argv[2]
else:
msg1 = "ADM-ULTIMATE"
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
address_family = socket.AF_INET
def handle_error(self, request, client_address):
print >>sys.stderr, '-'*40
print >>sys.stderr, 'Exception happened during processing of request from', client_address
traceback.print_exc()
print >>sys.stderr, '-'*40
class ThreadingHTTPServer6(ThreadingHTTPServer):
address_family = socket.AF_INET6
class SimpleHTTPProxyHandler(BaseHTTPRequestHandler):
global_lock = Lock()
conn_table = {}
timeout = 300
upstream_timeout = 300
proxy_via = None
def log_error(self, format, *args):
if format == "Request timed out: %r":
return
self.log_message(format, *args)
def do_CONNECT(self):
req = self
reqbody = None
req.path = "https://%s/" % req.path.replace(':443', '')
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
u = urlsplit(req.path)
address = (u.hostname, u.port or 443)
try:
conn = socket.create_connection(address)
except socket.error:
return
self.send_response(200, msg1)
self.send_header('Connection', 'close')
self.end_headers()
conns = [self.connection, conn]
keep_connection = True
while keep_connection:
keep_connection = False
rlist, wlist, xlist = select.select(conns, [], conns, self.timeout)
if xlist:
break
for r in rlist:
other = conns[1] if r is conns[0] else conns[0]
data = r.recv(8192)
if data:
other.sendall(data)
keep_connection = True
conn.close()
def do_HEAD(self):
self.do_SPAM()
def do_GET(self):
self.do_SPAM()
def do_POST(self):
self.do_SPAM()
def do_SPAM(self):
req = self
content_length = int(req.headers.get('Content-Length', 0))
if content_length > 0:
reqbody = self.rfile.read(content_length)
else:
reqbody = None
replaced_reqbody = self.request_handler(req, reqbody)
if replaced_reqbody is True:
return
elif replaced_reqbody is not None:
reqbody = replaced_reqbody
if 'Content-Length' in req.headers:
req.headers['Content-Length'] = str(len(reqbody))
self.remove_hop_by_hop_headers(req.headers)
if self.upstream_timeout:
req.headers['Connection'] = 'Keep-Alive'
else:
req.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(req.headers)
try:
res, resdata = self.request_to_upstream_server(req, reqbody)
except socket.error:
return
content_encoding = res.headers.get('Content-Encoding', 'identity')
resbody = self.decode_content_body(resdata, content_encoding)
replaced_resbody = self.response_handler(req, reqbody, res, resbody)
if replaced_resbody is True:
return
elif replaced_resbody is not None:
resdata = self.encode_content_body(replaced_resbody, content_encoding)
if 'Content-Length' in res.headers:
res.headers['Content-Length'] = str(len(resdata))
resbody = replaced_resbody
self.remove_hop_by_hop_headers(res.headers)
if self.timeout:
res.headers['Connection'] = 'Keep-Alive'
else:
res.headers['Connection'] = 'close'
if self.proxy_via:
self.modify_via_header(res.headers)
self.send_response(res.status, res.reason)
for k, v in res.headers.items():
if k == 'set-cookie':
for value in self.split_set_cookie_header(v):
self.send_header(k, value)
else:
self.send_header(k, v)
self.end_headers()
if self.command != 'HEAD':
self.wfile.write(resdata)
with self.global_lock:
self.save_handler(req, reqbody, res, resbody)
def request_to_upstream_server(self, req, reqbody):
u = urlsplit(req.path)
origin = (u.scheme, u.netloc)
req.headers['Host'] = u.netloc
selector = "%s?%s" % (u.path, u.query) if u.query else u.path
while True:
with self.lock_origin(origin):
conn = self.open_origin(origin)
try:
conn.request(req.command, selector, reqbody, headers=dict(req.headers))
except socket.error:
self.close_origin(origin)
raise
try:
res = conn.getresponse(buffering=True)
except httplib.BadStatusLine as e:
if e.line == "''":
self.close_origin(origin)
continue
else:
raise
resdata = res.read()
res.headers = res.msg
if not self.upstream_timeout or 'close' in res.headers.get('Connection', ''):
self.close_origin(origin)
else:
self.reset_timer(origin)
return res, resdata
def lock_origin(self, origin):
d = self.conn_table.setdefault(origin, {})
if not 'lock' in d:
d['lock'] = Lock()
return d['lock']
def open_origin(self, origin):
conn = self.conn_table[origin].get('connection')
if not conn:
scheme, netloc = origin
if scheme == 'https':
conn = httplib.HTTPSConnection(netloc)
else:
conn = httplib.HTTPConnection(netloc)
self.reset_timer(origin)
self.conn_table[origin]['connection'] = conn
return conn
def reset_timer(self, origin):
timer = self.conn_table[origin].get('timer')
if timer:
timer.cancel()
if self.upstream_timeout:
timer = Timer(self.upstream_timeout, self.close_origin, args=[origin])
timer.daemon = True
timer.start()
else:
timer = None
self.conn_table[origin]['timer'] = timer
def close_origin(self, origin):
timer = self.conn_table[origin]['timer']
if timer:
timer.cancel()
conn = self.conn_table[origin]['connection']
conn.close()
del self.conn_table[origin]['connection']
def remove_hop_by_hop_headers(self, headers):
hop_by_hop_headers = ['Connection', 'Keep-Alive', 'Proxy-Authenticate', 'Proxy-Authorization', 'TE', 'Trailers', 'Trailer', 'Transfer-Encoding', 'Upgrade']
connection = headers.get('Connection')
if connection:
keys = re.split(r',\s*', connection)
hop_by_hop_headers.extend(keys)
for k in hop_by_hop_headers:
if k in headers:
del headers[k]
def modify_via_header(self, headers):
via_string = "%s %s" % (self.protocol_version, self.proxy_via)
via_string = re.sub(r'^HTTP/', '', via_string)
original = headers.get('Via')
if original:
headers['Via'] = original + ', ' + via_string
else:
headers['Via'] = via_string
def decode_content_body(self, data, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO(data)
with gzip.GzipFile(fileobj=io) as f:
body = f.read()
elif content_encoding == 'deflate':
body = zlib.decompress(data)
elif content_encoding == 'identity':
body = data
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return body
def encode_content_body(self, body, content_encoding):
if content_encoding in ('gzip', 'x-gzip'):
io = StringIO()
with gzip.GzipFile(fileobj=io, mode='wb') as f:
f.write(body)
data = io.getvalue()
elif content_encoding == 'deflate':
data = zlib.compress(body)
elif content_encoding == 'identity':
data = body
else:
raise Exception("Unknown Content-Encoding: %s" % content_encoding)
return data
def split_set_cookie_header(self, value):
re_cookies = r'([^=]+=[^,;]+(?:;\s*Expires=[^,]+,[^,;]+|;[^,;]+)*)(?:,\s*)?'
return re.findall(re_cookies, value, flags=re.IGNORECASE)
def request_handler(self, req, reqbody):
pass
def response_handler(self, req, reqbody, res, resbody):
pass
def save_handler(self, req, reqbody, res, resbody):
pass
def test(HandlerClass=SimpleHTTPProxyHandler, ServerClass=ThreadingHTTPServer, protocol="HTTP/1.1"):
if sys.argv[1:]:
port = int(sys.argv[1])
else:
port = 8799
server_address = ('', port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()
if __name__ == '__main__':
test()

5
Bot/update/cabecalho Normal file

File diff suppressed because one or more lines are too long

474
Bot/update/fai2ban Normal file
View File

@ -0,0 +1,474 @@
#!/bin/bash
failtwoban=$(dpkg -l | grep fail2ban | grep ii)
apache=$(dpkg -l | grep apache2 | grep ii)
squid=$(dpkg -l | grep squid | grep ii)
dropbear=$(dpkg -l | grep dropbear | grep ii)
openssh=$(dpkg -l | grep openssh | grep ii)
if [ "$openssh" != "" ]; then
s1="ssh"
fi
if [ "$squid" != "" ]; then
s2="squid"
fi
if [ "$dropbear" != "" ]; then
s3="dropbear"
fi
if [ "$apache" != "" ]; then
s4="apache"
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
#FUN_BAR
fun_bar () {
comando="$1"
_=$(
$comando > /dev/null 2>&1
) & > /dev/null
pid=$!
while [[ -d /proc/$pid ]]; do
echo -ne " \033[1;33m["
for((i=0; i<10; i++)); do
echo -ne "\033[1;31m##"
sleep 0.2
done
echo -ne "\033[1;33m]"
sleep 1s
echo
tput cuu1
tput dl1
done
echo -e " \033[1;33m[\033[1;31m####################\033[1;33m] - \033[1;32m100%\033[0m"
sleep 1s
}
fail2ban_function () {
if [ "$failtwoban" != "" ]; then
echo -e "${cor[4]} ${txt[143]}"
echo -e "${cor[2]} |1| >${cor[3]} ${txt[144]}"
echo -e "${cor[2]} |2| >${cor[3]} ${txt[145]}"
echo -e "${cor[1]} =================================== ${cor[0]}"
read -p " [1|2]: " lo_og
if [ "$lo_og" = "2" ]; then
cat /var/log/fail2ban.log
fi
if [ "$lo_og" = "1" ]; then
echo -e "${cor[1]} =================================== \033[1;37m"
fun_bar "apt-get remove fail2ban -y"
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
return
fi
echo -e "${cor[5]} ${txt[146]}"
echo -e "${cor[5]} ${txt[147]}"
echo -e "${cor[5]} ${txt[148]}"
echo -e "${cor[5]} ${txt[149]}"
echo -e "${cor[5]} ${txt[150]}"
echo -e "${cor[5]} ${txt[151]}"
echo -e "${cor[5]} ${txt[152]}"
echo -e "${cor[1]} =================================== \033[1;37m"
read -p " [S/N]: " fail2ban
if [[ "$fail2ban" = "s" || "$fail2ban" = "S" ]]; then
echo -e "${cor[1]} =================================== \033[1;37m"
fun_bar "apt-get install fail2ban -y"
cd $HOME
wget -O fail2ban https://github.com/ChumoGH/chumogh-gmail.com/raw/master/fail2ban-0.9.4.tar.gz -o /dev/null
tar -xf $HOME/fail2ban
cd $HOME/fail2ban-0.9.4
fun_bar "./setup.py install"
echo '[INCLUDES]
before = paths-debian.conf
[DEFAULT]
ignoreip = 127.0.0.1/8
# ignorecommand = /path/to/command <ip>
ignorecommand =
bantime = 1036800
findtime = 3600
maxretry = 5
backend = auto
usedns = warn
logencoding = auto
enabled = false
filter = %(__name__)s
destemail = root@localhost
sender = root@localhost
mta = sendmail
protocol = tcp
chain = INPUT
port = 0:65535
fail2ban_agent = Fail2Ban/%(fail2ban_version)s
banaction = iptables-multiport
banaction_allports = iptables-allports
action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]
action_mwl = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
action_xarf = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]
action_cf_mwl = cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"]
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
action_blocklist_de = blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]
action_badips = badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]
action_badips_report = badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]
action = %(action_)s' > /etc/fail2ban/jail.local
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[153]}"
echo -e "${cor[5]} ${txt[154]}"
if [ "$s1" != "" ]; then
echo -ne " $s1"
fi
if [ "$s2" != "" ]; then
echo -ne " $s2"
fi
if [ "$s3" != "" ]; then
echo -ne " $s3"
fi
if [ "$s4" != "" ]; then
echo -ne " $s4"
fi
echo -e ""
echo -e "${cor[1]} =================================== ${cor[0]}"
echo -e "${cor[5]} ${txt[155]}"
read -p " [S/N]: " sim_nao
if [[ "$sim_nao" = "s" || "$sim_nao" = "S" ]]; then
if [ "$s1" != "" ]; then
echo '[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[sshd-ddos]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s' >> /etc/fail2ban/jail.local
else
echo '[sshd]
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[sshd-ddos]
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s' >> /etc/fail2ban/jail.local
fi
if [ "$s2" != "" ]; then
echo '[squid]
enabled = true
port = 80,443,3128,8080
logpath = /var/log/squid/access.log' >> /etc/fail2ban/jail.local
else
echo '[squid]
port = 80,443,3128,8080
logpath = /var/log/squid/access.log' >> /etc/fail2ban/jail.local
fi
if [ "$s3" != "" ]; then
echo '[dropbear]
enabled = true
port = ssh
logpath = %(dropbear_log)s
backend = %(dropbear_backend)s' >> /etc/fail2ban/jail.local
else
echo '[dropbear]
port = ssh
logpath = %(dropbear_log)s
backend = %(dropbear_backend)s' >> /etc/fail2ban/jail.local
fi
if [ "$s4" != "" ]; then
echo '[apache-auth]
enabled = true
port = http,https
logpath = %(apache_error_log)s' >> /etc/fail2ban/jail.local
else
echo '[apache-auth]
port = http,https
logpath = %(apache_error_log)s' >> /etc/fail2ban/jail.local
fi
echo '[selinux-ssh]
port = ssh
logpath = %(auditd_log)s
[apache-badbots]
port = http,https
logpath = %(apache_access_log)s
bantime = 172800
maxretry = 1
[apache-noscript]
port = http,https
logpath = %(apache_error_log)s
[apache-overflows]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-nohome]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-botsearch]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-fakegooglebot]
port = http,https
logpath = %(apache_access_log)s
maxretry = 1
ignorecommand = %(ignorecommands_dir)s/apache-fakegooglebot <ip>
[apache-modsecurity]
port = http,https
logpath = %(apache_error_log)s
maxretry = 2
[apache-shellshock]
port = http,https
logpath = %(apache_error_log)s
maxretry = 1
[openhab-auth]
filter = openhab
action = iptables-allports[name=NoAuthFailures]
logpath = /opt/openhab/logs/request.log
[nginx-http-auth]
port = http,https
logpath = %(nginx_error_log)s
[nginx-limit-req]
port = http,https
logpath = %(nginx_error_log)s
[nginx-botsearch]
port = http,https
logpath = %(nginx_error_log)s
maxretry = 2
[php-url-fopen]
port = http,https
logpath = %(nginx_access_log)s
%(apache_access_log)s
[suhosin]
port = http,https
logpath = %(suhosin_log)s
[lighttpd-auth]
port = http,https
logpath = %(lighttpd_error_log)s
[roundcube-auth]
port = http,https
logpath = %(roundcube_errors_log)s
[openwebmail]
port = http,https
logpath = /var/log/openwebmail.log
[horde]
port = http,https
logpath = /var/log/horde/horde.log
[groupoffice]
port = http,https
logpath = /home/groupoffice/log/info.log
[sogo-auth]
port = http,https
logpath = /var/log/sogo/sogo.log
[tine20]
logpath = /var/log/tine20/tine20.log
port = http,https
[drupal-auth]
port = http,https
logpath = %(syslog_daemon)s
backend = %(syslog_backend)s
[guacamole]
port = http,https
logpath = /var/log/tomcat*/catalina.out
[monit]
#Ban clients brute-forcing the monit gui login
port = 2812
logpath = /var/log/monit
[webmin-auth]
port = 10000
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[froxlor-auth]
port = http,https
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[3proxy]
port = 3128
logpath = /var/log/3proxy.log
[proftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(proftpd_log)s
backend = %(proftpd_backend)s
[pure-ftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(pureftpd_log)s
backend = %(pureftpd_backend)s
[gssftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(syslog_daemon)s
backend = %(syslog_backend)s
[wuftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(wuftpd_log)s
backend = %(wuftpd_backend)s
[vsftpd]
port = ftp,ftp-data,ftps,ftps-data
logpath = %(vsftpd_log)s
[assp]
port = smtp,465,submission
logpath = /root/path/to/assp/logs/maillog.txt
[courier-smtp]
port = smtp,465,submission
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[postfix]
port = smtp,465,submission
logpath = %(postfix_log)s
backend = %(postfix_backend)s
[postfix-rbl]
port = smtp,465,submission
logpath = %(postfix_log)s
backend = %(postfix_backend)s
maxretry = 1
[sendmail-auth]
port = submission,465,smtp
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[sendmail-reject]
port = smtp,465,submission
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[qmail-rbl]
filter = qmail
port = smtp,465,submission
logpath = /service/qmail/log/main/current
[dovecot]
port = pop3,pop3s,imap,imaps,submission,465,sieve
logpath = %(dovecot_log)s
backend = %(dovecot_backend)s
[sieve]
port = smtp,465,submission
logpath = %(dovecot_log)s
backend = %(dovecot_backend)s
[solid-pop3d]
port = pop3,pop3s
logpath = %(solidpop3d_log)s
[exim]
port = smtp,465,submission
logpath = %(exim_main_log)s
[exim-spam]
port = smtp,465,submission
logpath = %(exim_main_log)s
[kerio]
port = imap,smtp,imaps,465
logpath = /opt/kerio/mailserver/store/logs/security.log
[courier-auth]
port = smtp,465,submission,imap3,imaps,pop3,pop3s
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[postfix-sasl]
port = smtp,465,submission,imap3,imaps,pop3,pop3s
logpath = %(postfix_log)s
backend = %(postfix_backend)s
[perdition]
port = imap3,imaps,pop3,pop3s
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[squirrelmail]
port = smtp,465,submission,imap2,imap3,imaps,pop3,pop3s,http,https,socks
logpath = /var/lib/squirrelmail/prefs/squirrelmail_access_log
[cyrus-imap]
port = imap3,imaps
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[uwimap-auth]
port = imap3,imaps
logpath = %(syslog_mail)s
backend = %(syslog_backend)s
[named-refused]
port = domain,953
logpath = /var/log/named/security.log
[nsd]
port = 53
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
logpath = /var/log/nsd.log
[asterisk]
port = 5060,5061
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
logpath = /var/log/asterisk/messages
maxretry = 10
[freeswitch]
port = 5060,5061
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
logpath = /var/log/freeswitch.log
maxretry = 10
[mysqld-auth]
port = 3306
logpath = %(mysql_log)s
backend = %(mysql_backend)s
[recidive]
logpath = /var/log/fail2ban.log
banaction = %(banaction_allports)s
bantime = 604800 ; 1 week
findtime = 86400 ; 1 day
[pam-generic]
banaction = %(banaction_allports)s
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[xinetd-fail]
banaction = iptables-multiport-log
logpath = %(syslog_daemon)s
backend = %(syslog_backend)s
maxretry = 2
[stunnel]
logpath = /var/log/stunnel4/stunnel.log
[ejabberd-auth]
port = 5222
logpath = /var/log/ejabberd/ejabberd.log
[counter-strike]
logpath = /opt/cstrike/logs/L[0-9]*.log
# Firewall: http://www.cstrike-planet.com/faq/6
tcpport = 27030,27031,27032,27033,27034,27035,27036,27037,27038,27039
udpport = 1200,27000,27001,27002,27003,27004,27005,27006,27007,27008,27009,27010,27011,27012,27013,27014,27015
action = %(banaction)s[name=%(__name__)s-tcp, port="%(tcpport)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(udpport)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
[nagios]
logpath = %(syslog_daemon)s ; nrpe.cfg may define a different log_facility
backend = %(syslog_backend)s
maxretry = 1
[directadmin]
logpath = /var/log/directadmin/login.log
port = 2222
[portsentry]
logpath = /var/lib/portsentry/portsentry.history
maxretry = 1
[pass2allow-ftp]
# this pass2allow example allows FTP traffic after successful HTTP authentication
port = ftp,ftp-data,ftps,ftps-data
# knocking_url variable must be overridden to some secret value in filter.d/apache-pass.local
filter = apache-pass
# access log of the website with HTTP auth
logpath = %(apache_access_log)s
blocktype = RETURN
returntype = DROP
bantime = 3600
maxretry = 1
findtime = 1
[murmur]
port = 64738
action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol=tcp, chain="%(chain)s", actname=%(banaction)s-tcp]
%(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol=udp, chain="%(chain)s", actname=%(banaction)s-udp]
logpath = /var/log/mumble-server/mumble-server.log
[screensharingd]
logpath = /var/log/system.log
logencoding = utf-8
[haproxy-http-auth]
logpath = /var/log/haproxy.log' >> /etc/fail2ban/jail.local
service fail2ban restart > /dev/null 2>&1
echo -e "${cor[5]} ${txt[156]}"
fi
fi
echo -e "${cor[1]} =================================== ${cor[0]}"
return
}
fail2ban_function
[[ -e $HOME/fail2ban ]] && rm $HOME/fail2ban
[[ -d $HOME/fail2ban-0.9.4 ]] && rm -rf $HOME/fail2ban-0.9.4

5
Bot/update/ferramentas Normal file

File diff suppressed because one or more lines are too long

2
Bot/update/menu Normal file

File diff suppressed because one or more lines are too long

1
Bot/update/menu_credito Normal file
View File

@ -0,0 +1 @@
@ChumoGH - OFFICIAL

2
Bot/update/menu_inst Normal file

File diff suppressed because one or more lines are too long

755
Bot/update/payloads Normal file
View File

@ -0,0 +1,755 @@
----------------------------------------------------------------------------
[auth][auth]get http://ssh.proxy.ip/<ponte_conection_>mhost/
User-Agent: YES
[lf][raw][method] mhost:443 HTTP/1.1
Proxy-Authorization: Keep-Alive
Connection: Close
[realData][crlf]get mhost/ HTTP/1.1[crlf]CONNECT mhost[crlf][crlf][delay_split][auth][auth][auth][auth]GET mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET mhost/ HTTP/1.1[crlf][method] ecob.claro.com.br[crlf][crlf][delay_split]get mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://ecob.claro.com.br/ HTTP/1.1
User-Agent: YES
[lf][raw][method] mhost:443 HTTP/1.1
Proxy-Authorization: Keep-Alive
Connection: Close
[realData][crlf]get mhost/ HTTP/1.1[crlf]CONNECT ecob.claro.com.br[crlf][crlf][delay_split]
----------------------------------------------------------------------------
[auth][auth][auth][auth]get http://mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/<ponte_conection_>mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]get http://mhost/<ponte_conection_>mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/<ponte_conection_>mhost/ HTTP/1.1[crlf][method] mhost[crlf][crlf][delay_split]GET http://mhost/ HTTP/1.1
User-Agent: YES
[lf][raw][method] mhost:443 HTTP/1.1
Proxy-Authorization: Keep-Alive
Connection: Close
[realData][crlf][auth][auth][auth][auth][auth][auth][auth][auth][auth][auth][auth][lf]
----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1
User-Agent: [ua][crlf][host][crlf][crlf][split]CONNECT ip da. Vps :443 HTTP/1.0[crlf][crlf]CONNECT mhost:443 HTTP/1.1[crlf]CONNECT [host_port] HTTP/1.0[crlf][crlf]GET http://mhost/ HTTP/1.0
Host: mhost
Proxy-Authorization: basic: mhost
User-Agent: [ua]
Connection: close
Proxy-Connection: Keep-Alive [crlf][host][crlf][crlf][split]CONNECT [host_port] HTTP/1.0[crlf][crlf][crlf]GET http://mhost/ HTTP/1.0[crlf]Host: mhost/[crlf][host][crlf][crlf]CONNECT [host_port] HTTP/1.0[crlf][crlf][realData][crlf][crlf][crlf]
----------------------------------------------------------------------------
[method] mhost:443 HTTP/1.1[lf]CONNECT [host_port] [protocol][lf][lf]GET http://mhost/ HTTP/1.1\nHost: mhost\nConnection: close\nConnection: close\nUser-Agent:[ua][lf]Proxy-Connection: Keep-Alive[lf][host][crlf][lf][delay_split]CONNECT [host_port] [protocol][lf][lf]CONNECT [host_port] [protocol][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]User-Agent: KDDI[lf][host][lf][lf][lf][raw]CONNECT [host_port] [protocol][lf]CONNECT [ssh] HTTP/1.1[lf]CONNECT [host_port] [protocol][lf][lf]DELETE http://mhost/HTTP/1.1[lf]Host: m.opera.com[lf]Proxy-Authorization: basic: *[lf]User-Agent: KDDI[lf]Connection: close[lf]Proxy-Connection: Direct[lf][host][lf][lf][raw]CONNECT [host_port] [protocol][lf][lf][lf][raw][method] http://mhost[port] HTTP/1.1[lf]Host: [auth][lf][host][lf][lf]CONNECT [host] [protocol][lf][lf][raw]CONNECT [host] [protocol][lf][lf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf][netData][crlf][instant_split]MOVE http://mhost[delay_split][lf]__[crlf][crlf][netData][crlf][instant_split]MOVE http://mhost[delay_split][lf]__[crlf][crlf][netData][crlf][instant_split]MOVE http://mhost[delay_split][lf]__[crlf]X-Online-Host: mhost[crlf]Packet Length: Authorization[crlf]Packet Content: Authorization[crlf]Transfer-Encoding: chunked[crlf]Referer: mhost[lf]__[crlf]
----------------------------------------------------------------------------
[lf][lf]CONNECT [host_port]@mhost [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]User-Agent: [ua][lf][host]@mhost [protocol][crlf][crlf]
----------------------------------------------------------------------------
[immutable][method] [host_port] [delay_split]GET http://mhost HTTP/1.1[netData][crlf]HTTP:mip:80[crlf]X-GreenArrow-MtaID: smtp1-1[crlf]CONNECT http://mhost/ HTTP/1.1[crlf]CONNECT http://mhost/ HTTP/1.0[crlf][split]CONNECT http://mhost/ HTTP/1.1[crlf]CONNECT http://mhost/ HTTP/1.1[crlf][crlf]
-----------------------------------------------------------------------------
[method] [host_port]?[split]GET http://mhost:8080/[crlf][crlf]get [host_port]?[split]OPTIONS http://mhost/[crlf]Connection: Keep-Alive[crlf]User-Agent: Mozilla/5.0 (Android; Mobile; rv:35.0) Gecko/35.0 Firefox/35.0[crlf]CONNECT [host_port] [crlf]GET [host_port]?[split]get http://mhost/[crlf][crlf][method] mip:80[split]GET mhost/[crlf][crlf]: Cache-Control:no-store,no-cache,must-revalidate,post-check=0,pre-check=0[crlf]Connection:close[crlf]CONNECT [host_port]?[split]GET http://mhost:/[crlf][crlf]POST [host_port]?[split]GET
mhost:/[crlf]Content-Length: 999999999\r\n\r\n
-----------------------------------------------------------------------------
CONNECT [host_port] [protocol][crlf][delay_split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Referer: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port]GET http://mhost/ [protocol][lf][split]get mhost/ HTTP/1.1[lf][lf]
-----------------------------------------------------------------------------
CONNECT [host_port]get http://mhost/ [protocol][lf][split]GET http://mhost/ HTTP/1.1[lf]Host: navegue.vivo.ddivulga.com/pacote[lf][host_port]get http://mhost/ [protocol][lf][split]GET http://mhost/ HTTP/1.1[lf]Host: mhost[lf][host_port]GET http://mhost/ [protocol][lf][split]get http://mhost/ HTTP/1.1[lf]Host: mhost[lf][host_port]GET http://mhost/ [protocol][lf][split]get http://mhost/ HTTP/1.1[lf]Host: mhost[lf][host_port]GET http://mhost/ [protocol][lf][split]CONNECT [host_port]@mhost/ [protocol][crlf]Host: mhost/[crlf]GET mhost/ HTTP/1.1[crlf]HEAD mhost HTTP/1.1[crlf]TRACE mhost HTTP/1.1[crlf]OPTIONS mhost HTTP/1.1[crlf]PATCH mhost/ HTTP/1.1[crlf]PROPATCH mhost/ HTTP/1.1[crlf]DELETE mhost HTTP/1.1[crlf]PUT mhost/ HTTP/1.1[crlf]Host: mhost/[crlf]Host: mhost/[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]X-Forwarded-For: mhost[protocol][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port][split]get http://mhost HTTP/1.1[crlf]Host: mhost/[crlf]X-Forward-Host: mhost/[crlf]Connection: Keep-Alive[crlf]Connection: Close[crlf]User-Agent: [ua][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port][split]get mhost/ HTTP/1.1[crlf] [crlf][immutable]
-----------------------------------------------------------------------------
CONNECT [host_port] [split]get http://mhost/ EHTTP/1.1 200 OK[crlf]HTTP Host: speedtest.net;m.whatsapp.com;sonymobile.com.br;caixa.sp.gov;mhost.co.id;vivo.com.br;[crlf]Forwarded-For: m.whatsapp.com/speedtest.bet[crlf]Connection: Keep-Alive[crlf][crlf][raw][crlf][instant_split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Online-Host: mhost[crlf]ping-server: www.google.com[crlf]Connection: Close[crlf]Bandwith-Speed: 10GBps,lock,Keep-Alive[crlf]User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)[crlf][crlf]ping m.facebook.com[crlf]Content-Type: text/html; charset=utf-8X-[crlf]Content-Type: OptionsnosniffAccess-Control-Allow-Credentialstrueaccess-control-allow[split][method] OPTIONSExpiresSat, 01 Jan 2000 00:00:00 GMT0„2(6317d ago)X-FB-Debug1d4XXullTOxJZaZVk8PkrdpTcsyCcqDpHzZ6bFycC+ELii5hc8/lFzWhQ98EO/Cq2VJDnK2l5VTKEJISC++PbQ[crlf]Connection: close[crlf]Connection: Keep-Alive[crlf]Content-Length: 999999999999[crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port]@mhost [instant_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]get mhost/[crlf]Connection: close Keep-Alive[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf][immutable]
-----------------------------------------------------------------------------
CONNECT [host_port][split]GET mhost/ HTTP/1.1[crlf][crlf][immutable]
-----------------------------------------------------------------------------
CONNECT [host_port]@mhost/ [instant_split]get http://mhost/ HTTP/1.1[crlf]
-----------------------------------------------------------------------------
[immutable]get [host_port] [protocol][crlf][delay_split]CONNECT http://mhost/ HTTP/1.1[crlf]
-----------------------------------------------------------------------------
CONNECT [host_port] [instant_split]get http://mhost/ HTTP/1.1[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][crlf][instant_split]get http://mhost/
HTTP/1.1[ua][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTPS/2.0[auth][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [auth][crlf][crlf][delay_split]CONNECT [host_port] [protocol][crlf]JAZZ http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [protocol][crlf][crlf][delay_split]CONNECT [host_port] [method][cr]?[lf][crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port] [protocol]\r
\r
get http://mhost HTTP/1.1\r
Host: mhost\r
X-Online-Host: mhost\r
X-Forward-Host: mhost\r
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-gb) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.9174AP\r
\r
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost
User-Agent: Yes
Connection: close
Proxy-Connection: Keep-Alive
[crlf][crlf]CONNECT [host_port][protocol][crlf][crlf][immutable]
-----------------------------------------------------------------------------
get [host_port][protocol][crlf][split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][raw][crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]UseDNS: Yes[crlf]Cache-Control: no-cache[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf] Access-Control-Allow-Credentials: true, true[lf] Access-Control-Allow-Headers: X-Requested-With,Content-Type, X-Requested-With,Content-Type[lf] Access-Control-Allow-Methods: GET,PUT,OPTIONS,POST,DELETE, GET,PUT,OPTIONS,POST,DELETE[lf] Age: 8, 8[lf] Cache-Control: max-age=86400[lf] public[lf] Connection: keep-alive[lf] Content-Type: text/html; charset=UTF-8[crlf]Content-Length: 9999999999999[crlf]UseDNS: Yes[crlf]Vary: Accept-Encoding[crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf] Access-Control-Allow-Credentials: true, true[lf] Access-Control-Allow-Headers: X-Requested-With,Content-Type, X-Requested-With,Content-Type[lf] Access-Control-Allow-Methods: GET,PUT,OPTIONS,POST,DELETE, GET,PUT,OPTIONS,POST,DELETE[lf] Age: 8, 8[lf] Cache-Control: max-age=86400[lf] public[lf] Connection: keep-alive[lf] Content-Type: text/html; charset=UTF-8[crlf]Content-Length: 9999999999999[crlf]Vary: Accept-Encoding[crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
[netData][split][raw][crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
GET http://mhost/ HTTP/1.1
Host: mhost/
User-Agent: Yes
Connection: close
Proxy-Connection: update
[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]host: http://mhost/[crlf]Connection: close update[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf][crlf][crlf]
-----------------------------------------------------------------------------
get [host_port][protocol][crlf][split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][raw][crlf][crlf]User-Agent: [ua][crlf]Connection: Close[crlf]Proxy-connection: Close[crlf]Proxy-Authorization: Basic[crlf]Cache-Control: no-cache[crlf]Connection: Keep-Alive[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Content-Type: text/html; charset=iso-8859-1[crlf]Connection: close[crlf][crlf][crlf]User-Agent: [ua][crlf][crlf]Referer: mhost[crlf]Cookie: mhost[crlf]Proxy-Connection: Keep-Alive [crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1
Host: mhost
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Linux; Android 5.1; LG-X220 Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: http://mhost
Accept-Encoding: gzip, deflate, sdch
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: _ga=GA1.2.2045323091.1494102805; _gid=GA1.2.1482137697.1494102805; tfp=80bcf53934df3482b37b54c954bd53ab; tpctmp=1494102806975; pnahc=0; _parsely_visitor={%22id%22:%22719d5f49-e168-4c56-b7c7-afdce6daef18%22%2C%22session_count%22:1%2C%22last_session_ts%22:1494102810109}; sc_is_visitor_unique=rx10046506.1494105143.4F070B22E5E94FC564C94CB6DE2D8F78.1.1.1.1.1.1.1.1.1
Connection: close
Proxy-Connection: Keep-Alive
[crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port][protocol][crlf][split]get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][raw][crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control: no-cache[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost[crlf] HTTP/1.1[crlf]Host: mhost[crlf]User-Agent: [ua][crlf]Connection: close [crlf]
Referer:http://mhost[crlf]
Content-Type: text/html; charset=iso-8859-1[crlf]Content-Length:0[crlf]Accept: text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost
User-Agent: null
Connection: close
Proxy-Connection: x-online-host
[lf][lf] CONNECT [host_port] [protocol] [netData][lf]Content-Length: 130 [lf][lf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf][crlf]User-Agent: Yes[lf]Accept-Encoding: gzip,deflate[lf]Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7[lf]Connection: Basic[lf]Referer: mhost[lf]Cookie: mhost [lf]Proxy-Connection: Keep-Alive[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Accept-Language: en-us,en;q=0.5[crlf]Accept-Encoding: gzip,deflate[crlf]Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7[crlf]Keep-Alive: 115[crlf]Connection: keep-alive[crlf]Referer: mhost[crlf]Cookie: mhost Proxy-Connection: Keep-Alive[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control: no-cache[crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]Connection: close[crlf][crlf][raw][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]CONNECT [host_port][method]HTTP/1.1[lf]HEAD http://mhost/ [protocol][lf]Host: mhost[lf]CONNECT [lf]DELETE http://mhost/ HTTP/1.1[crlf]CONNECT mhost [crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf][netData][crlf]@mip [crlf][crlf]http://mhost/ HTTP/1.1[crlf]mip[crlf][crlf] [crlf][crlf]http://mhost/ HTTP/1.1[crlf]Host@mip[crlf][crlf] [crlf][crlf] http://mhost/ HTTP/1.1[crlf]Host mhost/[crlf][crlf][netData][crlf] [crlf][crlf] http://mhost/ HTTP/1.1[crlf] [crlf][crlf][netData][crlf] [crlf][crlf] http://mhost/ HTTP/1.1[cr][lf] [crlf][crlf][netData][cr][lf] [crlf][crlf]CONNECT mip:22@http://mhost/ HTTP/1.1[crlf] [crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost HTTP/1.1[crlf][crlf]CONNECT http://mhost/ [protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: close[crlf]User-Agent: [ua][crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control : no-cache[crlf][crlf]
-----------------------------------------------------------------------------
CONNECT [host_port]@mhost HTTP/1.1[crlf][crlf]get http://mhost/ [protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: close[crlf]User-Agent: [ua][crlf]Proxy-connection: Keep-Alive[crlf]Proxy-Authorization: Basic[crlf]Cache-Control : no-cache[crlf][crlf]
-----------------------------------------------------------------------------
get https://mhost/ HTTP/1.1
Host: mhost[crlf]User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: mhost
Cookie: mhost Proxy-Connection: Keep-Alive [crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost[crlf]User-Agent: Yes[lf]Accept-Encoding: gzip,deflate[lf]Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7[lf]Connection: Basic[lf]Referer: mhost[lf]Cookie: mhost [lf]Proxy-Connection: Keep-Alive[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][crlf][delay_split]CONNECT [host_port]@mhost [protocol][crlf][crlf]
----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]DATA: 2048B[lf]Host: mhost[lf]User-Agent: Yes[lf]Connection: close[lf]Accept-Encoding: gzip[lf]Non-Buffer: true[lf]Proxy: false[lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][delay_split]CONNECT http://mhost/ HTTP/1.1[crlf]Host: http://mhost/[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: http://mhost[crlf]X-Forwarded-For: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1
Host: mhost
Cache-Control=max-age=0
[crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Referer: mhost[crlf]GET /HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][raw][crlf][crlf][raw][crlf]Referer: mhost[crlf][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\nHost: mhost/\nUser-Agent: Yes\nConnection: close\nProxy-Connection: Keep-Alive\n\r\n\r\n[netData]\r\n \r\n\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: close Keep-Alive[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf][split]CONNECT mhost@[host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf][lf][realData][lf][lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf][split]CONNECT [host_port][protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]X-Forward-Host: mhost[crlf]Connection: Keep-Alive[crlf]User-Agent: [ua][crlf][crlf]CONNECT [host_port][protocol][crlf][crlf]
-----------------------------------------------------------------------------
[netData][crlf]
get http://mhost/[crlf]
Host: mhost[crlf][crlf]
CONNECT mhost[protocol][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\n
Host: mhost\r\nConnection: Keep-Alive\r\n
\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]
Host: mhost[crlf]
X-Online-Host: mhost[crlf][crlf]
CONNECT mhost [protocol][crlf]
[crlf]
-----------------------------------------------------------------------------
[netData][crlf]
get http://mhost/ HTTP/1.1[crlf]
Host: mhost[crlf]
CONNECT mhost[protocol][crlf]
-----------------------------------------------------------------------------
[netData] HTTP/1.0\r\n\r\n
get http://mhost/ HTTP/1.1\r\n
Host: mhost\r\n
Connection: Keep-Alive\r\n
CONNECT mhost\r\n
\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost HTTP/1.1[crlf]X-Real-IP:mip[crlf]X-Forwarded-For:http://mhost/ http://mhost/[crlf]X-Forwarded-Port:mhost[crlf]X-Forwarded-Proto:http[crlf]Connection:Keep-Alive[crlf][crlf][instant_split]CONNECT [ssh]HTTP/1.0[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host:mhost[crlf][crlf][split][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host:
mhost[crlf]Connection: Keep-Alive[crlf][crlf]
[lf][realData][crlf]CONNECT mhost HTTP/1.1[lf][lf]
-----------------------------------------------------------------------------
get [host_port] HTTP/1.1[crlf][crlf]GET http://mhost/ [protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forward-Host: mhost[crlf]User-Agent: [ua][crlf][raw][crlf]
[crlf]
-----------------------------------------------------------------------------
get [host_port]http://mhost/[protocol][crlf][split]mhost:/ HTTP/1.1[crlf]Host: mhost:[crlf]X-Forward-Host: mhost:[crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]CONNECT mhost[crlf]Connection: close[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host:
http://mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\nHost:
mhost\r\n\r\n[netData]
\r\n\r\n\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\nX-Online-Host:mhost\r\n\r\nCONNECT mip:443
HTTP/1.0\r\n \r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1\r\nGET: mhost\n\r\nCONNECT mip:443
HTTP/1.0\r\n \r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\r\n\r\n\\\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf]Connection: close[crlf]CONNECT [host_port][protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[crlf]X-Forward-Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf]X-Forward-Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]mhost[lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Forward-Host: mhost[lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Connection: http://mhost[lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]CONNECT mhost@[port][protocol][lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Connection: Keep-Alive[crlf]mhost@[host_port][lf]HEAD http://mhost[protocol][lf]Host: mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forwarded-For: mhost[crlf][netdata][crlf] [crlf]-Agent: mhost[ua][crlf]CONNECT mhost [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]User-Agent: mhost[ua][crlf]CONNECT mhost [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf][split]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]X-Forwarded-For: mhost[crlf]User-Agent: mhost[ua][crlf]Connection: close[crlf]CONNECT mhost [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost [host_port] [protocol][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost@[host_port] [protocol][crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]CONNECT http://mhost[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf]Connection: close[crlf][netData][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]get http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]CONNECT mhost@[host_port][protocol][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]GET http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]CONNECT mhost@[host_port][protocol][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]CONNECT http://mhost/[protocol]@[host_port][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf]Connection: close[crlf][netdata][crlf] [crlf][split]Connection: close[crlf]Content-Lenght: 20624[crlf]
[crlf][netData][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port] HTTP/1.1[crlf][crlf][crlf]GET http://mhost/[protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf]
[crlf][netData][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost\r\nHost:mhost\r\n\r\n[netData]\r\n \r\n\r\n
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/[host_port][method]HTTP/1.1[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][lf]HEAD http://mhost[protocol][lf]Host: mhost lf]CONNECT mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf][crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]host: mhost[crlf][crlf][realData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost [crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][crlf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf]Connection: Keep-Alive[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][crlf][realData][crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf][crlf]CONNECT mhost [host_port][protocol][crlf] [crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost[lf]Host: mhost[lf][lf]CONNECT mhost [host_port][lf]CONNECT mhost [lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost[lf]Host: mhost[lf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][lf]CONNECT mhost [host_port][lf]CONNECT mhost [lf]
-----------------------------------------------------------------------------
[realData][crlf][split]get http://mhost/ HTTP/1.1[crlf][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf]Connection: Keep-Alive[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]mhost[lf]Host: mhost[lf][lf]CONNECT mhost [host_port][lf]get mhost [lf]
-----------------------------------------------------------------------------
get [host_port]@mhost" HTTP/1.1[crlf][crlf]GET http://mhost"/ [protocol][crlf]Host: mhost"[crlf]X-Forward-Host: mhost"[crlf]CONNECT [host_port] [protocol][crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf][cr][crlf]X-Online-Host: mhost[crlf]Connection: [crlf]User-Agent: [ua][crlf]Content-Lenght: 99999999999[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]X-Online-Host: mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Authorization: Basic: Connection: X-Forward-Keep-AliveX-Online-Host: mhost[lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]host:frontend.claro.com.br[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost HTTP/1.1[crlf]Host: mhost[crlf][crlf][netData][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Host: Multibanco.com.br[crlf][crlf]CONNECT [host_port] [protocol][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[lf]Host: mhost [lf][lf]CONNECT [host_port][lf]CONNECT [lf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf] Proxy-Authorization: Basic:Connection: X-Forward-Keep-AliveX-Online-Host:[lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf][instant_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf]Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]X-Online-Host: mhost[crlf][crlf]CONNECT [host_port] [protocol][crlf]X-Online-Host: mhost [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]X-Online-Host: http://mhost[crlf][crlf]CONNECT[host_port] [protocol][crlf]X-Online-Host: mhost [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost HTTP/1.1[crlf]Connect mip:443 [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost[protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost[crlf][crlf][split]get mhost HTTP/1.1[cr][lf][raw][crlf] [crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf][delay_split]GET http://mhost/ HTTP/1.1[crlf]Host:mhost[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf][instant_split]GET http://mhost/ HTTP/1.1[crlf]Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------
get http://mhost/ HTTP/1.1[crlf]Content-Type: text[crlf]Cache-Control: no-cache[crlf]Connection: close[crlf]Content-Lenght: 20624[crlf]get mip:443@mhost HTTP/1.1[crlf][crlf]
-----------------------------------------------------------------------------
get [host_port]@mhost [protocol][crlf]Host: mhost[crlf]X-Forwarded-For: mhost User-Agent: Yes
Connection: close
Proxy-Connection: Keep-Alive Connection: Transfer-Encoding
[protocol][ua][port][auth][lf][lf][netData][lf] [lf][lf]
-----------------------------------------------------------------------------
get [host_port] [protocol][crlf]Host: mhost[crlf]X-Online-Host: mhost[crlf][crlf]
-----------------------------------------------------------------------------

1247
Bot/update/shadowsocks.sh Normal file

File diff suppressed because it is too large Load Diff

81
Bot/update/ultrahost Normal file
View File

@ -0,0 +1,81 @@
#!/bin/bash
subdom () {
SUBDOM="$1"
[[ "$SUBDOM" = "" ]] && return
randomize="$RANDOM"
for sites in `cat $log`; do
[[ $(echo ${DNS[@]}|grep $sites) = "" ]] && DNS+=($sites)
[[ $(echo ${DNS[@]}|grep $sites) != "" ]] && cat $log|grep -v "$sites" > $log
done
while true; do
[[ "$(pidof lynx | wc -w)" -lt "20" ]] && break
done
(
HOST[$randomize]="$SUBDOM"
curl -sSL "${HOST[$randomize]}"|grep -Eoi '<a [^>]+>'|grep -Eo 'href="[^\"]+"'|grep -Eo '(http|https)://[a-zA-Z0-9./*]+'|sort -u|awk -F "://" '{print $2}' >> $log
) > /dev/null 2>&1 &
}
iniciar () {
SUB_DOM=$1
limite=$2
[[ ${SUB_DOM} = "" ]] && read -p "Site Alvo: " SUB_DOM
[[ ${limite} = "" ]] && limite="300"
#CRIA LOG
log="./loog" && touch $log
#INICIA PRIMEIRA BUSCA
_DOM=$(curl -sSL "$SUB_DOM"|grep -Eoi '<a [^>]+>'|grep -Eo 'href="[^\"]+"'|grep -Eo '(http|https)://[a-zA-Z0-9./*]+'|sort -u|awk -F "://" '{print $2}')
for _DOMS in `echo $_DOM`; do
[[ $(echo ${DNS[@]}|grep ${_DOMS}) = "" ]] && DNS+=(${_DOMS})
done
#INICIA THREADS
i=0
while true; do
DOMAIN=$(echo "${DNS[$i]}")
[[ $DOMAIN = "" ]] && break
if [[ $(echo -e "${PESQ[@]}"|grep "$DOMAIN") = "" ]]; then
subdom "$DOMAIN"
echo -e "\033[1;31m(Scan\033[1;32m $((${#PESQ[@]}+1))\033[1;31m de \033[1;32m${#DNS[@]}\033[1;31m) - Escaneando ---> \033[1;36mhttp://$DOMAIN\033[1;37m"
PESQ+=($DOMAIN)
fi
[[ "$(echo ${#DNS[@]})" -gt "$limite" ]] && break
i=$(($i+1))
sleep 1s
done
rm $log
echo -e "\033[1;31m====================================\n\033[1;32mScan Finalizado!, Iniciando Coleta de IPs\033[1;31m\n====================================\033[0m"
[[ -e $HOME/subresult ]] && rm $HOME/subresult
[[ ! -e $HOME/subresult ]] && touch $HOME/subresult
for result in $(echo "${DNS[@]}"); do
(
rand="$RANDOM"
dns[rand]="$result"
scan[rand]=$(echo ${result}|cut -d'/' -f1)
IP[rand]=$(nslookup "${scan[rand]}"|grep -Eo 'Address: [0-9.]+'|grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'|tail -1) > /dev/null 2>&1
echo -e "====================================\nDNS: ${dns[rand]}\nIP: ${IP[rand]}\n====================================" >> $HOME/subresult
unset IP
) &
done
while true; do
[[ $(pidof nslookup|wc -w) -lt "1" ]] && break
done
RSLT=$(($(cat $HOME/subresult|wc -l)/4)) && echo -e "\033[1;31m====================================\n\033[1;32m$RSLT Hosts Capturados\n\033[1;31m====================================\033[0m"
echo -ne "Desea Imprimir los Resultados? [S/N]: "; read yn
[[ $yn = @(s|S|y|Y) ]] && {
echo -ne "\033[1;32m"
cat $HOME/subresult|grep -v =
echo -e "\033[1;31m====================================\033[0m"
}
return 0
}
#INICIA SCRIPT
echo -e "\033[1;31m====================================\033[0m"
echo -e "\033[1;33m INICIALIZANDO PROCEDIMENTOS (SCAN)"
echo -e "\033[1;31m====================================\033[0m"
iniciar $1 $2
[[ $? = "0" ]] &&
echo -e "\033[1;32mRegistro Generado en : $HOME/subresult\033[0m" &&
echo -e "\033[1;31m====================================\033[0m"

2
Bot/update/usercodes Normal file

File diff suppressed because one or more lines are too long

1
Bot/update/v-local.log Normal file
View File

@ -0,0 +1 @@
V5.7U

181
Bot/update/verifica Normal file
View File

@ -0,0 +1,181 @@
#!/bin/bash
#CREADOR Henry Chumo | 06/06/2022
#Alias : @ChumoGH
# -*- ENCODING: UTF-8 -*-
dropbear_pids () {
port_dropbear=`ps aux|grep 'dropbear'|awk NR==1|awk '{print $17;}'`
log=/var/log/auth.log
loginsukses='Password auth succeeded'
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
echo "$user $PID $waktu"
fi
done
}
mostrar_usuarios () {
for u in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
echo "$u"
done
}
function_onlines () {
users=$(cat /etc/passwd|grep 'home'|grep 'false'|grep -v 'syslog'|awk -F ':' '{print $1}')
dpids=$(dropbear_pids)
time=$(date +%s)
[[ -e /etc/openvpn/openvpn-status.log ]] && ovpn_log=$(cat /etc/openvpn/openvpn-status.log)
n='0'
i='0'
conect='0'
for _user in $(mostrar_usuarios); do
[[ -z "$(ps -u $_user|grep sshd)" ]] && sqd=0 || sqd=1
[[ -z "$(echo $ovpn_log|grep -E ,"$_user",)" ]] && ovp=0 || ovp=1
[[ -z "$(echo $dpids|grep -w "$_user")" ]] && drop=0 || drop=1
conex=$(($sqd + $ovp + $drop))
[[ $conex -ne 0 ]] && let conect++
if [[ $(chage -l $_user |grep 'Account expires' |awk -F ': ' '{print $2}') != never ]]; then
[[ $time -gt $(date '+%s' -d "$(chage -l $_user |grep "Account expires" |awk -F ': ' '{print $2}')") ]] && let n++
fi
done
_tuser=$(echo "$users"|sed '/^$/d'|wc -l)
#echo "${conect}" > /etc/adm-lite/onlines
#echo "${n}" > /etc/adm-lite/vencidos
#echo "${_tuser}" > /etc/adm-lite/total
}
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)
[[ "$us" != "0" ]] && echo "$userovpn"
done
}
function_usertime () {
declare -A data
declare -A time
declare -A time2
declare -A timefinal
tempousers="./tempo_conexao"
usr_pids_var="./userDIR"
[[ ! -e $tempousers ]] && touch $tempousers
_data_now=$(date +%s)
for user in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
unset ssh
[[ -e $usr_pids_var/$user.pid ]] && source $usr_pids_var/$user.pid
ssh+="$(ps -u $user | grep sshd |wc -l)+"
ssh+="$(dropbear_pids | grep "$user" | wc -l)+"
[[ -e /etc/openvpn/server.conf ]] && ssh+="$(fun_ovpn_onl | grep "$user" | wc -l)+"
ssh+="0"
user_pid=$(echo $ssh|bc)
if [ "$user_pid" -gt "0" ]; then
[[ "${data[$user]}" = "" ]] && data[$user]="$_data_now"
fi
if [ "$user_pid" = "0" ]; then
unset data[$user]
[[ -e "$usr_pids_var/$user.pid" ]] && rm -f $usr_pids_var/$user.pid
[[ -e $usr_pids_var/$user.pid2 ]] && rm -f $usr_pids_var/$user.pid2
fi
if [ "${data[$user]}" != "" ]; then
time[$user]=$(($_data_now - ${data[$user]}))
time2[$user]=$(cat $tempousers | grep "$user" | awk '{print $2}')
[[ "${time2[$user]}" = "" ]] && time2[$user]="0"
timefinal[$user]=$((${time2[$user]} + ${time[$user]}))
_arquivo=$(cat $tempousers |grep -v "$user")
echo "$_arquivo" > $tempousers
echo "$user ${timefinal[$user]}" >> $tempousers
echo "data[$user]=$_data_now" > $usr_pids_var/$user.pid
fi
done
}
fun_net () {
(
log_1="/tmp/tcpdump"
log_2="/tmp/tcpdumpLOG"
usr_dir="/etc/adm-lite/userDIR/usr_cnx"
[[ -e "$log_1" ]] && mv -f $log_1 $log_2
[[ ! -e $usr_dir ]] && touch $usr_dir
#ENCERRA TCP
for pd in `ps x | grep tcpdump | grep -v grep | awk '{print $1}'`; do
kill -9 $pd &> /dev/null
done
#INICIA TCP
tcpdump -s 50 -n &> /dev/null
#ANALIZA USER
for user in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
touch /tmp/$user
ip_openssh $user > /dev/null 2>&1
ip_drop $user > /dev/null 2>&1
sed -i '/^$/d' /tmp/$user
pacotes=$(paste -sd+ /tmp/$user | bc)
rm /tmp/$user
if [ "$pacotes" != "" ]; then
if [ "$(cat $usr_dir | grep "$user")" != "" ]; then
pacotesuser=$(cat $usr_dir | grep "$user" | awk '{print $2}')
[[ $pacotesuser = "" ]] && pacotesuser=0
[[ $pacotesuser != +([0-9]) ]] && pacotesuser=0
ussrvar=$(cat $usr_dir | grep -v "$user")
echo "$ussrvar" > $usr_dir
pacotes=$(($pacotes+$pacotesuser))
echo -e "$user $pacotes" >> $usr_dir
else
echo -e "$user $pacotes" >> $usr_dir
fi
fi
unset pacotes
done
) &
}
ip_openssh () {
user="$1"
for ip in `lsof -u $user -P -n | grep "ESTABLISHED" | awk -F "->" '{print $2}' |awk -F ":" '{print $1}' | grep -v "127.0.0.1"`; do
packet=$(cat $log_2 | grep "$ip" | wc -l)
echo "$packet" >> /tmp/$user
unset packet
done
}
ip_drop () {
user="$1"
loguser='Password auth succeeded'
touch /tmp/drop
for ip in `cat /var/log/auth.log | tail -100 | grep "$user" | grep "$loguser" | awk -F "from" '{print $2}' | awk -F ":" '{print $1}'`; do
if [ "$(cat /tmp/drop | grep "$ip")" = "" ]; then
packet=$(cat $log_2 | grep "$ip" | wc -l)
echo "$packet" >> /tmp/$user
echo "$ip" >> /tmp/drop
fi
done
rm /tmp/drop
}
function_onlines > /dev/null 2>&1
#function_usertime > /dev/null 2>&1
#fun_net > /dev/null 2>&1
killall verifica > /dev/null 2>&1

292
Code-BOT-Comandos/BotGen.sh Normal file
View File

@ -0,0 +1,292 @@
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
#https://github.com/joao-lucas/ShellBot
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
CIDimg=/etc/tokenIMG && [[ ! -d ${CIDimg} ]] && mkdir ${CIDimg}
SRC="${CIDdir}/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC}
CID="${CIDdir}/User-ID" && [[ ! -e ${CID} ]] && echo > ${CID}
CIDRESS="${CIDdir}/RESSELLERS" && [[ ! -e ${CIDRESS} ]] && mkdir ${CIDRESS}
keytxt="${CIDdir}/keys" && [[ ! -d ${keytxt} ]] && mkdir ${keytxt}
timg="${CIDimg}/img" && [[ ! -d ${timg} ]] && mkdir ${timg}
[[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || apt-get install jq -y &>/dev/null
[[ ! -e "/bin/ShellBot.sh" ]] && wget -O /bin/ShellBot.sh https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/ShellBot.sh &> /dev/null
[[ -e /etc/texto-bot ]] && rm /etc/texto-bot
LINE=" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"
# Importando API
source ShellBot.sh
source ${SRC}/menu
source ${SRC}/ayuda
source ${SRC}/cache
source ${SRC}/invalido
source ${SRC}/status
source ${SRC}/reinicio
source ${SRC}/myip
source ${SRC}/id
source ${SRC}/back_ID
source ${SRC}/link
source ${SRC}/listID
source ${SRC}/gerar_key
source ${SRC}/power
source ${SRC}/comandos
source ${SRC}/update
source ${SRC}/donar
source ${SRC}/costes
#source ${SRC}/kill_drop.sh
# Token del bot
bot_token="$(cat ${CIDdir}/token)"
# Inicializando el bot
ShellBot.init --token "$bot_token" --monitor --flush --return map
ShellBot.username
reply () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
ShellBot.sendMessage --chat_id $var \
--text "$comando" \
--parse_mode html \
--reply_markup "$(ShellBot.ForceReply)"
[[ "${callback_query_data}" = /del || "${message_text}" = /del ]] && listID_src
#[[ "${callback_query_data}" = /img || "${message_text}" = /img ]] && listID_src
[[ "${callback_query_data}" = '/banIP' || "${message_text}" = '/banIP' ]] && list_IP
}
menu_print () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then
# ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \
ShellBot.sendMessage --chat_id $var \
--text "<i>$(echo -e $bot_retorno)</i>" \
--parse_mode html \
--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_user')"
else
# ShellBot.sendMessage --chat_id ${message_chat_id[$id]} \
ShellBot.sendMessage --chat_id $var \
--text "<i>$(echo -e $bot_retorno)</i>" \
--parse_mode html \
--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_conf')"
fi
}
menu_printSN () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then
ShellBot.sendMessage --chat_id $var \
--text "<i>$(echo -e $bot_retorno)</i>" \
--parse_mode html \
--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_send_id')"
fi
}
download_file () {
# shellbot.sh editado linea 3986
user=User-ID
[[ -e ${CID} ]] && rm ${CID}
local file_id
ShellBot.getFile --file_id ${message_document_file_id[$id]}
ShellBot.downloadFile --file_path "${return[file_path]}" --dir "${CIDdir}"
[[ -e ${return[file_path]} ]] && mv ${return[file_path]} ${CID}
local bot_retorno="ID user botgen\n"
bot_retorno+="$LINE\n"
bot_retorno+="Se restauro con exito!!\n"
bot_retorno+="$LINE\n"
bot_retorno+=" FILE ${return[file_path]} \n"
bot_retorno+="$LINE"
ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \
--reply_to_message_id "${message_message_id[$id]}" \
--text "<i>$(echo -e $bot_retorno)</i>" \
--parse_mode html
return 0
}
msj_add () {
ShellBot.sendMessage --chat_id ${1} \
--text "<i>$(echo -e $bot_retor)</i>" \
--parse_mode html
}
upfile_fun () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
ShellBot.sendDocument --chat_id $var \
--document @${1} \
#--caption "$(echo -e "$bot_retorno")" \
#--parse_mode html \
#--reply_markup "$(ShellBot.ForceReply)"
#--reply_markup "$(ShellBot.InlineKeyboardMarkup -b "$2")"
}
upimg_fun () {
ShellBot.sendDocument --chat_id $(cat ${CIDdir}/Admin-ID) \
--document @${1} \
#--caption "$(echo -e "$bot_retorno")" \
#--parse_mode html \
#--reply_markup "$(ShellBot.ForceReply)"
#--reply_markup "$(ShellBot.InlineKeyboardMarkup -b "$2")"
}
invalido_fun () {
MSG_id=$((${message_message_id} + 1 ))
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
local bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙰𝙳𝙼 🎊\n"
bot_retorno+="$LINE\n"
bot_retorno+=" COMANDO NO PERMITIDO !!\n Quizas debes usar este /keygen \n O Posiblemente no estas Autorizado, clic aqui /prices o \n Contacta a $(cat < /etc/ADM-db/resell) y adquiere una subscripcion \n Toca aqui para ayuda /ayuda \n"
bot_retorno+="$LINE\n"
ShellBot.sendMessage --chat_id $var \
--text "<i>$(echo -e $bot_retorno)</i>" \
--parse_mode html
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
return 0
}
send_admin(){
local bot_retorno2="$LINE\n"
bot_retorno2+="🔰 Solicitud de autorizacion 🔰\n"
bot_retorno2+="$LINE\n"
bot_retorno2+="<u>Nombre</u>: ${callback_query_from_first_name}\n"
[[ ! -z ${callback_query_from_username} ]] && bot_retorno2+="<u>Alias</u>: @${callback_query_from_username}\n"
bot_retorno2+="<u>ID</u>: <code>${callback_query_from_id}</code>\n"
bot_retorno2+="$LINE"
bot_retorno="$LINE\n"
bot_retorno+=" 🔰 Bot generador de key 🔰\n"
bot_retorno+=" ⚜ by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ✅ ID enviado al admin ✅\n"
bot_retorno+="$LINE"
comand_boton "atras"
saveID "${callback_query_from_id}"
var=$(cat < ${CIDdir}/Admin-ID)
ShellBot.sendMessage --chat_id $var \
--text "$(echo -e "$bot_retorno2")" \
--parse_mode html \
--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_save_id')"
return 0
}
msj_fun () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
ShellBot.sendMessage --chat_id $var \
--text "<i>$(echo -e "$bot_retorno")</i>" \
--parse_mode html
return 0
}
msj_del () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
ShellBot.deleteMessage --chat_id $var --message_id $1
return 0
}
msj_img () {
#${timg}/id_${usrLOP}.png
local file_id
ShellBot.getFile --file_id "$1"
#ShellBot.downloadFile --file_path "${return[file_path]}" --dir "${timg}/id_${usrLOP}.png"
#[[ -e ${return[file_path]} ]] && mv ${return[file_path]} "${timg}/id_${usrLOP}.png1"
#[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
#ShellBot.sendPhoto --chat_id $var --photo @${timg}/id_${usrLOP}.png
#ShellBot.deleteMessage --chat_id $var --message_id $1
upimg_fun
local bot_retorno="ID user botgen\n"
bot_retorno+="$LINE\n"
bot_retorno+="Se restauro con exito!!\n"
bot_retorno+="$LINE\n"
bot_retorno+=" FILE ${return[file_path]} \n"
bot_retorno+="$LINE"
ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \
--reply_to_message_id "${message_message_id[$id]}" \
--text "<i>$(echo -e $bot_retorno)</i>" \
--parse_mode html
return 0
}
msj_chat () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
ShellBot.sendChatAction --chat_id $var --action typing
#ShellBot.deleteMessage --chat_id $var --message_id $1
return 0
}
msj_donar () {
[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
ShellBot.sendMessage --chat_id $var \
--text "<i>$(echo -e "$bot_retorno")</i>" \
--parse_mode html \
--reply_markup "$(ShellBot.InlineKeyboardMarkup -b 'botao_donar')"
return 0
}
saveID(){
unset botao_save_id
botao_save_id=''
ShellBot.InlineKeyboardButton --button 'botao_save_id' --line 1 --text "Autorizar ID" --callback_data "/saveid $1"
}
botao_conf=''
botao_user=''
botao_donar=''
unset botao_send_id
botao_send_id=''
ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text "ENVIAR al ADM" --callback_data '/sendid'
ShellBot.InlineKeyboardButton --button 'botao_send_id' --line 1 --text "menu" --callback_data '/menu'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text 'NEW ID' --callback_data '/add'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text 'QUITAR 🗑' --callback_data '/del'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text 'LISTAR 📋' --callback_data '/list'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 1 --text ' 🔎 ID' --callback_data '/buscar'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text ' ✅ | ❌ ' --callback_data '/power'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 2 --text 'MENU' --callback_data '/menu'
ShellBot.InlineKeyboardButton --button 'botao_conf' --line 3 --text '🔑 GEN KEY 🔑' --callback_data '/keygen'
ShellBot.InlineKeyboardButton --button 'botao_user' --line 1 --text '🔑 GEN KEY 🔑' --callback_data '/keygen'
ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' 🧿 Ban|IP 📲' --callback_data '/banIP' # '1' --url "https://t.me/$(cat < /etc/ADM-db/resell)"
ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' 🛒 CATALOGO 📝 ' --callback_data '1' --url "$(cat < /etc/urlCT)"
ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text '💰 DONAR 💰' --callback_data '1' --url "$(cat < /etc/urlDN)"
ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text ' 🪀 WTS 📲' --callback_data '1' --url "https://wa.me/$(cat < /etc/numctc)"
ShellBot.InlineKeyboardButton --button 'botao_user' --line 3 --text ' MENU ' --callback_data '/menu'
#ShellBot.InlineKeyboardButton --button 'botao_user' --line 2 --text ' Contacto 📲' --callback_data '1' --url 'https://wa.me/593987072611?text=Hola!,%20𝕙𝕦𝕞𝕠𝔾%20Me%20interesa%20Conocer%20más%20sobre%20el%20ADM.'
ShellBot.InlineKeyboardButton --button 'botao_donar' --line 2 --text 'Donar Paypal' --callback_data '1' --url "$(cat < /etc/urlDN)"
ShellBot.InlineKeyboardButton --button 'botao_donar' --line 2 --text 'ACCEDER WHATSAPP' --callback_data '1' --url "https://wa.me/$(cat < /etc/numctc)"
# Ejecutando escucha del bot
while true; do
ShellBot.getUpdates --limit 100 --offset $(ShellBot.OffsetNext) --timeout 30
for id in $(ShellBot.ListUpdates); do
chatuser="$(echo ${message_chat_id[$id]}|cut -d'-' -f2)"
[[ -z $chatuser ]] && chatuser="$(echo ${callback_query_from_id[$id]}|cut -d'-' -f2)"
echo $chatuser >&2
#echo "user id $chatuser"
comando=(${message_text[$id]})
[[ -z $comando ]] && comando=(${callback_query_data[$id]})
#echo "comando $comando"
[[ ! -e "${CIDdir}/Admin-ID" ]] && echo "null" > ${CIDdir}/Admin-ID
permited=$(cat ${CIDdir}/Admin-ID | awk '{print $1}')
comand
done
done

58
Code-BOT-Comandos/ayuda Normal file
View File

@ -0,0 +1,58 @@
#!/bin/bash
ayuda_src () {
bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 $message_from_first_name $message_from_last_name 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n"
if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then
if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then
bot_retorno+="/ID\n 𝚖𝚞𝚎𝚜𝚝𝚛𝚊 𝚜𝚞𝚜 𝙸𝙳 𝚍𝚎 𝚝𝚎𝚕𝚎𝚐𝚛𝚊𝚖 \n 𝚙𝚊𝚛𝚊 𝚝𝚎𝚗𝚎𝚛 𝚊𝚌𝚌𝚎𝚜𝚘 𝚊𝚕 /𝚔𝚎𝚢𝚐𝚎𝚗\n 𝚍𝚎𝚟𝚎 𝚎𝚗𝚟𝚒𝚊𝚛 𝚜𝚞 𝙸𝙳 𝚊𝚕 𝚊𝚍𝚖𝚒𝚗 $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
bot_retorno+="(Boton) Keygen\n genera una key para\n el instalador del script\n para tener acceso\n deve enviar su ID al admin $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
bot_retorno+="/menu\n muestra el menu\n de comandos disponibles\n"
bot_retorno+="$LINE\n"
bot_retorno+="/ayuda\n muestra este menu de ayuda\n"
bot_retorno+="$LINE\n"
bot_retorno+="/donar\n ayuda Voluntaria\n"
bot_retorno+="$LINE\n"
else
bot_retorno+="/ID\n muestra sus ID de telegram\n para tener acceso al /keygen\n deve enviar su ID al admin $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
bot_retorno+="(Boton) Keygen\n genera una key para\n el instalador del script\n para tener acceso\n deve enviar su ID al admin $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
bot_retorno+="/instal\n muestra el link de instalacion\n del script para usar sus key\n"
bot_retorno+="$LINE\n"
bot_retorno+="/menu\n muestra el menu\n de comandos disponibles\n"
bot_retorno+="$LINE\n"
bot_retorno+="/ayuda\n muestra este menu de ayuda\n"
bot_retorno+="$LINE\n"
bot_retorno+="/donar\n ayuda Voluntaria\n"
bot_retorno+="$LINE\n"
fi
else
bot_retorno+="/infosys\n muestra informacion del sistema\n Ram, Cpu, Fecha y Hora\n"
bot_retorno+="$LINE\n"
bot_retorno+="/ID\n muestra sus ID de telegram\n para tener acceso al /keygen\n deve enviar su ID al admin $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
bot_retorno+="/add\n añade nuevo ID\n para dar acceso /keygen\n <u>modo de uso</u>\n /add 123456789 | dias \n"
bot_retorno+="$LINE\n"
bot_retorno+="/del\n elimina los ID\n antes deves usar /list\n <u>modo de uso</u>\n /del Selecciona el ID\n \n"
bot_retorno+="$LINE\n"
bot_retorno+="/list\n muestra una lista de id\n"
bot_retorno+="$LINE\n"
bot_retorno+="(Boton) Keygen\n genera una key para\n el instalador del script\n para tener acceso\n deve enviar su ID al admin $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
bot_retorno+="/instal\n muestra el link de instalacion\n del script para usar sus key\n"
bot_retorno+="$LINE\n"
bot_retorno+="/power\n poner o sacar de linea el generador\n"
bot_retorno+="$LINE\n"
bot_retorno+="/menu\n muestra el menu\n de comandos disponibles\n"
bot_retorno+="$LINE\n"
bot_retorno+="/ayuda\n muestra este menu de ayuda\n"
bot_retorno+="$LINE\n"
bot_retorno+="/cache\n limpia el cache contenido en la ram\n"
bot_retorno+="$LINE\n"
bot_retorno+="/reboot\n Reinicia el servidor vps\n"
bot_retorno+="$LINE\n"
fi
msj_fun
}

View File

@ -0,0 +1,7 @@
#!/bin/bash
upfile_src () {
cp ${CID} $HOME/
upfile_fun $HOME/User-ID
rm $HOME/User-ID
}

38
Code-BOT-Comandos/cache Normal file
View File

@ -0,0 +1,38 @@
#!/bin/bash
cache_src () {
#MEMORIA RAM
unset ram1
unset ram2
unset ram3
unset _usor
_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
ram1=$(free -h | grep -i mem | awk {'print $2'})
ram2=$(free -h | grep -i mem | awk {'print $4'})
ram3=$(free -h | grep -i mem | awk {'print $3'})
bot_retorno="==========Antes==========\n"
bot_retorno+="Ram: $ram1 || EN Uso: $_usor\n"
bot_retorno+="USADA: $ram3 || LIBRE: $ram2\n"
bot_retorno+="=========================\n"
msj_fun
sleep 2
sudo sync
sudo sysctl -w vm.drop_caches=3 > /dev/null 2>&1
unset ram1
unset ram2
unset ram3
unset _usor
_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
ram1=$(free -h | grep -i mem | awk {'print $2'})
ram2=$(free -h | grep -i mem | awk {'print $4'})
ram3=$(free -h | grep -i mem | awk {'print $3'})
bot_retorno="==========Ahora==========\n"
bot_retorno+="Ram: $ram1 || EN Uso: $_usor\n"
bot_retorno+="USADA: $ram3 || LIBRE: $ram2\n"
bot_retorno+="=========================\n"
msj_fun
}

129
Code-BOT-Comandos/comandos Normal file
View File

@ -0,0 +1,129 @@
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
dropID () {
unset bot_retorno
[[ -e /etc/systemd/system/btkill.service ]] && {
killall kill_drop.sh &>/dev/null
systemctl stop btkill &>/dev/null
systemctl disable btkill &>/dev/null
rm /etc/systemd/system/btkill.service &>/dev/null
bot_retorno+=" ⚠️ ALERTA DE NOTIFICACION ⚠️\n"
bot_retorno+=" Bot ID KILL fuera de linea"
bot_retorno+="$LINE\n"
} || {
echo -e '[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart="/bin/bash" "/etc/ADM-db/sources/kill_drop.sh"
ExecReload="/bin/bash" "/etc/ADM-db/sources/kill_drop.sh"
Restart=always
RestartSec=3600s
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/btkill.service
systemctl daemon-reload
systemctl enable btkill &>/dev/null
systemctl start btkill &>/dev/null
bot_retorno+=" 🔰 AVISO DE NOTIFICACION 🔰 \n"
bot_retorno+=" Bot ID KILL ACTIVADO"
bot_retorno+="$LINE\n"
}
msj_fun
#[[ -e /etc/ADM-db/Admin-ID ]] && var=$(cat < /etc/ADM-db/Admin-ID)
#[[ ! -z ${callback_query_message_chat_id[$id]} ]] && var=${callback_query_message_chat_id[$id]} || var=${message_chat_id[$id]}
# ShellBot.sendMessage --chat_id $var \
# --reply_to_message_id $var \
# --text "<i>$(echo -e $bot_retorno)</i>" \
# --parse_mode html
}
comand () {
if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then
if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then
case ${comando[0]} in
/[Ii]d|/[Ii]D)myid_src &;;
/[Mm]enu|[Mm]enu|/[Ss]tart|[Ss]tart|[Cc]omensar|/[Cc]omensar)menu_src &;;
/[Aa]yuda|[Aa]yuda|[Hh]elp|/[Hh]elp)ayuda_src &;;
/[Dd]onar|[Dd]onar)donar &;;
/[Ii]mg|[Ii]mg)reply &;;
/[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;;
/sendid)send_ID;;
/chekid)send_ID;;
/upmake)dupdate2;;
/*|*)invalido_fun &;;
esac
else
if [[ ${message_text[$id]} || ${callback_query_data[$id]} ]]; then
case ${comando[0]} in
/[Mm]enu|[Mm]enu|/[Ss]tart|[Ss]tart|[Cc]omensar|/[Cc]omensar)menu_src &;;
/[Aa]yuda|[Aa]yuda|[Hh]elp|/[Hh]elp)ayuda_src &;;
/[Ii]d|/[Ii]D)myid_src &;;
/[Ii]nstal)link_src &;;
/[Kk]eygen)gerar_key &;;
/[Bb]anIP|[Bb]anIP)reply &;;
/[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;;
/[Dd]onar|[Dd]onar)donar &;;
/upmake)dupdate2;;
/*|*)invalido_fun &;;
esac
fi
sleep 5
[[ -e "/etc/donar_active.txt" ]] && donar
fi
else
if [[ ${message_reply_to_message_message_id[$id]} ]]; then
case ${message_reply_to_message_text[$id]} in
'/del')deleteID_reply;;
'/add')addID_reply;;
'/addrev')addID_reventa;;
'/buscar')searchID_reply;;
'/banIP')killIP_reply;;
'/img')img_reply;;
*)invalido_fun;;
esac
elif [[ ${message_document_file_id[$id]} ]]; then
download_file
elif [[ ${message_text[$id]} || ${callback_query_data[$id]} ]]; then
case ${comando[0]} in
/[Mm]enu|[Mm]enu|/[Ss]tart|[Ss]tart|[Cc]omensar|/[Cc]omensar)menu_src &;;
/[Aa]yuda|[Aa]yuda|[Hh]elp|/[Hh]elp)ayuda_src &;;
/[Ii]d|/[Ii]D)myid_src &;;
/[Kk]illid|[Kk]illid) dropID &;;
/[Cc]hat|[Ch]hat)msj_chat &;;
/[Ii]mg|[Ii]mg)reply &;;
/[Aa]dd|/[Dd]el)reply &;;
/[Aa]ddrev)reply &;;
/[Bb]uscar|[Bb]uscar)reply &;;
/[Bb]anIP|[Bb]anIP)reply &;;
/[Cc]atip|[Cc]atip)list_IP &;;
/[Pp]ower)start_gen &;;
/[Kk]eygen)gerar_key &;;
/[Ii]nfosys)infosys_src &;;
/[Ll]ist)listID_src &;;
/[Ii]dgen|[Ii]dgen)listID_GEN &;;
/[Rr]eboot)reboot_src &;;
/[Ii]nstal)link_src &;;
/[Cc]ache)cache_src &;;
/[Uu]pdate|/[Aa]ctualizar)update &;;
/[Dd]onar|[Dd]onar)donar_OnOff &;;
/[Pp]rice|[Pp]price|[Pp]rices|/[Pp]rices)prices_on &;;
/upmake)dupdate2;;
/*|*)invalido_fun &;;
esac
fi
fi
}

31
Code-BOT-Comandos/costes Normal file
View File

@ -0,0 +1,31 @@
#!/bin/bash
#!/bin/bash
[[ -e /etc/ADM-db/idioma_menuinst ]] && tr=$(cat < /etc/ADM-db/idioma_menuinst)
prices_on () {
[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}"
[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}"
local msg
msg=' •••••••••••••••••••••••••••••••••••••••••••••••••\n'
msg+=" Hola, 『 ${firsnme} ${lastnme} 』 \n"
msg+=' •••••••••••••••••••••••••••••••••••••••••••••••••\n'
msg+=' $0.70 USD - Acceso ilimitado al BOT 4 dias \n'
msg+=' $1.00 USD - Acceso ilimitado al BOT 7 dias \n'
msg+=' $1.50 USD - Acceso ilimitado al BOT 15 dias \n'
msg+=' $2.00 USD - Acceso ilimitado al BOT 30 dias \n'
msg+=' $3.00 USD - Acceso ilimitado al BOT 60 dias\n'
msg+=' $4.00 USD - Acceso ilimitado al BOT 90 dias\n'
msg+=' $5.00 USD - Acceso ilimitado al BOT 180 dias\n'
msg+=' $9.00 USD - Acceso ilimitado al BOT 365 dias\n'
msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n'
msg+=" BOT PREMIUM CON ACCESO Ilimitado \n Incluyendo tu reseller en la Key! \n Soporte, Actualizaciones y MAS!!)\n"
msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n'
msg+=" VISITA NUESTRO CATALOGO EN https://shoppy.gg/@ChumoGH/ \n"
msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n'
ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \
--reply_to_message_id "${message_message_id[$id]}" \
--text "<i>$(echo -e $msg)</i>" \
--parse_mode html
return 0
}

31
Code-BOT-Comandos/donar Normal file
View File

@ -0,0 +1,31 @@
#!/bin/bash
donar () {
bot_retorno="$LINE\n"
bot_retorno+=" ⚠️ TENDRAS ACCESO ILIMITADO ⚠️ \n 🚫 INCLUIDO TU RESELLER EN LA KEY 🚫"
bot_retorno+=" 𝙴𝚜𝚝𝚎 𝙿𝚛𝚘𝚢𝚎𝚌𝚝𝚘, 𝚗𝚎𝚌𝚎𝚜𝚒𝚝𝚊 𝚊𝚢𝚞𝚍𝚊 𝚙𝚊𝚛𝚊 𝙴𝚟𝚘𝚕𝚞𝚌𝚒𝚘𝚗𝚊𝚛\n"
bot_retorno+=" 𝙎𝙞 𝙙𝙚𝙨𝙚𝙖𝙨 𝙍𝙚𝙖𝙡𝙞𝙯𝙖𝙧 𝙪𝙣𝙖 𝘿𝙤𝙣𝙖𝙘𝙞𝙤𝙣\n"
bot_retorno+=" 𝙋𝙖𝙮𝙥𝙖𝙡\n"
bot_retorno+=" PAGO BTC - CRIPTOMONEDA\n"
bot_retorno+="$LINE\n"
bot_retorno+=" Desde ya muchas gracias\n"
bot_retorno+="$LINE\n"
msj_fun
#msj_donar
}
donar_OnOff () {
if [[ ! -e "/etc/donar_active.txt" ]]; then
echo "on" > /etc/donar_active.txt
local bot_retorno="$LINE\n"
bot_retorno+="MENSAJE DONATIVO : <u>ENCENDIDO</u> ✅\n"
bot_retorno+="$LINE\n"
msj_fun
else
rm -rf /etc/donar_active.txt
local bot_retorno="$LINE\n"
bot_retorno+="MENSAJE DONATIVO: <u>APAGADO</u> ❌\n"
bot_retorno+="$LINE\n"
msj_fun
fi
}

BIN
Code-BOT-Comandos/files.tar Normal file

Binary file not shown.

156
Code-BOT-Comandos/gerar_key Normal file
View File

@ -0,0 +1,156 @@
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
# verificacion primarias
meu_ip_fun () {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
}
[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py"
SCPT_DIR="/etc/SCRIPT"
[[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR}
INSTA_ARQUIVOS="ADMVPS.zip"
DIR="/etc/http-shell"
LIST="$(echo "NewVPS-" | rev)"
[[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")"
gerar_key () {
unset usrLOP nombrevalue nBot nBotSS
[[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}"
[[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}"
[[ -z ${callback_query_from_username} ]] && usrLOP=${message_from_username} || usrLOP=${callback_query_from_username}
#[[ -z ${usrLOP} ]] && LIST="$(echo "NewVPS-" | rev)" || LIST="$(echo "${usrLOP}-" | rev)"
numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)
limcont=$(cat /etc/ADM-db/limit)
[[ "$limcont" -ge "998" ]] && limted="∞" || limted=$(cat /etc/ADM-db/limit)
[[ "$(( $limcont - $numkey_gen ))" -ge "900" ]] && credres="∞" || credres=$(( $limcont - $numkey_gen))
meu_ip_fun
[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}"
[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}"
[[ -z $nBot ]] && nBot=$(ShellBot.username)
[[ -e ${CIDdir}/ress ]] && echo $nomkey > ${SCPT_DIR}/menu_credito || echo -e "${firsnme} ${lastnme}" > ${SCPT_DIR}/menu_credito
adminV="$(less ${SCPT_DIR}/menu_credito)";
valuekey="$(date | md5sum | head -c11)"
valuekey+="$(echo $(($RANDOM*10))|head -c 6)"
#valuekey="$(date | md5sum | head -c4)"
#valuekey+="$(echo $(($RANDOM*10))|head -c 3)"
#valuekey+="$(date | md5sum | head -c5)"
#valuekey+="$(echo $(($RANDOM*10))|head -c 2)"
oUP=$(wget -qO- ipv4.icanhazip.com)
fun_list "$valuekey"
keyfinal="$(ofus "$oUP:8888/${valuekey}/$LIST")"
#local bot_retorno=" ═--💻 𝙎 𝘾 𝙍 𝙄 𝙋 𝙏 | 𝘾𝙝𝙪𝙢𝙤𝙂𝙃|𝘼𝘿𝙈 💻 --═\n" #--------------------------------------------------------------------------------------
local bot_retorno=" $LINE\n" #--------------------------------------------------------------------------------------
# 🚫 Sin TU RESELLER EN LA KEY 🚫\n
[[ -z ${message_chat_tittle} ]] && grupCHAT="" || grupCHAT="ChatID : ${chatuser} "
#bot_retorno+=" KEY { $numkey_gen } DE @${usrLOP} con ID: ${nombrevalue} $grupCHAT \n ⚠️ VENCE EN 1 HORA O AL SER USADA ⚠️\n"
[[ -z ${usrLOP} ]] && bot_retorno+=" 🪧 USUARIO SIN ALIAS CON ID: ⚠ADVERTIDO⚠ \n ⚠️ KEY VENCE EN 4 HORAS O AL USARLA ⚠️\n ⚠️\n" || bot_retorno+=" KEY { $numkey_gen } DE @${usrLOP} con ID: <tg-spoiler>${nombrevalue}</tg-spoiler> $grupCHAT \n ⚠️ VENCE EN 4 HORAS O AL SER USADA ⚠️\n"
bot_retorno+="$LINE\n"
bot_retorno+=" 🛡️ 𝚁𝙴𝚂𝙴𝙻𝙻𝙴𝚁 🛡️ : ${adminV}\n"
bot_retorno+="$LINE\n"
bot_retorno+=" 🗝️ <pre>${keyfinal}</pre> 🗝️\n"
bot_retorno+="$LINE\n"
bot_retorno+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) 🔐 \n"
bot_retorno+="$LINE\n"
bot_retorno+='<pre>apt update -y; apt upgrade -y; wget -q https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/setup; chmod 777 setup; ./setup --install</pre>\n'
bot_retorno+="$LINE\n"
bot_retorno+=" 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🧬🧬 S.O Ubuntu 14 a 22 X64(x86|ARM) 🧬🧬 \n Debian 7,8,9,11 (x64) \n 🪦 ADQUIERE TU ACCESO EN @${nBot} 🛡️⚔️\n"
bot_retorno+="$LINE\n"
msj_fun
bot_file+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) 🛡️ \n\n"
bot_file+="apt update -y && apt upgrade -y && wget -q https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/setup && chmod +x setup && ./setup --install\n\n"
bot_file+=" ${keyfinal} \n"
echo -e ${bot_file} > ${keytxt}/key_${usrLOP}.txt
upfile_fun ${keytxt}/key_${usrLOP}.txt
rm ${keytxt}/key_${usrLOP}.txt
}
fun_list () {
rm ${SCPT_DIR}/*.x.c &> /dev/null
unset KEY
KEY="$1"
#CRIA DIR
[[ ! -e ${DIR} ]] && mkdir ${DIR}
#ENVIA ARQS
i=0
VALUE+="gerar.sh http-server.py lista-arq $BASICINST"
for arqx in `ls ${SCPT_DIR}`; do
[[ $(echo $VALUE|grep -w "${arqx}") ]] && continue
echo -e "[$i] -> ${arqx}"
arq_list[$i]="${arqx}"
let i++
done
#CRIA KEY
[[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY}
#PASSA ARQS
unset nombrevalue
[[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}"
[[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}"
[[ "$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)" -ge "$(cat < /etc/ADM-db/limit)" ]] &&
{
numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)
local bot_retorno="$LINE\n"
bot_retorno+=" 🚫 OOOH!, @${callback_query_from_username} con ID:$nombrevalue ‼️\n Tus Creditos se han Agotado \n"
bot_retorno+=" TUS CREDITOS PERMITIDOS :『 $(cat < /etc/ADM-db/limit) 』, 𝙆𝙚𝙮𝙨 𝙂𝙚𝙣𝙚𝙧𝙖𝙙𝙖𝙨『 $numkey_gen 』🗝️\n"
bot_retorno+="$LINE\n"
bot_retorno+=" Si deseas Usar el Generador sin Limite , Contacta con $(cat < /etc/ADM-db/resell)\n"
bot_retorno+=" Recuerda que Todo Esfuerzo Vale, Solicita Acceso \n"
bot_retorno+=" 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🧬🧬 S.O Ubuntu 16,18,20 X64(x86|ARM) 🧬🧬 \n Debian 7,8,9,10 (x64) \n 🪦 ADQUIERE TU ACCESO EN @${nBot} 🛡️⚔️\n"
bot_retorno+=" 🔐 𝙆𝙚𝙮𝙨 𝙐𝙨𝙖𝙙𝙖𝙨『 $(grep -o -i $nombrevalue /etc/gerar-sh-log | wc -l) 』 🔓, 𝘒𝘦𝘺𝘴 𝘈𝘤𝘵𝘪𝘷𝘢𝘴 『 $(ls /etc/http-shell/ | grep name | wc -l) 』 🗝️ \n"
bot_retorno+="$LINE\n"
msj_fun
exit
} ||
echo "$nombrevalue" >> /etc/ADM-db/num-key.cont
numkey_used=$(grep -o -i $nombrevalue /etc/gerar-sh-log | wc -l)
numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)
#ADM BASIC
arqslist="$BASICINST"
for arqx in `echo "${arqslist}"`; do
[[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA
cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/
echo "$arqx" >> ${DIR}/${KEY}/${LIST}
done
rm ${SCPT_DIR}/*.x.c &> /dev/null
echo "$nombrevalue" > ${DIR}/${KEY}.name
[[ ! -z $IPFIX ]] && echo "$IPFIX" > ${DIR}/${KEY}/keyfixa
_hora=$(printf '%(%D-%H:%M:%S)T')
TOKEN="$(cat /etc/ADM-db/token)"
urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
MENSAJE=" ••••📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩••••\n"
MENSAJE+=" KEY : ${keyfinal} \n"
MENSAJE+=" CADUCADA : $_hora\n"
MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n"
MENSAJE+=' 🔰 Bot generador de key 🔰\n'
MENSAJE+=' ⚜ By @ChumoGH ⚜ \n'
MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n"
#&& curl -s -X POST $urlBOT -d chat_id=$nombrevalue -d text="$(echo -e "$MENSAJE")" &>/dev/null
at now +4 hours <<< "rm -rf ${DIR}/${KEY} && rm -f ${DIR}/${KEY}.name"
}
ofus () {
unset server
server=$(echo ${txt_ofuscatw}|cut -d':' -f1)
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}

315
Code-BOT-Comandos/id Normal file
View File

@ -0,0 +1,315 @@
#!/bin/bash
[[ -d /root/RegBOT ]] || mkdir /root/RegBOT
send_ID () {
MSG_id=$((${message_message_id} + 1 ))
[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}"
[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}"
[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username}
[[ -e /root/RegBOT/U_check.txt ]] && n_soli=$(cat /root/RegBOT/U_check.txt | grep ${chatuser} | wc -l) || n_soli=1
[[ $n_soli < 2 ]] && {
echo "${chatuser}" >> /root/RegBOT/U_check.txt
bot_retor="$LINE\n"
bot_retor+=" Cliente 『 ${firsnme} ${lastnme} 』\n"
[[ -z ${nUSER} ]] && bot_retor+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retor+=" <u> ALIAS</u>: @${nUSER} CON $n_soli INTENTOS\n"
bot_retor+="$LINE\n"
bot_retor+=" FORMATO $MSG_id <tg-spoiler>${chatuser}</tg-spoiler> | <u>DIAS</u> \n"
bot_retor+=" PARA ACEPTAR DA CLICK AQUI 👉 /add , LUEGO\n"
bot_retor+=" PARA 4 DIAS COPY 👉 <code>${chatuser} | 4</code> \n"
bot_retor+=" PARA 7 DIAS COPY 👉 <code>${chatuser} | 7</code> \n"
bot_retor+=" PARA 15 DIAS COPY 👉 <code>${chatuser} | 15</code> \n"
bot_retor+=" PARA 30 DIAS COPY 👉 <code>${chatuser} | 30</code> \n"
bot_retor+=" PARA 60 DIAS COPY 👉 <code>${chatuser} | 60</code> \n"
bot_retor+=" PARA 90 DIAS COPY 👉 <code>${chatuser} | 90</code> \n"
bot_retor+=" PARA 180 DIAS COPY 👉 <code>${chatuser} | 179</code> \n"
bot_retor+=" PARA 1 AÑO COPY 👉 <code>${chatuser} | 364</code> \n"
bot_retor+=" CUSTOM COPY 👉 ♨️ <code>${chatuser} | dias</code> ♨️\n"
bot_retor+="$LINE\n"
bot_retor+=" VERIFIQUE SU TOKEN DE PAGO ANTES DE LA AUTORIZACION\n"
bot_retor+="$LINE\n"
msj_add "$(cat < ${CIDdir}/Admin-ID)"
bot_retorno="$LINE\n"
bot_retorno+=" 🔰 𝚂𝚞 𝙸𝙳 【 <code>${chatuser}</code> 】 🔰\n"
bot_retorno+="$LINE\n"
[[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ AÑADA UN ALIAS PARA PODER SOLICITAR ⚠️\n" || bot_retorno+="UD SOLICITO AUTORIZACION A $(cat < /etc/ADM-db/resell)\n"
[[ -z ${nUSER} ]] && bot_retorno+=" IMPOSIBLE VERIFICAR ID SIN ALIAS\n REMARCA SU ${n_soli} SOLITUD INVALIDA \n" || bot_retorno+=" ESTA ES SU ${n_soli} SOLICITUD MEDIANTE ID DE REGISTRO\n"
bot_retorno+="$LINE\n"
[[ -z ${nUSER} ]] && bot_retorno+=" ⚠ ID ENVIADO CON ADVERTENCIA (POSIBLE BANEO DE ID) ⚠️\n" || bot_retorno+=" ✅ ID ENVIADO EXITOSAMENTE ✅\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ENVIE SU COMPROBANDO O CORREO DE PAGO PARA SU AUTORIZACION\n"
bot_retorno+="$LINE\n"
msj_fun
} || {
bot_retorno="$LINE\n"
bot_retorno+=" 🔰 𝚂𝚞 𝙸𝙳 【 <code>${chatuser}</code> 】 🔰\n"
bot_retorno+="$LINE\n"
[[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retorno+=" <u> ALIAS</u>: @${nUSER} CON ID : <code>${chatuser}</code>\n"
[[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ AÑADA UN ALIAS PARA PODER SOLICITAR ⚠️\n" || bot_retorno+=" UD ENVIO ${n_soli} SOLICITUDES A $(cat < /etc/ADM-db/resell)\n"
[[ -z ${nUSER} ]] && bot_retorno+=" IMPOSIBLE VERIFICAR ID SIN ALIAS\n REMARCA SU ${n_soli} SOLITUD INVALIDA \n" || bot_retorno+=" SU PETICION FUE RECHAZADA POR EXCESO DE PETICIONES\n"
bot_retorno+=" 🚫🚫️ SU ID FUE BANEADO 🚫🚫 \n"
bot_retorno+="$LINE\n"
echo "${chatuser}" >> /root/RegBOT/banID
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
msj_fun
}
}
myid_src () {
MSG_id=$((${message_message_id} + 1 ))
[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username}
[[ ! -z $(cat /etc/ADM-db/Admin-ID|grep "${chatuser}" ) ]] && { #ENTRA A VERIFICAR ADM
bot_retorno=" $LINE\n"
bot_retorno+=" HOLA @${nUSER} UD ES ADM \n"
bot_retorno+="$LINE\n"
bot_retorno+=" DIJITA MENU /menu 🔰\n"
bot_retorno+="\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
#bot_retorno+="<b>bold</b>, <strong> bold</strong> \n
#<i>italic</i>, <em>italic</em>\n"
bot_retorno+=" <pre>BORRAREMOS ESTE PRE ${message_message_id} </pre>\n"
bot_retorno+=" <code>BORRAREMOS ESTE CODE ${MSG_id} </code>\n"
msj_fun
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
} || { # SINO ES ADM - CAMBIA A USUARIOS AUTORIZADOS
[[ $(cat ${CID}|grep "${chatuser}" ) = "" ]] && { # ENTRA A VERIFCAR USUARIOS QUE NO EXISTEN
bot_retorno="$LINE\n"
[[ -z ${nUSER} ]] && bot_retorno+=" ⚠️ USUARIO SIN ALIAS ⚠️\n" || bot_retorno+="𝙃𝙤𝙡𝙖 【 @${nUSER} 】, SU ID NO ESTA AUTORIZADO\n"
bot_retorno+=" ADQUIERE UNA MENBRESIA O DIJITA /prices \n"
bot_retorno+=" VISITA LA TIENDA 🛒🛍️ PINCHANDO 👉<a href='https://shoppy.gg/@ChumoGH/'>AQUI</a>👈\n"
bot_retorno+="$LINE\n"
bot_retorno+="𝚂𝚞 𝙸𝙳 【 <code>${chatuser}</code> 】\n"
bot_retorno+="$LINE\n"
bot_retorno+="👇PINCHA 👇 EN EL BOTON PARA QUE $(cat < /etc/ADM-db/resell) TE AUTORICE!!\n"
bot_retorno+="$LINE\n"
menu_printSN
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
} || { # ENTRA A IDS YA REGISTRADOS
bot_retorno=" $LINE\n"
bot_retorno+=" HOLA @${nUSER} SU ID ESTA REGISTRADO \n"
bot_retorno+="$LINE\n"
bot_retorno+=" 🆔 : <code>${chatuser}</code> 🔰\n"
bot_retorno+=" FECHA DE CORTE : ⏳ $(cat /etc/ADM-db/User-ID | grep ${chatuser}| awk '{print $3}') | $(date +%R)\n"
bot_retorno+="\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
msj_fun
}
} # FIN VERIFICAR ADM
}
killIP_reply () {
if sed -i "/${message_text[$id]}/d" /var/www/html/ChumoGH/checkIP.log; then
bot_retorno="$LINE\n"
bot_retorno+=" IP ELIMINADA DE REGISTRO EXITOSAMENTE!\n"
bot_retorno+=" IP : ${message_text[$id]} \n"
bot_retorno+="$LINE\n"
else
bot_retorno="$LINE\n"
bot_retorno+=" ERROR AL ELIMINAR IP DE REGISTROS \n"
bot_retorno+=" POSIBLEMENTE ${message_text[$id]} NO EXISTA \n"
bot_retorno+="$LINE\n"
fi
msj_fun
}
deleteID_reply () {
ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig')
idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig')
sed -i "${message_text[$id]}/d" ${CID}
bot_retorno="$LINE\n"
bot_retorno+=" ID ELIMINADO EXITOSAMENTE!\n"
bot_retorno+=" ID Eliminado: ${ids}\n"
bot_retorno+="$LINE\n"
bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n"
#bot_retor+="𝙃𝙤𝙡𝙖 『 $message_from_first_name $message_from_last_name 』\n"
bot_retor+="Desafortunadamente tu Membresia ha Finalizado\n"
#bot_retor+=" ⌚⌚ Hora Actual del Bot : ⌚⌚\n"
bot_retor+="Fecha de Corte : $(date '+%C%y-%m-%d') - $(date +%R) \n"
bot_retor+="Si tienes Dudas, Contacta con $(cat < /etc/ADM-db/resell)\n"
bot_retor+="$LINE\n"
bot_retor+="Recuerda adquirir creditos, o Realizar una Colaboracion\n $(cat < /etc/mpayu) \n"
bot_retor+="Para mantener tu acceso al BotGen Recuerda Mostrar tu Token de Donacion o Compra\n"
bot_retor+="$LINE\n"
msj_fun
msj_add ${ids}
upfile_src
}
img_reply () {
local file_id
ShellBot.getFile --file_id ${message_document_file_id[$id]}
ShellBot.downloadFile --file_path "${return[file_path]}" --dir "/root/"
[[ -e ${return[file_path]} ]] && mv ${return[file_path]} "/root/"
local bot_retorno="ID user botgen\n"
bot_retorno+="$LINE\n"
bot_retorno+=" FILE ${return[file_path]} \n"
bot_retorno+="$LINE"
ID_img=${message_photo_file_unique_id}
bot_retorno+=" CALCULANDO ID DE MENSAJES \n"
bot_retorno+=" ID FILE PHOTO : ${message_photo_file_id}\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ID UNICO FILE PHOTO : ${message_photo_file_unique_id}\n"
bot_retorno+=" CAPTION : ${message_caption}\n"
bot_retorno+="$LINE\n"
msj_fun
#upfile_src
msj_img "${ID_img}"
}
searchID_reply () {
searchID=$(cat -n /etc/ADM-db/User-ID | grep "${message_text[$id]}")
bot_retorno="$LINE\n"
bot_retorno+=" MOSTRANDO RESULTADOS DE BUSQUEDA!\n"
bot_retorno+=" $LINE\n"
[[ ! -z ${searchID} ]] && bot_retorno+=" N°${searchID} \n" || bot_retorno+=" ID NO ENCONTRADO \n"
msj_fun
}
addID_reply () {
ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig')
idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig')
valid=$(date '+%C%y-%m-%d' -d " +$idc days")
[[ $(cat ${CID}|grep "$ids" ) = "" ]] && {
[[ -e /root/RegBOT/banID ]] && sed -i "/${ids}/d" /root/RegBOT/banID
echo "/${ids} | $valid" >> ${CID}
echo "/${ids} | $(date '+%C%y-%m-%d') | $(date +%R)" >> ${CID}.reg
bot_retorno=" ✉️ REGISTRO ACEPTADO ✉️ \n"
bot_retorno+=" 🆔 : ${ids} | ACEPTADO 🧾\n"
bot_retorno+="$LINE\n"
bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ✅ ID REGISTRADO EXITOSAMENTE ✅\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
unset i
for i in $(cat /etc/ADM-db/User-ID | awk '{print $3}'); do
[[ "$(date -d $(date '+%C%y-%m-%d') +%s)" -ge "$(date -d $i +%s)" ]] && {
for id in $(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do
sed -i "/${id}/d" /etc/ADM-db/User-ID
bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n"
bot_retor+=" SU MEMBRESIA HA FINALIZADO POR CHECK ID\n"
bot_retor+=" FIN DE CONTRADO : $(date '+%C%y-%m-%d') - $(date +%R) \n"
bot_retor+=" SI DESEAS APELAR TU CONTRADO, CONTACTA CON $(cat < /etc/ADM-db/resell)\n"
bot_retor+=" $LINE\n"
bot_retor+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n"
bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n"
bot_retor+=" $LINE\n"
msj_add ${id}
done
}
done
[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username}
[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}"
[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}"
bot_retor=" ✉️ ESTIMADO @${nUSER} SU REGISTRO FUE APROBADO ✉️ \n"
bot_retor+=" $LINE\n"
bot_retor+=" EL ADM $(cat < /etc/ADM-db/resell) APROBO TU SOLICITUD\n"
bot_retor+=" ☺GRACIAS POR CONFIAR EN NOSOTROS ☺️\n"
bot_retor+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n"
bot_retor+=" 🆔 : ${ids} | 🔐 ACEPTADO 🧾\n"
bot_retor+="𝙃SU RESELLER : ${firsnme} ${lastnm} \n"
bot_retor+=" $LINE\n"
bot_retor+=" GENERAR Key's usar el comando /keygen\n"
bot_retor+=" Para MENU Digita el comando /menu\n"
bot_retor+=" $LINE\n"
bot_retor+=" CONTACTA ESCRIBE AL ADM $(cat < /etc/ADM-db/resell)\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @ChumoGH "
bot_retor+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n"
bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n"
bot_retor+=" $LINE\n"
msj_fun
msj_add ${ids}
upfile_src
} || {
bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
bot_retorno+="Este ID ya esta Registrado\n"
bot_retorno+=" ❌ ID NO REGISTRADO ❌\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
msj_fun
}
}
addID_reventa () {
bot_retorno=" -----🫥 FUNCION EN ESTADO BETA 🫥 ------\n"
bot_retorno+=" $LINE\n"
bot_retorno+=" ID ${ids} VALIDO HASTA $(cat /etc/ADM-db/User-ID | grep ${ids} | awk '{print $3}')\n"
bot_retorno+=" ❌ NO REGISTRAR DUPLICADOS ❌\n"
bot_retorno+=" SE PRESENTAN REGLAS DE ESTE FORMATO \n"
bot_retorno+=" 1 ID - Podra autorizar maximo 10 IDs \n"
bot_retorno+=" Por maximo de 6 meses de tiempo! \n"
bot_retorno+="$LINE\n"
bot_retorno+=" EL ADMIN PRINCIPAL, PODRA CONTROLAR \n"
bot_retorno+=" ESTAS AUTORIZACIONES \n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
msj_fun
}
addID_REV () {
ids=$(echo ${message_text[$id]} | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig')
idc=$(echo ${message_text[$id]} | awk '{print $3}' | sed -e 's/[^a-z0-9 -]//ig')
valid=$(date '+%C%y-%m-%d' -d " +$idc days")
[[ $(cat ${${CIDRESS}}|grep "$ids" ) = "" ]] && {
echo "/${ids} | $valid" >> ${CID}
bot_retorno=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 @${callback_query_from_username} 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n"
bot_retorno+="$LINE\n"
bot_retorno+=" New ID: ${ids}\n"
bot_retorno+=" FECHA DE REGISTRO : $(date '+%C%y-%m-%d')|$(date +%R) \n VALIDO HASTA : ${valid}|$(date +%R)\n"
bot_retorno+="$LINE"
bot_retorno+=" ✅ ID REGISTRADO ✅\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
unset i
for i in $(cat /etc/ADM-db/User-ID | awk '{print $3}'); do
[[ $(date -d $i +%s) -ge $(date -d $(date '+%C%y-%m-%d') +%s) ]] || {
idlog=$(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig')
sed -i "/${idlog}/d" /etc/ADM-db/User-ID
bot_retor=" 🎊 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 🎊\n"
bot_retor+="Desafortunadamente tu Membresia ha Finalizado\n"
bot_retor+="Fecha de Corte : $i \n"
bot_retor+="Si tienes Dudas, Contacta con $(cat < /etc/ADM-db/resell)\n"
bot_retor+="$LINE\n"
bot_retor+="Recuerda adquirir creditos, o Realizar una Colaboracion\n $(cat < /etc/mpayu) \n"
bot_retor+="Para mantener tu acceso al BotGen Recuerda Mostrar tu Token de Donacion o Compra\n"
bot_retor+="$LINE\n"
msj_add ${idlog}
}
done
bot_retor=" ✉️ 𝙱𝚒𝚎𝚗𝚟𝚎𝚗𝚒𝚍𝚘 Nuevamente 𝚊𝚕 𝙱𝚘𝚝𝙶𝚎𝚗 𝙲𝚑𝚞𝚖𝚘𝙶𝙷-𝙰𝙳𝙼 ✉️ \n"
bot_retor+="𝙃𝙤𝙡𝙖 『 ${callback_query_from_first_name} ${callback_query_from_last_name} 』\n"
bot_retor+=" EL ADM $(cat < /etc/ADM-db/resell) te autorizo\n"
bot_retor+=" AUTORIZACION EXTENDIDA HASTA EL ${valid}\n"
bot_retor+=" GENERAR Key's usar el comando /keygen\n"
bot_retor+=" Para MENU Digita el comando /menu\n"
bot_retor+=" $LINE\n"
bot_retor+=" CONTACTA ESCRIBE AL ADM $(cat < /etc/ADM-db/resell)\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @ChumoGH "
bot_retor+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n"
bot_retor+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n"
bot_retor+="$LINE\n"
msj_fun
msj_add ${ids}
upfile_src
} || {
bot_retorno=" -----🫥 ID YA REGISTRADO 🫥 ------\n"
bot_retorno+=" $LINE\n"
bot_retorno+=" ID ${ids} VALIDO HASTA $(cat /etc/ADM-db/User-ID | grep ${ids} | awk '{print $3}')\n"
bot_retorno+=" ❌ NO REGISTRAR DUPLICADOS ❌\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
bot_retorno+="$LINE\n"
msj_fun
}
}

View File

@ -0,0 +1,7 @@
#!/bin/bash
invalido_src () {
bot_retorno="$LINE\n"
bot_retorno+="Comando LENIN MORENO ( INVALIDO XD! )\n"
bot_retorno+="$LINE\n"
}

View File

@ -0,0 +1,42 @@
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
SRC="${CIDdir}/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC}
CID="${CIDdir}/User-ID" && [[ ! -e ${CID} ]] && echo > ${CID}
keytxt="${CIDdir}/keys" && [[ ! -d ${keytxt} ]] && mkdir ${keytxt}
LINE=" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"
# Token del bot
bot_token="$(cat ${CIDdir}/token)"
msj_add () {
[[ -z $bot_token ]] && exit
ID=$1 && ID="$(echo $ID | awk '{print $1}' | sed -e 's/[^0-9]//ig')"
[[ ${ID} -lt '999' ]] && ID='576145089'
urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
#curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null
curl -s -X POST $urlBOT -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null
}
#FUNCION DESTRUIR ID
unset i
for i in $(cat /etc/ADM-db/User-ID | awk '{print $3}'); do
[[ "$(date -d $(date '+%C%y-%m-%d') +%s)" -ge "$(date -d $i +%s)" ]] && {
for id in $(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do
sed -i "/${id}/d" /etc/ADM-db/User-ID
echo -e " ID : ${id} REMOVIDO $i en $(date '+%C%y-%m-%d') - $(date +%R) " >> $HOME/killID.log
MENSAJE="•••••••••••••••••📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩•••••••••••••••••\n"
MENSAJE+=" SU MEMBRESIA HA FINALIZADO MEDIANTE KILL-ID\n"
MENSAJE+=" FIN DE CONTRADO : $(date '+%C%y-%m-%d') - $(date +%R) \n"
MENSAJE+=" SI DESEAS APELAR TU CONTRADO, CONTACTA CON $(cat < /etc/ADM-db/resell)\n"
MENSAJE+=" $LINE\n"
MENSAJE+=" ADQUIERE TU MEMBRESIA DESDE @$(ShellBot.username) , DIGITANDO /prices \n"
MENSAJE+=" RECUERDA MANTENER TU CAPTURA DE PAGO, PARA ALGUN RECLAMO!\n"
MENSAJE+=" $LINE\n"
msj_add ${id}
done
}
done
exit

14
Code-BOT-Comandos/link Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
link_src () {
bot_retorno="$LINE\n"
bot_retorno+=" 🧬🧬 Soporte - OS 🧬🧬 \n Ubuntu 14 - 16 - 18 - 20 (x64)\n Debian 7,8,9,10 (x64) \n 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🪦 Solicita Creditos de tu KEY 🛡️⚔️\n"
bot_retorno+="Verifica tus Keys, https://t.me/ChumoGH_bot Reseller : @ChumoGH \n"
bot_retorno+="$LINE\n"
bot_retorno+="<code>apt update -y; apt upgrade -y; wget -q http://plus.chumogh.xyz/setup; chmod 777 setup; ./setup</code>\n"
bot_retorno+="$LINE\n"
bot_retorno+="$LINE\n"
bot_retorno+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) FOR ARM 🛡️ \n"
bot_retorno+="$LINE\n"
bot_retorno+="<code>apt update -y; apt upgrade -y; wget -q https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/setup; chmod 777 setup; ./setup</code>\n"
msj_fun
}

91
Code-BOT-Comandos/listID Normal file
View File

@ -0,0 +1,91 @@
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
listID_GEN () {
unset bot_lin
n=1
for i in $(cat /etc/ADM-db/User-ID | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do
idlog=$(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $3}')
#idGEN=$(grep -o -i $idlog /etc/ADM-db/num-key.cont | wc -l)
[[ -e /etc/ADM-db/num-key.cont ]] && idGEN=$(cat /etc/ADM-db/num-key.cont | grep $i | wc -l) || idGEN=0
bot_lin+=" $n] > <tg-spoiler>${i}</tg-spoiler> | $idlog | ${idGEN}\n"
#lsid=$(cat -n ${CID})
let n++
done
local bot_retorno="$LINE\n"
bot_retorno+=' - ID´S AUTORIZADOS + GENERADAS -\n'
bot_retorno+="$LINE\n"
bot_retorno+=" $(echo -e ${bot_lin}) " #|column -t -s '-')"
bot_retorno+="$LINE\n"
msj_fun
}
listID_src () {
lsid=$(cat -n ${CID})
local bot_retorno=" $LINE\n"
bot_retorno+=" - ID'S AUTORIZADOS -\n"
bot_retorno+="$LINE\n"
bot_retorno+="${lsid}\n"
bot_retorno+="$LINE\n"
msj_fun
}
ChatADM () {
local bot_retorno=" $LINE\n"
bot_retorno+=" ENVIA TU ARCHIVO O COMPROBANTE AL ADM\n"
bot_retorno+=" MODELO EN EVOLUCCION DE @ChumoGH\n"
bot_retorno+="\n"
bot_retorno+="$LINE\n"
msj_fun
}
list_IP () {
unset lsid
unset idchek
[[ -z ${idchek} ]] && idchek="${message_from_id}"
[[ -z ${idchek} ]] && idchek="${callback_query_from_id}"
[[ -z "$(cat /etc/ADM-db/User-ID | grep ${idchek} )" ]] && {
[[ "$(cat /etc/ADM-db/Admin-ID)" == "${idchek}" ]] && {
cat /var/www/html/ChumoGH/checkIP.log > /tmp/ips
echo -e " $(cat /tmp/ips | awk '{print $3}' | uniq)" > /tmp/ipchek
lsid=$(cat -n /tmp/ipchek)
local bot_retorno=" $LINE\n"
bot_retorno+=' - ULTIMOS IP´S UNICOS CAPTURADOS \n'
bot_retorno+=" - TIENES $(cat /var/www/html/ChumoGH/checkIP.log | wc -l) IP´s CAPTURADAS \n"
bot_retorno+="$LINE\n"
bot_retorno+=" ${lsid}\n"
bot_retorno+="$LINE\n"
}
} || {
cat /var/www/html/ChumoGH/checkIP.log | grep "${idchek}" > /tmp/ips
echo -e " $(cat /tmp/ips | awk '{print $3}' | uniq)" > /tmp/ipchek
lsid=$(cat -n /tmp/ipchek)
local bot_retorno=" $LINE\n"
bot_retorno+=' - ULTIMOS IP´S UNICOS CAPTURADOS \n'
bot_retorno+=" - TIENES $(cat /var/www/html/ChumoGH/checkIP.log | grep ${idchek} | wc -l) IP´s CAPTURADAS DE TUS GENERADAS \n"
bot_retorno+="$LINE\n"
bot_retorno+=" ${lsid}\n"
bot_retorno+="$LINE\n"
}
msj_fun
}
listID_RESS () {
i=1
for lRES in $(ls ${CIDRESS}); do
echo " $i /$lRES"
let i++
done
lsid=$(ls ${CIDRESS})
local bot_retorno="$LINE\n"
bot_retorno+="Lista de id permitidos\n"
bot_retorno+="$LINE\n"
bot_retorno+="${lsid}\n"
bot_retorno+="$LINE\n"
msj_fun
}

94
Code-BOT-Comandos/menu Normal file
View File

@ -0,0 +1,94 @@
#!/bin/bash
unset checkPID_GEN
checkPID_GEN=$(ps x|grep -v grep|grep "8888")
[[ ! $checkPID_GEN ]] && PID_GEN='(💔) OFF' || PID_GEN='(💚) ON'
[[ -e /etc/systemd/system/btkill.service ]] && kkid="✅" || kkid="❌"
menu_src () {
#namcli=$(bash /etc/ADM-db/BotGen.sh | grep message_from_first_name | grep message_from_first_name | grep -i message_from_first_name | awk {'print $4'})
#${message_text[$usuario]} $message_from_first_name $message_from_last_name
[[ -z ${callback_query_from_username} ]] && nUSER=${message_from_username} || nUSER=${callback_query_from_username}
bot_retorno=" 🎊 MENU PRINCIPAL DE ChumoGH|ADM $(cat < /etc/SCRIPT/v-local.log) 🎊\n"
if [[ $(echo $permited|grep "${chatuser}") = "" ]]; then
if [[ $(cat ${CID}|grep "${chatuser}") = "" ]]; then
[[ -e /root/RegBOT/banID ]] && idBAN=$(cat /root/RegBOT/banID) || idBAN=""
#[[ -z "$(echo $idBAN | grep "${chatuser")" ]] && {
bot_retorno+="$LINE\n"
#bot_retorno+="𝙃𝙤𝙡𝙖 ( $message_from_first_name $message_from_last_name ), 𝘽𝙞𝙚𝙣𝙫𝙚𝙣𝙞𝙙𝙤 𝙖𝙡 𝙈𝙚𝙣𝙪"
bot_retorno+="$LINE\n"
bot_retorno+=" ⚠️ AUN NO ESTAS AUTORIZADO 🚫"
bot_retorno+="$LINE\n"
bot_retorno+=" HOLA @${nUSER} SU ID NO ESTA VERIFICADO \n"
bot_retorno+="$LINE\n"
bot_retorno+="/ID ► MUESTRA TU ID PERSONAL 📍\n"
bot_retorno+="/menu | MENU DE COMANDOS\n"
bot_retorno+="/ayuda | INSTRUCCIONES DE COMANDOS\n"
bot_retorno+="/price | PRECIOS DE ACCESO MEMBRESIAS\n"
bot_retorno+="/chekid | VERIFICAR ID LUEGO DE PAGO\n"
bot_retorno+="$LINE\n"
bot_retorno+=" ADQUIERE UNA MENBRESIA O DIJITA /prices \n O CONTACTAME $(cat < /etc/ADM-db/resell)\n"
bot_retorno+="$LINE\n"
menu_printSN
# } || {
# bot_retorno+="$LINE\n"
# bot_retorno+=" 🚫🚫️ SU ID FUE BANEADO 🚫🚫 \n"
# bot_retorno+="$LINE\n"
# menu_printSN
# }
#msj_fun
else
[[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")"
numkey_used=$(grep -o -i $message_chat_id /etc/gerar-sh-log | wc -l)
numkey_gen=$(grep -o -i $message_chat_id /etc/ADM-db/num-key.cont | wc -l)
data_user=$(cat ${CID}|grep "${chatuser}" | awk -F "|" '{print $2}')
data_sec=$(date +%s)
data_user_sec=$(date +%s --date="$data_user")
variavel_soma=$(($data_user_sec - $data_sec))
dias_use=$(($variavel_soma / 86400))
[[ "$dias_use" -le 0 ]] && dias_use=0 || dias_use=$(($dias_use + 1))
bot_retorno+="$LINE\n"
bot_retorno+=" ⚠️ ACCESO ILIMITADO POR『 $dias_use 』DIAS ⚠️ \n ✓ INCLUIDO TU RESELLER EN LA KEY ✔"
bot_retorno+=" ✩ ID AUTORIZADO HASTA EL $data_user | $(date +%R) ⌚\n"
[[ -z $checkPID_GEN ]] && bot_retorno+=" ⚠️ ADVERTENCIA!! BotGen ⚠️\n" || bot_retorno+=" ✩ BotGen FUNCIONANDO ONLINE 🔥\n"
[[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}"
[[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}"
bot_retorno+="$LINE\n"
bot_retorno+=" RESELLER ACTUAL : ${firsnme} ${lastnme}\n"
bot_retorno+="$LINE\n"
bot_retorno+="/menu ► MENU DE ACCIONES PERMITIDAD | \n"
bot_retorno+="/hack ► HACKEAR LA NASA :v \n"
bot_retorno+="/rvntas ► AGREGAR REVENDEDOR \n"
bot_retorno+="/instal ► LINK DE SCRIPT |\n"
bot_retorno+="/keygen ► COMANDO DE GENERAR KEY |\n"
bot_retorno+="/ayuda ► Ayuda/Instrucciones del BOT |\n"
bot_retorno+=" ❊ 𝚁𝚎𝚌𝚞𝚎𝚛𝚍𝚊 𝙲𝚘𝚕𝚊𝚋𝚘𝚛𝚊𝚛 💸💰 , 𝚜𝚒 𝚝𝚎 𝚊𝚐𝚛𝚊𝚍𝚘 𝚖𝚒 𝚃𝚛𝚊𝚋𝚊𝚓𝚘 ❊\n"
bot_retorno+="Si tienes inconvenientes con el Bot 🎁 Contactame : +$(cat < /etc/numctc) 📲\n"
bot_retorno+=" 🔐 『 $numkey_used 』𝙆𝙚𝙮𝙨 𝙐𝙨𝙖𝙙𝙖𝙨 🔓,『 $numkey_gen 』𝙆𝙚𝙮𝙨 𝙂𝙚𝙣𝙚𝙧𝙖𝙙𝙖𝙨 🗝️ \n"
bot_retorno+="$LINE\n"
menu_print
fi
else
unset usadas
usadas="$(cat /etc/http-instas)"
[[ ! $usadas ]] && k_used="0" || k_used="$usadas"
bot_retorno+="Gen $PID_GEN | Keys Used [$k_used]\n"
bot_retorno+="$LINE\n"
bot_retorno+="/infosys ➩ INFORMACION DEL VPS \n"
bot_retorno+="/killid ➩ LIMITADOR DE CADUCIDAD ${kkid}\n"
bot_retorno+="/idgen ➩ LISTA DE ID + GENERADAS\n"
bot_retorno+="/chat ➩ CHATEAR CON EL BOT\n"
bot_retorno+="/buscar ➩ BUSCAR ID AUTORIZADO\n"
bot_retorno+="/instal ➩ INSTALADOR OFICIAL \n"
bot_retorno+="/hack ➩ HACKEAR LA NASA :v \n"
bot_retorno+="/addrev ➩ AGREGAR REVENDEDOR \n"
bot_retorno+="/ayuda ➩ INSTRUCCIONES DE COMANDOS \n"
bot_retorno+="/cache ➩ OPTIMIZA SERVIDOR \n"
bot_retorno+="/update ➩ ACTUALIZA FILES BotGen \n"
bot_retorno+="/reboot ➩ REINICIA SERVIDOR VPS \n"
bot_retorno+="/price ➩ PRECIOS DE ACCESO MEMBRESIAS\n"
bot_retorno+="/donar ➩ ACTIVA O DESACTIVA EL MENSAJE DONATIVO \n"
bot_retorno+="$LINE\n"
menu_print
fi
}

13
Code-BOT-Comandos/myip Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
meu_ip_fun () {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
}
meu_ip () {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && echo "$MIP2" || echo "$MIP"
}

44
Code-BOT-Comandos/power Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
start_gen () {
MSG_id=$((${message_message_id} + 1 ))
unset PIDGEN
PIDGEN=$(ps aux|grep -v grep|grep "http-server.sh")
if [[ ! $PIDGEN ]]; then
screen -dmS generador /bin/http-server.sh -start
local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
bot_retorno+=" Generador: <u>Online</u> ✅\n"
bot_retorno+="$LINE\n"
msj_fun
else
killall http-server.sh
local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
bot_retorno+=" Generador: ⚠️ <u>Offline</u> ❌\n"
bot_retorno+="$LINE\n"
msj_fun
fi
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
}
files_script() {
MSG_id=$((${message_message_id} + 1 ))
#echo '#!/bin/bash
local bot_retorno=" ✉️ ====NOTIFICACION==== ✉️ \n"
bot_retorno+="$LINE\n"
wget -q -O $HOME/lista https://www.dropbox.com/s/yqhjmr7o3342viv/lista?dl=0 -o /dev/null
rm -f /etc/SCRIPT/*
cd /etc/SCRIPT
wget --no-check-certificate -i $HOME/lista -o || echo " error!"
rm -f $HOME/lista*
cd $HOME
[[ $(ls /etc/SCRIPT/ | wc -l) > 0 ]] && bot_retorno+=" Generador: ⚠️ <u> ACTUALIZADO</u> \n" || bot_retorno+=" ERROR AL ACTUALIZAR, INGRESE AL SERVIDOR\n"
bot_retorno+="$LINE\n"
msj_fun
sleep 5s
msj_del ${message_message_id}
msj_del ${MSG_id}
}

View File

@ -0,0 +1,10 @@
#!/bin/bash
reboot_src () {
bot_retorno="$LINE\n"
bot_retorno+="Reiniciando servidor VPS\n"
bot_retorno+="$LINE\n"
msj_fun
sleep 2
sudo reboot
}

46
Code-BOT-Comandos/status Normal file
View File

@ -0,0 +1,46 @@
#!/bin/bash
infosys_src () {
#HORA Y FECHA
unset _hora
unset _fecha
_hora=$(printf '%(%H:%M:%S)T')
_fecha=$(printf '%(%D)T')
#PROCESSADOR
unset _core
unset _usop
_core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
_usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
#MEMORIA RAM
unset ram1
unset ram2
unset ram3
ram1=$(free -h | grep -i mem | awk {'print $2'})
ram2=$(free -h | grep -i mem | awk {'print $4'})
ram3=$(free -h | grep -i mem | awk {'print $3'})
unset _ram
unset _usor
_ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})")
_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
unset os_sys
os_sys=$(echo $(cat -n /etc/issue |grep 1 |cut -d' ' -f6,7,8 |sed 's/1//' |sed 's/ //')) && echo $system|awk '{print $1, $2}'
bot_retorno="$LINE\n"
bot_retorno+="S.O: $os_sys\n"
bot_retorno+="Su IP es: $(meu_ip)\n"
bot_retorno+="$LINE\n"
bot_retorno+="Ram: $ram1 || En Uso: $_usor\n"
bot_retorno+="USADA: $ram3 || LIBRE: $ram2\n"
bot_retorno+="$LINE\n"
bot_retorno+="CPU: $_core || En Uso: $_usop\n"
bot_retorno+="$LINE\n"
bot_retorno+="FECHA: $_fecha\n"
bot_retorno+="HORA: $_hora\n"
bot_retorno+="$LINE\n"
msj_fun
}

30
Code-BOT-Comandos/update Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
dupdate2 (){
rm -rf /etc/ADM-db/*
rm -rf /etc/SCRIPT/*
}
update () {
#[[ -e /etc/nivbot ]] || echo "0" > /etc/nivbot
#[[ -d /etc/ADM-db ]] && chmod +x /etc/ADM-db/*
#echo -ne "\033[1;31m[ ! ] RESPALDANDO USUARIO ADMINISTRADOR "
#(
#[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes $HOME/costes
#[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token $HOME/token
#[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID $HOME/Admin-ID
#[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID $HOME/User-ID
#[[ -e /etc/ADM-db/limit ]] && mv /etc/ADM-db/limit $HOME/limit
#[[ -e /etc/ADM-db/resell ]] && mv /etc/ADM-db/resell $HOME/resell
#[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress $HOME/ress
#[[ -e /etc/ADM-db/num-key.cont ]] && mv /etc/ADM-db/num-key.cont $HOME/num-key.cont
#) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
#rm -rf /etc/ADM-db
#CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
#[[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://www.dropbox.com/s/9q5o523m1ns8vkd/confbot-t.sh &> /dev/null && chmod +x ${CIDdir}/confbot.sh
#sed -i -e 's/\r$//' ${CIDdir}/confbot.sh
#echo $id > /etc/ADM-db/idioma_menuinst
#source ${CIDdir}/confbot.sh
#bot_conf
files_script
}

576
Code-BOT-General/intBOT.sh Normal file
View File

@ -0,0 +1,576 @@
#!/bin/bash
[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg)
bar="$(msg -bar3)"
[[ -e /etc/systemd/system/btkill.service ]] && systemctl restart btkill.service &>/dev/null
tr=${id}
ofus () {
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]="x";;
"x")txt[$i]=".";;
"5")txt[$i]="s";;
"s")txt[$i]="5";;
"1")txt[$i]="@";;
"@")txt[$i]="1";;
"2")txt[$i]="?";;
"?")txt[$i]="2";;
"4")txt[$i]="0";;
"0")txt[$i]="4";;
"/")txt[$i]="K";;
"K")txt[$i]="/";;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
# SISTEMA DE SELECAO
selection_fun () {
local selection="null"
local range
for((i=0; i<=$1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
echo -ne "\033[1;37mOpcion: " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
check_ip () {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
echo "$IP" > /usr/bin/vendor_code
}
function_verify () {
unset keybot
echo -e "\033[7;49;35m =====>>►► 🐲 GEN ChumoGH${TTcent}VPS 🐲 ◄◄<<===== \033[0m"
msg -bar
[[ "$(echo "$(cat < /etc/nivbot)")" -ge "5" ]] && {
[[ -e /bin/downloadbot ]] && {
[[ -z $(cat < /bin/downloadbot) ]] && read -p " Ingresa tu Key de Autorizacion : " keybot || unset keybot
} || read -p " Key de Autorizacion : " keybot
} || read -p " Key de Autorizacion : " keybot
[[ -z $keybot ]] && {
rm -f /bin/downloadbot
[[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com'
permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
} || {
permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
}
[[ $(echo $permited|grep "${IP}") = "" ]] || {
clear
echo -e "\n\n\n\e[31m====================================================="
echo -e "\e[31m ¡LA IP $(wget -qO- ipv4.icanhazip.com) FUE RECHAZADA!"
echo -e " $link No AUTORIZADA el ACCESO "
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
echo -e "\e[31m=====================================================\n\n\n\e[0m"
[[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh
exit 1
} && {
### INTALAR VERCION DE SCRIPT
clear
echo -e "\n\n\n\e[32m====================================================="
echo -e "\e[32m ¡LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!"
echo -e " Mediante $link Autorida por @ChumoGH"
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
echo -e "\e[32m=====================================================\n\n\n\e[0m"
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
[[ -e /etc/nivbot ]] && {
i=$(cat < /etc/nivbot)
lv=$(($i+1))
echo $lv > /etc/nivbot
} || echo "1" > /etc/nivbot
v1=$(curl -sSL "https://www.dropbox.com/s/8tizr516cvkwss6/v-new.log")
echo "$v1" > /etc/ADM-db/vercion
}
}
edit_cost () {
msg -bar
echo -e "\033[1;37mRECUERDA EDITAR LOS COSTOS O TIEMPOS\n Para Salir Ctrl + C o 0 Para Regresar\033[1;33m"
echo -e " \033[1;31m[ !!! ]\033[1;33m RECUERDA, UNA VEZ EDITADO NO PODRAS VOLVER A \n TENER EL ORIGINAL, A MENOS QUE REINSTALES \033[1;31m\033[1;33m"
msg -bar
echo -e " \033[1;31mLuego de editar Presiona Ctrl + O y Enter \033[1;33m \033[1;31m\033[1;33m"
echo -e " \033[1;31m Por Ultimo Ctrl + X \033[1;33m \033[1;31m\033[1;33m"
echo -ne "\033[1;37m"
read -p " Presiona Enter para Continuar "
nano /etc/ADM-db/sources/costes
systemctl restart BotGen-server &>/dev/null
echo -e " MODIFICADO EXITOSAMENTE"
bot_gen
}
change_pay () {
unset option
clear
echo -e "$bar"
echo -e " MENSAJE ACTUAL $(cat < /etc/mpayu)"
echo -e "$bar"
echo -e " \033[1;37mINGRESA TU METODO DE PAGO Y/O CORREO"
echo -e "$bar\n"
echo -e "Ingresa en este Orden o Secuencia \n PAYPAL : chumogh@gmail.com \n"
echo -e "$bar"
read -p "TEXTO: " opcion
[[ -z $opcion ]] && bot_gen && exit || echo "$opcion" > /etc/mpayu && echo "TOKEN APLICADO EXITOSAMENTE"
read -p " Enter para Continuar"
echo -e "$bar"
echo -e " \033[1;37m NUMERO DE CONTACTO ACTUAL $(cat < /etc/numctc) "
echo -e "$bar\n"
echo -e " Ingresa en este Orden o FORMATO \n 593987072611 \n"
echo -e "$bar"
read -p "TEXTO: " opcion1
opcion1="$(echo -e "$opcion1" | sed -e 's/[^0-9]//ig')"
[[ -z $opcion ]] && return || {
echo -e "$opcion1" > /etc/numctc
chmod +x /etc/numctc
echo "TOKEN APLICADO EXITOSAMENTE"
systemctl restart BotGen-server &>/dev/null
}
echo -e "$bar\n"
echo -e " AGREGA NUEVO URL DE CATALOGO / OPCIONAL \n https://shoppy.gg/@ChumoGH/ \n"
echo -e "$bar"
read -p "TEXTO: " nmsg
[[ -z $nmsg ]] && return || {
echo -e "$nmsg" > /etc/urlCT
chmod +x /etc/urlCT
echo "URL APLICADO EXITOSAMENTE"
systemctl restart BotGen-server &>/dev/null
}
echo -e "$bar\n"
echo -e " AGREGA NUEVO ENLACE PARA DONACIONES / OPCIONAL \n https://www.paypal.com/paypalme/ChumoGH \n"
echo -e "$bar"
read -p "TEXTO: " donat
[[ -z $donat ]] && return || {
echo -e "$donat" > /etc/urlDN
chmod +x /etc/urlDN
echo "URL APLICADO EXITOSAMENTE"
systemctl restart BotGen-server &>/dev/null
}
read -p " Enter para Continuar"
systemctl restart BotGen-server &>/dev/null
bot_gen
}
lim-bot () {
unset option
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese el Limite del Bot"
echo -e "$bar"
echo -n "Limite: "
read opcion
echo "$opcion" > ${CIDdir}/limit
echo "$opcion" > /etc/limit
unset PIDGEN
PIDGEN=$(ps aux|grep -v grep|grep "kill_drop.sh")
if [[ ! $PIDGEN ]]; then
msg -bar
echo -ne "\033[1;97m Poner en linea KILL ID [s/n]: "
read bot_ini
msg -bar
[[ $bot_ini = @(s|S|y|Y) ]] && {
echo -e "[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/bin/bash /etc/ADM-db/sources/kill_drop.sh
Restart=always
RestartSec=60s
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/btkill.service
systemctl enable btkill &>/dev/null
systemctl start btkill &>/dev/null
msg -bar
echo -e "\033[1;31m Bot ID KILL ACTIVADO"
msg -bar
}
else
killall kill_drop.sh &>/dev/null
systemctl stop btkill &>/dev/null
systemctl disable btkill &>/dev/null
rm /etc/systemd/system/btkill.service &>/dev/null
clear
msg -bar
echo -e "\033[1;31m Bot ID KILL fuera de linea"
msg -bar
fi
read -p "Presione Enter para continuar "
bot_gen
#echo "sed -i "s/1001282138571/0/g" /etc/gerar-sh-log
#echo '#!/bin/bash -e
#sleep 24h' > ${CIDdir}/sumlimit
#echo 'newq=$(cat < /etc/ADM-db/limit)
#opcion=$(cat < /etc/limit)
#newsum=$(($newq + $opcion))
#echo "$newsum" > /etc/ADM-db/limit
#screen -dmS sumlimit bash /etc/ADM-db/sumlimit&
#exit' >> ${CIDdir}/sumlimit
#echo -e "$bar"
#read -p "Presione Enter para continuar "
#screen -dmS sumlimit bash /etc/ADM-db/sumlimit&
#bot_gen
}
veryfy_fun () {
SRC="/etc/ADM-db/sources" && [[ ! -d ${SRC} ]] && mkdir ${SRC}
unset ARQ
case $1 in
"BotGen.sh")ARQ="/etc/ADM-db/";;
*)ARQ="/etc/ADM-db/sources/";;
esac
mv -f $HOME/update/$1 ${ARQ}/$1 && echo -e "\033[1;31m- \033[1;32mRecibido!" || echo -e "\033[1;31m- \033[1;31mFalla (no recibido!)"
chmod +x ${ARQ}/$1
}
download () {
clear
msg -bar
echo -e "\033[1;33mDescargando archivos... ESPERE "
msg -bar
mkdir -p /root/update &>/dev/null
wget -q --no-check-certificate -O $HOME/files.tar https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Code-BOT-Comandos/files.tar
[[ -d $HOME/update ]] && rm -rf $HOME/update/* || mkdir $HOME/update
[[ -e $HOME/files.tar ]] && tar xpf $HOME/files.tar -C $HOME/update && rm -f $HOME/files.tar
echo 999 > ${CIDdir}/limit
n=1
for arqx in `ls $HOME/update`; do
echo -ne "\033[1;33mFichero \033[1;31m[${n}.bot] "
[[ -e $HOME/update/$arqx ]] && veryfy_fun $arqx
n=$(($n + 1))
done
cd $HOME && rm -rf $HOME/update && rm -f $HOME/files.tar
echo -ne "\033[1;31m[ ! ] RESTAUDANDO ADMINISTRADOR "
(
[[ -e $HOME/costes ]] && mv $HOME/costes /etc/ADM-db/sources/costes
[[ -e $HOME/token ]] && mv $HOME/token /etc/ADM-db/token
[[ -e $HOME/resell ]] && mv $HOME/resell /etc/ADM-db/resell
[[ -e $HOME/Admin-ID ]] && mv $HOME/Admin-ID /etc/ADM-db/Admin-ID
[[ -e $HOME/User-ID ]] && mv $HOME/User-ID /etc/ADM-db/User-ID
[[ -e $HOME/ress ]] && mv $HOME/ress /etc/ADM-db/ress
[[ -e $HOME/limit ]] && mv $HOME/limit /etc/ADM-db/limit
[[ -e $HOME/num-key.cont ]] && mv $HOME/num-key.cont /etc/ADM-db/num-key.cont
) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
[[ ! -e ${CIDdir}/resell ]] && echo "@ChumoGH" > ${CIDdir}/resell
[[ ! -e $(cat < /etc/mpayu) ]] && echo "Paypal : chumogh@outlook.com" > /etc/mpayu && echo "593987072611" > /etc/numctc
rm $HOME/lista-arq
systemctl restart BotGen-server &>/dev/null
bot_gen
}
ini_token () {
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese el token de su bot"
echo -e "$bar"
echo -n "TOKEN: "
read opcion
echo "$opcion" > ${CIDdir}/token
echo -e "$bar"
echo -e " \033[1;32mtoken se guardo con exito!" && echo -e "$bar" && echo -e " \033[1;37mPara tener acceso a todos los comandos del bot\n deve iniciar el bot en la opcion 2.\n desde su apps (telegram). ingresar al bot!\n digite el comando \033[1;31m/id\n \033[1;37mel bot le respodera con su ID de telegram.\n copiar el ID e ingresar el mismo en la opcion 3" && echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
ini_res () {
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese el Contacto de ADMIN de su bot"
echo -e "$bar"
echo -n "RESELLER: "
read opction
echo "$opction" > ${CIDdir}/resell
echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
ini_id () {
clear
echo -e "$bar"
echo -e " \033[1;37mIngrese su ID de telegram"
echo -e "$bar"
echo -n "ID: "
read opcion
echo "$opcion" > ${CIDdir}/Admin-ID
echo -e "$bar"
echo -e " \033[1;32mID guardo con exito!" && echo -e "$bar" && echo -e " \033[1;37mdesde su apps (telegram). ingresar al bot!\n digite el comando \033[1;31m/menu\n \033[1;37mprueve si tiene acceso al menu extendido." && echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
start_bot () {
[[ ! -e "${CIDdir}/token" ]] && echo "null" > ${CIDdir}/token
unset PIDGEN
PIDGEN=$(ps aux|grep -v grep|grep "BotGen.sh")
if [[ ! $PIDGEN ]]; then
echo -e "[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/bin/bash ${CIDdir}/BotGen.sh -start
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/BotGen-server.service
systemctl enable BotGen-server &>/dev/null
systemctl start BotGen-server &>/dev/null
else
killall BotGen.sh &>/dev/null
systemctl stop BotGen-server &>/dev/null
systemctl disable BotGen-server &>/dev/null
rm /etc/systemd/system/BotGen-server.service &>/dev/null
clear
msg -bar
echo -e "\033[1;31m BotGen fuera de linea"
msg -bar
read -p "Presione Enter para continuar "
fi
bot_gen
}
ayuda_fun () {
clear
echo -e "$bar"
echo -e " \e[47m\e[30m Instrucciones rapidas \e[0m"
echo -e "$bar"
echo -e "\033[1;37m Es necesario crear un bot en \033[1;32m@BotFather "
echo -e "$bar"
echo -e "\033[1;32m1- \033[1;37mEn su apps telegram ingrese a @BotFather"
echo -e "\033[1;32m2- \033[1;37mDigite el comando \033[1;31m/newbot"
echo -e "\033[1;32m3- @BotFather \033[1;37msolicitara que\n asigne un nombre a su bot"
echo -e "\033[1;32m4- @BotFather \033[1;37msolicitara que asigne otro nombre,\n esta vez deve finalizar en bot eje: \033[1;31mXXX_bot"
echo -e "\033[1;32m5- \033[1;37mObtener token del bot creado.\n En \033[1;32m@BotFather \033[1;37mdigite el comando \033[1;31m/token\n \033[1;37mseleccione el bot y copie el token."
echo -e "\033[1;32m6- \033[1;37mIngrese el token\n en la opcion \033[1;32m[1] \033[1;31m> \033[1;37mTOKEN DEL BOT"
echo -e "\033[1;32m7- \033[1;37mPoner en linea el bot\n en la opcion \033[1;32m[2] \033[1;31m> \033[1;37mINICIAR/PARAR BOT"
echo -e "\033[1;32m8- \033[1;37mEn su apps telegram, inicie el bot creado\n digite el comando \033[1;31m/id \033[1;37mel bot le respondera\n con su ID de telegran (copie el ID)"
echo -e "\033[1;32m9- \033[1;37mIngrese el ID en la\n opcion \033[1;32m[3] \033[1;31m> \033[1;37mID DE USUARIO TELEGRAM"
echo -e "\033[1;32m10-\033[1;37mcomprueve que tiene acceso a\n las opciones avanzadas de su bot."
echo -e "$bar"
read -p "Presione Enter para continuar "
bot_gen
}
bot_conf () {
[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token
[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID
check_ip
function_verify
instaled=/etc/ADM-db/sources && [[ ! -d ${instaled} ]] && download
}
msj_prueba () {
TOKEN="$(cat /etc/ADM-db/token)"
ID="$(cat /etc/ADM-db/Admin-ID)"
[[ -z $TOKEN ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el token\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
[[ -z $ID ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el ID\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
MENSAJE="---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n"
MENSAJE+="Esto es un mesaje de prueba!\n"
MENSAJE+="$bar\n"
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
curl -s -X POST $URL -d chat_id=$ID -d text="$MENSAJE" &>/dev/null
clear
echo -e "---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n"
echo -e "\033[1;37m Mensaje enviado Exitosamente...!"
echo -e "$bar"
sleep 3s
}
}
bot_gen
}
addnewmss() {
unset yesno
unset dnew
let foc++
echo -e "$bar"
echo -e " \033[1;37mINGRESA EL MENSAJE A ENVIAR"
echo -e "$bar"
read -p " $foc TEXTO: " addmss
MSS+="$addmss\n"
echo -e "${cor[3]} ¿DESEAS AÑADIR OTRO SMS ? "
read -p " [S/N]: " -e -i s sshsn
tput cuu1 && tput dl1
tput cuu1 && tput dl1
[[ "$sshsn" = @(s|S|y|Y) ]] && addnewmss
}
msj_ind () {
foc=1
TOKEN="$(cat /etc/ADM-db/token)"
echo -e "$bar"
echo -e " \033[1;37mIngrese su ID de telegram a Mensajear"
echo -e "$bar"
read -p "ID: " ID
[[ -z $ID ]] && ID="$(cat /etc/ADM-db/Admin-ID)"
[[ -z $TOKEN ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el token\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
[[ -z $ID ]] && {
clear
echo -e "$bar"
echo -e "\033[1;37m Aun no a ingresado el ID\n No se puede enviar ningun mensaje!"
echo -e "$bar"
read foo
} || {
MENSAJE="Hola, Mensale de Prueba del BotGen Generador!"
echo -e "$bar"
echo -e " \033[1;37mINGRESA EL MENSAJE A ENVIAR"
echo -e "$bar"
read -p " $foc TEXTO: " addmss
MSS+="$addmss\n"
echo -e "${cor[3]} ¿DESEAS AÑADIR OTRO SMS ? "
read -p " [S/N]: " -e -i s sshsn
tput cuu1 && tput dl1
tput cuu1 && tput dl1
[[ "$sshsn" = @(s|S|y|Y) ]] && addnewmss
MENSAJE=' ---------📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩--------\n'
MENSAJE+="$MSS \n "
echo -e "$bar"
echo -e " \033[1;37mPEGA RUTA DE IMAGEN"
echo -e "$bar"
read -p "IMG: " img
#[[ -z $img ]] && img="https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/favi.png"
#[[ -z $img ]] && img="/var/www/html/bot_vmess_qr.png"
[[ -z $MENSAJE ]] && MENSAJE="Hola, Mensale de Prueba del BotGen Generador!"
URL="https://api.telegram.org/bot$TOKEN/sendMessage"
URG="https://api.telegram.org/bot$TOKEN/sendPhoto"
curl -s -X POST $URG -F chat_id=$ID -F photo="@$img" #-F caption="<code>New Script @ChumoGH</code>" #-F width="100" -F height="100"
curl -s -X POST $URL -d chat_id=$ID -d text="$(echo -e "$MENSAJE")" &>/dev/null
# clear
echo -e "@$img"
echo -e "$bar"
echo -e "\033[1;37m Mensaje enviado Exitosamente...!"
echo -e "$bar"
read -p "ENTER PARA Continuar"
}
}
bot_gen
}
act-bot () {
echo "Respaldando TOKEN y ADMINISTRADOR"
[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token /root/token
[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID /root/Admin-ID
[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID /root/User-ID
[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress /root/ress
[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes /root/costes
[[ $(cat < /etc/ADM-db/resell) != "@ChumoGH" ]] && mv /etc/ADM-db/resell /root/resell
rm -rf /etc/ADM-db/sources/gerar_key && download
}
respon () {
[[ ! -e /etc/menu_ito ]] && credd=$(cat < /etc/SCRIPT/menu_credito) || credd=$(cat /etc/menu_ito )
[[ -e ${CIDdir}/ress ]] && {
echo -e "DESACTIVANDO RESELLER $credd FIJO EN BotGEN"
echo -e " AHORA SE FIJARA EL NOMBRE DE QUIEN GENERE LA KEY"
read -p "ENTER PARA VOLVER"
rm -f ${CIDdir}/ress
} || {
echo -e "ACTIVANDO RESELLER $credd FIJO EN BotGEN"
echo -e "AHORA SE FIJARA $credd EN TODAS LAS KEYS "
read -p "ENTER PARA VOLVER"
touch ${CIDdir}/ress
}
bot_gen
}
bot_gen () {
clear
unset PID_GEN
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
PID_GEN=$(ps x|grep -v grep|grep "BotGen.sh")
PID_on=$(ps x|grep -v grep|grep "modelid")
[[ ! $PID_on ]] && PID_on="\033[1;31mOFF" || PID_on="\033[1;32mON"
[[ ! -e /etc/systemd/system/btkill.service ]] && PID_kill="\033[1;31mOFF" || PID_kill="\033[1;32mON"
[[ ! $PID_GEN ]] && PID_GEN="\033[1;31mOFF" || PID_GEN="\033[1;32mON"
[[ -e ${CIDdir}/token ]] && tk="\033[1;32mOK" || tk="\033[1;31mNULL"
[[ -e /etc/numctc ]] && nm="\033[1;32mNUM" || nm="\033[1;31mNULL"
[[ -e /etc/urlDN ]] && dn="\033[1;32mDON" || dn="\033[1;31mNULL"
[[ -e /etc/urlCT ]] && ct="\033[1;32mCAT" || ct="\033[1;31mNULL"
[[ -e ${CIDdir}/Admin-ID ]] && adid="\033[1;32mOK" || adid="\033[1;31mNULL"
[[ -e ${CIDdir}/ress ]] && rfij="\033[1;32mRESELLER FIJO (Bot Personal )" || rfij="\033[1;31mRESELLER ALEATORIO ( Bot Custom )"
limcont=$(cat /etc/ADM-db/limit)
[[ "${limcont}" = "999" ]] && limted=" ∞ " || limted=$(cat /etc/ADM-db/limit)
msg -bar
echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN ChumoGH${TTcent}ADM $(cat ${CIDdir}/vercion) 🐲 ◄◄<=== \033[0m"
msg -bar
echo -e " - LIMITADOR \033[1;32m ( $limted ) \033[1;37m KILL ID VENCIDOS ${PID_kill} "
msg -bar
echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;35m> \033[1;37m TOKEN DEL BOT $tk "
echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;35m> \033[1;37m INICIAR/PARAR BOT $PID_GEN\033[0m"
echo -e "\033[0;35m[\033[0;36m3\033[0;35m] \033[0;35m> \033[1;37m ID DE USUARIO TELEGRAM $adid"
echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;35m> \033[1;37m Cambiar Contacto -> $(cat < ${CIDdir}/resell)"
echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;35m> \033[1;37m MENSAJE DE PRUEBA"
echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;36m> \033[1;37m MANUAL De Uso"
echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;35m> \033[1;37m Limite de KEYS "
echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;35m> \033[1;37m ENLACES $nm | $dn | $ct "
echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;35m> \033[1;37m $rfij"
echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;35m> \033[1;37m MSG POR ID"
echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;35m> \033[1;37m Modificar COSTES DEL BOT"
msg -bar
echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR"
msg -bar
selection=$(selection_fun 11)
case ${selection} in
0) gerar && exit ;;
1) ini_token;;
2) start_bot;;
3) ini_id;;
4) ini_res;;
5) msj_prueba;;
6) ayuda_fun;;
7) source <(curl -sSL https://www.dropbox.com/s/f5mlwun3hkpq6k8/bot-permited.sh) ;;
8) act-bot ;;
7) lim-bot ;;
8) change_pay;;
9) respon;;
10)msj_ind;;
11)edit_cost;;
*) bot_gen;;
esac
}

471
Instalador/install.sh Normal file
View File

@ -0,0 +1,471 @@
##!/bin/bashlink
#Instalador del BOT
coo=1
IVAR="/etc/http-instas"
SCPT_DIR="/etc/SCRIPT"
rm -f gera*
source <(curl -sSL https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg) >/dev/null
#!/bin/bash
# menu maker (opciones 1, 2, 3,.....)
flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•'
cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
menu_func() {
local options=${#@}
local array
for ((num = 1; num <= $options; num++)); do
echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
array=(${!num})
case ${array[0]} in
"-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;;
"-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;;
"-fi") echo -e "${array[@]:2} ${array[1]}" ;;
-bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;;
*) echo -e "\033[1;37m${array[@]}" ;;
esac
done
}
selection_fun() {
local selection="null"
local range
for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
echo -ne "\033[1;37m ► Opcion : " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
tittle() {
[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
clear && clear
msg -bar
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
msg -bar
}
in_opcion() {
unset opcion
if [[ -z $2 ]]; then
msg -nazu " $1: " >&2
else
msg $1 " $2: " >&2
fi
read opcion
echo "$opcion"
}
# centrado de texto
print_center() {
if [[ -z $2 ]]; then
text="$1"
else
col="$1"
text="$2"
fi
while read line; do
unset space
x=$(((54 - ${#line}) / 2))
for ((i = 0; i < $x; i++)); do
space+=' '
done
space+="$line"
if [[ -z $2 ]]; then
msg -azu "$space"
else
msg "$col" "$space"
fi
done <<<$(echo -e "$text")
}
# titulos y encabesados
title() {
clear
msg -bar
if [[ -z $2 ]]; then
print_center -azu "$1"
else
print_center "$1" "$2"
fi
msg -bar
}
# finalizacion de tareas
enter() {
msg -bar
text="►► Presione enter para continuar ◄◄"
if [[ -z $1 ]]; then
print_center -ama "$text"
else
print_center "$1" "$text"
fi
read
}
# opcion, regresar volver/atras
back() {
msg -bar
echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
msg -bar
}
msg() {
local colors="/etc/new-adm-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
COLOR[7]='\033[1;49;95m'
COLOR[8]='\033[1;49;96m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1) COLOR[$COL]='\033[1;37m' ;;
2) COLOR[$COL]='\e[31m' ;;
3) COLOR[$COL]='\e[32m' ;;
4) COLOR[$COL]='\e[33m' ;;
5) COLOR[$COL]='\e[34m' ;;
6) COLOR[$COL]='\e[35m' ;;
7) COLOR[$COL]='\033[1;36m' ;;
8) COLOR[$COL]='\033[1;49;95m' ;;
9) COLOR[$COL]='\033[1;49;96m' ;;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;;
-nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;;
#-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
esac
}
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 &
echo -ne "\033[1;33m ["
while true; do
for ((i = 0; i < 18; i++)); do
echo -ne "\033[1;31m##"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
del() {
for ((i = 0; i < $1; i++)); do
tput cuu1 && tput dl1
done
}
[[ -d /bin/ejecutar ]] && {
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg
} || mkdir /bin/ejecutar
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"
export -f msg
export -f fun_bar
export -f tittle
export -f enter
export -f back
export -f print_center
export -f in_opcion
export -f del
add-apt-repository universe
apt update -y
apt upgrade -y
install_ini() {
clear
msg -bar
echo -e "\033[92m -- INSTALANDO PAQUETES NECESARIOS -- "
msg -bar
ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
locale-gen en_US.UTF-8 >/dev/null 2>&1
update-locale LANG=en_US.UTF-8 >/dev/null 2>&1
echo -e "\033[97m # Instalando UTF...................... $ESTATUS "
apt-get install gawk -y >/dev/null 2>&1
#bc
[[ $(dpkg --get-selections | grep -w "jq" | head -1) ]] || apt-get install jq -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "jq" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "jq" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install jq................... $ESTATUS "
#SCREEN
[[ $(dpkg --get-selections | grep -w "screen" | head -1) ]] || apt-get install screen -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "screen" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "screen" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install screen............... $ESTATUS "
#apache2
[[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] || {
apt-get install apache2 -y &>/dev/null
sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf
service apache2 restart >/dev/null 2>&1 &
}
[[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install apache2.............. $ESTATUS "
#curl
[[ $(dpkg --get-selections | grep -w "curl" | head -1) ]] || apt-get install curl -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "curl" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "curl" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install curl................. $ESTATUS "
#socat
[[ $(dpkg --get-selections | grep -w "socat" | head -1) ]] || apt-get install socat -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "socat" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "socat" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install socat................ $ESTATUS "
#netcat
[[ $(dpkg --get-selections | grep -w "netcat" | head -1) ]] || apt-get install netcat -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "netcat" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "netcat" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install netcat............... $ESTATUS "
#netcat-traditional
[[ $(dpkg --get-selections | grep -w "netcat-traditional" | head -1) ]] || apt-get install netcat-traditional -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "netcat-traditional" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "netcat-traditional" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install netcat-traditional... $ESTATUS "
#net-tools
[[ $(dpkg --get-selections | grep -w "net-tools" | head -1) ]] || apt-get install net-tools -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "net-tools" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "net-tools" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install net-tools............ $ESTATUS "
#cowsay
[[ $(dpkg --get-selections | grep -w "cowsay" | head -1) ]] || apt-get install cowsay -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "cowsay" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "cowsay" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install cowsay............... $ESTATUS "
#figlet
[[ $(dpkg --get-selections | grep -w "figlet" | head -1) ]] || apt-get install figlet -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "figlet" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "figlet" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install figlet............... $ESTATUS "
#lolcat
apt-get install lolcat -y &>/dev/null
sudo gem install lolcat &>/dev/null
[[ $(dpkg --get-selections | grep -w "lolcat" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "lolcat" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install lolcat............... $ESTATUS "
#PV
[[ $(dpkg --get-selections | grep -w "pv" | head -1) ]] || apt-get install pv -y &>/dev/null
[[ $(dpkg --get-selections | grep -w "pv" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
[[ $(dpkg --get-selections | grep -w "pv" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
echo -e "\033[97m # apt-get install PV ................ $ESTATUS "
msg -bar
echo -e "\033[92m La instalacion de paquetes necesarios a finalizado"
msg -bar
echo -e "\033[97m Si la instalacion de paquetes tiene fallas"
echo -ne "\033[97m Reintentar Install Paquetes [ s/n ]: "
read inst
[[ $inst = @(s|S|y|Y) ]] && install_ini
}
check_ip() {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
echo "$IP" >/usr/bin/vendor_code
}
function_verify() {
unset keybot
msg -bar
[[ ! -e /etc/nivbot ]] && echo >/etc/nivbot
echo -e "\e[31m BOTGEN LIBRE TE LO VENDIERON ?\e[32m"
[[ "$(echo "$(cat </etc/nivbot)")" < "3" ]] && {
[[ -e /bin/downloadbot ]] && {
[[ -z $(cat </bin/downloadbot) ]] && read -p " DIGITE SI O NO : " keybot || unset keybot
}
} || read -p " DIGITE SI O NO: " keybot
[[ -z $keybot ]] && {
[[ -e /bin/downloadbot ]] && link="$(cat </bin/downloadbot)" || link='https://raw.githubusercontent.com'
[[ $link = 'https://raw.githubusercontent.com' ]] && echo "CONTROL MEDIANTE GitHub" || echo "CONTROL EXTERNO"
permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot")
} || {
permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot")
[[ -z $keybot ]] && echo $link >/bin/downloadbot || echo -e "$(ofus $keybot)" >/bin/downloadbot
}
permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot")
[[ $(echo $permited | grep "${IP}") = "" ]] || {
clear
msg -bar
echo -e "\n"
echo -e "\e[31m LA IP $(wget -qO- ipv4.icanhazip.com) FUE RECHAZADA!"
echo -e " $link No AUTORIZADA el ACCESO "
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
msg -bar
[[ -e "/bin/ShellBot.sh" ]] && rm /bin/ShellBot.sh
[[ -e /bin/downloadbot ]] && rm -f /bin/downloadbot
echo -e "\n"
msg -bar
exit 1
} && {
### INTALAR VERCION DE SCRIPT
clear && clear
msg -bar
echo -e "\e[32m LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!"
[[ -e /usr/bin/downBase ]] || echo 'https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase
v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log")
[[ ! -e /bin/downloadbot ]] && {
[[ $link = 'https://raw.githubusercontent.com' ]] && echo "https://raw.githubusercontent.com" >/bin/downloadbot || echo "$(ofus $keybot)" >/bin/downloadbot
chmod +x /bin/downloadbot
}
[[ -e /etc/nivbot ]] && {
i=$(cat </etc/nivbot)
lv=$(($i + 1))
echo $lv >/etc/nivbot
} || echo "1" >/etc/nivbot
echo $Key >/etc/valkey && chmod +x /etc/valkey
[[ -e /usr/bin/downBase ]] || echo 'https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase
[[ -e /bin/ShellBot.sh ]] && wget -O /bin/ShellBot.sh https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/ShellBot.sh >/dev/null && chmod +rwx /bin/ShellBot.sh
sleep 3s
}
}
echo '0' >/etc/http-instas
[[ -d $SCPT_DIR ]] && rm -rf $SCPT_DIR
#CORES
cor[1]="\033[1;36m"
cor[2]="\033[1;32m"
cor[3]="\033[1;31m"
cor[4]="\033[1;33m"
cor[0]="\033[1;37m"
#TEXTOS
#COMPARA
fun_filez() {
fup="$HOME/update"
echo "$1" >>$HOME/files.log
wget -O /bin/http-server.sh https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Bot/http-server.py && chmod +x /bin/http-server.sh
[[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1
}
ofus() {
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]="v" ;;
"v") txt[$i]="." ;;
"1") txt[$i]="@" ;;
"@") txt[$i]="1" ;;
"2") txt[$i]="?" ;;
"?") txt[$i]="2" ;;
"4") txt[$i]="p" ;;
"p") txt[$i]="4" ;;
"-") txt[$i]="L" ;;
"L") txt[$i]="-" ;;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
DOWS() {
wget -O /root/lista https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/lista
wget --no-check-certificate -i $HOME/lista
}
function aguarde() {
sleep 1
fun_ejec=$1
helice() {
DOWS >/dev/null 2>&1 &
tput civis
while [ -d /proc/$! ]; do
for i in / - \\ \|; do
sleep .1
echo -ne "\e[1D$i"
done
done
tput cnorm
}
echo -ne "\033[1;37m TRASLADANDO FILES \033[1;32mSCRIPT \033[1;37me \033[1;32mAUTOGEN\033[1;32m.\033[1;33m.\033[1;31m. \033[1;33m"
helice
echo -e "\e[1D REALIZADO"
}
atualiza_fun() {
msg -bar
[[ -d ./update ]] && rm -rf ./update/* || mkdir ./update
cd ./update/
aguarde
unset arqs
n=1
rm -f $HOME/files.log
for arqs in $(ls $HOME/update); do
echo -ne "\033[1;33m FILE \e[32m [${n}.gen] \e[0m "
fun_filez $arqs >/dev/null 2>&1 && echo -e "\033[1;31m- \033[1;31m $arqs (no Trasladado!)" || echo -e "\033[1;31m- \033[1;32m $arqs Trasladado!"
n=$(($n + 1))
done
mkdir -p /etc/SCRIPT
mv -f /root/update/* /etc/SCRIPT/
wget -q -O /usr/bin/gerar https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Menu-Bash/gerador.sh && chmod +rwx /usr/bin/gerar
cd $HOME
msg -bar
echo -e "\033[1;92m DIGITE EL COMANDO: \033[1;33mgerar "
msg -bar
[[ -e $HOME/lista ]] && rm $HOME/lista
[[ -d $HOME/update ]] && rm -rf $HOME/update
}
unset Key
[[ $1 = '--install' ]] && install_ini
[[ $1 = '' ]] && clear && echo " DESTRUYENDO FICHERO rm -rf /bin " && exit
clear
check_ip
function_verify
atualiza_fun

866
Menu-Bash/gerador.sh Normal file
View File

@ -0,0 +1,866 @@
#!/bin/bash
clear
unset readvalue
[[ ! -d /etc/http-shell ]] && mkdir /etc/http-shell
[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py"
IVAR="/etc/http-instas"
source <(curl -sSL https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg) >/dev/null
#!/bin/bash
# menu maker (opciones 1, 2, 3,.....)
flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && cG='/c' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && _kl1='ghkey' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && kL10='tc' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && am1='/e' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' nib="${am1}${kL10}"
cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
menu_func() {
local options=${#@}
local array
for ((num = 1; num <= $options; num++)); do
echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
array=(${!num})
case ${array[0]} in
"-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;;
"-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;;
"-fi") echo -e "${array[@]:2} ${array[1]}" ;;
-bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;;
*) echo -e "\033[1;37m${array[@]}" ;;
esac
done
}
selection_fun() {
local selection="null"
local range
for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
echo -ne "\033[1;37m ► Opcion : " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
tittle() {
[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
clear && clear
msg -bar
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
msg -bar
}
in_opcion() {
unset opcion
if [[ -z $2 ]]; then
msg -nazu " $1: " >&2
else
msg $1 " $2: " >&2
fi
read opcion
echo "$opcion"
}
# centrado de texto
print_center() {
if [[ -z $2 ]]; then
text="$1"
else
col="$1"
text="$2"
fi
while read line; do
unset space
x=$(((54 - ${#line}) / 2))
for ((i = 0; i < $x; i++)); do
space+=' '
done
space+="$line"
if [[ -z $2 ]]; then
msg -azu "$space"
else
msg "$col" "$space"
fi
done <<<$(echo -e "$text")
}
# titulos y encabesados
title() {
clear
msg -bar
if [[ -z $2 ]]; then
print_center -azu "$1"
else
print_center "$1" "$2"
fi
msg -bar
}
# finalizacion de tareas
enter() {
msg -bar
text="►► Presione enter para continuar ◄◄"
if [[ -z $1 ]]; then
print_center -ama "$text"
else
print_center "$1" "$text"
fi
read
}
# opcion, regresar volver/atras
back() {
msg -bar
echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
msg -bar
}
msg() {
local colors="/etc/new-adm-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
COLOR[7]='\033[1;49;95m'
COLOR[8]='\033[1;49;96m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1) COLOR[$COL]='\033[1;37m' ;;
2) COLOR[$COL]='\e[31m' ;;
3) COLOR[$COL]='\e[32m' ;;
4) COLOR[$COL]='\e[33m' ;;
5) COLOR[$COL]='\e[34m' ;;
6) COLOR[$COL]='\e[35m' ;;
7) COLOR[$COL]='\033[1;36m' ;;
8) COLOR[$COL]='\033[1;49;95m' ;;
9) COLOR[$COL]='\033[1;49;96m' ;;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;;
-nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
-verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
-blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;;
#-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
-bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
esac
}
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 &
echo -ne "\033[1;33m ["
while true; do
for ((i = 0; i < 18; i++)); do
echo -ne "\033[1;31m##"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
del() {
for ((i = 0; i < $1; i++)); do
tput cuu1 && tput dl1
done
}
[[ -d /bin/ejecutar ]] && {
[[ ! -e /etc/cghkey ]] && rm -rf /etc/adm-lite
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg
} || mkdir /bin/ejecutar
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"
export -f msg
export -f fun_bar
export -f tittle
export -f enter
export -f back
export -f print_center
export -f in_opcion
export -f del
tittle() {
killall kswapd0 ksoftirqd >/dev/null 2>&1
clear && clear
msg -bar
echo -e " \033[7;49;35m${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m"
}
check_ip() {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
echo "$IP" >/usr/bin/vendor_code
}
####inicio puertos
ports_() {
unset porta
_core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
_usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
##
ram1=$(free -h | grep -i mem | awk {'print $2'})
ram2=$(free -h | grep -i mem | awk {'print $4'})
ram3=$(free -h | grep -i mem | awk {'print $3'})
##
_ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})")
_usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
_core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
_usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
mt=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f2)
mb=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f6)
ml=$(free -h | grep Mem | sed 's/\s\+/,/g' | cut -d , -f7)
pp=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}')
csss=$(cat /proc/cpuinfo | grep processor | wc -l)
usoo=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}')
CPU=$(echo $usoo | awk '{printf("%d\n",$1 + 0.5)}')
PID_GEN1=$(ps x | grep -v grep | grep "8888")
[[ ! $PID_GEN1 ]] && PID_GEN1="\033[0;31m[\033[0;35mCOLAPZADO\033[0;31m]" || PID_GEN1="\033[0;35m[\033[0;36mFUNCIONANDO\033[0;31m]"
porta=$(if netstat -tunlp | grep nc.tradit 1>/dev/null 2>/dev/null; then
echo -e "\033[0;36m Keygen: \033[0;31m[\033[0;32m ON \033[0;31m]"
else
echo -e "\033[0;36m Keygen: \033[0;35m[\033[0;31m OFF \033[0;35m]"
fi)
[[ $v1 = $v2 ]] && vesaoSCT="\033[1;32m${txt[315]} \033[0;33m ($v2)" || vesaoSCT="\033[1;31m${txt[316]}\033[0;33m($v2) <20>72 \033[1;32m($v1)\033[1;31m"
echo -e " ${cor[2]} ${vesaoSCT} ${cor[0]}"
msg -bar
echo -e "\033[1;34m ${TOP}\033[1;31m TOTAL:\033[1;32m "$mt "\033[1;34m ${TOP} \033[1;31m Libre:\033[1;32m "$ram2 "\033[1;34m ${TOP} \033[1;31m Usada:\033[1;32m"$ram3
echo -e "\033[1;34m ${TOP}\033[1;31m Uso RAM: \033[1;32m"$_usor "\033[1;34m${TOP}\033[1;31m Uso CPU: \033[1;32m$_usop \033[1;34m ${TOP}\033[1;31m Cache:\033[1;32m"$mb # $CPU"%"
msg -bar
echo -e "\033[0;31mSystem:\033[0;32m$(cat /etc/issue.net) \033[0;31mIP:\033[0;32m $(wget -qO- ipv4.icanhazip.com)"
msg -bar
echo ""
echo -ne "$(msg -verd " Keys Usadas") $(msg -azu " : ") " && msg -bra "\033[1;41m $(cat $IVAR) $porta"
echo ""
}
SCPT_DIR="/etc/SCRIPT"
[[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR}
[[ ! -e ${SCPT_DIR} ]] && bash /bin/ejecutar/echo-ram.sh
DIR="/etc/http-shell"
LIST="-SPVweN"
wget -O /bin/ejecutar/v-new.log https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log &>/dev/null
v1=$(cat /bin/ejecutar/v-new.log)
v2=$(cat <${SCPT_DIR}/v-local.log)
txt[315]=" ${FlT} ChumoGH Keygen ${FlT} IS UPDATED!"
txt[316]=" ${aLerT} ChumoGH Keygen ${aLerT} NEEDS UPDATE!"
meu_ip() {
MIP=$(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)
MIP2=$(wget -qO- ipv4.icanhazip.com)
[[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
}
mudar_instacao() {
while [[ ${var[$value]} != 0 ]]; do
[[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads ssl paysnd.sh verifica PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py"
clear
echo -e $BARRA
echo -e "MENU SSELECCI<43>N DE INSTALACI<43>N"
echo -e $BARRA
echo "[0] - FINALIZAR PROCEDIMIENTO"
i=1
for arqx in $(ls ${SCPT_DIR}); do
[[ $arqx = @(gerar.sh|http-server.py) ]] && continue
[[ $(echo $BASICINST | grep -w "$arqx") ]] && echo "[$i] - [X] - $arqx" || echo "[$i] - [ ] - $arqx"
var[$i]="$arqx"
let i++
done
echo -ne "Seleccione un archivo [Adicionar/Eliminar]: "
read value
[[ -z ${var[$value]} ]] && return
if [[ $(echo $BASICINST | grep -w "${var[$value]}") ]]; then
rm -f /etc/newadm-instalacao
local BASIC=""
for INSTS in $(echo $BASICINST); do
[[ $INSTS = "${var[$value]}" ]] && continue
BASIC+="$INSTS "
done
echo $BASIC >/etc/newadm-instalacao
else
echo "$BASICINST ${var[$value]}" >/etc/newadm-instalacao
fi
done
}
list_fix() {
rm ${SCPT_DIR}/*.x.c &>/dev/null
unset KEY
KEY="$1"
name="$2"
#CRIA DIR
[[ ! -e ${DIR} ]] && mkdir ${DIR}
#ENVIA ARQS
i=0
VALUE+="gerar.sh http-server.py $BASICINST"
for arqx in $(ls ${SCPT_DIR}); do
[[ $(echo $VALUE | grep -w "${arqx}") ]] && continue
echo -e "[$i] -> ${arqx}"
arq_list[$i]="${arqx}"
let i++
done
msg -bar
#read -p " OPCION : " readvalue
#CRIA KEY
[[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY}
#PASSA ARQS
[[ -z $readvalue ]] && readvalue="1"
[[ -z $nombrevalue ]] && nombrevalue="$nomkey$name"
if [[ $readvalue = @(cgh|1) ]]; then
#ADM BASIC
echo -e " - KEY SCRIPT BASE ADM - "
arqslist="$BASICINST"
for arqx in $(echo "${arqslist}"); do
[[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA
cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/
echo "$arqx" >>${DIR}/${KEY}/${LIST}
done
else
for arqx in $(echo "${readvalue}"); do
#UNE ARQ
[[ -e ${DIR}/${KEY}/${arq_list[$arqx]} ]] && continue #ANULA ARQUIVO CASO EXISTA
rm ${SCPT_DIR}/*.x.c &>/dev/null
cp ${SCPT_DIR}/${arq_list[$arqx]} ${DIR}/${KEY}/
echo "${arq_list[$arqx]}" >>${DIR}/${KEY}/${LIST}
done
echo "TRUE" >>${DIR}/${KEY}/FERRAMENTA
fi
rm ${SCPT_DIR}/*.x.c &>/dev/null
echo "$nombrevalue" >${DIR}/${KEY}.name
[[ ! -z $IPFIX ]] && echo "$IPFIX" >${DIR}/${KEY}/keyfixa
echo -e "-------------------------------------------------"
}
ofus() {
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]="x" ;;
"x") txt[$i]="." ;;
"5") txt[$i]="s" ;;
"s") txt[$i]="5" ;;
"1") txt[$i]="@" ;;
"@") txt[$i]="1" ;;
"2") txt[$i]="?" ;;
"?") txt[$i]="2" ;;
"4") txt[$i]="0" ;;
"0") txt[$i]="4" ;;
"/") txt[$i]="K" ;;
"K") txt[$i]="/" ;;
esac
txtofus+="${txt[$i]}"
done
echo "$txtofus" | rev
}
fix_key() {
unset nomkey
echo " Bienvenido, Porfavor dijita el Nombre del DUE<55>O de la KEYs"
echo " DIJITA 0 PARA REGRESAR "
read -p " RESELLER deL Keys : " nomkey
[[ $nomkey = 0 ]] && return
[[ -z $nomkey ]] && {
[[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")"
}
msg -bar
echo " Bienvenido, Porfavor ingresa el numero de keys a generar"
read -p "Numero de Keys : " numk
[[ -z ${numk} ]] && numk=0
msg -bar
read -p "INGRESA NOMBRE DE VENDEDOR : " vkey
clear
msg -bar
echo -e "$numk Keys activas,de $nomkey y esperando instalaci<63>n!"
echo "$nomkey" >${SCPT_DIR}/menu_credito
for ((w = 0; w < $numk; w++)); do
valuekey="$(date | md5sum | head -c11)"
valuekey+="$(echo $(($RANDOM * 10)) | head -c 6)"
xyz+="$(echo $(($RANDOM * 3)) | head -c 4)"
#valuekey+="$(echo $(($RANDOM*10))|head -c 5)"
list_fix "$valuekey" "$(($w + 1))"
keyfinal=$(ofus "$(wget -qO- ipv4.icanhazip.com):8888/$valuekey/$LIST")
echo -e " ${CHeko} Key $(($w + 1)) Exitosa! $(printf '%(%D-%H:%M:%S)T') \n"
echo -e " ${TTcent} ${keyfinal} ${TTcent}" | pv -qL 80
done
[[ -e /etc/menu_ito ]] && cat /etc/menu_ito >${SCPT_DIR}/menu_credito || echo -e "\nCreditos Aplicados Exitosamente"
#$(cat < /etc/ADM-db/resell)
msg -bar
echo -e " ${ScT} *INSTALADOR UNIVERSAL* ${ScT}"
msg -bar && echo -ne "$(msg -verd "apt update -y &&") $(msg -aqua "apt upgrade -y &&\n") " && msg -bra "\033[7;49;35m wget -q https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/setup && chmod 777 setup && ./setup --install"
msg -bar
[[ -e /etc/menu_numito ]] && menumito="$(cat /etc/menu_numito)" || menumito="https://t.me/ChumoGH_bot"
[[ -z $vkey ]] && vkey="@ChumoGH"
echo -e " ${ceLL} Soporte : Ubuntu 14.04 - 16.04 - 18.04 - 20.04 - 21.04 - 22.04\n S.O PREFERENTE 18.04"
echo -e " Verificada: $vkey ${ScT} RESELLER ACTUAL : $nomkey" | pv -qL 80
msg -bar
read -p "Enter para finalizar"
}
att_gen_key() {
i=0
rm ${SCPT_DIR}/*.x.c &>/dev/null
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
echo "[$i] Volver"
keys="$keys retorno"
let i++
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then
echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;32m ($(cat ${DIR}/${arqs}/keyfixa))\033[0m"
keys="$keys $arqs"
let i++
fi
done
keys=($keys)
msg -bar
while [[ -z ${keys[$value]} || -z $value ]]; do
read -p "Escolha qual Atualizar[t=todos]: " -e -i 0 value
done
[[ $value = 0 ]] && return
if [[ $value = @(t|T) ]]; then
i=0
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
KEYDIR="$DIR/$arqs"
rm $KEYDIR/*.x.c &>/dev/null
if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then #Keyen Atualiza
rm ${KEYDIR}/${LIST}
for arqx in $(ls $SCPT_DIR); do
cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx
echo "${arqx}" >>${KEYDIR}/${LIST}
rm ${SCPT_DIR}/*.x.c &>/dev/null
rm $KEYDIR/*.x.c &>/dev/null
done
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m"
fi
let i++
done
rm ${SCPT_DIR}/*.x.c &>/dev/null
msg -bar2
echo -ne "\033[0m" && read -p "Enter"
return 0
fi
KEYDIR="$DIR/${keys[$value]}"
[[ -d "$KEYDIR" ]] && {
rm $KEYDIR/*.x.c &>/dev/null
rm ${KEYDIR}/${LIST}
for arqx in $(ls $SCPT_DIR); do
cp ${SCPT_DIR}/$arqx ${KEYDIR}/$arqx
echo "${arqx}" >>${KEYDIR}/${LIST}
rm ${SCPT_DIR}/*.x.c &>/dev/null
rm $KEYDIR/*.x.c &>/dev/null
done
arqsx=$(ofus "$IP:8888/${keys[$value]}/$LIST")
echo -e "\033[1;33m[KEY]: $arqsx \033[1;32m(ATUALIZADA!)\033[0m"
read -p "Enter"
rm ${SCPT_DIR}/*.x.c &>/dev/null
}
}
del_KILL() {
for arqlist in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
[[ -e /${DIR}/${arqlist}.name ]] || rm -rf /${DIR}/${arqlist}
done
}
remover_key() {
del_KILL
i=0
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
echo "[$i] Volver"
keys="$keys retorno"
let i++
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
if [[ ! -e ${DIR}/${arqs}/used.date ]]; then
echo -e "\033[1;32m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m (Key Activa)\033[0m" || rm -rf ${DIR}/${arqs}
else
echo -e "\033[1;31m[$i] $arqsx ($(cat ${DIR}/${arqs}.name))\033[1;33m ($(cat ${DIR}/${arqs}/used.date) IP: $(cat ${DIR}/${arqs}/used))\033[0m"
fi
keys="$keys $arqs"
let i++
done
keys=($keys)
msg -bar
while [[ -z ${keys[$value]} || -z $value ]]; do
read -p "Elija cual remover: " -e -i 0 value
done
[[ -d "$DIR/${keys[$value]}" ]] && rm -rf $DIR/${keys[$value]}* || return
}
remover_key_usada() {
i=0
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
arqsx=$(ofus "$IP:8888/$arqs/$LIST")
if [[ -e ${DIR}/${arqs}/used.date ]]; then #KEY USADA
if [[ $(ls -l -c ${DIR}/${arqs}/used.date | cut -d' ' -f7) != $(date | cut -d' ' -f3) ]]; then
rm -rf ${DIR}/${arqs}*
echo -e "\033[1;31m[KEY]: $arqsx \033[1;32m(Eliminada!)\033[0m"
else
echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m"
fi
else
echo -e "\033[1;32m[KEY]: $arqsx \033[1;32m(Key Activa!)\033[0m"
fi
let i++
done
msg -bar2
echo -ne "\033[0m" && read -p "Enter"
}
start_gen() {
unset bot_ini
PIDGEN=$(ps x | grep -v grep | grep "http-server.sh")
if [[ ! $PIDGEN ]]; then
msg -bar
echo -ne "\033[1;97m Poner en linea despues de un reinicio [s/n]: "
read bot_ini
msg -bar
[[ $bot_ini = @(s|S|y|Y) ]] && {
crontab -l >/root/cron
echo "@reboot screen -dmS generador /bin/http-server.sh -start" >>/root/cron
crontab /root/cron
rm /root/cron
echo '#!/bin/bash
killall http-server.sh
screen -dmS generador /bin/http-server.sh -start
echo #' >/bin/genon
chmod +rwx /bin/genon
echo "00 * * * * root bash /bin/genon" >>/etc/crontab
service cron restart
} || {
crontab -l >/root/cron
sed -i '/http-server.sh/ d' /root/cron
crontab /root/cron
rm /root/cron
sed '/genon/ d' /etc/crontab >/bin/ejecutar/crontab
cat /bin/ejecutar/crontab >/etc/crontab
service cron restart
}
genon
else
killall http-server.sh
fi
}
message_gen() {
read -p "Ingresa el Mensaje: " MSGNEW
[[ -z $MSGNEW ]] && return
echo $MSGNEW >/etc/menu_ito
cat /etc/menu_ito >${SCPT_DIR}/menu_credito
read -p "Ingresa tu Numero de Contacto o tu ALIAS de TELEGRAM: " MSGNEW
echo $MSGNEW >/etc/menu_numito && chmod +rwx /etc/menu_numito
msg -bar
}
act_gen() {
while [[ ${varread} != @([0-2]) ]]; do
echo -e "Bienvenido al Actualizador, Escoje que vas a Actualizar\n 1).- KEY ACTIVA\n 2).- Creditos del ADM\n " | lolcat
echo -ne "${cor[6]}"
read -p " Escoje :" varread
done
msg -bar
if [[ ${varread} = 0 ]]; then
return
elif [[ ${varread} = 1 ]]; then
att_gen_key
elif [[ ${varread} = 2 ]]; then
message_gen
fi
#source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/Key-gerar/insta.sh)
}
rmv_iplib() {
echo -e "SERVIDORES DE KEY ATIVOS!"
rm /var/www/html/newlib && touch /var/www/html/newlib
rm ${SCPT_DIR}/*.x.c &>/dev/null
[[ -z $(ls $DIR | grep -v "ERROR-KEY") ]] && return
for arqs in $(ls $DIR | grep -v "ERROR-KEY" | grep -v ".name"); do
if [[ $(cat ${DIR}/${arqs}.name | grep GERADOR) ]]; then
var=$(cat ${DIR}/${arqs}.name)
ip=$(cat ${DIR}/${arqs}/keyfixa)
# echo -ne "\033[1;31m[USUARIO]:(\033[1;32m${var%%[*}\033[1;31m) \033[1;33m[GERADOR]:\033[1;32m ($ip)\033[0m"
echo "$ip" >>/var/www/html/newlib && echo -e " \033[1;36m[ATUALIZADO]"
fi
done
echo "51.222.29.216" >>/var/www/html/newlib
msg -bar
read -p "Enter"
}
bot_menu() {
[[ -e /etc/nivbot ]] || echo "0" >/etc/nivbot
[[ -d /etc/ADM-db ]] && chmod +rwx /etc/ADM-db/*
echo -ne "\033[1;31m[ ! ] RESPALDANDO USUARIO ADMINISTRADOR "
(
[[ -e /etc/ADM-db/sources/costes ]] && mv /etc/ADM-db/sources/costes $HOME/costes
[[ -e /etc/ADM-db/token ]] && mv /etc/ADM-db/token $HOME/token
[[ -e /etc/ADM-db/Admin-ID ]] && mv /etc/ADM-db/Admin-ID $HOME/Admin-ID
[[ -e /etc/ADM-db/User-ID ]] && mv /etc/ADM-db/User-ID $HOME/User-ID
[[ -e /etc/ADM-db/limit ]] && mv /etc/ADM-db/limit $HOME/limit
[[ -e /etc/ADM-db/resell ]] && mv /etc/ADM-db/resell $HOME/resell
[[ -e /etc/ADM-db/ress ]] && mv /etc/ADM-db/ress $HOME/ress
[[ -e /etc/ADM-db/num-key.cont ]] && mv /etc/ADM-db/num-key.cont $HOME/num-key.cont
) && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
rm -rf /etc/ADM-db
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
[[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Code-BOT-General/intBOT.sh &>/dev/null && chmod +rwx ${CIDdir}/confbot.sh
sed -i -e 's/\r$//' ${CIDdir}/confbot.sh
source ${CIDdir}/confbot.sh && rm -f ${CIDdir}/confbot.sh
bot_conf
}
fum_ver() {
while [[ ! $Keey ]]; do
clear
export PATH=$PATH:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/games
echo -e "\n \033[1;32m DIGITA TU KEY A VERIFICAR "
msg -ne "Script Key: " && read Keey
[[ ! -z $Keey ]] && Keey="$(echo "$Keey" | tr -d '[[:space:]]')"
tput cuu1 && tput dl1
done
REQUEST=$(ofus "$Keey" | cut -d'/' -f2)
echo -e "\n"
echo -e " FILE Contend : ${REQUEST} $(echo ${REQUEST} | wc -c)"
echo -e "\n"
echo -e " VERIFICA, Si tu key Contiene \033[1;45m KEY DE ChumoGH! \033[0m "
echo -e "\n"
msg -ne " Link Key: http://$(ofus $Keey) \n "
IiP=$(ofus "$Keey" | 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}')
[[ $(curl -s --connect-timeout 2 $IiP:8888) ]] && echo -e "\033[1;42mCONEXION CON SERVIDOR EXITOSA\033[0m" || echo -e "\033[1;43mCONEXION CON SERVIDOR FALLIDA\033[0m"
wget --no-check-certificate -O $HOME/list-key $(ofus $Keey)/$(wget -qO- ipv4.icanhazip.com) >/dev/null 2>&1 && echo -ne "\033[1;32m [ VERIFICANDO ]" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]" #&& echo -e "\033[1;32m [ Key ]\n" || echo -e "\033[1;31m [ No Existe Acceso al KEY ]"
ofen=$(wget -qO- $(ofus $Keey))
unset arqx
[[ -d $HOME/install ]] && rm -rf $HOME/install/* || mkdir $HOME/install
verificar_arq() {
echo "$1" >>$HOME/install/log.txt
}
n=1
IP=$(ofus "$Keey" | 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}') && echo "$IP" >/usr/bin/vendor_code
pontos="."
stopping=" COMPROBANDO " | sed -e 's/[^a-z -]//ig'
for arqx in $(cat $HOME/list-key); do
msg -verm "${stopping}${pontos}" && sleep 0.3s
wget --no-check-certificate -O $HOME/install/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}"
tput cuu1 && tput dl1
pontos+="."
n=$(($n + 1))
done
echo -ne " ---> ESTADO : \033[1;45m$ofen\033[0m con "
[[ ! -e $HOME/install/log.txt ]] && touch $HOME/install/log.txt
echo " $(cat <$HOME/install/log.txt | wc -l) FILES " && rm -f $HOME/install/log.txt
msg -ne " \033[1;42mESTADO :\033[0m "
[[ -e $HOME/list-key ]] && {
echo -ne " "
[[ $ofen = "KEY DE ChumoGH!" ]] &&
echo -e "KEY FUNCIONAL" && rm -f $HOME/list-key && echo -ne "\033[0m"
} || echo -e " KEY INVALIDA O USADA\033[0m\n"
#curl -s --connect-timeout 2 ${IiP}:81/${REQUEST}/menu_credito > menu_credito
msg -ne " RESELLER del Key :\033[0m "
[[ -e $HOME/install/menu_credito ]] && {
echo -ne " "
[[ "$(cat $HOME/install/menu_credito)" = "" ]] && {
echo -e "SIN RESELLER\033[0m"
} || echo -e "$(cat $HOME/install/menu_credito)\033[0m" && rm -rf $HOME/install && echo -ne "\033[0m"
} || echo -e " NO HAY CONTENIDO DE KEY Key\033[0m\n"
read -p "Enter"
}
alter_id() {
while [[ ${varread} != @([0-3]) ]]; do
tittle
msg -bar
echo -e " \033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Creditos POR ID \033[0;32m(#OFICIAL)"
echo -e " \033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m REINICIAR CONTADOR TOTAL \033[0;32m(#OFICIAL)"
msg -bar
echo -e " \033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m Regresar"
msg -bar
echo -ne "${cor[6]}"
read -p " Opcion : " varread
done
msg -bar
if [[ ${varread} = 0 ]]; then
return 0
elif [[ ${varread} = 1 ]]; then
echo -e "\033[1;32m DIGITA ID A REINICIAR "
msg -ne " Paste ID : " && read newli
sed -i "/${newli}/d" /etc/ADM-db/num-key.cont
echo "REGISTRO EN $(grep -o -i $newli /etc/ADM-db/num-key.cont | wc -l) KEYS"
read -p "Limite Aplicado Exitosamente"
elif [[ ${varread} = 2 ]]; then
echo -e "\033[1;32m BORRAREMOS EL CONTEO TOTAL DEL GENERADOR "
rm -rf /etc/ADM-db/num-key.cont && touch /etc/ADM-db/num-key.cont
echo "REGISTRO EN $(cat /etc/ADM-db/num-key.cont | wc -l) KEYS"
read -p "Limite Aplicado Exitosamente"
fi
}
# SISTEMA DE SELECAO
selection_fun() {
local selection="null"
local range
for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
echo -ne "\033[1;37mOpcion: " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
alter_limit() {
echo -e "\033[1;32m DIGITA TU NUEVO LIMITE "
msg -ne "New Limit: " && read newli
echo $newli >/etc/ADM-db/limit
read -p "Limite Aplicado Exitosamente"
}
dropIP() {
[[ ! -e /etc/dropIP.sh ]] && wget -q -O /etc/dropIP.sh https://www.dropbox.com/s/12r0h64vb1lc1oy/dropIP.sh?dl=0
unset PIDGEN
if [[ -e /var/www/html/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot ]]; then
echo -e "[Unit]
Description=BotGen Service by @ChumoGH
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/bin/bash /etc/dropIP.sh
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target" >/etc/systemd/system/dropIP.service
systemctl enable dropIP &>/dev/null
systemctl start dropIP &>/dev/null
else
killall dropIP &>/dev/null
systemctl stop dropIP &>/dev/null
systemctl disable dropIP &>/dev/null
rm /etc/systemd/system/dropIP.service &>/dev/null
clear
msg -bar
echo -e "\033[1;31m BotGen fuera de linea"
msg -bar
read -p "Presione Enter para continuar "
fi
}
meu_ip
menau() {
unset PID_GEN1
PID_GEN=$(ps x | grep -v grep | grep "http-server.sh")
PID_GEN1=$(ps x | grep -v grep | grep "8888")
PID_BGEN1=$(ps x | grep -v grep | grep "BotGen.sh")
add_fun="${PID_BGEN1}"
tittle
[[ -e /etc/valkey ]] && {
figlet -f smslant "$(cat </etc/valkey)" | lolcat
msg -bar
} || {
figlet -p -f smslant "@ChumoGH" | lolcat
msg -bar
}
[[ ! $PID_GEN ]] && PID_GEN="\033[0;35m[\033[0;31mDETENIDO\033[0;35m]" || PID_GEN="\033[0;35m[\033[0;36mWORKING\033[0;35m]"
[[ ! $PID_GEN1 ]] && PID_GEN1="\033[0;35m[\033[0;31m OFF \033[0;35m]" || PID_GEN1="\033[0;35m[\033[0;36m ON \033[0;35m]"
[[ ! $PID_BGEN1 ]] && {
PID_BGEN1="\033[0;35m[\033[0;31mNO INICIADO\033[0;35m]"
lim_menu='11'
} || PID_BGEN1="\033[0;35m[\033[0;36mFUNCIONANDO\033[0;35m]" && lim_menu='12'
ports_
[[ -e /etc/ADM-db/limit ]] && limcont=$(cat /etc/ADM-db/limit)
[[ "${limcont}" -ge "998" ]] && limted="50" || {
[[ -e /etc/ADM-db/limit ]] && limted=$(cat /etc/ADM-db/limit)
}
[[ -z $limted ]] && limted="No Found"
msg -bar
cd ${SCPT_DIR}
echo -e "\033[0;35m |\033[0;32m $(find . -type f | wc -l) \033[0;35m|\033[0;33m Ficheros\033[0;32m >\033[1;31m ${SCPT_DIR} \033[0;34mcon\033[0;35m |\033[0;32m$(ls /etc/http-shell/ | grep name | wc -l)\033[0;35m|\033[0;33m\033[0;33m KEYs"
cd $HOME
msg -bar
meu_ip
[[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m1\033[0;35m] \033[0;34m<\033[0;33m Alterar Limite del BOT ( $limted )" #$PID_GEN1\033[0m
echo -e "\033[0;35m[\033[0;36m2\033[0;35m] \033[0;34m<\033[0;33m APAGAR/VER KEYS"
#echo -e "\033[0;35m[\033[0;36mx\033[0;35m] \033[0;34m<\033[0;33m ------------------------" #KEYS ( GENERADOR )"
echo -e "\033[0;35m[\033[0;36m4\033[0;35m] \033[0;34m<\033[0;34m Generar Keys ALEATORIAS"
echo -e "\033[0;35m[\033[0;36m5\033[0;35m] \033[0;34m<\033[0;33m INICIAR/PARAR KEYGEN $PID_GEN\033[0m"
echo -e "\033[0;35m[\033[0;36m6\033[0;35m] \033[0;34m<\033[0;33m REGISTRO DE KEYS USADAS"
echo -e "\033[0;35m[\033[0;36m7\033[0;35m] \033[0;34m<\033[0;33m Checar KEY ACTIVADA"
echo -e "\033[0;35m[\033[0;36m8\033[0;35m] \033[0;34m<\033[0;33m ACTUALIZAR GENERADOR/KEY/CREDITOS "
echo -e "\033[0;35m[\033[0;36m9\033[0;35m] \033[0;34m<\033[0;33m Actualizar KEY"
echo -e "\033[0;35m[\033[0;36m10\033[0;35m] \033[0;34m<\033[0;33m CONFIGURAR BOT DE TELEGRAM $PID_BGEN1\033[0m"
[[ -z $add_fun ]] || echo -e "\033[0;35m[\033[0;36m11\033[0;35m] \033[0;34m<\033[0;33m + / - CREDITOS Por ID"
echo -e "\033[0;35m[\033[0;36m0\033[0;35m] \033[0;34m<\033[0;33m SALIR"
msg -bar
}
while :; do
menau
selection=$(selection_fun $lim_menu)
case ${selection} in
0) cd $HOME && break ;;
1) alter_limit ;;
2) remover_key ;;
3) remover_key_usada ;;
4) fix_key ;;
5) start_gen ;;
6)
echo -ne "\033[1;36m"
echo -e "$(cat /etc/gerar-sh-log)" 2>/dev/null || echo "NINGUN LOG DE MOMENTO"
echo -ne "\033[0m" && read -p "Enter"
;;
7) fum_ver ;;
8) act_gen ;;
9) att_gen_key ;;
10) bot_menu ;;
11) alter_id ;;
esac
done

4241
Otros/ShellBot.sh Normal file

File diff suppressed because it is too large Load Diff

17
Otros/lista Normal file
View File

@ -0,0 +1,17 @@
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PDirect.py
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PGet.py
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/POpen.py
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PPriv.py
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/PPub.py
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/cabecalho
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/fai2ban
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/ferramentas
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/menu
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/menu_credito
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/menu_inst
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/payloads
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/shadowsocks.sh
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/ultrahost
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/usercodes
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log
https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/http-server.py

218
Otros/msg Normal file
View File

@ -0,0 +1,218 @@
#!/bin/bash
# menu maker (opciones 1, 2, 3,.....)
flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && cG='/c' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && _kl1='ghkey' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && kL10='tc' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && am1='/e' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•' nib="${am1}${kL10}"
cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
menu_func(){
local options=${#@}
local array
for((num=1; num<=$options; num++)); do
echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
array=(${!num})
case ${array[0]} in
"-vd")echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}";;
"-vm")echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}";;
"-fi")echo -e "${array[@]:2} ${array[1]}";;
-bar|-bar2|-bar3|-bar4)echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})";;
*)echo -e "\033[1;37m${array[@]}";;
esac
done
}
selection_fun () {
local selection="null"
local range
for((i=0; i<=$1; i++)); do range[$i]="$i "; done
while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
echo -ne "\033[1;37m ► Opcion : " >&2
read selection
tput cuu1 >&2 && tput dl1 >&2
done
echo $selection
}
tittle () {
[[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
clear&&clear
msg -bar
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
msg -bar
}
in_opcion(){
unset opcion
if [[ -z $2 ]]; then
msg -nazu " $1: " >&2
else
msg $1 " $2: " >&2
fi
read opcion
echo "$opcion"
}
# centrado de texto
print_center(){
if [[ -z $2 ]]; then
text="$1"
else
col="$1"
text="$2"
fi
while read line; do
unset space
x=$(( ( 54 - ${#line}) / 2))
for (( i = 0; i < $x; i++ )); do
space+=' '
done
space+="$line"
if [[ -z $2 ]]; then
msg -azu "$space"
else
msg "$col" "$space"
fi
done <<< $(echo -e "$text")
}
# titulos y encabesados
title(){
clear
msg -bar
if [[ -z $2 ]]; then
print_center -azu "$1"
else
print_center "$1" "$2"
fi
msg -bar
}
# finalizacion de tareas
enter(){
msg -bar
text="►► Presione enter para continuar ◄◄"
if [[ -z $1 ]]; then
print_center -ama "$text"
else
print_center "$1" "$text"
fi
read
}
# opcion, regresar volver/atras
back(){
msg -bar
echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
msg -bar
}
msg () {
local colors="/etc/new-adm-color"
if [[ ! -e $colors ]]; then
COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
COLOR[1]='\e[31m' #VERMELHO='\e[31m'
COLOR[2]='\e[32m' #VERDE='\e[32m'
COLOR[3]='\e[33m' #AMARELO='\e[33m'
COLOR[4]='\e[34m' #AZUL='\e[34m'
COLOR[5]='\e[35m' #MAGENTA='\e[35m'
COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
COLOR[7]='\033[1;49;95m'
COLOR[8]='\033[1;49;96m'
else
local COL=0
for number in $(cat $colors); do
case $number in
1)COLOR[$COL]='\033[1;37m';;
2)COLOR[$COL]='\e[31m';;
3)COLOR[$COL]='\e[32m';;
4)COLOR[$COL]='\e[33m';;
5)COLOR[$COL]='\e[34m';;
6)COLOR[$COL]='\e[35m';;
7)COLOR[$COL]='\033[1;36m';;
8)COLOR[$COL]='\033[1;49;95m';;
9)COLOR[$COL]='\033[1;49;96m';;
esac
let COL++
done
fi
NEGRITO='\e[1m'
SEMCOR='\e[0m'
case $1 in
-ne)cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-ama)cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-verm)cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";;
-verm2)cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-aqua)cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-azu)cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-verd)cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-bra)cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}";;
-nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-nverd)cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";;
-verm3)cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}";;
-teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-teal2)cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}";;
-blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-blak2)cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}";;
-blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";;
-blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}";;
#-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar1)ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar2)ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar3)ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
-bar4)ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
esac
}
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 &
echo -ne "\033[1;33m ["
while true; do
for((i=0; i<18; i++)); do
echo -ne "\033[1;31m##"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne "\033[1;33m ["
done
echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
}
del(){
for (( i = 0; i < $1; i++ )); do
tput cuu1 && tput dl1
done
}
[[ -d /bin/ejecutar ]] && {
#[[ ! -e /etc/cghkey ]] && rm -rf /etc/adm-lite
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Otros/msg
} || mkdir /bin/ejecutar
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"
export -f msg
export -f fun_bar
export -f tittle
export -f enter
export -f back
export -f print_center
export -f in_opcion
export -f del

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# Generador-BOT
Codigo libre para generar BOT GEN partiendo de un script basico
#Correcciones paulatinas e instalacion directa
wget https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Instalador/install.sh ; chmod +rwx install.sh; ./install.sh --install