cabecalho 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. #!/bin/bash
  2. unset ram1
  3. unset ram2
  4. unset ram3
  5. unset _usor
  6. unset _ram
  7. if ! [ $(id -u) = 0 ]; then
  8. clear
  9. echo ""
  10. msg -bar #echo "◈ ━━━━━━━━━━━━━━━ ⸙ - ⸙ ━━━━━━━━━━━━━━━ ◈ "
  11. echo " ⛑⛑⛑ Error Fatal!! x000e1 ⛑⛑⛑"
  12. msg -bar #echo "◈ ━━━━━━━━━━━━━━━ ⸙ - ⸙ ━━━━━━━━━━━━━━━ ◈ "
  13. echo " ✠ Este script debe ejecutarse como root! ✠"
  14. echo " Como Solucionarlo "
  15. echo " Ejecute el script así:"
  16. echo " ⇘ ⇙ "
  17. echo " sudo -i "
  18. echo " sudo su"
  19. echo " Retornando . . ."
  20. echo $(date)
  21. msg -bar
  22. exit
  23. fi
  24. adaptador=`ifconfig | awk 'NR==1{print substr($1,1,length($1)-1); }'` > /dev/null 2>&1
  25. install_ini () {
  26. msg -bar
  27. echo -e "\033[97m"
  28. echo -e "\033[41m -- INSTALAREMOS LO NECESARIO PARA EL ADM --"
  29. echo -e " \033[41m-- Arch : $(lscpu | grep "Vendor ID" | awk '{print $3}') SISTEMA $(lsb_release -si) $(lsb_release -sr) --"
  30. echo -e "\033[100m ATENCION A INSTALACION POR SI DEVUELVE UN ERROR "
  31. echo -e "\033[97m"
  32. msg -bar
  33. locale-gen en_US.UTF-8 > /dev/null 2>&1
  34. update-locale LANG=en_US.UTF-8 > /dev/null 2>&1 && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  35. echo -e "\033[97m # Instalando Paqueteria UTF............ $ESTATUS "
  36. #at
  37. [[ $(dpkg --get-selections|grep -w "at"|head -1) ]] || apt-get install at -y &>/dev/null
  38. [[ $(dpkg --get-selections|grep -w "at"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  39. [[ $(dpkg --get-selections|grep -w "at"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  40. echo -e "\033[97m # apt-get install at................... $ESTATUS "
  41. #screen
  42. [[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || apt-get install screen -y &>/dev/null
  43. [[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  44. [[ $(dpkg --get-selections|grep -w "screen"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  45. echo -e "\033[97m # apt-get install screen............... $ESTATUS "
  46. #python
  47. [[ $(dpkg --get-selections|grep -w "python"|head -1) ]] || apt-get install python -y &>/dev/null
  48. [[ $(dpkg --get-selections|grep -w "python"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  49. [[ $(dpkg --get-selections|grep -w "python"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  50. echo -e "\033[97m # apt-get install python............... $ESTATUS "
  51. #python3
  52. [[ $(dpkg --get-selections|grep -w "python3"|head -1) ]] || apt-get install python3 -y &>/dev/null
  53. [[ $(dpkg --get-selections|grep -w "python3"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  54. [[ $(dpkg --get-selections|grep -w "python3"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  55. echo -e "\033[97m # apt-get install python3.............. $ESTATUS "
  56. #python3-pip
  57. [[ $(dpkg --get-selections|grep -w "python3-pip"|head -1) ]] || apt-get install python3-pip -y &>/dev/null
  58. [[ $(dpkg --get-selections|grep -w "python3-pip"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  59. [[ $(dpkg --get-selections|grep -w "python3-pip"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  60. echo -e "\033[97m # apt-get install python3-pip.......... $ESTATUS "
  61. #unzip
  62. [[ $(dpkg --get-selections|grep -w "unzip"|head -1) ]] || apt-get install unzip -y &>/dev/null
  63. [[ $(dpkg --get-selections|grep -w "unzip"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  64. [[ $(dpkg --get-selections|grep -w "unzip"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  65. echo -e "\033[97m # apt-get install unzip................ $ESTATUS "
  66. #zip
  67. [[ $(dpkg --get-selections|grep -w "zip"|head -1) ]] || apt-get install zip -y &>/dev/null
  68. [[ $(dpkg --get-selections|grep -w "zip"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  69. [[ $(dpkg --get-selections|grep -w "zip"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  70. echo -e "\033[97m # apt-get install zip.................. $ESTATUS "
  71. #lsof
  72. [[ $(dpkg --get-selections|grep -w "lsof"|head -1) ]] || apt-get install lsof -y &>/dev/null
  73. [[ $(dpkg --get-selections|grep -w "lsof"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  74. [[ $(dpkg --get-selections|grep -w "lsof"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  75. echo -e "\033[97m # apt-get install lsof................. $ESTATUS "
  76. #apache2
  77. [[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || {
  78. apt-get install apache2 -y &>/dev/null
  79. sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf
  80. service apache2 restart > /dev/null 2>&1 &
  81. }
  82. [[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  83. [[ $(dpkg --get-selections|grep -w "apache2"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  84. echo -e "\033[97m # apt-get install apache2.............. $ESTATUS "
  85. #nmap
  86. [[ $(dpkg --get-selections|grep -w "nmap"|head -1) ]] || apt-get install nmap -y &>/dev/null
  87. [[ $(dpkg --get-selections|grep -w "nmap"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  88. [[ $(dpkg --get-selections|grep -w "nmap"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  89. echo -e "\033[97m # apt-get install nmap................. $ESTATUS "
  90. #QRENCODE
  91. [[ $(dpkg --get-selections|grep -w "qrencode"|head -1) ]] || apt-get install qrencode -y &>/dev/null
  92. [[ $(dpkg --get-selections|grep -w "qrencode"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  93. [[ $(dpkg --get-selections|grep -w "qrencode"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  94. echo -e "\033[97m # apt-get install qrencode............. $ESTATUS "
  95. #socat
  96. [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || apt-get install socat -y &>/dev/null
  97. [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  98. [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  99. echo -e "\033[97m # apt-get install socat................ $ESTATUS "
  100. #bc
  101. [[ $(dpkg --get-selections|grep -w "bc"|head -1) ]] || apt-get install bc -y &>/dev/null
  102. [[ $(dpkg --get-selections|grep -w "bc"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  103. [[ $(dpkg --get-selections|grep -w "bc"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  104. echo -e "\033[97m # apt-get install bc................... $ESTATUS "
  105. #lynx
  106. [[ $(dpkg --get-selections|grep -w "lynx"|head -1) ]] || apt-get install lynx -y &>/dev/null
  107. [[ $(dpkg --get-selections|grep -w "lynx"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  108. [[ $(dpkg --get-selections|grep -w "lynx"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  109. echo -e "\033[97m # apt-get install lynx................. $ESTATUS "
  110. #netcat
  111. [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || apt-get install netcat -y &>/dev/null
  112. [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  113. [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  114. echo -e "\033[97m # apt-get install netcat............... $ESTATUS "
  115. #net-tools
  116. [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || apt-get net-tools -y &>/dev/null
  117. [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  118. [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  119. echo -e "\033[97m # apt-get install net-tools............ $ESTATUS "
  120. #cowsay
  121. [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || apt-get install cowsay -y &>/dev/null
  122. [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  123. [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  124. echo -e "\033[97m # apt-get install cowsay............... $ESTATUS "
  125. #nmap
  126. [[ $(dpkg --get-selections|grep -w "nmap"|head -1) ]] || apt-get install nmap -y &>/dev/null
  127. [[ $(dpkg --get-selections|grep -w "nmap"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  128. [[ $(dpkg --get-selections|grep -w "nmap"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  129. echo -e "\033[97m # apt-get install nmap................. $ESTATUS "
  130. #vnstat
  131. [[ $(dpkg --get-selections|grep -w "vnstat"|head -1) ]] || apt-get install vnstat -y &>/dev/null
  132. [[ $(dpkg --get-selections|grep -w "vnstat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  133. [[ $(dpkg --get-selections|grep -w "vnstat"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  134. echo -e "\033[97m # apt-get install vnstat............... $ESTATUS "
  135. #figlet
  136. [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y &>/dev/null
  137. [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  138. [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  139. echo -e "\033[97m # apt-get install figlet............... $ESTATUS "
  140. #lolcat
  141. [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || apt-get install lolcat -y &>/dev/null
  142. sudo gem install lolcat &>/dev/null
  143. [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  144. [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  145. echo -e "\033[97m # apt-get install lolcat............... $ESTATUS "
  146. #PV
  147. [[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || apt-get install pv -y &>/dev/null
  148. [[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null
  149. [[ $(dpkg --get-selections|grep -w "pv"|head -1) ]] && ESTATUS=`echo -e "\e[3;32mINSTALADO\e[0m"` &>/dev/null
  150. echo -e "\033[97m # apt-get install PV ................ $ESTATUS "
  151. echo -e "$BARRA"
  152. echo -e "\033[92m La instalacion de paquetes necesarios a finalizado"
  153. echo -e "$BARRA"
  154. }
  155. _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
  156. _usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
  157. ##
  158. ram1=$(free -h | grep -i mem | awk {'print $2'})
  159. ram2=$(free -h | grep -i mem | awk {'print $4'})
  160. ram3=$(free -h | grep -i mem | awk {'print $3'})
  161. ##
  162. _ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})")
  163. _usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
  164. _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
  165. _usop=$(printf '%-1s' "$(top -bn1 | awk '/Cpu/ { cpu = "" 100 - $8 "%" }; END { print cpu }')")
  166. ##
  167. # Funcoes Globais
  168. msg () {
  169. local colors="/etc/new-adm-color"
  170. if [[ ! -e $colors ]]; then
  171. COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
  172. COLOR[1]='\e[31m' #VERMELHO='\e[31m'
  173. COLOR[2]='\e[32m' #VERDE='\e[32m'
  174. COLOR[3]='\e[33m' #AMARELO='\e[33m'
  175. COLOR[4]='\e[34m' #AZUL='\e[34m'
  176. COLOR[5]='\e[91m' #MAGENTA='\e[35m'
  177. COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
  178. else
  179. local COL=0
  180. for number in $(cat $colors); do
  181. case $number in
  182. 1)COLOR[$COL]='\033[1;37m';;
  183. 2)COLOR[$COL]='\e[31m';;
  184. 3)COLOR[$COL]='\e[32m';;
  185. 4)COLOR[$COL]='\e[33m';;
  186. 5)COLOR[$COL]='\e[34m';;
  187. 6)COLOR[$COL]='\e[35m';;
  188. 7)COLOR[$COL]='\033[1;36m';;
  189. esac
  190. let COL++
  191. done
  192. fi
  193. NEGRITO='\e[1m'
  194. SEMCOR='\e[0m'
  195. case $1 in
  196. -ne)ccor="${COLOR[1]}${NEGRITO}" && echo -ne "${ccor}${2}${SEMCOR}";;
  197. -ama)ccor="${COLOR[3]}${NEGRITO}" && echo -e "${ccor}${2}${SEMCOR}";;
  198. -verm)ccor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${ccor}${2}${SEMCOR}";;
  199. -verm2)ccor="${COLOR[1]}${NEGRITO}" && echo -e "${ccor}${2}${SEMCOR}";;
  200. -azu)ccor="${COLOR[6]}${NEGRITO}" && echo -e "${ccor}${2}${SEMCOR}";;
  201. -verd)ccor="${COLOR[2]}${NEGRITO}" && echo -e "${ccor}${2}${SEMCOR}";;
  202. -bra)ccor="${COLOR[0]}${SEMCOR}" && echo -e "${ccor}${2}${SEMCOR}";;
  203. -bar2)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
  204. -bar)ccor="${COLOR[1]}•••••••••••••••••••••••••••••••••••••••••••••••••" && echo -e "${SEMCOR}${ccor}${SEMCOR}";;
  205. esac
  206. }
  207. fun_barin () {
  208. #==comando a ejecutar==
  209. comando="$1"
  210. #==interfas==
  211. in=' ['
  212. en=' ] '
  213. full_in="➛"
  214. full_en='100%'
  215. bar=(────────────────────
  216. ═───────────────────
  217. ▇═──────────────────
  218. ▇▇═─────────────────
  219. ═▇▇═────────────────
  220. ─═▇▇═───────────────
  221. ──═▇▇═──────────────
  222. ───═▇▇═─────────────
  223. ────═▇▇═────────────
  224. ─────═▇▇═───────────
  225. ──────═▇▇═──────────
  226. ───────═▇▇═─────────
  227. ────────═▇▇═────────
  228. ─────────═▇▇═───────
  229. ──────────═▇▇═──────
  230. ───────────═▇▇═─────
  231. ────────────═▇▇═────
  232. ─────────────═▇▇═───
  233. ──────────────═▇▇═──
  234. ───────────────═▇▇═─
  235. ────────────────═▇▇═
  236. ─────────────────═▇▇
  237. ──────────────────═▇
  238. ───────────────────═
  239. ──────────────────═▇
  240. ─────────────────═▇▇
  241. ────────────────═▇▇═
  242. ───────────────═▇▇═─
  243. ──────────────═▇▇═──
  244. ─────────────═▇▇═───
  245. ────────────═▇▇═────
  246. ───────────═▇▇═─────
  247. ──────────═▇▇═──────
  248. ─────────═▇▇═───────
  249. ────────═▇▇═────────
  250. ───────═▇▇═─────────
  251. ──────═▇▇═──────────
  252. ─────═▇▇═───────────
  253. ────═▇▇═────────────
  254. ───═▇▇═─────────────
  255. ──═▇▇═──────────────
  256. ─═▇▇═───────────────
  257. ═▇▇═────────────────
  258. ▇▇═─────────────────
  259. ▇═──────────────────
  260. ═───────────────────
  261. ────────────────────);
  262. #==color==
  263. in="\033[1;33m$in\033[0m"
  264. en="\033[1;33m$en\033[0m"
  265. full_in="\033[1;31m$full_in"
  266. full_en="\033[1;32m$full_en\033[0m"
  267. _=$(
  268. $comando > /dev/null 2>&1
  269. ) & > /dev/null
  270. pid=$!
  271. while [[ -d /proc/$pid ]]; do
  272. for i in "${bar[@]}"; do
  273. echo -ne "\r $in"
  274. echo -ne "ESPERE $en $in \033[1;31m$i"
  275. echo -ne " $en"
  276. sleep 0.2
  277. done
  278. done
  279. echo -e " $full_in $full_en"
  280. sleep 0.1s
  281. }
  282. fun_bar () {
  283. fun_barin
  284. }
  285. fun_bar_x () {
  286. comando[0]="$1"
  287. comando[1]="$2"
  288. (
  289. [[ -e $HOME/fim ]] && rm $HOME/fim
  290. ${comando[0]} -y > /dev/null 2>&1
  291. ${comando[1]} -y > /dev/null 2>&1
  292. touch $HOME/fim
  293. ) > /dev/null 2>&1 &
  294. tput civis
  295. echo -ne " \033[1;33mEspere \033[1;37m- \033[1;33m[" | pv -qL 15
  296. while true; do
  297. for((i=0; i<18; i++)); do
  298. echo -ne "\033[1;31m➭"
  299. sleep 0.1s
  300. done
  301. [[ -e $HOME/fim ]] && rm $HOME/fim && break
  302. echo -e "\033[1;33m]"
  303. sleep 0.5s
  304. tput cuu1
  305. tput dl1
  306. echo -ne " \033[1;ESPERE \033[1;37m- \033[1;33m["
  307. done
  308. echo -e "\033[1;33m]\033[1;37m -\033[1;32m COMPLETADO ✔\033[1;37m"
  309. tput cnorm
  310. }
  311. install_fim () {
  312. fecha=`date +"%d-%m-%y"`;
  313. [[ -d /bin/ejecutar ]] && rm -rf /bin/ejecutar
  314. [[ -e /etc/adm-lite/gerar.sh ]] && rm -f /etc/adm-lite/gerar.sh
  315. mkdir /bin/ejecutar
  316. [[ -e /bin/ejecutar/menu_credito ]] && echo "" || echo "$(cat /etc/adm-lite/menu_credito)" > /bin/ejecutar/menu_credito && chmod +x /bin/ejecutar/menu_credito
  317. wget -q -O /bin/toolmaster https://raw.githubusercontent.com/ChumoGH/chumogh-gmail.com/master/toolmaster
  318. chmod +x /bin/toolmaster
  319. echo 'source <(curl -sSL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/free-men.sh)' > /bin/ejecutar/echo-ram.sh
  320. echo 'wget -q -O /bin/ejecutar/v-new.log https://www.dropbox.com/s/8tizr516cvkwss6/v-new.log' >> /bin/ejecutar/echo-ram.sh && bash /bin/ejecutar/echo-ram.sh
  321. if cat /root/.bashrc | grep ChumoGH; then
  322. echo "clear" >> /root/.bashrc
  323. echo 'killall menu > /dev/null 2>&1' >> /root/.bashrc
  324. sed '/ChumoGH/ d' /root/.bashrc > /root/.bashrc.cp
  325. sed '/echo/ d' /root/.bashrc.cp > /root/.bashrc
  326. sed '/ejecutar/ d' /root/.bashrc > /root/.bashrc.cp
  327. sed '/date/ d' /root/.bashrc.cp > /root/.bashrc
  328. rm -f /root/.bashrc.cp
  329. echo 'DATE=$(date +"%d-%m-%y")' >> /root/.bashrc
  330. echo 'TIME=$(date +"%T")' >> /root/.bashrc
  331. echo 'figlet -k ChumoGH | lolcat' >> /root/.bashrc
  332. echo 'echo -e ""' >> /root/.bashrc
  333. echo 'bash /bin/ejecutar/echo-ram.sh' >> /root/.bashrc
  334. echo 'echo -e " Fecha de Instalacion : " $(cat < /bin/ejecutar/fecha)' >> /root/.bashrc
  335. echo 'echo -e " Nombre del Servidor : $HOSTNAME"' >> /root/.bashrc
  336. echo 'echo -e " Tiempo en Linea : $(uptime -p)"' >> /root/.bashrc
  337. echo 'echo -e " Memoria Libre : $(cat < /bin/ejecutar/raml)"' >> /root/.bashrc
  338. echo 'echo -e " Fecha del Servidor : $DATE"' >> /root/.bashrc
  339. echo 'echo -e " Hora del Servidor : $TIME"' >> /root/.bashrc
  340. echo 'echo -e ""' >> /root/.bashrc
  341. echo 'echo -e " Bienvenido!"' >> .bashrc
  342. echo 'echo -e "\033[1;43m Teclee cgh , menu o adm para ver el MENU\033[0m."' >> /root/.bashrc
  343. echo 'echo -e ""' >> /root/.bashrc
  344. echo "STARTUP AGREGADO EXITOSAMENTE"
  345. else
  346. echo "clear" >> .bashrc
  347. echo 'killall menu > /dev/null 2>&1' >> /root/.bashrc
  348. echo 'DATE=$(date +"%d-%m-%y")' >> /root/.bashrc
  349. echo 'TIME=$(date +"%T")' >> /root/.bashrc
  350. echo 'figlet -k ChumoGH | lolcat' >> /root/.bashrc
  351. echo 'echo -e ""' >> /root/.bashrc
  352. echo 'bash /bin/ejecutar/echo-ram.sh' >> /root/.bashrc
  353. echo 'echo -e " Fecha de Instalacion : " $(cat < /bin/ejecutar/fecha)' >> /root/.bashrc
  354. echo 'echo -e " Nombre del Servidor : $HOSTNAME"' >> /root/.bashrc
  355. echo 'echo -e " Tiempo en Linea : $(uptime -p)"' >> /root/.bashrc
  356. echo 'echo -e " Memoria Libre : $(cat < /bin/ejecutar/raml)"' >> /root/.bashrc
  357. echo 'echo -e " Fecha del Servidor : $DATE"' >> /root/.bashrc
  358. echo 'echo -e " Hora del Servidor : $TIME"' >> /root/.bashrc
  359. echo 'echo -e ""' >> /root/.bashrc
  360. echo 'echo -e "Bienvenido!"' >> .bashrc
  361. echo 'echo -e "\033[1;43m Teclee cgh , menu o adm para ver el MENU\033[0m."' >> /root/.bashrc
  362. echo 'echo -e ""' >> /root/.bashrc
  363. echo " STARTUP AGREGADO EXITOSAMENTE"
  364. fi
  365. [[ -e $HOME/lista ]] && rm $HOME/lista
  366. clear
  367. msg -bar2 #echo -e "${cor[5]}◈ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🪐 - 🪐 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ◈ "
  368. echo -e "\033[0;33m
  369. Nombre de tu servidor.... OPCIONAL
  370. RECOMENDABLE 10 Caracteres Maximo!"
  371. msg -bar2
  372. echo -ne " Nombre del Servidor : "; read name
  373. [[ -z $name ]] && {
  374. rm -f /root/name
  375. } || {
  376. echo $name > /etc/adm-lite/name
  377. chmod +x /etc/adm-lite/name
  378. echo $name > /root/name
  379. }
  380. fun_barin
  381. figlet $name
  382. opti=0
  383. echo 0 > /bin/ejecutar/val
  384. echo 0 > /bin/ejecutar/uskill
  385. echo "desactivado" > /bin/ejecutar/val1
  386. [[ -e /bin/ejecutar/menu_credito ]] && echo "" || echo "$(cat /etc/adm-lite/menu_credito)" > /bin/ejecutar/menu_credito && chmod +x /bin/ejecutar/menu_credito
  387. echo "Verified【 $(cat /bin/ejecutar/menu_credito)" > /bin/ejecutar/exito
  388. echo -e "${cor[5]}NOMBRE AGREGADO EXITOSAMENTE"
  389. echo -ne " \033[0m"
  390. clear
  391. echo $fecha > /bin/ejecutar/fecha
  392. msg -bar
  393. echo -e "\033[1;32mCAMBIAR ZONA HORARIA EN ( * \033[1;33mMenu 7 \033[1;32m*\033[1;33m opcion 14 \033[1;32m)"
  394. msg -bar2
  395. echo -e "${cor[3]} ChumoGH-ADM Configurado Exitosamente!"
  396. msg -bar2
  397. echo -e "${cor[3]} |∆| ${cor[2]} Ahora puedes acceder al PANNEL"
  398. msg -bar2
  399. echo -e " \033[1;41m Use los Comandos: cgh, menu, adm"
  400. msg -bar
  401. echo -e "${cor[2]} Para acceder al MENU, DISFRUTA LA ESTANCIA!"
  402. echo -e "${cor[2]} Reinicie para completar Instalacion - OPCIONAL - "
  403. echo -e " RECOMENDABLE ACCEDER COMO ROOT y/o ADMINISTRADOR\033[0m"
  404. echo -e " Fecha de Instalacion : " $(cat < /bin/ejecutar/fecha)
  405. msg -bar
  406. echo -e "\033[0;33m YA TIENES ACCESO ROOT A TU VPS?
  407. ESTO ES ESPECIAL PARA (AWS,GOOGLE,AZURE,OVH,ETC)
  408. SI ENTRASTE CON UN USUARIO DIFERENTE AL ROOT
  409. PRESIONA S, CASO CONTRARIO, IGNORA EL MENSAJE"
  410. msg -bar
  411. echo -e "\033[1;42m Deseas Aplicar el FIX de PASSWD en Acceso ROOT\033[0;33m :v"
  412. echo -ne "\033[0;32m "
  413. read -p " Responde [ s | n ] : " -e -i "n" x
  414. [[ $x = @(s|S|y|Y) ]] && source <(curl -sSL https://www.dropbox.com/s/hl9vyo8mf94z0h5/root-pass.sh) || echo -e "\033[1;32mAplica FIX en ( * \033[1;33m Menu 7\033[1;32m *\033[1;33m opcion 9 \033[1;32m*\033[1;32m)"
  415. echo ""
  416. figlet $name | lolcat
  417. exit
  418. }
  419. [[ "$1" = "--fims" ]] && {
  420. install_fim
  421. exit 0
  422. }
  423. instalar_fun () {
  424. install_ini
  425. cor[2]="\033[1;37m"
  426. wget -q -O /var/www/html/index.html https://www.dropbox.com/s/vowqcezrtiduh8n/index.html
  427. }
  428. [[ "$1" = "--instalar" ]] && {
  429. instalar_fun
  430. exit 0
  431. }
  432. remover_adm () {
  433. echo -e "${cor[1]} =================================== ${cor[0]}"
  434. echo -e "${cor[5]} ${txt[209]}"
  435. read -p " [ s / n ]: " certe_za
  436. [[ "$certe_za" = @(s|S|y|Y) ]] && {
  437. [[ -e /etc/openvpn/server.conf ]] && remover_ovpn & > /dev/null 2>&1
  438. echo -e "${cor[5]} Unistaling python${cor[0]}"
  439. fun_bar 'apt-get purge python -y' 'apt-get purge python3-pip -y'
  440. echo -e "${cor[5]} Unistaling Nmap${cor[0]}"
  441. fun_bar 'apt-get purge screen -y' 'apt-get purge nmap -y'
  442. echo -e "${cor[5]} Unistaling curl${cor[0]}"
  443. fun_bar 'apt-get purge figlet -y' 'apt-get purge unzip -y' 'apt-get purge squid -y'
  444. echo -e "${cor[5]} Unistaling Dropbear/Squid${cor[0]}"
  445. fun_bar 'apt-get purge bc -y' 'apt-get purge lynx -y'
  446. echo -e "${cor[5]} Unistaling Apache2${cor[0]}"
  447. fun_bar 'apt-get purge curl -y' 'apt-get purge squid -y'
  448. echo -e "${cor[5]} Unistaling Libs${cor[0]}"
  449. fun_bar 'apt-get purge squid3 -y' 'apt-get purge dropbear -y' 'apt-get purge stunnel4 -y'
  450. echo -e "${cor[5]} Unistaling Scripts${cor[0]}"
  451. fun_bar 'apt-get purge apache2 -y' 'apt-get purge php5 libapache2-mod-php5 php5-mcrypt'
  452. apt-get autoremove -y > /dev/null 2>&1
  453. [[ -e /bin/ejecutar ]] && rm -rf /bin/ejecutar > /dev/null 2>&1
  454. [[ -e /etc/usuariosteste ]] && rm -rf /etc/usuariosteste > /dev/null 2>&1
  455. [[ -e $HOME/log.txt ]] && rm -f $HOME/log.txt
  456. [[ -e /bin/troj.sh ]] && rm -f /bin/troj.sh
  457. [[ -e /bin/v2r.sh ]] && rm -f /bin/v2r.sh
  458. [[ -e /bin/clash.sh ]] && rm -f /bin/clash.sh
  459. [[ -e /bin/menu ]] && rm /bin/menu
  460. [[ -e /bin/cgh ]] && rm /bin/cgh
  461. sed '/ChumoGH/ d' /root/.bashrc > /root/.bashrc.cp1
  462. sed '/clear/ d' /root/.bashrc.cp1 > /root/.bashrc.cp
  463. sed '/echo/ d' /root/.bashrc.cp > /root/.bashrc
  464. rm -f /root/.bashrc.cp /root/.bashrc.cp1
  465. [[ -e $HOME/exito ]] && rm -f /root/exito $HOME/name > /dev/null 2>&1
  466. echo -e "${cor[5]} SUCESS! :D${cor[0]}"
  467. [[ -e /etc/adm-lite ]] && rm -rf /etc/adm-lite
  468. echo -e "\033[0m"
  469. msg -bar
  470. exit
  471. } || {
  472. echo -e "${cor[1]} ${txt[210]} ${cor[0]}"
  473. msg -bar
  474. return
  475. }
  476. }
  477. clear
  478. #DECLARACAO DE VARIAVEIS
  479. _tmp="./usuarios_cache"
  480. _tmp2="./usuarios_cache2"
  481. _tmp3="./usuarios_cache3"
  482. _tmp4="./usuarios_cache4"
  483. _tmp5="./version"
  484. _cacheDIR="./autoonline"
  485. _dr="./idioma"
  486. dir_user="./userDIR"
  487. dir="/etc/adm-lite"
  488. tempousers="./tempo_conexao"
  489. _modulos="./modulos"
  490. _cores="./cores"
  491. #SISTEMADEMODULOS
  492. unset OPENVPN
  493. unset limiter_on
  494. [[ -e /etc/openvpn/server.conf ]] && {
  495. [[ -e /etc/openvpn/openvpn-status.log ]] && OPENVPN="on" || echo -e "OPENVPN ERROR"
  496. }
  497. [[ -e "$_modulos" ]] && {
  498. while read _module; do
  499. [[ "$_module" = "OPENSSH" ]] && OPENSSH="on"
  500. [[ "$_module" = "DROPBEAR" ]] && DROPBEAR="on"
  501. [[ "$_module" = "VERIFICAR" ]] && VERIFICAR="on"
  502. done < $_modulos
  503. } || {
  504. touch $_modulos
  505. }
  506. [[ $(ps x|grep -v grep|grep limitera |awk '{print $1}') ]] && limiter_on="\033[1;32mON"
  507. [[ $VERIFICAR = "on" ]] && limiter_on="\033[1;32mON"
  508. #TEXTOS
  509. [[ "$(echo ${txt[0]})" = "" ]] && source idioma_geral
  510. _system=$(cat -n /etc/issue |grep 1 |cut -d' ' -f6,7,8 |sed 's/1//' |sed 's/ //')
  511. [[ "$_os" = "" ]] && system[1]=$(echo $_system) && system[2]=$(echo ${system[1]} | awk '{print $1, $2}') && _os="\033[1;31m${system[2]}"
  512. _on="\033[0;31m [\033[0;32mON\033[0;31m]"
  513. _off="\033[0;31m [OFF]"
  514. #PIDSVARIAVEIS
  515. unset pid_badvpn && pid_badvpn=$(ps x | grep "badvpn" | grep -v "grep") #$(netstat -nlpt | egrep -o badvpn)
  516. unset fail2_ban && fail2_ban=$(dpkg -l | grep fail2ban | grep ii)
  517. [[ "$pid_badvpn" != "" ]] && _badvpn="$_on" || _badvpn="$_off"
  518. [[ `grep -c "^#ADM" /etc/sysctl.conf` -eq 0 ]] && _tcpspeed="$_off" || _tcpspeed="$_on"
  519. [[ "$fail2_ban" = "" ]] && fail_b="$_off" || fail_b="$_on"
  520. [[ "$VERIFICAR" = "on" ]] && VERIFICAR_PID="$_on" || VERIFICAR_PID="$_off"
  521. [[ -e ./onlines ]] && __onlines="\033[1;31m$(cat ./onlines)" || __onlines="\033[1;31m0"
  522. [[ -e /bin/ejecutar/uskill ]] && ukk="\033[1;31m$(cat /bin/ejecutar/uskill)" || ukk="\033[1;31m0"
  523. [[ -e ./vencidos ]] && __vencidos="\033[1;31m$(cat ./vencidos)" || __vencidos="\033[1;31m0"
  524. [[ "$(ps x | grep "ultimatebot" | grep -v "grep")" != "" ]] && bot="$_on" || bot="$_off"
  525. v1=$(cat /bin/ejecutar/v-new.log)
  526. v2=$(cat /etc/adm-lite/v-local.log)
  527. if [ -e /etc/squid/squid.conf ]; then
  528. squid_var="/etc/squid/squid.conf"
  529. elif [ -e /etc/squid3/squid.conf ]; then
  530. squid_var="/etc/squid3/squid.conf"
  531. fi
  532. [[ -e $squid_var ]] && {
  533. teste_cache="#CACHE DO SQUID"
  534. [[ `grep -c "^$teste_cache" $squid_var` -eq 0 ]] && _cachesquid="$_off" || _cachesquid="$_on"
  535. }
  536. #FUNCOES
  537. funcao_addcores () {
  538. if [ "$1" = "0" ]; then
  539. cor[$2]="\033[0m"
  540. elif [ "$1" = "1" ]; then
  541. cor[$2]="\033[1;31m"
  542. elif [ "$1" = "2" ]; then
  543. cor[$2]="\033[1;32m"
  544. elif [ "$1" = "3" ]; then
  545. cor[$2]="\033[1;33m"
  546. elif [ "$1" = "4" ]; then
  547. cor[$2]="\033[1;34m"
  548. elif [ "$1" = "5" ]; then
  549. cor[$2]="\033[1;35m"
  550. elif [ "$1" = "6" ]; then
  551. cor[$2]="\033[1;36m"
  552. elif [ "$1" = "7" ]; then
  553. cor[$2]="\033[1;37m"
  554. fi
  555. }
  556. funcao_cores1 () {
  557. if [ "$6" = "" ]; then
  558. echo -e "${cor[5]} ${txt[24]} ${cor[0]}"
  559. sleep 2s
  560. return
  561. fi
  562. echo "0" > $1
  563. funcao_cores2 $2 $1
  564. funcao_cores2 $3 $1
  565. funcao_cores2 $4 $1
  566. funcao_cores2 $5 $1
  567. funcao_cores2 $6 $1
  568. funcao_cores2 $7 $1
  569. }
  570. funcao_cores2 () {
  571. if [ "$1" = "1" ]; then
  572. echo -e "\033[1;31m${txt[25]}"
  573. sleep 1s
  574. echo "1" >> $2
  575. elif [ "$1" = "2" ]; then
  576. echo -e "\033[1;32m${txt[25]}"
  577. sleep 1s
  578. echo "2" >> $2
  579. elif [ "$1" = "3" ]; then
  580. echo -e "\033[1;33m${txt[25]}"
  581. sleep 1s
  582. echo "3" >> $2
  583. elif [ "$1" = "4" ]; then
  584. echo -e "\033[1;34m${txt[25]}"
  585. sleep 1s
  586. echo "4" >> $2
  587. elif [ "$1" = "5" ]; then
  588. echo -e "\033[1;35\]m${txt[25]}"
  589. sleep 1s
  590. echo "5" >> $2
  591. elif [ "$1" = "6" ]; then
  592. echo -e "\033[1;36m${txt[25]}"
  593. sleep 1s
  594. echo "6" >> $2
  595. elif [ "$1" = "7" ]; then
  596. echo -e "\033[1;37m${txt[25]}"
  597. sleep 1s
  598. echo "7" >> $2
  599. elif [ "$1" -gt "7" ]; then
  600. rm $2
  601. funcao_cores1
  602. fi
  603. }
  604. funcao_cores () {
  605. echo -e "${cor[1]} =================================== ${cor[0]}"
  606. echo -e "${cor[5]} ${txt[21]}"
  607. echo -e "${cor[1]} • AABBCCDDEEFF"
  608. echo -e "${cor[2]} • AABBCCDDEEFF"
  609. echo -e "${cor[3]} • AABBCCDDEEFF"
  610. echo -e "${cor[4]} • AABBCCDDEEFF"
  611. echo -e "${cor[5]} • AABBCCDDEEFF"
  612. echo -e "${cor[6]} • AABBCCDDEEFF"
  613. ncor[1]="\033[1;31m"
  614. ncor[2]="\033[1;32m"
  615. ncor[3]="\033[1;33m"
  616. ncor[4]="\033[1;34m"
  617. ncor[5]="\033[1;35m"
  618. ncor[6]="\033[1;36m"
  619. ncor[7]="\033[1;37m"
  620. echo -e "${cor[1]} =================================== ${cor[0]}"
  621. echo -e "${ncor[1]} [1]•AA ${ncor[2]} [2]•AA ${ncor[3]} [3]•AA"
  622. echo -e "${ncor[4]} [4]•AA ${ncor[5]} [5]•AA ${ncor[6]} [6]•AA"
  623. echo -e "${ncor[7]} [7]•AA"
  624. echo -e "${cor[1]} =================================== ${cor[0]}"
  625. echo -e "${cor[5]} ${txt[22]}"
  626. unset ncor
  627. read -p " ${txt[23]} " _cores_
  628. funcao_cores1 $_cores $_cores_
  629. }
  630. [[ -e $_cores ]] && {
  631. _cont="0"
  632. while read _cor; do
  633. funcao_addcores ${_cor} ${_cont}
  634. _cont=$(($_cont + 1))
  635. done < $_cores
  636. } || {
  637. cor[0]="\033[0m"
  638. cor[1]="\033[1;34m"
  639. cor[2]="\033[1;32m"
  640. cor[3]="\033[1;37m"
  641. cor[4]="\033[1;36m"
  642. cor[5]="\033[1;33m"
  643. cor[6]="\033[1;35m"
  644. }
  645. vary_rex () {
  646. echo -e $(echo "$1"| sed 's/../\\x&/g;s/$/ /') && return 0 || return 1
  647. }
  648. funcao_verificacao () {
  649. if [[ $limiter_on = "" ]]; then
  650. unset limiter_on
  651. killall limiter.sh > /dev/null 2>&1
  652. kill -9 $(ps x|grep -v grep|grep limiter.sh|awk '{print $1}')
  653. fi
  654. [[ ! -e $_modulos ]] && touch $_modulos
  655. [[ "$VERIFICAR" = "on" ]] && {
  656. active_verif=$(cat $_modulos | egrep -v "VERIFICAR")
  657. echo "$active_verif" > $_modulos
  658. for _pids_ in `atq | awk '{print $1}'`; do
  659. atrm $_pids_
  660. done
  661. [[ -e ./vencidos ]] && rm ./vencidos
  662. [[ -e ./onlines ]] && rm ./onlines
  663. } || {
  664. echo "VERIFICAR" >> $_modulos
  665. echo "at -f /bin/cron now + 1 min" > /bin/cron
  666. echo "/etc/adm-lite/verifica &" >> /bin/cron
  667. chmod 777 /bin/cron
  668. chmod 777 /etc/adm-lite/*
  669. bash /bin/cron
  670. }
  671. unset VERIFICAR
  672. unset __onlines
  673. unset __vencidos
  674. }
  675. #PREENXE_VARIAVEL $select_name
  676. select_users () {
  677. _cont="1"
  678. [[ -e $_tmp3 ]] && rm $_tmp3
  679. touch $_tmp3
  680. for u in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |grep -v "nobody" |grep -vi polkitd |grep -vi systemd-[a-z] |grep -vi systemd-[0-9] |sort`; do
  681. echo "$_cont $u --" >> $_tmp3
  682. [[ -e $dir_user/$u.block ]] && echo -e "\033[0;35m [\033[0;36m$_cont\033[0;35m]\033[0;31m ➮${cor[5]} $u \033[1;34m<--\033[1;31m SUSPENDIDIO" || echo -e "\033[0;35m [\033[0;36m$_cont\033[0;35m]\033[0;31m ➮${cor[5]} $u"
  683. [[ "$u" = "" ]] && break
  684. _cont=$(($_cont + 1))
  685. done
  686. msg -bar
  687. echo -e "${cor[5]} NUMERO DE USUARIO, O ESCRIBRE EL NOMBRE"
  688. echo -ne "${cor[6]}"
  689. read -p " ❐ OPCION : " select_user
  690. tput cuu1 && tput dl1
  691. if [ "$select_user" = "" ]; then
  692. echo -e "${cor[5]} NO SELECCIONO USUARIO . . ."
  693. return
  694. fi
  695. if [ "$select_user" -le "$_cont" ] 1> /dev/null 2> /dev/null
  696. then
  697. select_name=$(cat $_tmp3 | head -$select_user | tail -1 | awk '{print $2}')
  698. echo -e "${cor[5]} $name"
  699. else
  700. if cat /etc/passwd |grep $select_user: > /dev/null
  701. then
  702. select_name="$select_user"
  703. else
  704. echo -e "${cor[5]} USUARIO ESCOJIDO, NO EXISTE"
  705. echo -e "${cor[5]} SELECCION DE USUARIO INCORRECTA"
  706. return
  707. fi
  708. fi
  709. unset select_user
  710. }
  711. #PREENXE A VARIAVEL $IP
  712. meu_ip () {
  713. [[ -e /etc/catIPlocal && -e /etc/catIP ]] && {
  714. MEU_IP=$(cat < /etc/catIPlocal)
  715. MEU_IP2=$(cat < /etc/catIP)
  716. [[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" || IP="$MEU_IP"
  717. } || {
  718. MEU_IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1) && echo $MEU_IP > /etc/catIPlocal
  719. MEU_IP2=$(wget -qO- ipv4.icanhazip.com) && echo $MEU_IP2 > /etc/catIP
  720. [[ "$MEU_IP" != "$MEU_IP2" ]] && IP="$MEU_IP2" || IP="$MEU_IP"
  721. }
  722. }
  723. ofus () {
  724. unset txtofus
  725. number=$(expr length $1)
  726. for((i=1; i<$number+1; i++)); do
  727. txt[$i]=$(echo "$1" | cut -b $i)
  728. case ${txt[$i]} in
  729. ".")txt[$i]="x";;
  730. "x")txt[$i]=".";;
  731. "1")txt[$i]="@";;
  732. "@")txt[$i]="1";;
  733. "2")txt[$i]="?";;
  734. "?")txt[$i]="2";;
  735. "4")txt[$i]="%";;
  736. "%")txt[$i]="4";;
  737. "/")txt[$i]="K";;
  738. "K")txt[$i]="/";;
  739. esac
  740. txtofus+="${txt[$i]}"
  741. done
  742. echo "$txtofus" | rev
  743. }
  744. fun_atualizar () {
  745. cd /etc/adm-lite
  746. chmod 777 ./*
  747. echo -e "${cor[3]} ¿DESEAS CONTINUAR CON UPDATE DEL SCRIPT ? "
  748. read -p " [S/N]: " -e -i s sshsn
  749. [[ "$sshsn" = @(s|S|y|Y) ]] && {
  750. [[ -e /etc/adm-lite/idioma ]] && rm /etc/adm-lite/idioma
  751. source <(curl -sSL https://www.dropbox.com/s/57xibc03arhjo7w/updateadm) "alx"
  752. }
  753. }
  754. #GERA NOVO CLIENTE
  755. newclient () {
  756. # Generates the custom client.ovpn
  757. rm -rf /etc/openvpn/easy-rsa/pki/reqs/$1.req
  758. rm -rf /etc/openvpn/easy-rsa/pki/issued/$1.crt
  759. rm -rf /etc/openvpn/easy-rsa/pki/private/$1.key
  760. cd /etc/openvpn/easy-rsa/
  761. ./easyrsa build-client-full $1 nopass > /dev/null 2>&1
  762. cd
  763. cp /etc/openvpn/client-common.txt ~/$1.ovpn
  764. echo "<ca>" >> ~/$1.ovpn
  765. cat /etc/openvpn/easy-rsa/pki/ca.crt >> ~/$1.ovpn
  766. echo "</ca>" >> ~/$1.ovpn
  767. echo "<cert>" >> ~/$1.ovpn
  768. cat /etc/openvpn/easy-rsa/pki/issued/$1.crt >> ~/$1.ovpn
  769. echo "</cert>" >> ~/$1.ovpn
  770. echo "<key>" >> ~/$1.ovpn
  771. cat /etc/openvpn/easy-rsa/pki/private/$1.key >> ~/$1.ovpn
  772. echo "</key>" >> ~/$1.ovpn
  773. echo "<tls-auth>" >> ~/$1.ovpn
  774. cat /etc/openvpn/ta.key >> ~/$1.ovpn
  775. echo "</tls-auth>" >> ~/$1.ovpn
  776. }
  777. open_1 () {
  778. CLIENT="$1"
  779. senha="$2"
  780. daysrnf="$3"
  781. limit="$4"
  782. #cd /etc/openvpn/easy-rsa/
  783. #./easyrsa build-client-full $CLIENT nopass
  784. newclient "$CLIENT"
  785. #echo ""
  786. #echo "$CLIENT KEY" ~/"$CLIENT.ovpn"
  787. valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
  788. datexp=$(date "+%d/%m/%Y" -d "+ $daysrnf days")
  789. useradd -M -s /bin/false -d /home/ovpn/ $CLIENT -e $valid
  790. usermod -p $(openssl passwd -1 $senha) $CLIENT
  791. #Arquivo
  792. while [[ ${newfile} != @(s|S|y|Y|n|N) ]]; do
  793. msg -bar
  794. read -p "Crear Archivo OpenVPN? [S/N]: " -e -i S newfile
  795. tput cuu1 && tput dl1
  796. done
  797. [[ ${newfile} = @(s|S|y|Y) ]] && {
  798. while [[ ${ovpnauth} != @(s|S|y|Y|n|N) ]]; do
  799. read -p " Colocar autenticacion de usuario en el archivo? [S/N]: " -e -i S ovpnauth
  800. tput cuu1 && tput dl1
  801. done
  802. [[ ${ovpnauth} = @(s|S|y|Y) ]] && sed -i "s;auth-user-pass;<auth-user-pass>\n$CLIENT\n$senha\n</auth-user-pass>;g" $HOME/$CLIENT.ovpn
  803. cd $HOME
  804. zip ./$CLIENT.zip ./$CLIENT.ovpn > /dev/null 2>&1
  805. echo -e "\033[1;31m Archivo generado en: ($HOME/$CLIENT.zip)"
  806. echo -e "\033[1;32m ${txt[321]} ( * menu * opcion 2 * opcion 8 )"
  807. }
  808. rm -f ./$CLIENT.ovpn
  809. cd /etc/adm-lite
  810. echo "senha: $senha" > $dir_user/$CLIENT
  811. echo "limite: $limit" >> $dir_user/$CLIENT
  812. echo "data: $valid" >> $dir_user/$CLIENT
  813. }
  814. open_2 () {
  815. CLIENT="$1"
  816. userdel --force $CLIENT
  817. cd /etc/adm-lite
  818. [[ -e $dir_user/$CLIENT ]] && rm $dir_user/$CLIENT
  819. }
  820. #SISTEMA PORTAS
  821. open_port () {
  822. tmp_arq="/tmp/arq-tmp"
  823. while read arquivo; do
  824. if [ ! -e "$tmp_arq" ]; then
  825. echo "$arquivo" > $tmp_arq
  826. else
  827. echo "$arquivo" >> $tmp_arq
  828. fi
  829. if [ "$(echo "$arquivo" | awk '{print $1}')" = "$2" ]; then
  830. [[ "$(cat $tmp_arq | grep "$2 $3" | wc -l)" = "0" ]] && echo "$2 $3" >> $tmp_arq
  831. fi
  832. done < $1
  833. mv -f $tmp_arq $1
  834. }
  835. open_dropbear () {
  836. tmp_arq="/tmp/arq-tmp"
  837. arquivo="/etc/default/dropbear"
  838. echo -e "${cor[2]} |1| >${cor[5]} ${txt[279]}"
  839. echo -e "${cor[2]} |2| >${cor[5]} ${txt[280]}\033[1;37m"
  840. read -p " [ 1 / 2 ]: " escolhaas
  841. if [ "$escolhaas" = "1" ]; then
  842. porta="$1"
  843. sed "s;-p $porta ;;g" $arquivo > $tmp_arq
  844. mv -f $tmp_arq $arquivo
  845. service dropbear restart > /dev/null 2>&1 &
  846. sleep 1s
  847. echo -e "${cor[5]} ${txt[281]}"
  848. return
  849. elif [ "$escolhaas" = "2" ]; then
  850. read -p " Nuevo Puerto: " newport
  851. porta="$newport"
  852. sed -i "s/443/$porta -p 443/g" $arquivo
  853. service dropbear restart > /dev/null 2>&1 &
  854. sleep 1s
  855. echo -e "${cor[5]} ${txt[281]}"
  856. return
  857. fi
  858. }
  859. open_squid () {
  860. tmp_arq="/tmp/arq-tmp"
  861. if [ -d "/etc/squid" ]; then
  862. arquivo="/etc/squid/squid.conf"
  863. elif [ -d "/etc/squid3" ]; then
  864. arquivo="/etc/squid3/squid.conf"
  865. fi
  866. echo -e "${cor[2]} |1| >${cor[5]} ${txt[279]}"
  867. echo -e "${cor[2]} |2| >${cor[5]} ${txt[280]}\033[1;37m"
  868. read -p " [ 1 / 2 ]: " escolhaas
  869. if [ "$escolhaas" = "1" ]; then
  870. porta="$1"
  871. cat $arquivo | grep -v "http_port $porta" > $tmp_arq
  872. mv -f $tmp_arq $arquivo
  873. service squid3 restart > /dev/null 2>&1 &
  874. service squid restart > /dev/null 2>&1 &
  875. sleep 1s
  876. echo -e "${cor[5]} ${txt[281]}"
  877. return
  878. elif [ "$escolhaas" = "2" ]; then
  879. read -p " Nova Porta: " newport
  880. open_port "$arquivo" "http_port" "$newport"
  881. service squid3 restart > /dev/null 2>&1 &
  882. service squid restart > /dev/null 2>&1 &
  883. sleep 1s
  884. echo -e "${cor[5]} ${txt[281]}"
  885. return
  886. fi
  887. }
  888. open_ssh () {
  889. tmp_arq="/tmp/arq-tmp"
  890. arquivo="/etc/ssh/sshd_config"
  891. echo -e "${cor[2]} |1| >${cor[5]} ${txt[279]}"
  892. echo -e "${cor[2]} |2| >${cor[5]} ${txt[280]}\033[1;37m"
  893. read -p " [ 1 / 2 ]: " escolhaas
  894. if [ "$escolhaas" = "1" ]; then
  895. porta="$1"
  896. cat $arquivo | grep -v "Port $porta" > $tmp_arq
  897. mv -f $tmp_arq $arquivo
  898. service ssh restart > /dev/null 2>&1 &
  899. service sshd restart > /dev/null 2>&1 &
  900. sleep 1s
  901. echo -e "${cor[5]} ${txt[281]}"
  902. return
  903. elif [ "$escolhaas" = "2" ]; then
  904. read -p " Nova Porta: " newport
  905. open_port "$arquivo" "Port" "$newport"
  906. service ssh restart > /dev/null 2>&1 &
  907. service sshd restart > /dev/null 2>&1 &
  908. sleep 1s
  909. echo -e "${cor[5]} ${txt[281]}"
  910. return
  911. fi
  912. }
  913. open_python () {
  914. echo -e "${cor[2]} ${cor[5]}${txt[279]}"
  915. read -p " [S/N]: " -e -i n pthsn
  916. [[ "$pthsn" = @(s|S|y|Y) ]] && {
  917. echo -e "${cor[1]} ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ ${cor[0]}"
  918. porta="$1"
  919. fuser -k $porta/tcp > /dev/null 2>&1
  920. sleep 1s
  921. echo -e "${cor[5]} ${txt[281]}"
  922. return
  923. }
  924. }
  925. minhas_portas () {
  926. echo -e "${cor[1]} ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ ${cor[4]}"
  927. portas_var="/tmp/portas"
  928. porta_var="/tmp/portas2"
  929. lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN" > $portas_var
  930. while read port; do
  931. var1=$(echo $port | awk '{print $1}')
  932. var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
  933. if [ ! -e "$porta_var" ]; then
  934. echo -e "$var1 $var2" > $porta_var
  935. fi
  936. if [ "$(cat $porta_var | grep "$var1" | grep "$var2")" = "" ]; then
  937. echo -e "$var1 $var2" >> $porta_var
  938. fi
  939. done < $portas_var
  940. i=1
  941. while read pts; do
  942. [[ "$pts" = "" ]] && break
  943. service_porta[$i]=$(echo "$pts" | awk '{print $2}')
  944. service_serv[$i]=$(echo "$pts" | awk '{print $1}')
  945. echo -e " \033[1;37m[$i] -> \033[1;31m${service_serv[$i]} : \033[1;32m${service_porta[$i]}"
  946. i=$(($i+1))
  947. done < $porta_var
  948. echo -e "${cor[5]} ${txt[277]}"
  949. echo -e "${cor[1]} ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ \033[1;37m"
  950. read -p " [1-$(($i-1))]: " nun
  951. echo -e "\033[1;31m ${txt[283]} \033[1;32m${service_porta[$nun]}\033[1;31m : \033[1;32m${service_serv[$nun]}\033[0m"
  952. rm $portas_var
  953. rm $porta_var
  954. echo -e "${cor[1]} ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ ${cor[0]}"
  955. if [ "${service_serv[$nun]}" = "dropbear" ]; then
  956. open_dropbear ${service_porta[$nun]}
  957. elif [ "${service_serv[$nun]}" = "sshd" ]; then
  958. open_ssh ${service_porta[$nun]}
  959. elif [ "${service_serv[$nun]}" = "squid3" ]; then
  960. open_squid ${service_porta[$nun]}
  961. elif [ "${service_serv[$nun]}" = "squid" ]; then
  962. open_squid ${service_porta[$nun]}
  963. elif [ "${service_serv[$nun]}" = "python" ]; then
  964. open_python ${service_porta[$nun]}
  965. elif [ "${service_serv[$nun]}" = "python3" ]; then
  966. open_python ${service_porta[$nun]}
  967. else
  968. echo -e "\033[1;31m ${txt[278]}\033[0m"
  969. fi
  970. echo -e "${cor[1]} ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ ${cor[0]}"
  971. }
  972. #VERIFICA SE E NUMERICO
  973. number_var () {
  974. unset var_number
  975. if (echo "$1" | egrep '[^0-9]' &> /dev/null); then
  976. echo -e "${cor[5]} ${txt[98]}"
  977. else
  978. var_number="$1"
  979. fi
  980. }
  981. ports_ () {
  982. PT=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN")
  983. x=1
  984. for porta in `echo -e "$PT" | cut -d: -f2 | cut -d' ' -f1 | uniq`; do
  985. porta[$x]="$porta"
  986. svcs[$x]="$(echo -e "$PT" | grep -w "$porta" | awk '{print $1}' | uniq)"
  987. x=$(($x+1))
  988. done
  989. for((i=1; i<$x; i++)); do
  990. [[ ! -z ${svcs[$i]} ]] && texto="\033[1;34m ▸ \033[1;37m${svcs[$i]}: \033[1;31m${porta[$i]}" || texto=''
  991. [[ ${svcs[$i]} = "apache2" ]] && texto="\033[1;34m ▸ \033[1;37mAPACHE: \033[1;31m${porta[$i]}"
  992. [[ ${svcs[$i]} = "node" ]] && texto="\033[1;34m ▸ \033[1;37mWebSocket: \033[1;31m${porta[$i]}"
  993. [[ ${svcs[$i]} = "clash" ]] && texto="\033[1;34m ▸ \033[1;37mClash: \033[1;31m${porta[$i]}"
  994. [[ ${svcs[$i]} = "psiphond" ]] && texto="\033[1;34m ▸ \033[1;37mPSIPHON: \033[1;31m${porta[$i]}"
  995. [[ ${svcs[$i]} = "xray-v2-u" ]] && texto="\033[1;34m ▸ \033[1;37mXRAY/UI: \033[1;31m${porta[$i]}"
  996. [[ ${svcs[$i]} = "v2-ui" ]] && texto="\033[1;34m ▸ \033[1;37mV2-UI/WEB: \033[1;31m${porta[$i]}"
  997. [[ ${svcs[$i]} = "xray-linu" ]] && texto="\033[1;34m ▸ \033[1;37mXRAY/UI: \033[1;31m${porta[$i]}"
  998. [[ ${svcs[$i]} = "x-ui" ]] && texto="\033[1;34m ▸ \033[1;37mXUI/WEB: \033[1;31m${porta[$i]}"
  999. [[ ${svcs[$i]} = "openvpn" ]] && texto="\033[1;34m ◂ \033[1;37mOPENVPN-TCP: \033[1;31m${porta[$i]}"
  1000. [[ ${svcs[$i]} = "squid" ]] && texto="\033[1;34m ◂ \033[1;37mSQUID: \033[1;31m${porta[$i]}"
  1001. [[ ${svcs[$i]} = "squid3" ]] && texto="\033[1;34m ◂ \033[1;37mSQUID: \033[1;31m${porta[$i]}"
  1002. [[ ${svcs[$i]} = "dropbear" ]] && texto="\033[1;34m ▸ \033[1;37mDROPBEAR: \033[1;31m${porta[$i]}"
  1003. [[ ${svcs[$i]} = "python3" ]] && texto="\033[1;34m ▸ \033[1;37mSOCKS/PYTHON: \033[1;31m${porta[$i]}"
  1004. [[ ${svcs[$i]} = "python" ]] && texto="\033[1;34m ▸ \033[1;37mSOCKS/PYTHON: \033[1;31m${porta[$i]}"
  1005. [[ ${svcs[$i]} = "obfs-serv" ]] && texto="\033[1;34m ▸ \033[1;37mSSR (OBFS): \033[1;31m${porta[$i]}"
  1006. [[ ${svcs[$i]} = "ss-server" ]] && texto="\033[1;34m ▸ \033[1;37mSSR (LIV): \033[1;31m${porta[$i]}"
  1007. [[ ${svcs[$i]} = "sshd" ]] && texto="\033[1;34m ▸ \033[1;37mSSH: \033[1;31m${porta[$i]}"
  1008. [[ ${svcs[$i]} = "ssh" ]] && texto="\033[1;34m ▸ \033[1;37mSSH: \033[1;31m${porta[$i]}"
  1009. [[ ${svcs[$i]} = "systemd-r" ]] && texto="\033[1;34m ▸ \033[1;37mSystem-DNS: \033[1;31m${porta[$i]}"
  1010. [[ ${svcs[$i]} = "stunnel4" ]] && texto="\033[1;34m ▸ \033[1;37mSSL: \033[1;31m${porta[$i]}"
  1011. [[ ${svcs[$i]} = "v2ray" ]] && texto="\033[1;34m ◂ \033[1;37mV2RAY: \033[1;31m${porta[$i]}"
  1012. [[ ${svcs[$i]} = "xray" ]] && texto="\033[1;34m ◂ \033[1;37mXRAY: \033[1;31m${porta[$i]}"
  1013. #[[ ${svcs[$i]} = "badvpn-ud" ]] && texto="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31mON"
  1014. [[ ${porta[$i]} = "7200" ]] && texto="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31m${porta[$i]}"
  1015. [[ ${porta[$i]} = "7300" ]] && texto="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31m${porta[$i]}"
  1016. [[ ${porta[$i]} = "7100" ]] && texto="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31m${porta[$i]}"
  1017. [[ ${svcs[$i]} = "trojan" ]] && texto="\033[1;34m ◂ \033[1;37mTrojan-GO: \033[1;31m${porta[$i]}"
  1018. [[ ${svcs[$i]} = "sslh" ]] && texto="\033[1;34m ◂ \033[1;37mSSLH: \033[1;31m${porta[$i]}"
  1019. [[ ${svcs[$i]} = "nc.tradit" ]] && texto="\033[1;34m ◂ \033[1;37mKeyGen: \033[1;31mON"
  1020. i=$(($i+1))
  1021. [[ ! -z ${svcs[$i]} ]] && texto_="\033[1;34m ▸ \033[1;37m${svcs[$i]}: \033[1;31m${porta[$i]}" || texto_=''
  1022. [[ ${svcs[$i]} = "apache2" ]] && texto_="\033[1;34m ▸ \033[1;37mAPACHE: \033[1;31m${porta[$i]}"
  1023. [[ ${svcs[$i]} = "node" ]] && texto_="\033[1;34m ▸ \033[1;37mWebSocket: \033[1;31m${porta[$i]}"
  1024. [[ ${svcs[$i]} = "clash" ]] && texto_="\033[1;34m ▸ \033[1;37mClash: \033[1;31m${porta[$i]}"
  1025. [[ ${svcs[$i]} = "psiphond" ]] && texto_="\033[1;34m ▸ \033[1;37mPSIPHON: \033[1;31m${porta[$i]}"
  1026. [[ ${svcs[$i]} = "xray-v2-u" ]] && texto_="\033[1;34m ▸ \033[1;37mXRAY/UI: \033[1;31m${porta[$i]}"
  1027. [[ ${svcs[$i]} = "v2-ui" ]] && texto_="\033[1;34m ▸ \033[1;37mV2-UI/WEB: \033[1;31m${porta[$i]}"
  1028. [[ ${svcs[$i]} = "xray-linu" ]] && texto_="\033[1;34m ▸ \033[1;37mXRAY/UI: \033[1;31m${porta[$i]}"
  1029. [[ ${svcs[$i]} = "x-ui" ]] && texto_="\033[1;34m ▸ \033[1;37mXUI/WEB: \033[1;31m${porta[$i]}"
  1030. [[ ${svcs[$i]} = "openvpn" ]] && texto_="\033[1;34m ◂ \033[1;37mOPENVPN-TCP: \033[1;31m${porta[$i]}"
  1031. [[ ${svcs[$i]} = "squid" ]] && texto_="\033[1;34m ◂ \033[1;37mSQUID: \033[1;31m${porta[$i]}"
  1032. [[ ${svcs[$i]} = "squid3" ]] && texto_="\033[1;34m ◂ \033[1;37mSQUID: \033[1;31m${porta[$i]}"
  1033. [[ ${svcs[$i]} = "dropbear" ]] && texto_="\033[1;34m ▸ \033[1;37mDROPBEAR: \033[1;31m${porta[$i]}"
  1034. [[ ${svcs[$i]} = "python3" ]] && texto_="\033[1;34m ▸ \033[1;37mSOCKS/PYTHON: \033[1;31m${porta[$i]}"
  1035. [[ ${svcs[$i]} = "python" ]] && texto_="\033[1;34m ▸ \033[1;37mSOCKS/PYTHON: \033[1;31m${porta[$i]}"
  1036. [[ ${svcs[$i]} = "obfs-serv" ]] && texto_="\033[1;34m ▸ \033[1;37mSSR (OBFS): \033[1;31m${porta[$i]}"
  1037. [[ ${svcs[$i]} = "ss-server" ]] && texto_="\033[1;34m ▸ \033[1;37mSSR (LIV): \033[1;31m${porta[$i]}"
  1038. [[ ${svcs[$i]} = "sshd" ]] && texto_="\033[1;34m ▸ \033[1;37mSSH: \033[1;31m${porta[$i]}"
  1039. [[ ${svcs[$i]} = "ssh" ]] && texto_="\033[1;34m ▸ \033[1;37mSSH: \033[1;31m${porta[$i]}"
  1040. [[ ${svcs[$i]} = "systemd-r" ]] && texto_="\033[1;34m ▸ \033[1;37mSystem-DNS: \033[1;31m${porta[$i]}"
  1041. [[ ${svcs[$i]} = "stunnel4" ]] && texto_="\033[1;34m ▸ \033[1;37mSSL: \033[1;31m${porta[$i]}"
  1042. [[ ${svcs[$i]} = "v2ray" ]] && texto_="\033[1;34m ◂ \033[1;37mV2RAY: \033[1;31m${porta[$i]}"
  1043. [[ ${svcs[$i]} = "xray" ]] && texto_="\033[1;34m ◂ \033[1;37mXRAY: \033[1;31m${porta[$i]}"
  1044. #[[ ${svcs[$i]} = "badvpn-ud" ]] && texto_="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31mON"
  1045. [[ ${porta[$i]} = "7200" ]] && texto_="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31m${porta[$i]}"
  1046. [[ ${porta[$i]} = "7300" ]] && texto_="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31m${porta[$i]}"
  1047. [[ ${porta[$i]} = "7100" ]] && texto_="\033[1;34m ▸ \033[1;37mBadVPN: \033[1;31m${porta[$i]}"
  1048. [[ ${svcs[$i]} = "trojan" ]] && texto_="\033[1;34m ◂ \033[1;37mTrojan-GO: \033[1;31m${porta[$i]}"
  1049. [[ ${svcs[$i]} = "sslh" ]] && texto_="\033[1;34m ◂ \033[1;37mSSLH: \033[1;31m${porta[$i]}"
  1050. [[ ${svcs[$i]} = "nc.tradit" ]] && texto_="\033[1;34m ◂ \033[1;37mKeyGen: \033[1;31mON"
  1051. echo -e "$texto $texto_"
  1052. done
  1053. PIDGEN=$(ps x | grep "teleBotGen" | grep -v grep |awk '{print $1}')
  1054. [[ ! -z $PIDGEN ]] && {
  1055. botG="\033[1;34m ▸ \033[1;37m BotGen Telegram 🤖 : \033[1;31m ⚡ ACTIVO ⚡"
  1056. msg -bar
  1057. echo -e "$botG"
  1058. }
  1059. }
  1060. exitokey="\033[3;49;32m$(cat < /bin/ejecutar/exito)©"
  1061. [[ $v1 = $v2 ]] && vesaoSCT="\033[1;37m Key: $exitokey 】\033[0m\033[0;33m($v2)" || vesaoSCT="\033[1;31m${txt[316]}\033[0;33m($v2) ► \033[1;32m($v1)\033[1;31m"
  1062. cpuss=$(cat /proc/cpuinfo | grep processor | wc -l)
  1063. modelo1=$(lscpu | grep Arch | sed 's/\s\+/,/g' | cut -d , -f2)
  1064. [[ $modelo1 = "aarch64" ]] && modelo1=" ARM64"
  1065. meu_ip
  1066. [[ -e /root/name ]] && figlet -p -f smslant < /root/name | lolcat || echo -e "\033[7;49;35m =====>>►► 🐲 New ChumoGH💥VPS 🐲 ◄◄<<===== \033[0m"
  1067. msg -bar #echo -e "${cor[1]} ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪ ${cor[0]}"
  1068. [[ "$VERIFICAR" = "on" ]] && echo -e "${cor[2]} ‣ \033[1;37mActivos: $__onlines ${cor[2]} ‣ \033[1;37mCaducados: $__vencidos ${cor[2]} ‣ \033[1;37m Eliminados: $ukk"
  1069. echo -e "${cor[2]} ‣ \033[1;37mS.O:$_os ${cor[2]} ‣ \033[1;37mBase:\033[1;31m$modelo1 ${cor[2]}‣ \033[1;37mCores:\033[1;31m $_core "
  1070. echo -e "${cor[2]} ‣ \033[1;37mIP: \033[1;31m$IP ${cor[2]}‣ \033[1;37mFECHA: \033[1;31m$(date +"%d/%m/%Y")-$(date +"%H:%M")"
  1071. msg -bar #echo -e "${cor[2]} ••••••••••••••••••••••••••••••••••••••••••••••••• ${cor[0]}"
  1072. echo -e "${vesaoSCT} "
  1073. msg -bar
  1074. [[ $1 = "ports_" ]] && ports_