install.sh 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. ##!/bin/bashlink
  2. #Instalador del BOT
  3. coo=1
  4. IVAR="/etc/http-instas"
  5. SCPT_DIR="/etc/SCRIPT"
  6. rm -f gera*
  7. source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg) >/dev/null
  8. #!/bin/bash
  9. # menu maker (opciones 1, 2, 3,.....)
  10. flech='➮' cOlM='⁙' && TOP='‣' && TTini='=====>>►► 🐲' && TTfin='🐲 ◄◄<<=====' && TTcent='💥' && RRini='【 ★' && RRfin='★ 】' && CHeko='✅' && ScT='🛡️' && FlT='⚔️' && BoLCC='🪦' && ceLL='🧬' && aLerT='⚠️' && lLaM='🔥' && pPIniT='∘' && bOTg='🤖' && rAy='⚡' && tTfIn='】' && TtfIn='【' tTfLe='►' && rUlq='🔰' && h0nG='🍄' && lLav3='🗝️' && m3ssg='📩' && pUn5A='⚜' && p1t0='•'
  11. cOpyRig='©' && mbar2=' •••••••••••••••••••••••'
  12. menu_func() {
  13. local options=${#@}
  14. local array
  15. for ((num = 1; num <= $options; num++)); do
  16. echo -ne "$(msg -verd " [$num]") $(msg -verm2 ">") "
  17. array=(${!num})
  18. case ${array[0]} in
  19. "-vd") echo -e "\033[1;33m[!]\033[1;32m ${array[@]:1}" ;;
  20. "-vm") echo -e "\033[1;33m[!]\033[1;31m ${array[@]:1}" ;;
  21. "-fi") echo -e "${array[@]:2} ${array[1]}" ;;
  22. -bar | -bar2 | -bar3 | -bar4) echo -e "\033[1;37m${array[@]:1}\n$(msg ${array[0]})" ;;
  23. *) echo -e "\033[1;37m${array[@]}" ;;
  24. esac
  25. done
  26. }
  27. selection_fun() {
  28. local selection="null"
  29. local range
  30. for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
  31. while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
  32. echo -ne "\033[1;37m ► Opcion : " >&2
  33. read selection
  34. tput cuu1 >&2 && tput dl1 >&2
  35. done
  36. echo $selection
  37. }
  38. tittle() {
  39. [[ -z $1 ]] && rt='adm-lite' || rt='ADMcgh'
  40. clear && clear
  41. msg -bar
  42. echo -e "\033[1;44;44m \033[1;33m=====>>►► 🐲 ChumoGH 💥 Plus 🐲 ◄◄<<===== \033[0m \033[0;33m[$(less /etc/${rt}/v-local.log)]"
  43. msg -bar
  44. }
  45. in_opcion() {
  46. unset opcion
  47. if [[ -z $2 ]]; then
  48. msg -nazu " $1: " >&2
  49. else
  50. msg $1 " $2: " >&2
  51. fi
  52. read opcion
  53. echo "$opcion"
  54. }
  55. # centrado de texto
  56. print_center() {
  57. if [[ -z $2 ]]; then
  58. text="$1"
  59. else
  60. col="$1"
  61. text="$2"
  62. fi
  63. while read line; do
  64. unset space
  65. x=$(((54 - ${#line}) / 2))
  66. for ((i = 0; i < $x; i++)); do
  67. space+=' '
  68. done
  69. space+="$line"
  70. if [[ -z $2 ]]; then
  71. msg -azu "$space"
  72. else
  73. msg "$col" "$space"
  74. fi
  75. done <<<$(echo -e "$text")
  76. }
  77. # titulos y encabesados
  78. title() {
  79. clear
  80. msg -bar
  81. if [[ -z $2 ]]; then
  82. print_center -azu "$1"
  83. else
  84. print_center "$1" "$2"
  85. fi
  86. msg -bar
  87. }
  88. # finalizacion de tareas
  89. enter() {
  90. msg -bar
  91. text="►► Presione enter para continuar ◄◄"
  92. if [[ -z $1 ]]; then
  93. print_center -ama "$text"
  94. else
  95. print_center "$1" "$text"
  96. fi
  97. read
  98. }
  99. # opcion, regresar volver/atras
  100. back() {
  101. msg -bar
  102. echo -ne "$(msg -verd " [0]") $(msg -verm2 ">") " && msg -bra "\033[1;41mVOLVER"
  103. msg -bar
  104. }
  105. msg() {
  106. local colors="/etc/new-adm-color"
  107. if [[ ! -e $colors ]]; then
  108. COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
  109. COLOR[1]='\e[31m' #VERMELHO='\e[31m'
  110. COLOR[2]='\e[32m' #VERDE='\e[32m'
  111. COLOR[3]='\e[33m' #AMARELO='\e[33m'
  112. COLOR[4]='\e[34m' #AZUL='\e[34m'
  113. COLOR[5]='\e[35m' #MAGENTA='\e[35m'
  114. COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
  115. COLOR[7]='\033[1;49;95m'
  116. COLOR[8]='\033[1;49;96m'
  117. else
  118. local COL=0
  119. for number in $(cat $colors); do
  120. case $number in
  121. 1) COLOR[$COL]='\033[1;37m' ;;
  122. 2) COLOR[$COL]='\e[31m' ;;
  123. 3) COLOR[$COL]='\e[32m' ;;
  124. 4) COLOR[$COL]='\e[33m' ;;
  125. 5) COLOR[$COL]='\e[34m' ;;
  126. 6) COLOR[$COL]='\e[35m' ;;
  127. 7) COLOR[$COL]='\033[1;36m' ;;
  128. 8) COLOR[$COL]='\033[1;49;95m' ;;
  129. 9) COLOR[$COL]='\033[1;49;96m' ;;
  130. esac
  131. let COL++
  132. done
  133. fi
  134. NEGRITO='\e[1m'
  135. SEMCOR='\e[0m'
  136. case $1 in
  137. -ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
  138. -ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  139. -verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
  140. -verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  141. -aqua) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  142. -azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  143. -verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  144. -bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;;
  145. -nazu) cor="${COLOR[6]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
  146. -nverd) cor="${COLOR[2]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
  147. -nama) cor="${COLOR[3]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
  148. -verm3) cor="${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
  149. -teal) cor="${COLOR[7]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  150. -teal2) cor="${COLOR[7]}" && echo -e "${cor}${2}${SEMCOR}" ;;
  151. -blak) cor="${COLOR[8]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  152. -blak2) cor="${COLOR[8]}" && echo -e "${cor}${2}${SEMCOR}" ;;
  153. -blu) cor="${COLOR[9]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  154. -blu1) cor="${COLOR[9]}" && echo -e "${cor}${2}${SEMCOR}" ;;
  155. #-bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
  156. -bar) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
  157. -bar1) ccor="${COLOR[1]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
  158. -bar2) ccor="${COLOR[1]}=====================================================" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
  159. -bar3) ccor="${COLOR[3]}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
  160. -bar4) ccor="${COLOR[5]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}" ;;
  161. esac
  162. }
  163. fun_bar() {
  164. comando[0]="$1"
  165. comando[1]="$2"
  166. (
  167. [[ -e $HOME/fim ]] && rm $HOME/fim
  168. ${comando[0]} -y >/dev/null 2>&1
  169. ${comando[1]} -y >/dev/null 2>&1
  170. touch $HOME/fim
  171. ) >/dev/null 2>&1 &
  172. echo -ne "\033[1;33m ["
  173. while true; do
  174. for ((i = 0; i < 18; i++)); do
  175. echo -ne "\033[1;31m##"
  176. sleep 0.1s
  177. done
  178. [[ -e $HOME/fim ]] && rm $HOME/fim && break
  179. echo -e "\033[1;33m]"
  180. sleep 1s
  181. tput cuu1
  182. tput dl1
  183. echo -ne "\033[1;33m ["
  184. done
  185. echo -e "\033[1;33m]\033[1;31m -\033[1;32m 100%\033[1;37m"
  186. }
  187. del() {
  188. for ((i = 0; i < $1; i++)); do
  189. tput cuu1 && tput dl1
  190. done
  191. }
  192. [[ -d /bin/ejecutar ]] && {
  193. [[ -e /bin/ejecutar/msg ]] || wget -q -O /bin/ejecutar/msg https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/msg-bar/msg
  194. } || mkdir /bin/ejecutar
  195. cor[0]="\033[0m"
  196. cor[1]="\033[1;34m"
  197. cor[2]="\033[1;32m"
  198. cor[3]="\033[1;37m"
  199. cor[4]="\033[1;36m"
  200. cor[5]="\033[1;33m"
  201. cor[6]="\033[1;35m"
  202. export -f msg
  203. export -f fun_bar
  204. export -f tittle
  205. export -f enter
  206. export -f back
  207. export -f print_center
  208. export -f in_opcion
  209. export -f del
  210. add-apt-repository universe
  211. apt update -y
  212. apt upgrade -y
  213. install_ini() {
  214. clear
  215. msg -bar
  216. echo -e "\033[92m -- INSTALANDO PAQUETES NECESARIOS -- "
  217. msg -bar
  218. ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  219. locale-gen en_US.UTF-8 >/dev/null 2>&1
  220. update-locale LANG=en_US.UTF-8 >/dev/null 2>&1
  221. echo -e "\033[97m # Instalando UTF...................... $ESTATUS "
  222. apt-get install gawk -y >/dev/null 2>&1
  223. #bc
  224. [[ $(dpkg --get-selections | grep -w "jq" | head -1) ]] || apt-get install jq -y &>/dev/null
  225. [[ $(dpkg --get-selections | grep -w "jq" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  226. [[ $(dpkg --get-selections | grep -w "jq" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  227. echo -e "\033[97m # apt-get install jq................... $ESTATUS "
  228. #SCREEN
  229. [[ $(dpkg --get-selections | grep -w "screen" | head -1) ]] || apt-get install screen -y &>/dev/null
  230. [[ $(dpkg --get-selections | grep -w "screen" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  231. [[ $(dpkg --get-selections | grep -w "screen" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  232. echo -e "\033[97m # apt-get install screen............... $ESTATUS "
  233. #apache2
  234. [[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] || {
  235. apt-get install apache2 -y &>/dev/null
  236. sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf
  237. service apache2 restart >/dev/null 2>&1 &
  238. }
  239. [[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  240. [[ $(dpkg --get-selections | grep -w "apache2" | head -1) ]] && ESTATUS=$(echo -e "\e[3;32mINSTALADO\e[0m") &>/dev/null
  241. echo -e "\033[97m # apt-get install apache2.............. $ESTATUS "
  242. #curl
  243. [[ $(dpkg --get-selections | grep -w "curl" | head -1) ]] || apt-get install curl -y &>/dev/null
  244. [[ $(dpkg --get-selections | grep -w "curl" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  245. [[ $(dpkg --get-selections | grep -w "curl" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  246. echo -e "\033[97m # apt-get install curl................. $ESTATUS "
  247. #socat
  248. [[ $(dpkg --get-selections | grep -w "socat" | head -1) ]] || apt-get install socat -y &>/dev/null
  249. [[ $(dpkg --get-selections | grep -w "socat" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  250. [[ $(dpkg --get-selections | grep -w "socat" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  251. echo -e "\033[97m # apt-get install socat................ $ESTATUS "
  252. #netcat
  253. [[ $(dpkg --get-selections | grep -w "netcat" | head -1) ]] || apt-get install netcat -y &>/dev/null
  254. [[ $(dpkg --get-selections | grep -w "netcat" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  255. [[ $(dpkg --get-selections | grep -w "netcat" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  256. echo -e "\033[97m # apt-get install netcat............... $ESTATUS "
  257. #netcat-traditional
  258. [[ $(dpkg --get-selections | grep -w "netcat-traditional" | head -1) ]] || apt-get install netcat-traditional -y &>/dev/null
  259. [[ $(dpkg --get-selections | grep -w "netcat-traditional" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  260. [[ $(dpkg --get-selections | grep -w "netcat-traditional" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  261. echo -e "\033[97m # apt-get install netcat-traditional... $ESTATUS "
  262. #net-tools
  263. [[ $(dpkg --get-selections | grep -w "net-tools" | head -1) ]] || apt-get install net-tools -y &>/dev/null
  264. [[ $(dpkg --get-selections | grep -w "net-tools" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  265. [[ $(dpkg --get-selections | grep -w "net-tools" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  266. echo -e "\033[97m # apt-get install net-tools............ $ESTATUS "
  267. #cowsay
  268. [[ $(dpkg --get-selections | grep -w "cowsay" | head -1) ]] || apt-get install cowsay -y &>/dev/null
  269. [[ $(dpkg --get-selections | grep -w "cowsay" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  270. [[ $(dpkg --get-selections | grep -w "cowsay" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  271. echo -e "\033[97m # apt-get install cowsay............... $ESTATUS "
  272. #figlet
  273. [[ $(dpkg --get-selections | grep -w "figlet" | head -1) ]] || apt-get install figlet -y &>/dev/null
  274. [[ $(dpkg --get-selections | grep -w "figlet" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  275. [[ $(dpkg --get-selections | grep -w "figlet" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  276. echo -e "\033[97m # apt-get install figlet............... $ESTATUS "
  277. #lolcat
  278. apt-get install lolcat -y &>/dev/null
  279. sudo gem install lolcat &>/dev/null
  280. [[ $(dpkg --get-selections | grep -w "lolcat" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  281. [[ $(dpkg --get-selections | grep -w "lolcat" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  282. echo -e "\033[97m # apt-get install lolcat............... $ESTATUS "
  283. #PV
  284. [[ $(dpkg --get-selections | grep -w "pv" | head -1) ]] || apt-get install pv -y &>/dev/null
  285. [[ $(dpkg --get-selections | grep -w "pv" | head -1) ]] || ESTATUS=$(echo -e "\033[91mFALLO DE INSTALACION") &>/dev/null
  286. [[ $(dpkg --get-selections | grep -w "pv" | head -1) ]] && ESTATUS=$(echo -e "\033[92mINSTALADO") &>/dev/null
  287. echo -e "\033[97m # apt-get install PV ................ $ESTATUS "
  288. msg -bar
  289. echo -e "\033[92m La instalacion de paquetes necesarios a finalizado"
  290. msg -bar
  291. echo -e "\033[97m Si la instalacion de paquetes tiene fallas"
  292. echo -ne "\033[97m Reintentar Install Paquetes [ s/n ]: "
  293. read inst
  294. [[ $inst = @(s|S|y|Y) ]] && install_ini
  295. }
  296. check_ip() {
  297. 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)
  298. MIP2=$(wget -qO- ipv4.icanhazip.com)
  299. [[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
  300. echo "$IP" >/usr/bin/vendor_code
  301. }
  302. function_verify() {
  303. unset keybot
  304. echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m"
  305. msg -bar
  306. [[ ! -e /etc/nivbot ]] && echo >/etc/nivbot
  307. echo -e " SOLICITA KEY DE AUTORIZACION UNICA "
  308. [[ "$(echo "$(cat </etc/nivbot)")" < "3" ]] && {
  309. [[ -e /bin/downloadbot ]] && {
  310. [[ -z $(cat </bin/downloadbot) ]] && read -p " INGRESA KEY DE AUTORIZACION : " keybot || unset keybot
  311. }
  312. } || read -p " Key de Autorizacion : " keybot
  313. [[ -z $keybot ]] && {
  314. [[ -e /bin/downloadbot ]] && link="$(cat </bin/downloadbot)" || link='https://raw.githubusercontent.com'
  315. [[ $link = 'https://raw.githubusercontent.com' ]] && echo "CONTROL MEDIANTE GitHub" || echo "CONTROL EXTERNO"
  316. permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot")
  317. } || {
  318. permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot")
  319. [[ -z $keybot ]] && echo $link >/bin/downloadbot || echo -e "$(ofus $keybot)" >/bin/downloadbot
  320. }
  321. permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/Control-Bot")
  322. [[ $(echo $permited | grep "${IP}") = "" ]] || {
  323. clear
  324. msg -bar
  325. echo -e "\n"
  326. echo -e "\e[31m LA IP $(wget -qO- ipv4.icanhazip.com) FUE RECHAZADA!"
  327. echo -e " $link No AUTORIZADA el ACCESO "
  328. echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
  329. msg -bar
  330. [[ -e "/bin/ShellBot.sh" ]] && rm /bin/ShellBot.sh
  331. [[ -e /bin/downloadbot ]] && rm -f /bin/downloadbot
  332. echo -e "\n"
  333. msg -bar
  334. exit 1
  335. } && {
  336. ### INTALAR VERCION DE SCRIPT
  337. clear && clear
  338. msg -bar
  339. echo -e "\e[32m LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!"
  340. [[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase
  341. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/adm-lite/v-local.log")
  342. [[ ! -e /bin/downloadbot ]] && {
  343. [[ $link = 'https://raw.githubusercontent.com' ]] && echo "https://raw.githubusercontent.com" >/bin/downloadbot || echo "$(ofus $keybot)" >/bin/downloadbot
  344. chmod +x /bin/downloadbot
  345. }
  346. [[ -e /etc/nivbot ]] && {
  347. i=$(cat </etc/nivbot)
  348. lv=$(($i + 1))
  349. echo $lv >/etc/nivbot
  350. } || echo "1" >/etc/nivbot
  351. echo $Key >/etc/valkey && chmod +x /etc/valkey
  352. [[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' >/usr/bin/downBase && chmod 777 /usr/bin/downBase
  353. sleep 3s
  354. }
  355. }
  356. echo '0' >/etc/http-instas
  357. [[ -d $SCPT_DIR ]] && rm -rf $SCPT_DIR
  358. #CORES
  359. cor[1]="\033[1;36m"
  360. cor[2]="\033[1;32m"
  361. cor[3]="\033[1;31m"
  362. cor[4]="\033[1;33m"
  363. cor[0]="\033[1;37m"
  364. #TEXTOS
  365. #COMPARA
  366. fun_filez() {
  367. fup="$HOME/update"
  368. echo "$1" >>$HOME/files.log
  369. [[ $1 = 'http-server.py' ]] && mv -f ${fup}/$1 /bin/http-server.sh && chmod +x /bin/http-server.sh
  370. [[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1
  371. }
  372. ofus() {
  373. unset txtofus
  374. number=$(expr length $1)
  375. for ((i = 1; i < $number + 1; i++)); do
  376. txt[$i]=$(echo "$1" | cut -b $i)
  377. case ${txt[$i]} in
  378. ".") txt[$i]="v" ;;
  379. "v") txt[$i]="." ;;
  380. "1") txt[$i]="@" ;;
  381. "@") txt[$i]="1" ;;
  382. "2") txt[$i]="?" ;;
  383. "?") txt[$i]="2" ;;
  384. "4") txt[$i]="p" ;;
  385. "p") txt[$i]="4" ;;
  386. "-") txt[$i]="L" ;;
  387. "L") txt[$i]="-" ;;
  388. esac
  389. txtofus+="${txt[$i]}"
  390. done
  391. echo "$txtofus" | rev
  392. }
  393. DOWS() {
  394. wget -O /root/lista https://www.dropbox.com/s/yqhjmr7o3342viv/lista
  395. wget --no-check-certificate -i $HOME/lista
  396. }
  397. function aguarde() {
  398. sleep 1
  399. fun_ejec=$1
  400. helice() {
  401. DOWS >/dev/null 2>&1 &
  402. tput civis
  403. while [ -d /proc/$! ]; do
  404. for i in / - \\ \|; do
  405. sleep .1
  406. echo -ne "\e[1D$i"
  407. done
  408. done
  409. tput cnorm
  410. }
  411. echo -ne "\033[1;37m TRASLADANDO FILES \033[1;32mSCRIPT \033[1;37me \033[1;32mAUTOGEN\033[1;32m.\033[1;33m.\033[1;31m. \033[1;33m"
  412. helice
  413. echo -e "\e[1D REALIZADO"
  414. }
  415. atualiza_fun() {
  416. msg -bar
  417. [[ -d ./update ]] && rm -rf ./update/* || mkdir ./update
  418. cd ./update/
  419. aguarde
  420. unset arqs
  421. n=1
  422. rm -f $HOME/files.log
  423. for arqs in $(ls $HOME/update); do
  424. echo -ne "\033[1;33m FILE \e[32m [${n}.gen] \e[0m "
  425. 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!"
  426. n=$(($n + 1))
  427. done
  428. mkdir -p /etc/SCRIPT
  429. mv -f /root/update/* /etc/SCRIPT/
  430. wget -q -O /usr/bin/gerar https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuGH-5.7u/Bot/gerador.sh && chmod +rwx /usr/bin/gerar
  431. cd $HOME
  432. msg -bar
  433. echo -e "\033[1;92m DIGITE EL COMANDO: \033[1;33mgerar "
  434. msg -bar
  435. [[ -e $HOME/lista ]] && rm $HOME/lista
  436. [[ -d $HOME/update ]] && rm -rf $HOME/update
  437. }
  438. unset Key
  439. [[ $1 = '--install' ]] && install_ini
  440. [[ $1 = '' ]] && clear && echo " DESTRUYENDO FICHERO rm -rf /bin " && exit
  441. clear
  442. check_ip
  443. function_verify
  444. atualiza_fun