bot.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. #!/bin/bash
  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='⚜'
  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. DOWS () {
  211. wget --no-check-certificate -i $HOME/lista-arq
  212. }
  213. check_ip () {
  214. 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)
  215. MIP2=$(wget -qO- ipv4.icanhazip.com)
  216. [[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP"
  217. echo "$IP" > /usr/bin/vendor_code
  218. }
  219. function_verify () {
  220. unset keybot
  221. echo -e "\033[7;49;35m ${TTini} GEN ChumoGH${TTcent}VPS ${TTfin} \033[0m"
  222. msg -bar
  223. [[ ! -e /etc/nivbot ]] && echo > /etc/nivbot
  224. echo -e " SOLICITA KEY DE AUTORIZACION UNICA "
  225. [[ "$(echo "$(cat < /etc/nivbot)")" < "3" ]] && {
  226. [[ -e /bin/downloadbot ]] && {
  227. [[ -z $(cat < /bin/downloadbot) ]] && read -p " INGRESA KEY DE AUTORIZACION : " keybot || unset keybot
  228. }
  229. } || read -p " Key de Autorizacion : " keybot
  230. [[ -z $keybot ]] && {
  231. [[ -e /bin/downloadbot ]] && link="$(cat < /bin/downloadbot)" || link='https://raw.githubusercontent.com'
  232. [[ $link = 'https://raw.githubusercontent.com' ]] && echo "CONTROL MEDIANTE GitHub" || echo "CONTROL EXTERNO"
  233. permited=$(curl -sSL "${link}/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
  234. } || {
  235. permited=$(curl -sSL "$(ofus $keybot)/ChumoGH/VPSbot/main/TeleBotGen/Control/Control-Bot")
  236. [[ -z $keybot ]] && echo $link > /bin/downloadbot || echo -e "$(ofus $keybot)" > /bin/downloadbot
  237. }
  238. ### INTALAR VERCION DE SCRIPT
  239. clear
  240. echo -e "\n\n\n\e[32m====================================================="
  241. echo -e "\e[32m LA IP $(wget -qO- ipv4.icanhazip.com) ESTA AUTORIZADA!"
  242. echo -e " Mediante $link Autorida por @ChumoGH"
  243. echo -e " SI DESEAS USAR EL BOTGEN CONTACTE A @ChumoGH"
  244. echo -e "\e[32m=====================================================\n\n\n\e[0m"
  245. [[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' > /usr/bin/downBase && chmod 777 /usr/bin/downBase
  246. v1=$(curl -sSL "https://www.dropbox.com/s/blxo0jifysvyrey/v-new.log")
  247. [[ ! -e /bin/downloadbot ]] && {
  248. [[ $link = 'https://raw.githubusercontent.com' ]] && echo "https://raw.githubusercontent.com" > /bin/downloadbot || echo "$(ofus $keybot)" > /bin/downloadbot
  249. chmod +x /bin/downloadbot
  250. }
  251. [[ -e /etc/nivbot ]] && {
  252. i=$(cat < /etc/nivbot)
  253. lv=$(($i+1))
  254. echo $lv > /etc/nivbot
  255. } || echo "1" > /etc/nivbot
  256. echo $Key > /etc/valkey && chmod +x /etc/valkey
  257. [[ -e /usr/bin/downBase ]] || echo 'https://www.dropbox.com/s/yqhjmr7o3342viv/lista' > /usr/bin/downBase && chmod 777 /usr/bin/downBase
  258. }
  259. function aguarde() {
  260. sleep 1
  261. fun_ejec=$1
  262. helice() {
  263. DOWS >/dev/null 2>&1 &
  264. tput civis
  265. while [ -d /proc/$! ]; do
  266. for i in / - \\ \|; do
  267. sleep .1
  268. echo -ne "\e[1D$i"
  269. done
  270. done
  271. tput cnorm
  272. }
  273. 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"
  274. helice
  275. echo -e "\e[1D REALIZADO"
  276. function_verify
  277. }
  278. #COMPARA
  279. fun_filez () {
  280. fup="$HOME/update"
  281. echo "$1" >> $HOME/files.log
  282. [[ $1 = 'http-server.py' ]] && mv -f ${fup}/$1 /bin/http-server.sh && chmod +x /bin/http-server.sh
  283. [[ -e $1 ]] && mv -f ${fup}/$1 /etc/SCRIPT/$1
  284. }
  285. atualiza_fun () {
  286. msg -bar
  287. [[ -d ./update ]] && rm -rf ./update/* || mkdir ./update
  288. cd ./update/
  289. aguarde
  290. unset arqs
  291. n=1
  292. rm -f $HOME/files.log
  293. for arqs in `ls $HOME/update`; do
  294. echo -ne "\033[1;33m FILE \e[32m [${n}.gen] \e[0m "
  295. 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!"
  296. n=$(($n + 1))
  297. done
  298. wget -q -O /usr/bin/gerar https://raw.githubusercontent.com/ChumoGH/ScriptCGH/main/GERADOR/gerador.sh && chmod +x /usr/bin/gerar
  299. cd $HOME
  300. [[ -e $HOME/lista ]] && rm $HOME/lista
  301. [[ -d $HOME/update ]] && rm -rf $HOME/update
  302. }
  303. install_ini () {
  304. clear
  305. msg -bar
  306. echo -e "\033[92m -- INSTALANDO PAQUETES NECESARIOS -- "
  307. msg -bar
  308. ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  309. locale-gen en_US.UTF-8 > /dev/null 2>&1
  310. update-locale LANG=en_US.UTF-8 > /dev/null 2>&1
  311. echo -e "\033[97m # Instalando UTF...................... $ESTATUS "
  312. apt-get install gawk -y > /dev/null 2>&1
  313. #bc
  314. [[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || apt-get install jq -y &>/dev/null
  315. [[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  316. [[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  317. echo -e "\033[97m # apt-get install jq................... $ESTATUS "
  318. #SCREEN
  319. [[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || apt-get install screen -y &>/dev/null
  320. [[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  321. [[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  322. echo -e "\033[97m # apt-get install screen............... $ESTATUS "
  323. #apache2
  324. [[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || {
  325. apt-get install apache2 -y &>/dev/null
  326. sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf
  327. service apache2 restart > /dev/null 2>&1 &
  328. }
  329. [[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  330. [[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  331. echo -e "\033[97m # apt-get install apache2.............. $ESTATUS "
  332. #curl
  333. [[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || apt-get install curl -y &>/dev/null
  334. [[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  335. [[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  336. echo -e "\033[97m # apt-get install curl................. $ESTATUS "
  337. #socat
  338. [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || apt-get install socat -y &>/dev/null
  339. [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  340. [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  341. echo -e "\033[97m # apt-get install socat................ $ESTATUS "
  342. #netcat
  343. [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || apt-get install netcat -y &>/dev/null
  344. [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  345. [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  346. echo -e "\033[97m # apt-get install netcat............... $ESTATUS "
  347. #netcat-traditional
  348. [[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || apt-get install netcat-traditional -y &>/dev/null
  349. [[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  350. [[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  351. echo -e "\033[97m # apt-get install netcat-traditional... $ESTATUS "
  352. #net-tools
  353. [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || apt-get install net-tools -y &>/dev/null
  354. [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  355. [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  356. echo -e "\033[97m # apt-get install net-tools............ $ESTATUS "
  357. #cowsay
  358. [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || apt-get install cowsay -y &>/dev/null
  359. [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  360. [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  361. echo -e "\033[97m # apt-get install cowsay............... $ESTATUS "
  362. #figlet
  363. [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y &>/dev/null
  364. [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  365. [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  366. echo -e "\033[97m # apt-get install figlet............... $ESTATUS "
  367. #lolcat
  368. apt-get install lolcat -y &>/dev/null
  369. sudo gem install lolcat &>/dev/null
  370. [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  371. [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  372. echo -e "\033[97m # apt-get install lolcat............... $ESTATUS "
  373. #PV
  374. [[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || apt-get install pv -y &>/dev/null
  375. [[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  376. [[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null
  377. echo -e "\033[97m # apt-get install PV ................ $ESTATUS "
  378. msg -bar
  379. echo -e "\033[92m La instalacion de paquetes necesarios a finalizado"
  380. atualiza_fun
  381. }
  382. [[ ! -e /etc/http-instas ]] && echo '0' > /etc/http-instas || let sd=$(cat < /etc/http-instas)-$coo && echo $sd > /etc/http-instas
  383. [[ -d $SCPT_DIR ]] && rm -rf $SCPT_DIR
  384. #CORES
  385. cor[1]="\033[1;36m"
  386. cor[2]="\033[1;32m"
  387. cor[3]="\033[1;31m"
  388. cor[4]="\033[1;33m"
  389. cor[0]="\033[1;37m"
  390. #TEXTOS
  391. ofus () {
  392. unset txtofus
  393. number=$(expr length $1)
  394. for((i=1; i<$number+1; i++)); do
  395. txt[$i]=$(echo "$1" | cut -b $i)
  396. case ${txt[$i]} in
  397. ".")txt[$i]="x";;
  398. "x")txt[$i]=".";;
  399. "5")txt[$i]="s";;
  400. "s")txt[$i]="5";;
  401. "1")txt[$i]="@";;
  402. "@")txt[$i]="1";;
  403. "2")txt[$i]="?";;
  404. "?")txt[$i]="2";;
  405. "4")txt[$i]="0";;
  406. "0")txt[$i]="4";;
  407. "/")txt[$i]="K";;
  408. "K")txt[$i]="/";;
  409. esac
  410. txtofus+="${txt[$i]}"
  411. done
  412. echo "$txtofus" | rev
  413. }
  414. unset Key
  415. [[ $1 = '--install' ]] && install_ini