gerar_key 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #!/bin/bash
  2. # -*- ENCODING: UTF-8 -*-
  3. # verificacion primarias
  4. meu_ip_fun () {
  5. 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)
  6. MIP2=$(wget -qO- ipv4.icanhazip.com)
  7. [[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
  8. }
  9. [[ -e /etc/newadm-instalacao ]] && BASICINST="$(cat /etc/newadm-instalacao)" || BASICINST="cabecalho menu_credito ferramentas menu_inst PPub.py usercodes payloads PDirect.py v-local.log PGet.py ultrahost menu POpen.py shadowsocks.sh fai2ban PPriv.py"
  10. SCPT_DIR="/etc/SCRIPT"
  11. [[ ! -e ${SCPT_DIR} ]] && mkdir ${SCPT_DIR}
  12. INSTA_ARQUIVOS="ADMVPS.zip"
  13. DIR="/etc/http-shell"
  14. LIST="$(echo "NewVPS-" | rev)"
  15. [[ -e /etc/menu_ito ]] && nomkey="$(cat /etc/menu_ito)" || nomkey="$(curl -sSL "https://www.dropbox.com/s/z38hj1mz3q9krso/menu_credito")"
  16. gerar_key () {
  17. unset usrLOP nombrevalue nBot nBotSS
  18. [[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}"
  19. [[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}"
  20. [[ -z ${callback_query_from_username} ]] && usrLOP=${message_from_username} || usrLOP=${callback_query_from_username}
  21. #[[ -z ${usrLOP} ]] && LIST="$(echo "NewVPS-" | rev)" || LIST="$(echo "${usrLOP}-" | rev)"
  22. numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)
  23. limcont=$(cat /etc/ADM-db/limit)
  24. [[ "$limcont" -ge "998" ]] && limted="∞" || limted=$(cat /etc/ADM-db/limit)
  25. [[ "$(( $limcont - $numkey_gen ))" -ge "900" ]] && credres="∞" || credres=$(( $limcont - $numkey_gen))
  26. meu_ip_fun
  27. [[ -z ${callback_query_from_first_name} ]] && firsnme="${message_from_first_name}" || firsnme="${callback_query_from_first_name}"
  28. [[ -z ${callback_query_from_last_name} ]] && lastnme="${message_from_last_name}" || lastnme="${callback_query_from_last_name}"
  29. [[ -z $nBot ]] && nBot=$(ShellBot.username)
  30. [[ -e ${CIDdir}/ress ]] && echo $nomkey > ${SCPT_DIR}/menu_credito || echo -e "${firsnme} ${lastnme}" > ${SCPT_DIR}/menu_credito
  31. adminV="$(less ${SCPT_DIR}/menu_credito)";
  32. valuekey="$(date | md5sum | head -c11)"
  33. valuekey+="$(echo $(($RANDOM*10))|head -c 6)"
  34. #valuekey="$(date | md5sum | head -c4)"
  35. #valuekey+="$(echo $(($RANDOM*10))|head -c 3)"
  36. #valuekey+="$(date | md5sum | head -c5)"
  37. #valuekey+="$(echo $(($RANDOM*10))|head -c 2)"
  38. oUP=$(wget -qO- ipv4.icanhazip.com)
  39. fun_list "$valuekey"
  40. keyfinal="$(ofus "$oUP:8888/${valuekey}/$LIST")"
  41. #local bot_retorno=" ═--💻 𝙎 𝘾 𝙍 𝙄 𝙋 𝙏 | 𝘾𝙝𝙪𝙢𝙤𝙂𝙃|𝘼𝘿𝙈 💻 --═\n" #--------------------------------------------------------------------------------------
  42. local bot_retorno=" $LINE\n" #--------------------------------------------------------------------------------------
  43. # 🚫 Sin TU RESELLER EN LA KEY 🚫\n
  44. [[ -z ${message_chat_tittle} ]] && grupCHAT="" || grupCHAT="ChatID : ${chatuser} "
  45. #bot_retorno+=" KEY { $numkey_gen } DE @${usrLOP} con ID: ${nombrevalue} $grupCHAT \n ⚠️ VENCE EN 1 HORA O AL SER USADA ⚠️\n"
  46. [[ -z ${usrLOP} ]] && bot_retorno+=" 🪧 USUARIO SIN ALIAS CON ID: ⚠️ADVERTIDO⚠️ \n ⚠️ KEY VENCE EN 4 HORAS O AL USARLA ⚠️\n ⚠️\n" || bot_retorno+=" KEY { $numkey_gen } DE @${usrLOP} con ID: <tg-spoiler>${nombrevalue}</tg-spoiler> $grupCHAT \n ⚠️ VENCE EN 4 HORAS O AL SER USADA ⚠️\n"
  47. bot_retorno+="$LINE\n"
  48. bot_retorno+=" 🛡️ 𝚁𝙴𝚂𝙴𝙻𝙻𝙴𝚁 🛡️ : ${adminV}\n"
  49. bot_retorno+="$LINE\n"
  50. bot_retorno+=" 🗝️ <pre>${keyfinal}</pre> 🗝️\n"
  51. bot_retorno+="$LINE\n"
  52. bot_retorno+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) 🔐 \n"
  53. bot_retorno+="$LINE\n"
  54. 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'
  55. bot_retorno+="$LINE\n"
  56. 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"
  57. bot_retorno+="$LINE\n"
  58. msj_fun
  59. bot_file+=" 🛡️ 𝙸𝚗𝚜𝚝𝚊𝚕𝚊𝚍𝚘𝚛 𝙾𝚏𝚒𝚌𝚒𝚊𝚕 $(cat < /etc/SCRIPT/v-local.log) 🛡️ \n\n"
  60. 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"
  61. bot_file+=" ${keyfinal} \n"
  62. echo -e ${bot_file} > ${keytxt}/key_${usrLOP}.txt
  63. upfile_fun ${keytxt}/key_${usrLOP}.txt
  64. rm ${keytxt}/key_${usrLOP}.txt
  65. }
  66. fun_list () {
  67. rm ${SCPT_DIR}/*.x.c &> /dev/null
  68. unset KEY
  69. KEY="$1"
  70. #CRIA DIR
  71. [[ ! -e ${DIR} ]] && mkdir ${DIR}
  72. #ENVIA ARQS
  73. i=0
  74. VALUE+="gerar.sh http-server.py lista-arq $BASICINST"
  75. for arqx in `ls ${SCPT_DIR}`; do
  76. [[ $(echo $VALUE|grep -w "${arqx}") ]] && continue
  77. echo -e "[$i] -> ${arqx}"
  78. arq_list[$i]="${arqx}"
  79. let i++
  80. done
  81. #CRIA KEY
  82. [[ ! -e ${DIR}/${KEY} ]] && mkdir ${DIR}/${KEY}
  83. #PASSA ARQS
  84. unset nombrevalue
  85. [[ -z ${nombrevalue} ]] && nombrevalue="${message_from_id}"
  86. [[ -z ${nombrevalue} ]] && nombrevalue="${callback_query_from_id}"
  87. [[ "$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)" -ge "$(cat < /etc/ADM-db/limit)" ]] &&
  88. {
  89. numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)
  90. local bot_retorno="$LINE\n"
  91. bot_retorno+=" 🚫 OOOH!, @${callback_query_from_username} con ID:$nombrevalue ‼️\n Tus Creditos se han Agotado \n"
  92. bot_retorno+=" TUS CREDITOS PERMITIDOS :『 $(cat < /etc/ADM-db/limit) 』, 𝙆𝙚𝙮𝙨 𝙂𝙚𝙣𝙚𝙧𝙖𝙙𝙖𝙨『 $numkey_gen 』🗝️\n"
  93. bot_retorno+="$LINE\n"
  94. bot_retorno+=" Si deseas Usar el Generador sin Limite , Contacta con $(cat < /etc/ADM-db/resell)\n"
  95. bot_retorno+=" Recuerda que Todo Esfuerzo Vale, Solicita Acceso \n"
  96. bot_retorno+=" 𝙍𝙚𝙘𝙤𝙢𝙚𝙣𝙙𝙖𝙙𝙤 𝙐𝙗𝙪𝙣𝙩𝙪 18.04 \n 🧬🧬 S.O Ubuntu 16,18,20 X64(x86|ARM) 🧬🧬 \n Debian 7,8,9,10 (x64) \n 🪦 ADQUIERE TU ACCESO EN @${nBot} 🛡️⚔️\n"
  97. bot_retorno+=" 🔐 𝙆𝙚𝙮𝙨 𝙐𝙨𝙖𝙙𝙖𝙨『 $(grep -o -i $nombrevalue /etc/gerar-sh-log | wc -l) 』 🔓, 𝘒𝘦𝘺𝘴 𝘈𝘤𝘵𝘪𝘷𝘢𝘴 『 $(ls /etc/http-shell/ | grep name | wc -l) 』 🗝️ \n"
  98. bot_retorno+="$LINE\n"
  99. msj_fun
  100. exit
  101. } ||
  102. echo "$nombrevalue" >> /etc/ADM-db/num-key.cont
  103. numkey_used=$(grep -o -i $nombrevalue /etc/gerar-sh-log | wc -l)
  104. numkey_gen=$(grep -o -i $nombrevalue /etc/ADM-db/num-key.cont | wc -l)
  105. #ADM BASIC
  106. arqslist="$BASICINST"
  107. for arqx in `echo "${arqslist}"`; do
  108. [[ -e ${DIR}/${KEY}/$arqx ]] && continue #ANULA ARQUIVO CASO EXISTA
  109. cp ${SCPT_DIR}/$arqx ${DIR}/${KEY}/
  110. echo "$arqx" >> ${DIR}/${KEY}/${LIST}
  111. done
  112. rm ${SCPT_DIR}/*.x.c &> /dev/null
  113. echo "$nombrevalue" > ${DIR}/${KEY}.name
  114. [[ ! -z $IPFIX ]] && echo "$IPFIX" > ${DIR}/${KEY}/keyfixa
  115. _hora=$(printf '%(%D-%H:%M:%S)T')
  116. TOKEN="$(cat /etc/ADM-db/token)"
  117. urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
  118. MENSAJE=" ••••📩𝙈𝙀𝙉𝙎𝘼𝙅𝙀 𝙍𝙀𝘾𝙄𝘽𝙄𝘿𝙊📩••••\n"
  119. MENSAJE+=" KEY : ${keyfinal} \n"
  120. MENSAJE+=" CADUCADA : $_hora\n"
  121. MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n"
  122. MENSAJE+=' 🔰 Bot generador de key 🔰\n'
  123. MENSAJE+=' ⚜ By @ChumoGH ⚜ \n'
  124. MENSAJE+=" ••••••••••••••••••••••••••••••••••••••••••••••••\n"
  125. #&& curl -s -X POST $urlBOT -d chat_id=$nombrevalue -d text="$(echo -e "$MENSAJE")" &>/dev/null
  126. at now +4 hours <<< "rm -rf ${DIR}/${KEY} && rm -f ${DIR}/${KEY}.name"
  127. }
  128. ofus () {
  129. unset server
  130. server=$(echo ${txt_ofuscatw}|cut -d':' -f1)
  131. unset txtofus
  132. number=$(expr length $1)
  133. for((i=1; i<$number+1; i++)); do
  134. txt[$i]=$(echo "$1" | cut -b $i)
  135. case ${txt[$i]} in
  136. ".")txt[$i]="x";;
  137. "x")txt[$i]=".";;
  138. "5")txt[$i]="s";;
  139. "s")txt[$i]="5";;
  140. "1")txt[$i]="@";;
  141. "@")txt[$i]="1";;
  142. "2")txt[$i]="?";;
  143. "?")txt[$i]="2";;
  144. "4")txt[$i]="0";;
  145. "0")txt[$i]="4";;
  146. "/")txt[$i]="K";;
  147. "K")txt[$i]="/";;
  148. esac
  149. txtofus+="${txt[$i]}"
  150. done
  151. echo "$txtofus" | rev
  152. }