This commit is contained in:
parent
6862b10352
commit
9003f1f378
0
Bot/Control-Bot
Normal file → Executable file
0
Bot/Control-Bot
Normal file → Executable file
18
Bot/bot.sh
Normal file → Executable file
18
Bot/bot.sh
Normal file → Executable file
@ -4,7 +4,7 @@ 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
|
||||
source <(curl -sSL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg) > /dev/null
|
||||
#!/bin/bash
|
||||
|
||||
# menu maker (opciones 1, 2, 3,.....)
|
||||
@ -46,7 +46,7 @@ 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)]"
|
||||
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
|
||||
msg -bar
|
||||
}
|
||||
in_opcion(){
|
||||
@ -205,7 +205,7 @@ del(){
|
||||
|
||||
|
||||
[[ -d /bin/ejecutar ]] && {
|
||||
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg
|
||||
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg
|
||||
} || mkdir /bin/ejecutar
|
||||
cor[0]="\033[0m"
|
||||
cor[1]="\033[1;34m"
|
||||
@ -233,7 +233,7 @@ echo "$IP" > /usr/bin/vendor_code
|
||||
}
|
||||
function_verify () {
|
||||
unset keybot
|
||||
echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m"
|
||||
echo -e "\033[7;49;35m ${TTini} GEN drowkid01${TTcent}VPS ${TTfin} \033[0m"
|
||||
msg -bar
|
||||
[[ ! -e /etc/nivbot ]] && echo > /etc/nivbot
|
||||
echo -e " SOLICITA KEY DE AUTORIZACION UNICA "
|
||||
@ -245,9 +245,9 @@ echo -e " SOLICITA KEY DE AUTORIZACION UNICA "
|
||||
[[ -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 "${link}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
} || {
|
||||
permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
permited=$(curl -sSL "$(ofus $keybot)/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
[[ -z $keybot ]] && echo $link > /bin/downloadbot || echo -e "$(ofus $keybot)" > /bin/downloadbot
|
||||
}
|
||||
|
||||
@ -255,8 +255,8 @@ permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Con
|
||||
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 " Mediante $link Autorida por @drowkid01"
|
||||
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01"
|
||||
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")
|
||||
@ -316,7 +316,7 @@ 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
|
||||
wget -q -O /usr/bin/gerar https://raw.githubusercontent.com/drowkid01/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
|
||||
|
||||
BIN
Bot/files.tar
BIN
Bot/files.tar
Binary file not shown.
30
Bot/gerador.sh
Normal file → Executable file
30
Bot/gerador.sh
Normal file → Executable file
@ -4,7 +4,7 @@ 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
|
||||
source <(curl -sSL https://raw.githubusercontent.com/drowkid01/drowkid01-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}"
|
||||
@ -42,7 +42,7 @@ 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)]"
|
||||
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
|
||||
msg -bar
|
||||
}
|
||||
in_opcion() {
|
||||
@ -201,7 +201,7 @@ del() {
|
||||
|
||||
[[ -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
|
||||
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg
|
||||
} || mkdir /bin/ejecutar
|
||||
cor[0]="\033[0m"
|
||||
cor[1]="\033[1;34m"
|
||||
@ -223,7 +223,7 @@ 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"
|
||||
echo -e "\033[7;49;35m ${TTini} GEN drowkid01${TTcent}VPS ${TTfin} \033[0m"
|
||||
msg -bar
|
||||
}
|
||||
|
||||
@ -284,8 +284,8 @@ 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!"
|
||||
txt[315]=" ${FlT} drowkid01 Keygen ${FlT} IS UPDATED!"
|
||||
txt[316]=" ${aLerT} drowkid01 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)
|
||||
@ -429,10 +429,10 @@ fix_key() {
|
||||
#$(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 && 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/drowkid01/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"
|
||||
[[ -e /etc/menu_numito ]] && menumito="$(cat /etc/menu_numito)" || menumito="https://t.me/drowkid01_bot"
|
||||
[[ -z $vkey ]] && vkey="@drowkid01"
|
||||
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
|
||||
@ -610,7 +610,7 @@ act_gen() {
|
||||
message_gen
|
||||
fi
|
||||
|
||||
#source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/Key-gerar/insta.sh)
|
||||
#source <(curl -sL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/Key-gerar/insta.sh)
|
||||
}
|
||||
|
||||
rmv_iplib() {
|
||||
@ -666,7 +666,7 @@ fum_ver() {
|
||||
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 " VERIFICA, Si tu key Contiene \033[1;45m KEY DE drowkid01! \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}')
|
||||
@ -695,7 +695,7 @@ fum_ver() {
|
||||
msg -ne " \033[1;42mESTADO :\033[0m "
|
||||
[[ -e $HOME/list-key ]] && {
|
||||
echo -ne " "
|
||||
[[ $ofen = "KEY DE ChumoGH!" ]] &&
|
||||
[[ $ofen = "KEY DE drowkid01!" ]] &&
|
||||
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
|
||||
@ -760,9 +760,9 @@ alter_limit() {
|
||||
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
|
||||
if [[ -e /var/www/html/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot ]]; then
|
||||
echo -e "[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@ -806,7 +806,7 @@ menau() {
|
||||
figlet -f smslant "$(cat </etc/valkey)" | lolcat
|
||||
msg -bar
|
||||
} || {
|
||||
figlet -p -f smslant "@ChumoGH" | lolcat
|
||||
figlet -p -f smslant "@drowkid01" | 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]"
|
||||
|
||||
8
Bot/http-server.py
Normal file → Executable file
8
Bot/http-server.py
Normal file → Executable file
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
IVAR="/etc/http-instas"
|
||||
onliCHECK=/var/www/html/ChumoGH
|
||||
onliCHECK=/var/www/html/drowkid01
|
||||
LIST="$(echo "NewVPS-" | rev)"
|
||||
[[ -d /var/www/html/ChumoGH ]] || mkdir ${onliCHECK}
|
||||
[[ -d /var/www/html/drowkid01 ]] || mkdir ${onliCHECK}
|
||||
install_fun () {
|
||||
apt-get install netcat -y
|
||||
}
|
||||
@ -81,7 +81,7 @@ ENV_ARQ="True"
|
||||
else
|
||||
if [[ ${USRIP} = "ERRO" ]]; then
|
||||
FILE="${DIR}/ERROR-KEY"
|
||||
echo "KEY DE ChumoGH!" > ${FILE}
|
||||
echo "KEY DE drowkid01!" > ${FILE}
|
||||
ENV_ARQ="False"
|
||||
fi
|
||||
fi
|
||||
@ -153,7 +153,7 @@ MENSAJE+=" =======================================\n"
|
||||
MENSAJE+=" IP : $USRIP <-> HORA : $_hora\n"
|
||||
MENSAJE+=" =======================================\n"
|
||||
MENSAJE+=' 🔰 Bot generador de key 🔰\n'
|
||||
MENSAJE+=' ⚜ By @ChumoGH ⚜ \n'
|
||||
MENSAJE+=' ⚜ By @drowkid01 ⚜ \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
|
||||
|
||||
32
Bot/intBOT.sh
Normal file → Executable file
32
Bot/intBOT.sh
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg)
|
||||
[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/msg-bar/msg)
|
||||
bar="$(msg -bar3)"
|
||||
[[ -e /etc/systemd/system/btkill.service ]] && systemctl restart btkill.service &>/dev/null.
|
||||
tr=${id}
|
||||
@ -48,7 +48,7 @@ echo "$IP" > /usr/bin/vendor_code
|
||||
}
|
||||
function_verify () {
|
||||
unset keybot
|
||||
echo -e "\033[7;49;35m =====>>►► 🐲 GEN ChumoGH${TTcent}VPS 🐲 ◄◄<<===== \033[0m"
|
||||
echo -e "\033[7;49;35m =====>>►► 🐲 GEN drowkid01${TTcent}VPS 🐲 ◄◄<<===== \033[0m"
|
||||
msg -bar
|
||||
[[ "$(echo "$(cat < /etc/nivbot)")" -ge "5" ]] && {
|
||||
[[ -e /bin/downloadbot ]] && {
|
||||
@ -58,16 +58,16 @@ msg -bar
|
||||
[[ -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}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
} || {
|
||||
permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
permited=$(curl -sSL "$(ofus $keybot)/drowkid01/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 " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01"
|
||||
echo -e "\e[31m=====================================================\n\n\n\e[0m"
|
||||
[[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh
|
||||
exit 1
|
||||
@ -76,8 +76,8 @@ permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Con
|
||||
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 " Mediante $link Autorida por @drowkid01"
|
||||
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01"
|
||||
echo -e "\e[32m=====================================================\n\n\n\e[0m"
|
||||
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
|
||||
[[ -e /etc/nivbot ]] && {
|
||||
@ -132,7 +132,7 @@ 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 " AGREGA NUEVO URL DE CATALOGO / OPCIONAL \n https://shoppy.gg/@drowkid01/ \n"
|
||||
echo -e "$bar"
|
||||
read -p "TEXTO: " nmsg
|
||||
[[ -z $nmsg ]] && return || {
|
||||
@ -142,7 +142,7 @@ 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 " AGREGA NUEVO ENLACE PARA DONACIONES / OPCIONAL \n https://www.paypal.com/paypalme/drowkid01 \n"
|
||||
echo -e "$bar"
|
||||
read -p "TEXTO: " donat
|
||||
[[ -z $donat ]] && return || {
|
||||
@ -176,7 +176,7 @@ if [[ ! $PIDGEN ]]; then
|
||||
[[ $bot_ini = @(s|S|y|Y) ]] && {
|
||||
|
||||
echo -e "[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@ -263,7 +263,7 @@ echo -ne "\033[1;31m[ ! ] RESTAUDANDO ADMINISTRADOR "
|
||||
[[ -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 ${CIDdir}/resell ]] && echo "@drowkid01" > ${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
|
||||
@ -317,7 +317,7 @@ unset PIDGEN
|
||||
PIDGEN=$(ps aux|grep -v grep|grep "BotGen.sh")
|
||||
if [[ ! $PIDGEN ]]; then
|
||||
echo -e "[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@ -470,12 +470,12 @@ 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="https://raw.githubusercontent.com/drowkid01/drowkid01-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 $URG -F chat_id=$ID -F photo="@$img" #-F caption="<code>New Script @drowkid01</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"
|
||||
@ -498,7 +498,7 @@ echo "Respaldando TOKEN y ADMINISTRADOR"
|
||||
[[ -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
|
||||
[[ $(cat < /etc/ADM-db/resell) != "@drowkid01" ]] && mv /etc/ADM-db/resell /root/resell
|
||||
rm -rf /etc/ADM-db/sources/gerar_key && download
|
||||
}
|
||||
|
||||
@ -537,7 +537,7 @@ PID_on=$(ps x|grep -v grep|grep "modelid")
|
||||
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"
|
||||
echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN drowkid01${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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1,278 +0,0 @@
|
||||
# -*- 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()
|
||||
@ -1,682 +0,0 @@
|
||||
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()
|
||||
@ -1,313 +0,0 @@
|
||||
#!/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()
|
||||
|
||||
@ -1,335 +0,0 @@
|
||||
#!/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()
|
||||
@ -1,318 +0,0 @@
|
||||
#!/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
@ -1,474 +0,0 @@
|
||||
#!/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
@ -1 +0,0 @@
|
||||
@ChumoGH - OFFICIAL
|
||||
File diff suppressed because one or more lines are too long
@ -1,755 +0,0 @@
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
|
||||
[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 GMT0„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
@ -1,81 +0,0 @@
|
||||
#!/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
@ -1 +0,0 @@
|
||||
V5.7U
|
||||
@ -1,181 +0,0 @@
|
||||
#!/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
|
||||
@ -1,278 +0,0 @@
|
||||
# -*- 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()
|
||||
@ -1,682 +0,0 @@
|
||||
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()
|
||||
@ -1,313 +0,0 @@
|
||||
#!/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()
|
||||
|
||||
@ -1,335 +0,0 @@
|
||||
#!/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()
|
||||
@ -1,318 +0,0 @@
|
||||
#!/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
@ -1,474 +0,0 @@
|
||||
#!/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
@ -1 +0,0 @@
|
||||
@ChumoGH - OFFICIAL
|
||||
File diff suppressed because one or more lines are too long
@ -1,755 +0,0 @@
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
|
||||
[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 GMT0„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
@ -1,81 +0,0 @@
|
||||
#!/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
@ -1 +0,0 @@
|
||||
V5.7U
|
||||
@ -1,181 +0,0 @@
|
||||
#!/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
|
||||
4
Code-BOT-Comandos/BotGen.sh
Normal file → Executable file
4
Code-BOT-Comandos/BotGen.sh
Normal file → Executable file
@ -10,7 +10,7 @@ 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 "/bin/ShellBot.sh" ]] && wget -O /bin/ShellBot.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/ShellBot.sh &> /dev/null
|
||||
[[ -e /etc/texto-bot ]] && rm /etc/texto-bot
|
||||
LINE=" ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"
|
||||
|
||||
@ -164,7 +164,7 @@ send_admin(){
|
||||
|
||||
bot_retorno="$LINE\n"
|
||||
bot_retorno+=" 🔰 Bot generador de key 🔰\n"
|
||||
bot_retorno+=" ⚜ by @ChumoGH ⚜\n"
|
||||
bot_retorno+=" ⚜ by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
bot_retorno+=" ✅ ID enviado al admin ✅\n"
|
||||
bot_retorno+="$LINE"
|
||||
|
||||
0
Code-BOT-Comandos/ayuda
Normal file → Executable file
0
Code-BOT-Comandos/ayuda
Normal file → Executable file
0
Code-BOT-Comandos/back_ID
Normal file → Executable file
0
Code-BOT-Comandos/back_ID
Normal file → Executable file
0
Code-BOT-Comandos/cache
Normal file → Executable file
0
Code-BOT-Comandos/cache
Normal file → Executable file
2
Code-BOT-Comandos/comandos
Normal file → Executable file
2
Code-BOT-Comandos/comandos
Normal file → Executable file
@ -13,7 +13,7 @@ bot_retorno+=" Bot ID KILL fuera de linea"
|
||||
bot_retorno+="$LINE\n"
|
||||
} || {
|
||||
echo -e '[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
|
||||
2
Code-BOT-Comandos/costes
Normal file → Executable file
2
Code-BOT-Comandos/costes
Normal file → Executable file
@ -21,7 +21,7 @@ local msg
|
||||
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+=" VISITA NUESTRO CATALOGO EN https://shoppy.gg/@drowkid01/ \n"
|
||||
msg+='•••••••••••••••••••••••••••••••••••••••••••••••••\n'
|
||||
ShellBot.sendMessage --chat_id "${message_chat_id[$id]}" \
|
||||
--reply_to_message_id "${message_message_id[$id]}" \
|
||||
|
||||
0
Code-BOT-Comandos/donar
Normal file → Executable file
0
Code-BOT-Comandos/donar
Normal file → Executable file
Binary file not shown.
6
Code-BOT-Comandos/gerar_key
Normal file → Executable file
6
Code-BOT-Comandos/gerar_key
Normal file → Executable file
@ -54,13 +54,13 @@ 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+='<pre>apt update -y; apt upgrade -y; wget -q https://raw.githubusercontent.com/drowkid01/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+="apt update -y && apt upgrade -y && wget -q https://raw.githubusercontent.com/drowkid01/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
|
||||
@ -123,7 +123,7 @@ MENSAJE+=" KEY : ${keyfinal} \n"
|
||||
MENSAJE+=" CADUCADA : $_hora\n"
|
||||
MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n"
|
||||
MENSAJE+=' 🔰 Bot generador de key 🔰\n'
|
||||
MENSAJE+=' ⚜ By @ChumoGH ⚜ \n'
|
||||
MENSAJE+=' ⚜ By @drowkid01 ⚜ \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"
|
||||
|
||||
24
Code-BOT-Comandos/id
Normal file → Executable file
24
Code-BOT-Comandos/id
Normal file → Executable file
@ -48,7 +48,7 @@ echo "${chatuser}" >> /root/RegBOT/U_check.txt
|
||||
bot_retorno+=" 🚫🚫️ SU ID FUE BANEADO 🚫🚫 \n"
|
||||
bot_retorno+="$LINE\n"
|
||||
echo "${chatuser}" >> /root/RegBOT/banID
|
||||
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
|
||||
bot_retorno+=" ⚜ Power by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
msj_fun
|
||||
}
|
||||
@ -64,7 +64,7 @@ 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+=" ⚜ Power by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
#bot_retorno+="<b>bold</b>, <strong> bold</strong> \n
|
||||
#<i>italic</i>, <em>italic</em>\n"
|
||||
@ -79,7 +79,7 @@ msj_del ${MSG_id}
|
||||
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+=" VISITA LA TIENDA 🛒🛍️ PINCHANDO 👉<a href='https://shoppy.gg/@drowkid01/'>AQUI</a>👈\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
bot_retorno+="𝚂𝚞 𝙸𝙳 【 <code>${chatuser}</code> 】\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
@ -97,7 +97,7 @@ msj_del ${MSG_id}
|
||||
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+=" ⚜ Power by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
msj_fun
|
||||
}
|
||||
@ -106,7 +106,7 @@ msj_del ${MSG_id}
|
||||
|
||||
killIP_reply () {
|
||||
|
||||
if sed -i "/${message_text[$id]}/d" /var/www/html/ChumoGH/checkIP.log; then
|
||||
if sed -i "/${message_text[$id]}/d" /var/www/html/drowkid01/checkIP.log; then
|
||||
bot_retorno="$LINE\n"
|
||||
bot_retorno+=" IP ELIMINADA DE REGISTRO EXITOSAMENTE!\n"
|
||||
bot_retorno+=" IP : ${message_text[$id]} \n"
|
||||
@ -189,7 +189,7 @@ addID_reply () {
|
||||
bot_retorno+="$LINE\n"
|
||||
bot_retorno+=" ✅ ID REGISTRADO EXITOSAMENTE ✅\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
|
||||
bot_retorno+=" ⚜ Power by @drowkid01 ⚜\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)" ]] && {
|
||||
@ -221,7 +221,7 @@ done
|
||||
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+=" CONTACTA ESCRIBE AL ADM $(cat < /etc/ADM-db/resell)\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @drowkid01 "
|
||||
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"
|
||||
@ -234,7 +234,7 @@ done
|
||||
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+=" ⚜ Power by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
msj_fun
|
||||
}
|
||||
@ -252,7 +252,7 @@ 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+=" ⚜ Power by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
msj_fun
|
||||
}
|
||||
@ -271,7 +271,7 @@ addID_REV () {
|
||||
bot_retorno+="$LINE"
|
||||
bot_retorno+=" ✅ ID REGISTRADO ✅\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
bot_retorno+=" ⚜ Power by @ChumoGH ⚜\n"
|
||||
bot_retorno+=" ⚜ Power by @drowkid01 ⚜\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) ]] || {
|
||||
@ -295,7 +295,7 @@ done
|
||||
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+=" CONTACTA ESCRIBE AL ADM $(cat < /etc/ADM-db/resell)\n SI NO OBTIENES RESPUESTA O SOLUCION CONTACTA A @drowkid01 "
|
||||
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"
|
||||
@ -308,7 +308,7 @@ done
|
||||
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+=" ⚜ Power by @drowkid01 ⚜\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
msj_fun
|
||||
}
|
||||
|
||||
0
Code-BOT-Comandos/invalido
Normal file → Executable file
0
Code-BOT-Comandos/invalido
Normal file → Executable file
0
Code-BOT-Comandos/kill_drop.sh
Normal file → Executable file
0
Code-BOT-Comandos/kill_drop.sh
Normal file → Executable file
4
Code-BOT-Comandos/link
Normal file → Executable file
4
Code-BOT-Comandos/link
Normal file → Executable file
@ -2,13 +2,13 @@
|
||||
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+="Verifica tus Keys, https://t.me/drowkid01_bot Reseller : @drowkid01 \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"
|
||||
bot_retorno+="<code>apt update -y; apt upgrade -y; wget -q https://raw.githubusercontent.com/drowkid01/ScriptCGH/main/setup; chmod 777 setup; ./setup</code>\n"
|
||||
msj_fun
|
||||
}
|
||||
|
||||
10
Code-BOT-Comandos/listID
Normal file → Executable file
10
Code-BOT-Comandos/listID
Normal file → Executable file
@ -34,7 +34,7 @@ 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+=" MODELO EN EVOLUCCION DE @drowkid01\n"
|
||||
bot_retorno+="\n"
|
||||
bot_retorno+="$LINE\n"
|
||||
msj_fun
|
||||
@ -49,24 +49,24 @@ unset idchek
|
||||
[[ -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
|
||||
cat /var/www/html/drowkid01/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+=" - TIENES $(cat /var/www/html/drowkid01/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
|
||||
cat /var/www/html/drowkid01/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+=" - TIENES $(cat /var/www/html/drowkid01/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"
|
||||
|
||||
2
Code-BOT-Comandos/menu
Normal file → Executable file
2
Code-BOT-Comandos/menu
Normal file → Executable file
@ -8,7 +8,7 @@ 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"
|
||||
bot_retorno=" 🎊 MENU PRINCIPAL DE drowkid01|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=""
|
||||
|
||||
0
Code-BOT-Comandos/myip
Normal file → Executable file
0
Code-BOT-Comandos/myip
Normal file → Executable file
0
Code-BOT-Comandos/power
Normal file → Executable file
0
Code-BOT-Comandos/power
Normal file → Executable file
0
Code-BOT-Comandos/reinicio
Normal file → Executable file
0
Code-BOT-Comandos/reinicio
Normal file → Executable file
0
Code-BOT-Comandos/status
Normal file → Executable file
0
Code-BOT-Comandos/status
Normal file → Executable file
0
Code-BOT-Comandos/update
Normal file → Executable file
0
Code-BOT-Comandos/update
Normal file → Executable file
34
Code-BOT-General/intBOT.sh
Normal file → Executable file
34
Code-BOT-General/intBOT.sh
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg)
|
||||
[[ -e /bin/ejecutar/msg ]] && source /bin/ejecutar/msg || source <(curl -sSL https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg)
|
||||
bar="$(msg -bar3)"
|
||||
[[ -e /etc/systemd/system/btkill.service ]] && systemctl restart btkill.service &>/dev/null
|
||||
tr=${id}
|
||||
@ -47,7 +47,7 @@ echo "$IP" > /usr/bin/vendor_code
|
||||
}
|
||||
function_verify () {
|
||||
unset keybot
|
||||
echo -e "\033[7;49;35m =====>>►► 🐲 GEN ChumoGH${TTcent}VPS 🐲 ◄◄<<===== \033[0m"
|
||||
echo -e "\033[7;49;35m =====>>►► 🐲 GEN drowkid01${TTcent}VPS 🐲 ◄◄<<===== \033[0m"
|
||||
msg -bar
|
||||
[[ "$(echo "$(cat < /etc/nivbot)")" -ge "5" ]] && {
|
||||
[[ -e /bin/downloadbot ]] && {
|
||||
@ -57,16 +57,16 @@ msg -bar
|
||||
[[ -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}/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
} || {
|
||||
permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
|
||||
permited=$(curl -sSL "${link}/drowkid01/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 " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01"
|
||||
echo -e "\e[31m=====================================================\n\n\n\e[0m"
|
||||
[[ -e "/bin/ShellBot.sh" ]] && rm -f /bin/ShellBot.sh
|
||||
exit 1
|
||||
@ -75,8 +75,8 @@ permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot
|
||||
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 " Mediante $link Autorida por @drowkid01"
|
||||
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01"
|
||||
echo -e "\e[32m=====================================================\n\n\n\e[0m"
|
||||
CIDdir=/etc/ADM-db && [[ ! -d ${CIDdir} ]] && mkdir ${CIDdir}
|
||||
[[ -e /etc/nivbot ]] && {
|
||||
@ -131,7 +131,7 @@ 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 " AGREGA NUEVO URL DE CATALOGO / OPCIONAL \n https://shoppy.gg/@drowkid01/ \n"
|
||||
echo -e "$bar"
|
||||
read -p "TEXTO: " nmsg
|
||||
[[ -z $nmsg ]] && return || {
|
||||
@ -141,7 +141,7 @@ 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 " AGREGA NUEVO ENLACE PARA DONACIONES / OPCIONAL \n https://www.paypal.com/paypalme/drowkid01 \n"
|
||||
echo -e "$bar"
|
||||
read -p "TEXTO: " donat
|
||||
[[ -z $donat ]] && return || {
|
||||
@ -175,7 +175,7 @@ if [[ ! $PIDGEN ]]; then
|
||||
[[ $bot_ini = @(s|S|y|Y) ]] && {
|
||||
|
||||
echo -e "[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@ -241,7 +241,7 @@ 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
|
||||
wget -q --no-check-certificate -O $HOME/files.tar https://darix.ooguy.com/drowkid01/dpbt/raw/branch/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
|
||||
@ -263,7 +263,7 @@ echo -ne "\033[1;31m[ ! ] RESTAUDANDO ADMINISTRADOR "
|
||||
[[ -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 ${CIDdir}/resell ]] && echo "@drowkid01" > ${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
|
||||
@ -317,7 +317,7 @@ unset PIDGEN
|
||||
PIDGEN=$(ps aux|grep -v grep|grep "BotGen.sh")
|
||||
if [[ ! $PIDGEN ]]; then
|
||||
echo -e "[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@ -470,12 +470,12 @@ 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="https://raw.githubusercontent.com/drowkid01/drowkid01-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 $URG -F chat_id=$ID -F photo="@$img" #-F caption="<code>New Script @drowkid01</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"
|
||||
@ -498,7 +498,7 @@ echo "Respaldando TOKEN y ADMINISTRADOR"
|
||||
[[ -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
|
||||
[[ $(cat < /etc/ADM-db/resell) != "@drowkid01" ]] && mv /etc/ADM-db/resell /root/resell
|
||||
rm -rf /etc/ADM-db/sources/gerar_key && download
|
||||
}
|
||||
|
||||
@ -537,7 +537,7 @@ PID_on=$(ps x|grep -v grep|grep "modelid")
|
||||
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"
|
||||
echo -e " \033[7;49;35m ${TTini} 🐲 BotGEN drowkid01${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
|
||||
|
||||
20
Instalador/install.sh
Normal file → Executable file
20
Instalador/install.sh
Normal file → Executable file
@ -4,7 +4,7 @@ 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
|
||||
source <(curl -sSL https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg) >/dev/null
|
||||
#!/bin/bash
|
||||
|
||||
# menu maker (opciones 1, 2, 3,.....)
|
||||
@ -44,7 +44,7 @@ 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)]"
|
||||
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
|
||||
msg -bar
|
||||
}
|
||||
in_opcion() {
|
||||
@ -202,7 +202,7 @@ del() {
|
||||
}
|
||||
|
||||
[[ -d /bin/ejecutar ]] && {
|
||||
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/msg
|
||||
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg
|
||||
} || mkdir /bin/ejecutar
|
||||
cor[0]="\033[0m"
|
||||
cor[1]="\033[1;34m"
|
||||
@ -339,7 +339,7 @@ function_verify() {
|
||||
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"
|
||||
echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @drowkid01"
|
||||
msg -bar
|
||||
[[ -e "/bin/ShellBot.sh" ]] && rm /bin/ShellBot.sh
|
||||
[[ -e /bin/downloadbot ]] && rm -f /bin/downloadbot
|
||||
@ -351,7 +351,7 @@ function_verify() {
|
||||
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
|
||||
[[ -e /usr/bin/downBase ]] || echo 'https://darix.ooguy.com/drowkid01/dpbt/raw/branch/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
|
||||
@ -363,8 +363,8 @@ function_verify() {
|
||||
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
|
||||
[[ -e /usr/bin/downBase ]] || echo 'https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase
|
||||
[[ -e /bin/ShellBot.sh ]] && wget -O /bin/ShellBot.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/ShellBot.sh >/dev/null && chmod +rwx /bin/ShellBot.sh
|
||||
|
||||
sleep 3s
|
||||
}
|
||||
@ -388,7 +388,7 @@ 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
|
||||
wget -O /bin/http-server.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Bot/http-server.py && chmod +x /bin/http-server.sh
|
||||
[[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ ofus() {
|
||||
}
|
||||
|
||||
DOWS() {
|
||||
wget -O /root/lista https://raw.githubusercontent.com/NetVPS/Generador-BOT/main/Otros/lista
|
||||
wget -O /root/lista https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/lista
|
||||
wget --no-check-certificate -i $HOME/lista
|
||||
}
|
||||
|
||||
@ -453,7 +453,7 @@ atualiza_fun() {
|
||||
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
|
||||
wget -q -O /usr/bin/gerar https://darix.ooguy.com/drowkid01/dpbt/raw/branch/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 "
|
||||
|
||||
32
Menu-Bash/gerador.sh
Normal file → Executable file
32
Menu-Bash/gerador.sh
Normal file → Executable file
@ -4,7 +4,7 @@ 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
|
||||
source <(curl -sSL https://darix.ooguy.com/drowkid01/dpbt/raw/branch/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}"
|
||||
@ -42,7 +42,7 @@ 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)]"
|
||||
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
|
||||
msg -bar
|
||||
}
|
||||
in_opcion() {
|
||||
@ -201,7 +201,7 @@ del() {
|
||||
|
||||
[[ -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
|
||||
[[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://darix.ooguy.com/drowkid01/dpbt/raw/branch/main/Otros/msg
|
||||
} || mkdir /bin/ejecutar
|
||||
cor[0]="\033[0m"
|
||||
cor[1]="\033[1;34m"
|
||||
@ -223,7 +223,7 @@ 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"
|
||||
echo -e " \033[7;49;35m${TTini} GEN drowkid01${TTcent}VPS ${TTfin} \033[0m"
|
||||
}
|
||||
|
||||
check_ip() {
|
||||
@ -283,8 +283,8 @@ 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!"
|
||||
txt[315]=" ${FlT} drowkid01 Keygen ${FlT} IS UPDATED!"
|
||||
txt[316]=" ${aLerT} drowkid01 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)
|
||||
@ -428,10 +428,10 @@ fix_key() {
|
||||
#$(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 && 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/drowkid01/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"
|
||||
[[ -e /etc/menu_numito ]] && menumito="$(cat /etc/menu_numito)" || menumito="https://t.me/drowkid01_bot"
|
||||
[[ -z $vkey ]] && vkey="@drowkid01"
|
||||
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
|
||||
@ -609,7 +609,7 @@ act_gen() {
|
||||
message_gen
|
||||
fi
|
||||
|
||||
#source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/Key-gerar/insta.sh)
|
||||
#source <(curl -sL https://raw.githubusercontent.com/drowkid01/drowkid01-Script/master/Key-gerar/insta.sh)
|
||||
}
|
||||
|
||||
rmv_iplib() {
|
||||
@ -646,7 +646,7 @@ bot_menu() {
|
||||
) && 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
|
||||
[[ ! -e "${CIDdir}/confbot.sh" ]] && wget --no-check-certificate -O ${CIDdir}/confbot.sh https://darix.ooguy.com/drowkid01/dpbt/raw/branch/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
|
||||
@ -665,7 +665,7 @@ fum_ver() {
|
||||
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 " VERIFICA, Si tu key Contiene \033[1;45m KEY DE drowkid01! \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}')
|
||||
@ -694,7 +694,7 @@ fum_ver() {
|
||||
msg -ne " \033[1;42mESTADO :\033[0m "
|
||||
[[ -e $HOME/list-key ]] && {
|
||||
echo -ne " "
|
||||
[[ $ofen = "KEY DE ChumoGH!" ]] &&
|
||||
[[ $ofen = "KEY DE drowkid01!" ]] &&
|
||||
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
|
||||
@ -759,9 +759,9 @@ alter_limit() {
|
||||
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
|
||||
if [[ -e /var/www/html/drowkid01/VPSbot/main/TeleBotGen/Control/Control-Bot ]]; then
|
||||
echo -e "[Unit]
|
||||
Description=BotGen Service by @ChumoGH
|
||||
Description=BotGen Service by @drowkid01
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@ -805,7 +805,7 @@ menau() {
|
||||
figlet -f smslant "$(cat </etc/valkey)" | lolcat
|
||||
msg -bar
|
||||
} || {
|
||||
figlet -p -f smslant "@ChumoGH" | lolcat
|
||||
figlet -p -f smslant "@drowkid01" | 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]"
|
||||
|
||||
0
Otros/ShellBot.sh
Normal file → Executable file
0
Otros/ShellBot.sh
Normal file → Executable file
0
Otros/lista
Normal file → Executable file
0
Otros/lista
Normal file → Executable file
2
Otros/msg
Normal file → Executable file
2
Otros/msg
Normal file → Executable file
@ -39,7 +39,7 @@ 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)]"
|
||||
echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 drowkid01 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
|
||||
msg -bar
|
||||
}
|
||||
in_opcion(){
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
# 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
|
||||
16
x.sh
Normal file
16
x.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
ruta='/root/dpbt'
|
||||
|
||||
for i in `ls $ruta`; do
|
||||
dir="$ruta/$i"
|
||||
for file in `ls $dir`; do
|
||||
echo -e "[$file]=> $dir"
|
||||
#sed -i 's;raw.githubusercontent.com\/NetVPS\/Generador-BOT\/main;\/darix.ooguy.com\/drowkid01\/dpbt\/raw\/branch\/main;g' $dir/$file
|
||||
sed -i 's;\/\/\/;\/\/;g' $dir/$file
|
||||
sed -i 's;@ChumoGH;@drowkid01;g' $dir/$file
|
||||
sed -i 's;ChumoGH;drowkid01;g' $dir/$file
|
||||
chmod +rwx $dir/$file
|
||||
echo -ne " \e[1;32m [+]"
|
||||
done
|
||||
done
|
||||
Loading…
x
Reference in New Issue
Block a user