menu 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  1. #!/bin/bash
  2. #------<<Script-Free v8.5.1>>
  3. clear
  4. clear
  5. #SPR &
  6. #sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 >/dev/null 2>&1
  7. #sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 >/dev/null 2>&1
  8. #sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1 >/dev/null 2>&1
  9. _hora=$(printf '%(%D-%H:%M:%S)T')
  10. #COLORES
  11. red=$(tput setaf 1)
  12. gren=$(tput setaf 2)
  13. yellow=$(tput setaf 3)
  14. SCPdir="/etc/VPS-MX" && [[ ! -d ${SCPdir} ]] && exit 1
  15. SCPusr="${SCPdir}/controlador"
  16. SCPfrm="${SCPdir}/herramientas"
  17. SCPinst="${SCPdir}/protocolos"
  18. SCPidioma="${SCPdir}/idioma"
  19. #PROCESSADOR
  20. _core=$(printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)")
  21. _usop=$(top -bn1 | sed -rn '3s/[^0-9]* ([0-9\.]+) .*/\1/p;4s/.*, ([0-9]+) .*/\1/p' | tr '\n' ' ')
  22. #SISTEMA-USO DA CPU-MEMORIA RAM
  23. ram1=$(free -h | grep -i mem | awk {'print $2'})
  24. ram2=$(free -h | grep -i mem | awk {'print $4'})
  25. ram3=$(free -h | grep -i mem | awk {'print $3'})
  26. _ram=$(printf ' %-9s' "$(free -h | grep -i mem | awk {'print $2'})")
  27. _usor=$(printf '%-8s' "$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }')")
  28. dirapache="/usr/local/lib/ubuntn/apache/ver" && [[ ! -d ${dirapache} ]] && exit
  29. if [[ -e /etc/bash.bashrc-bakup ]]; then
  30. AutoRun="\033[1;32m[ON]"
  31. elif [[ -e /etc/bash.bashrc ]]; then
  32. AutoRun="\033[1;31m[OFF]"
  33. fi
  34. # Funcoes Globais
  35. msg() {
  36. #ACTULIZADOR
  37. [[ ! -e /etc/versin_script ]] && echo 1 >/etc/versin_script
  38. v11=$(cat /etc/versin_script_new)
  39. v22=$(cat /etc/versin_script)
  40. [[ $v11 = $v22 ]] && vesaoSCT="\033[1;37mVersion\033[1;32m $v22 \033[1;31m]" || vesaoSCT="\033[1;31m($v22)\033[1;97m→\033[1;32m($v11)\033[1;31m ]"
  41. local colors="/etc/VPS-MX/colors"
  42. if [[ ! -e $colors ]]; then
  43. COLOR[0]='\033[1;37m' #BRAN='\033[1;37m'
  44. COLOR[1]='\e[31m' #VERMELHO='\e[31m'
  45. COLOR[2]='\e[32m' #VERDE='\e[32m'
  46. COLOR[3]='\e[33m' #AMARELO='\e[33m'
  47. COLOR[4]='\e[34m' #AZUL='\e[34m'
  48. COLOR[5]='\e[91m' #MAGENTA='\e[35m'
  49. COLOR[6]='\033[1;97m' #MAG='\033[1;36m'
  50. else
  51. local COL=0
  52. for number in $(cat $colors); do
  53. case $number in
  54. 1) COLOR[$COL]='\033[1;37m' ;;
  55. 2) COLOR[$COL]='\e[31m' ;;
  56. 3) COLOR[$COL]='\e[32m' ;;
  57. 4) COLOR[$COL]='\e[33m' ;;
  58. 5) COLOR[$COL]='\e[34m' ;;
  59. 6) COLOR[$COL]='\e[35m' ;;
  60. 7) COLOR[$COL]='\033[1;36m' ;;
  61. esac
  62. let COL++
  63. done
  64. fi
  65. NEGRITO='\e[1m'
  66. SEMCOR='\e[0m'
  67. case $1 in
  68. -ne) cor="${COLOR[1]}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}" ;;
  69. -ama) cor="${COLOR[3]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  70. -verm) cor="${COLOR[3]}${NEGRITO}[!] ${COLOR[1]}" && echo -e "${cor}${2}${SEMCOR}" ;;
  71. -verm2) cor="${COLOR[1]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  72. -azu) cor="${COLOR[6]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  73. -verd) cor="${COLOR[2]}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}" ;;
  74. -bra) cor="${COLOR[0]}${SEMCOR}" && echo -e "${cor}${2}${SEMCOR}" ;;
  75. "-bar2" | "-bar") cor="${COLOR[1]}————————————————————————————————————————————————————" && echo -e "${SEMCOR}${cor}${SEMCOR}" ;;
  76. -tit) echo -e "\e[97m \033[1;41m| #-#-► 🐲 SCRIPT VPS•MX ◄-#-# | \033[1;49m\033[1;49m \033[1;31m[ \033[1;32m $vesaoSCT " && echo -e "${SEMCOR}${cor}${SEMCOR}" ;;
  77. esac
  78. }
  79. canbio_color() {
  80. clear
  81. msg -bar2
  82. msg -tit
  83. msg -ama " CONTROLADOR DE COLORES DEL SCRIP VPS-MX"
  84. msg -bar2
  85. msg -ama "$(fun_trans "Selecione 7 cores"): "
  86. echo -e '\033[1;37m [1] ###\033[0m'
  87. echo -e '\e[31m [2] ###\033[0m'
  88. echo -e '\e[32m [3] ###\033[0m'
  89. echo -e '\e[33m [4] ###\033[0m'
  90. echo -e '\e[34m [5] ###\033[0m'
  91. echo -e '\e[35m [6] ###\033[0m'
  92. echo -e '\033[1;36m [7] ###\033[0m'
  93. msg -bar2
  94. for number in $(echo {1..7}); do
  95. msg -ne "$(fun_trans "Digite un Color") [$number]: " && read corselect
  96. [[ $corselect != @([1-7]) ]] && corselect=1
  97. cores+="$corselect "
  98. corselect=0
  99. done
  100. echo "$cores" >/etc/VPS-MX/colors
  101. msg -bar2
  102. }
  103. fun_trans() {
  104. local texto
  105. local retorno
  106. declare -A texto
  107. SCPidioma="${SCPdir}/idioma"
  108. [[ ! -e ${SCPidioma} ]] && touch ${SCPidioma}
  109. local LINGUAGE=$(cat ${SCPidioma})
  110. [[ -z $LINGUAGE ]] && LINGUAGE=es
  111. [[ $LINGUAGE = "es" ]] && echo "$@" && return
  112. [[ ! -e /usr/bin/trans ]] && wget -O /usr/bin/trans https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/Otros/trans &>/dev/null
  113. [[ ! -e /etc/VPS-MX/texto-mx ]] && touch /etc/VPS-MX/texto-mx
  114. source /etc/VPS-MX/texto-mx
  115. if [[ -z "$(echo ${texto[$@]})" ]]; then
  116. #ENGINES=(aspell google deepl bing spell hunspell apertium yandex)
  117. #NUM="$(($RANDOM%${#ENGINES[@]}))"
  118. retorno="$(source trans -e bing -b es:${LINGUAGE} "$@" | sed -e 's/[^a-z0-9 -]//ig' 2>/dev/null)"
  119. echo "texto[$@]='$retorno'" >>/etc/VPS-MX/texto-mx
  120. echo "$retorno"
  121. else
  122. echo "${texto[$@]}"
  123. fi
  124. }
  125. function_verify() {
  126. v1=$(curl -sSL "https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/Version")
  127. echo "$v1" >/etc/versin_script
  128. }
  129. atualiza_fun() {
  130. clear && clear
  131. echo -e "\033[1;93m SEGURO DE ACTULIZAR VPS-MX"
  132. read -t 60 -n 1 -rsp $'\033[1;39m << Presiona enter para Continuar >>\n'
  133. apt update
  134. apt upgrade -y
  135. install_vps_mx_85_oficial ;;
  136. }
  137. funcao_idioma() {
  138. tput cuu1 && tput dl1
  139. msg -bar2
  140. declare -A idioma=([1]="en English" [2]="fr Franch" [3]="de German" [4]="it Italian" [5]="pl Polish" [6]="pt Portuguese" [7]="es Spanish" [8]="tr Turkish")
  141. for ((i = 1; i <= 12; i++)); do
  142. valor1="$(echo ${idioma[$i]} | cut -d' ' -f2)"
  143. [[ -z $valor1 ]] && break
  144. valor1="\033[1;32m[$i] > \033[1;33m$valor1"
  145. while [[ ${#valor1} -lt 37 ]]; do
  146. valor1=$valor1" "
  147. done
  148. echo -ne "$valor1"
  149. let i++
  150. valor2="$(echo ${idioma[$i]} | cut -d' ' -f2)"
  151. [[ -z $valor2 ]] && {
  152. echo -e " "
  153. break
  154. }
  155. valor2="\033[1;32m[$i] > \033[1;33m$valor2"
  156. while [[ ${#valor2} -lt 37 ]]; do
  157. valor2=$valor2" "
  158. done
  159. echo -ne "$valor2"
  160. let i++
  161. valor3="$(echo ${idioma[$i]} | cut -d' ' -f2)"
  162. [[ -z $valor3 ]] && {
  163. echo -e " "
  164. break
  165. }
  166. valor3="\033[1;32m[$i] > \033[1;33m$valor3"
  167. while [[ ${#valor3} -lt 37 ]]; do
  168. valor3=$valor3" "
  169. done
  170. echo -e "$valor3"
  171. done
  172. msg -bar2
  173. unset selection
  174. while [[ ${selection} != @([1-8]) ]]; do
  175. echo -ne "\033[1;37m$(fun_trans " ► Selecione una Opcion"): " && read selection
  176. tput cuu1 && tput dl1
  177. done
  178. [[ -e /etc/VPS-MX/texto-mx ]] && rm /etc/VPS-MX/texto-mx
  179. echo "$(echo ${idioma[$selection]} | cut -d' ' -f1)" >${SCPidioma}
  180. }
  181. mine_port() {
  182. clear
  183. clear
  184. msg -bar
  185. msg -tit
  186. echo -e "\033[1;93m INFORMACION DEL SISTEMA Y PUERTOS ACTIVOS"
  187. msg -bar2
  188. echo -e "\033[1;31m PROCESADOR: \033[1;37mNUCLEOS: \033[1;32m$_core \033[1;37mUSO DE CPU: \033[1;32m$_usop"
  189. echo -e "\033[1;31m LA MEMORIA RAM SE ENCUENTRA AL: \033[1;32m$_usor"
  190. echo -e "\033[1;31m DETALLE RAM: \033[1;37mTOTAL: \033[1;32m$ram1 \033[1;37mUSADO: \033[1;32m$ram3 \033[1;37mLIBRE: \033[1;32m$ram2"
  191. msg -ne " SO: " && echo -ne "\033[1;37m$(os_system) "
  192. msg -ne " IP: " && echo -e "\033[1;37m$(meu_ip)"
  193. msg -bar2
  194. local portasVAR=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" | grep -v "COMMAND" | grep "LISTEN")
  195. local NOREPEAT
  196. local reQ
  197. local Port
  198. while read port; do
  199. reQ=$(echo ${port} | awk '{print $1}')
  200. Port=$(echo {$port} | awk '{print $9}' | awk -F ":" '{print $2}')
  201. [[ $(echo -e $NOREPEAT | grep -w "$Port") ]] && continue
  202. NOREPEAT+="$Port\n"
  203. case ${reQ} in
  204. squid | squid3)
  205. [[ -z $SQD ]] && local SQD="\033[1;31m SQUID: \033[1;32m"
  206. SQD+="$Port "
  207. ;;
  208. apache | apache2)
  209. [[ -z $APC ]] && local APC="\033[1;31m APACHE: \033[1;32m"
  210. APC+="$Port "
  211. ;;
  212. ssh | sshd)
  213. [[ -z $SSH ]] && local SSH="\033[1;31m SSH: \033[1;32m"
  214. SSH+="$Port "
  215. ;;
  216. dropbear)
  217. [[ -z $DPB ]] && local DPB="\033[1;31m DROPBEAR: \033[1;32m"
  218. DPB+="$Port "
  219. ;;
  220. ssserver | ss-server)
  221. [[ -z $SSV ]] && local SSV="\033[1;31m SHADOWSOCKS: \033[1;32m"
  222. SSV+="$Port "
  223. ;;
  224. openvpn)
  225. [[ -z $OVPN ]] && local OVPN="\033[1;31m OPENVPN-TCP: \033[1;32m"
  226. OVPN+="$Port "
  227. ;;
  228. stunnel4 | stunnel)
  229. [[ -z $SSL ]] && local SSL="\033[1;31m SSL: \033[1;32m"
  230. SSL+="$Port "
  231. ;;
  232. python | python3)
  233. [[ -z $PY3 ]] && local PY3="\033[1;31m SOCKS/PYTHON: \033[1;32m"
  234. PY3+="$Port "
  235. ;;
  236. v2ray)
  237. [[ -z $V2R ]] && local V2R="\033[1;31m V2RAY: \033[1;32m"
  238. V2R+="$Port "
  239. ;;
  240. badvpn-ud)
  241. [[ -z $BAD ]] && local BAD="\033[1;31m BADVPN: \033[1;32m"
  242. BAD+="$Port "
  243. ;;
  244. psiphon)
  245. [[ -z $PSI ]] && local PSI="\033[1;31m Psiphon: \033[1;32m"
  246. PSI+="$Port "
  247. ;;
  248. esac
  249. done <<<"${portasVAR}"
  250. #UDP
  251. local portasVAR=$(lsof -V -i -P -n | grep -v "ESTABLISHED" | grep -v "COMMAND")
  252. local NOREPEAT
  253. local reQ
  254. local Port
  255. while read port; do
  256. reQ=$(echo ${port} | awk '{print $1}')
  257. Port=$(echo ${port} | awk '{print $9}' | awk -F ":" '{print $2}')
  258. [[ $(echo -e $NOREPEAT | grep -w "$Port") ]] && continue
  259. NOREPEAT+="$Port\n"
  260. case ${reQ} in
  261. openvpn)
  262. [[ -z $OVPN ]] && local OVPN="\033[0;36m OPENVPN-UDP: \033[1;32m"
  263. OVPN+="$Port "
  264. ;;
  265. esac
  266. done <<<"${portasVAR}"
  267. [[ ! -z $SSH ]] && echo -e $SSH
  268. [[ ! -z $SSL ]] && echo -e $SSL
  269. [[ ! -z $DPB ]] && echo -e $DPB
  270. [[ ! -z $SQD ]] && echo -e $SQD
  271. [[ ! -z $PY3 ]] && echo -e $PY3
  272. [[ ! -z $SSV ]] && echo -e $SSV
  273. [[ ! -z $V2R ]] && echo -e $V2R
  274. [[ ! -z $APC ]] && echo -e $APC
  275. [[ ! -z $OVPN ]] && echo -e $OVPN
  276. [[ ! -z $BAD ]] && echo -e $BAD
  277. [[ ! -z $PSI ]] && echo -e $PSI
  278. msg -bar2
  279. }
  280. ofus() {
  281. unset txtofus
  282. number=$(expr length $1)
  283. for ((i = 1; i < $number + 1; i++)); do
  284. txt[$i]=$(echo "$1" | cut -b $i)
  285. case ${txt[$i]} in
  286. ".") txt[$i]="v" ;;
  287. "v") txt[$i]="." ;;
  288. "1") txt[$i]="@" ;;
  289. "@") txt[$i]="1" ;;
  290. "2") txt[$i]="?" ;;
  291. "?") txt[$i]="2" ;;
  292. "4") txt[$i]="p" ;;
  293. "p") txt[$i]="4" ;;
  294. "-") txt[$i]="K" ;;
  295. "K") txt[$i]="-" ;;
  296. esac
  297. txtofus+="${txt[$i]}"
  298. done
  299. echo "$txtofus" | rev
  300. }
  301. limpar_caches() {
  302. (
  303. VE="\033[1;33m" && MA="\033[1;31m" && DE="\033[1;32m"
  304. while [[ ! -e /tmp/abc ]]; do
  305. A+="#"
  306. echo -e "${VE}[${MA}${A}${VE}]" >&2
  307. sleep 0.3s
  308. tput cuu1 && tput dl1
  309. done
  310. echo -e "${VE}[${MA}${A}${VE}] - ${DE}[100%]" >&2
  311. rm /tmp/abc
  312. ) &
  313. echo 3 >/proc/sys/vm/drop_caches &>/dev/null
  314. sleep 1s
  315. sysctl -w vm.drop_caches=3 &>/dev/null
  316. apt-get autoclean -y &>/dev/null
  317. sleep 1s
  318. apt-get clean -y &>/dev/null
  319. rm /tmp/* &>/dev/null
  320. touch /tmp/abc
  321. sleep 0.5s
  322. msg -bar
  323. msg -ama "$(fun_trans "PROCESO CONCLUIDO")"
  324. msg -bar
  325. }
  326. fun_autorun() {
  327. if [[ -e /etc/bash.bashrc-bakup ]]; then
  328. mv -f /etc/bash.bashrc-bakup /etc/bash.bashrc
  329. cat /etc/bash.bashrc | grep -v "/etc/VPS-MX/menu" >/tmp/bash
  330. mv -f /tmp/bash /etc/bash.bashrc
  331. msg -ama "$(fun_trans "REMOVIDO CON EXITO")"
  332. msg -bar
  333. elif [[ -e /etc/bash.bashrc ]]; then
  334. cat /etc/bash.bashrc | grep -v /bin/menu >/etc/bash.bashrc.2
  335. echo '/etc/VPS-MX/menu' >>/etc/bash.bashrc.2
  336. cp /etc/bash.bashrc /etc/bash.bashrc-bakup
  337. mv -f /etc/bash.bashrc.2 /etc/bash.bashrc
  338. msg -ama "$(fun_trans "AUTO INICIALIZAR AGREGADO")"
  339. msg -bar
  340. fi
  341. }
  342. fun_bar() {
  343. comando="$1"
  344. _=$(
  345. $comando >/dev/null 2>&1
  346. ) &
  347. >/dev/null
  348. pid=$!
  349. while [[ -d /proc/$pid ]]; do
  350. echo -ne " \033[1;33m["
  351. for ((i = 0; i < 10; i++)); do
  352. echo -ne "\033[1;31m##"
  353. sleep 0.2
  354. done
  355. echo -ne "\033[1;33m]"
  356. sleep 1s
  357. echo
  358. tput cuu1
  359. tput dl1
  360. done
  361. echo -e " \033[1;33m[\033[1;31m####################\033[1;33m] - \033[1;32m100%\033[0m"
  362. sleep 1s
  363. }
  364. meu_ip() {
  365. if [[ -e /etc/VPS-MX/MEUIPvps ]]; then
  366. echo "$(cat /etc/VPS-MX/MEUIPvps)"
  367. else
  368. MEU_IP=$(wget -4 -qO- ifconfig.me/ip)
  369. echo "$MEU_IP" >/etc/VPS-MX/MEUIPvps
  370. fi
  371. }
  372. fun_ip() {
  373. if [[ -e /etc/VPS-MX/MEUIPvps ]]; then
  374. IP="$(cat /etc/VPS-MX/MEUIPvps)"
  375. else
  376. MEU_IP=$(wget -4 -qO- ifconfig.me/ip)
  377. echo "$MEU_IP" >/etc/VPS-MX/MEUIPvps
  378. fi
  379. }
  380. fun_eth() {
  381. eth=$(ifconfig | grep -v inet6 | grep -v lo | grep -v 127.0.0.1 | grep "encap:Ethernet" | awk '{print $1}')
  382. [[ $eth != "" ]] && {
  383. msg -bar
  384. msg -ama " $(fun_trans "Aplicar el sistema para mejorar los paquetes SSH?")"
  385. msg -ama " $(fun_trans "Opciones para usuarios avanzados")"
  386. msg -bar
  387. read -p " [S/N]: " -e -i n sshsn
  388. [[ "$sshsn" = @(s|S|y|Y) ]] && {
  389. echo -e "${cor[1]} $(fun_trans "Correccion de problemas de paquetes en SSH ...")"
  390. echo -e " $(fun_trans "¿Cual es la tasa RX?")"
  391. echo -ne "[ 1 - 999999999 ]: "
  392. read rx
  393. [[ "$rx" = "" ]] && rx="999999999"
  394. echo -e " $(fun_trans "¿Cual es la tasa TX?")"
  395. echo -ne "[ 1 - 999999999 ]: "
  396. read tx
  397. [[ "$tx" = "" ]] && tx="999999999"
  398. apt-get install ethtool -y >/dev/null 2>&1
  399. ethtool -G $eth rx $rx tx $tx >/dev/null 2>&1
  400. }
  401. msg -bar
  402. }
  403. }
  404. os_system() {
  405. system=$(echo $(cat -n /etc/issue | grep 1 | cut -d' ' -f6,7,8 | sed 's/1//' | sed 's/ //'))
  406. echo $system | awk '{print $1, $2}'
  407. }
  408. remove_script() {
  409. clear
  410. clear
  411. msg -bar
  412. msg -tit
  413. msg -ama " ¿ DESEA DESINSTALAR SCRIPT ?"
  414. msg -bar
  415. echo -e " Esto borrara todos los archivos del scrip VPS_MX"
  416. msg -bar
  417. while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
  418. read -p " [S/N]: " yesno
  419. tput cuu1 && tput dl1
  420. done
  421. if [[ ${yesno} = @(s|S|y|Y) ]]; then
  422. rm -rf ${SCPdir} &>/dev/null
  423. rm -rf ${SCPusr} &>/dev/null
  424. rm -rf ${SCPinst} &>/dev/null
  425. [[ -e /bin/VPS-MX ]] && rm /bin/VPS-MX
  426. [[ -e /usr/bin/VPS-MX ]] && rm /usr/bin/VPS-MX
  427. [[ -e /bin/menu ]] && rm /bin/menu
  428. [[ -e /usr/bin/menu ]] && rm /usr/bin/menu
  429. cd $HOME
  430. fi
  431. sudo apt-get --purge remove squid -y >/dev/null 2>&1
  432. sudo apt-get --purge remove stunnel4 -y >/dev/null 2>&1
  433. sudo apt-get --purge remove dropbear -y >/dev/null 2>&1
  434. }
  435. systen_info() {
  436. clear
  437. clear
  438. msg -bar
  439. msg -tit
  440. msg -ama "$(fun_trans " DETALLES DEL SISTEMA")"
  441. null="\033[1;31m"
  442. msg -bar
  443. if [ ! /proc/cpuinfo ]; then
  444. msg -verm "$(fun_trans "Sistema No Soportado")" && msg -bar
  445. return 1
  446. fi
  447. if [ ! /etc/issue.net ]; then
  448. msg -verm "$(fun_trans "Sistema No Soportado")" && msg -bar
  449. return 1
  450. fi
  451. if [ ! /proc/meminfo ]; then
  452. msg -verm "$(fun_trans "Sistema No Soportado")" && msg -bar
  453. return 1
  454. fi
  455. totalram=$(free | grep Mem | awk '{print $2}')
  456. usedram=$(free | grep Mem | awk '{print $3}')
  457. freeram=$(free | grep Mem | awk '{print $4}')
  458. swapram=$(cat /proc/meminfo | grep SwapTotal | awk '{print $2}')
  459. system=$(cat /etc/issue.net)
  460. clock=$(lscpu | grep "CPU MHz" | awk '{print $3}')
  461. based=$(cat /etc/*release | grep ID_LIKE | awk -F "=" '{print $2}')
  462. processor=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}')
  463. cpus=$(cat /proc/cpuinfo | grep processor | wc -l)
  464. [[ "$system" ]] && msg -ama "$(fun_trans "Sistema"): ${null}$system" || msg -ama "$(fun_trans "Sistema"): ${null}???"
  465. [[ "$based" ]] && msg -ama "$(fun_trans "Base"): ${null}$based" || msg -ama "$(fun_trans "Base"): ${null}???"
  466. [[ "$processor" ]] && msg -ama "$(fun_trans "Procesador"): ${null}$processor x$cpus" || msg -ama "$(fun_trans "Procesador"): ${null}???"
  467. [[ "$clock" ]] && msg -ama "$(fun_trans "Frecuencia de Operacion"): ${null}$clock MHz" || msg -ama "$(fun_trans "Frecuencia de Operacion"): ${null}???"
  468. msg -ama "$(fun_trans "Uso del Procesador"): ${null}$(ps aux | awk 'BEGIN { sum = 0 } { sum += sprintf("%f",$3) }; END { printf " " "%.2f" "%%", sum}')"
  469. msg -ama "$(fun_trans "Memoria Virtual Total"): ${null}$(($totalram / 1024))"
  470. msg -ama "$(fun_trans "Memoria Virtual En Uso"): ${null}$(($usedram / 1024))"
  471. msg -ama "$(fun_trans "Memoria Virtual Libre"): ${null}$(($freeram / 1024))"
  472. msg -ama "$(fun_trans "Memoria Virtual Swap"): ${null}$(($swapram / 1024))MB"
  473. msg -ama "$(fun_trans "Tempo Online"): ${null}$(uptime)"
  474. msg -ama "$(fun_trans "Nombre De La Maquina"): ${null}$(hostname)"
  475. msg -ama "$(fun_trans "IP De La Maquina"): ${null}$(ip addr | grep inet | grep -v inet6 | grep -v "host lo" | awk '{print $2}' | awk -F "/" '{print $1}')"
  476. msg -ama "$(fun_trans "Version de Kernel"): ${null}$(uname -r)"
  477. msg -ama "$(fun_trans "Arquitectura"): ${null}$(uname -m)"
  478. msg -bar
  479. return 0
  480. }
  481. float_data() {
  482. valuest=$(ps ax | grep /etc/shadowsocks-r | grep -v grep)
  483. [[ $valuest != "" ]] && valuest="\033[1;32m[ON]" || valuest="\033[1;31m[OFF]"
  484. ofc="\033[0m${gren}(#OFICIAL)"
  485. dev="\033[0m${yellow}(#BETA)"
  486. dev2="\033[0m${red}(#PREMIUM)"
  487. case $1 in
  488. "ADMbot-VEN.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "=>>") " && msg -azu "BOT-USA1 VENTAS $dev2" ;;
  489. "openssh.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "OPENSSH $(pid_inst sshd)" ;;
  490. "squid.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "SQUID ---------------------------- $(pid_inst squid)" ;;
  491. "dropbear.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "DROPBEAR ------------------------- $(pid_inst dropbear)" ;;
  492. "openvpn.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "OPENVPN -------------------------- $(pid_inst openvpn)" ;;
  493. "ssl.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "SSL ------------------------------ $(pid_inst stunnel4)" ;;
  494. "shadowsocks.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "SHADOWSOCKS-NORMAL --------------- $(pid_inst ssserver)" ;;
  495. "Shadowsocks-libev.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "SHADOWSOCKS-LIBEV ---------------- $(pid_inst ss-server)" ;;
  496. "Shadowsocks-R.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "SHADOWSOCKS-R -------------------- ${valuest}" ;;
  497. "sockspy.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "SOCKS PYTHON --------------------- $(pid_inst python)" ;;
  498. "v2ray.sh") echo -ne "$(msg -verd "[$2]") $(msg -verm2 "==>>") " && msg -azu "V2RAY ---------------------------- $(pid_inst v2ray)" ;;
  499. "budp.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "BADVPN-(UDP:7300) ---------------- $(pid_inst badvpn)" ;;
  500. "psiphon.sh") echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "PSIPHONE ---------------------------- $(pid_inst psiphon)" ;;
  501. "psiphon.sh") return 1 ;;
  502. "python.py") return 1 ;;
  503. "paysnd.sh") return 1 ;;
  504. "ultrahost") return 1 ;;
  505. "speed.py") return 1 ;;
  506. "speedtest_v1") return 1 ;;
  507. "apacheon.sh") return 1 ;;
  508. "ports.sh") return 1 ;;
  509. "dns-netflix.sh") return 1 ;;
  510. "tcp.sh") return 1 ;;
  511. "gestor.sh") return 1 ;;
  512. "squidpass.sh") return 1 ;;
  513. "fai2ban.sh") return 1 ;;
  514. "blockBT.sh") return 1 ;;
  515. "utils.sh") return 1 ;;
  516. "ADMbot.sh") return 1 ;;
  517. "C-SSR.sh") return 1 ;;
  518. "Crear-Demo.sh") return 1 ;;
  519. "pwd.pwd") return 1 ;;
  520. "PDirect.py") return 1 ;;
  521. "PGet.py") return 1 ;;
  522. "POpen.py") return 1 ;;
  523. "PPriv.py") return 1 ;;
  524. "PPub.py") return 1 ;;
  525. "SSH20.log") return 1 ;;
  526. *) echo -ne "$(msg -verd " [$2]") $(msg -verm2 "==>>") " && msg -azu "${1^^} \033[1;33m No Hay Una Descripcion !" ;;
  527. esac
  528. }
  529. ferramentas_fun() {
  530. clear
  531. clear
  532. tput cuu1 && tput dl1
  533. msg -bar2
  534. msg -tit
  535. msg -ama " MENU DE HERRAMIENTAS"
  536. msg -bar2
  537. local Numb=1
  538. for arqs in $(ls ${SCPfrm}); do
  539. float_data "$arqs" "$Numb" && {
  540. script[$Numb]="$arqs"
  541. let Numb++
  542. }
  543. done
  544. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "ADMINISTAR MEDIENTE BOT DE TELEGAM $ofc"
  545. script[$Numb]="ADMbot.sh"
  546. let Numb++
  547. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "NOTIFICACIONES NOTY-BOT $ofc"
  548. script[$Numb]="NotyBOT.py"
  549. let Numb++
  550. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "COMPARTIR ARCHIVO ONLINE $ofc"
  551. script[$Numb]="apacheon.sh"
  552. echo -e "\033[1;93m-----------------------SEGURIDAD---------------------"
  553. #PROTECION
  554. let Numb++
  555. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "FIREWALL PARA VPS VPS•MX $ofc"
  556. script[$Numb]="blockBT.sh"
  557. let Numb++
  558. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "FAIL2BAN PROTECION $ofc"
  559. script[$Numb]="fai2ban.sh"
  560. let Numb++
  561. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "AUTENTIFICAR PROXY SQUID $ofc"
  562. script[$Numb]="squidpass.sh"
  563. echo -e "\033[1;93m--------------------AJUSTES INTERNOS-----------------"
  564. #AJUSTES INTERNOS
  565. let Numb++
  566. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "TCP ACELERACION (BBR/PLUS) $dev"
  567. script[$Numb]="tcp.sh"
  568. let Numb++
  569. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "AGREGAR DNS NETFLIX By @USA1_BOT $ofc"
  570. script[$Numb]="dns-netflix.sh"
  571. let Numb++
  572. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "ADMINISTRAR PUERTOS ACTIVOS $ofc"
  573. script[$Numb]="ports.sh"
  574. let Numb++
  575. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "Pass Root/Add root/Horario/etc.. $ofc"
  576. script[$Numb]="gestor.sh"
  577. #OPTIMIZADORES
  578. echo -e "\033[1;93m---------------------OPTIMIZADORES-------------------"
  579. let Numb++
  580. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "Limpiar/Cache/Ram/Librerias/etc.. $ofc"
  581. script[$Numb]="utils.sh"
  582. let Numb++
  583. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "DETALLES DE SISTEMA $ofc"
  584. script[$Numb]="systeminf"
  585. #EXTRAS
  586. echo -e "\033[1;93m-------------------------EXTRAS----------------------"
  587. let Numb++
  588. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "PAYLOAD FUERZA BRUTA $ofc"
  589. script[$Numb]="paysnd.sh"
  590. let Numb++
  591. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "SCANNER DE SUBDOMINIO $ofc"
  592. script[$Numb]="ultrahost"
  593. let Numb++
  594. echo -ne "$(msg -verd "[$Numb]") $(msg -verm2 ">") " && msg -azu "PRUEBA DE VELOCIDAD $ofc"
  595. script[$Numb]="speed.py"
  596. echo -ne "$(msg -bar2)\n$(msg -verd "[0]") $(msg -verm2 ">") " && msg -bra "\e[97m\033[1;41m VOLVER \033[1;37m"
  597. script[0]="voltar"
  598. msg -bar2
  599. selection=$(selection_fun $Numb)
  600. [[ -e "${SCPfrm}/${script[$selection]}" ]] && {
  601. ${SCPfrm}/${script[$selection]}
  602. } || {
  603. case ${script[$selection]} in
  604. #"agregar")agregar_ferramenta;;
  605. #"remove")remove_ferramenta;;
  606. "limpar") limpar_caches ;;
  607. "systeminf") systen_info ;;
  608. *) return 0 ;;
  609. esac
  610. }
  611. }
  612. # Menu Instalaciones
  613. pid_inst() {
  614. [[ $1 = "" ]] && echo -e "\033[1;31m[OFF]" && return 0
  615. unset portas
  616. portas_var=$(lsof -V -i -P -n | grep -v "ESTABLISHED" | grep -v "COMMAND")
  617. i=0
  618. while read port; do
  619. var1=$(echo $port | awk '{print $1}') && var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
  620. [[ "$(echo -e ${portas[@]} | grep "$var1 $var2")" ]] || {
  621. portas[$i]="$var1 $var2\n"
  622. let i++
  623. }
  624. done <<<"$portas_var"
  625. [[ $(echo "${portas[@]}" | grep "$1") ]] && echo -e "\033[1;32m[ON]" || echo -e "\033[1;31m[OFF]"
  626. }
  627. menu_inst() {
  628. clear
  629. clear
  630. msg -bar
  631. msg -tit
  632. export -f fun_eth
  633. export -f fun_bar
  634. menuTXT=" \e[97m\033[1;41m VOLVER \033[1;37m"
  635. msg -ama " MENU DE PROTOCOLOS "
  636. msg -bar
  637. local Numb=1
  638. for arqs in $(ls ${SCPinst}); do
  639. float_data "$arqs" "$Numb" && {
  640. script[$Numb]="$arqs"
  641. let Numb++
  642. }
  643. done
  644. msg -bar
  645. echo -ne "$(msg -verd " [0]") $(msg -verm2 "==>>") " && msg -bra "$menuTXT"
  646. msg -bar
  647. script[0]="voltar"
  648. selection=999
  649. selection=$(selection_fun $Numb)
  650. [[ -e "${SCPinst}/${script[$selection]}" ]] && {
  651. ${SCPinst}/${script[$selection]}
  652. } || return 0
  653. }
  654. # MENU FLUTUANTE
  655. menu_func() {
  656. local options=${#@}
  657. local array
  658. for ((num = 1; num <= $options; num++)); do
  659. echo -ne " $(msg -verd "[$num]") $(msg -verm2 "=>>") "
  660. array=(${!num})
  661. case ${array[0]} in
  662. "-vd") msg -verd "\033[1;33m[!]\033[1;32m $(fun_trans "${array[@]:1}")" | sed ':a;N;$!ba;s/\n/ /g' ;;
  663. "-vm") msg -verm2 "\033[1;33m[!]\033[1;31m $(fun_trans "${array[@]:1}")" | sed ':a;N;$!ba;s/\n/ /g' ;;
  664. "-fi") msg -azu "$(fun_trans "${array[@]:2}") ${array[1]}" | sed ':a;N;$!ba;s/\n/ /g' ;;
  665. *) msg -azu "$(fun_trans "${array[@]}")" | sed ':a;N;$!ba;s/\n/ /g' ;;
  666. esac
  667. done
  668. }
  669. # SISTEMA DE SELECAO
  670. selection_fun() {
  671. local selection="null"
  672. local range
  673. for ((i = 0; i <= $1; i++)); do range[$i]="$i "; done
  674. while [[ ! $(echo ${range[*]} | grep -w "$selection") ]]; do
  675. echo -ne "\033[1;37m$(fun_trans " ► Selecione una Opcion"): " >&2
  676. read selection
  677. tput cuu1 >&2 && tput dl1 >&2
  678. done
  679. echo $selection
  680. }
  681. export -f msg
  682. export -f selection_fun
  683. export -f fun_trans
  684. export -f menu_func
  685. export -f meu_ip
  686. export -f fun_ip
  687. clear
  688. msg -bar
  689. msg -tit
  690. # echo -e "\033[1;31m[\033[1;32m $vesaoSCT\033[1;97m"
  691. # msg -bar
  692. title=$(echo -e "\033[1;96m$(cat ${SCPdir}/message.txt)")
  693. printf "%*s\n" $((($(echo -e "$title" | wc -c) + 55) / 2)) "$title"
  694. msg -bar
  695. echo -e " \033[1;37mIP: \033[1;93m$(meu_ip) \033[1;37mS.O: \033[1;96m$(os_system)"
  696. # echo -e "\033[1;37m % CPU: \033[1;32m$_usop \033[1;37mS.O: \033[1;96m$(os_system) \033[1;37m % RAM: \033[1;32m$_usor"
  697. monservi_fun() {
  698. clear
  699. clear
  700. monssh() {
  701. sed -i "57d" /bin/monitor.sh
  702. sed -i '57i EstadoServicio ssh' /bin/monitor.sh
  703. }
  704. mondropbear() {
  705. sed -i "59d" /bin/monitor.sh
  706. sed -i '59i EstadoServicio dropbear' /bin/monitor.sh
  707. }
  708. monssl() {
  709. sed -i "61d" /bin/monitor.sh
  710. sed -i '61i EstadoServicio stunnel4' /bin/monitor.sh
  711. }
  712. monsquid() {
  713. sed -i "63d" /bin/monitor.sh
  714. sed -i '63i [[ $(EstadoServicio squid) ]] && EstadoServicio squid3' /bin/monitor.sh
  715. }
  716. monapache() {
  717. sed -i "65d" /bin/monitor.sh
  718. sed -i '65i EstadoServicio apache2' /bin/monitor.sh
  719. }
  720. monv2ray() {
  721. sed -i "55d" /bin/monitor.sh
  722. sed -i '55i EstadoServicio v2ray' /bin/monitor.sh
  723. }
  724. msg -bar
  725. msg -tit
  726. echo -e "\033[1;32m MONITOR DE SERVICIONS PRINCIPALES"
  727. PIDVRF3="$(ps aux | grep "${SCPdir}/menu monitorservi" | grep -v grep | awk '{print $2}')"
  728. PIDVRF5="$(ps aux | grep "${SCPdir}/menu moni2" | grep -v grep | awk '{print $2}')"
  729. if [[ -z $PIDVRF3 ]]; then
  730. sed -i '5a\screen -dmS very3 /etc/VPS-MX/menu monitorservi' /bin/resetsshdrop
  731. msg -bar
  732. echo -e "\033[1;34m ¿Monitorear Protocolo SSH/SSHD?"
  733. msg -bar
  734. read -p " [ s | n ]: " monssh
  735. sed -i "57d" /bin/monitor.sh
  736. sed -i '57i #EstadoServicio ssh' /bin/monitor.sh
  737. [[ "$monssh" = "s" || "$monssh" = "S" ]] && monssh
  738. msg -bar
  739. echo -e "\033[1;34m ¿Monitorear Protocolo DROPBEAR?"
  740. msg -bar
  741. read -p " [ s | n ]: " mondropbear
  742. sed -i "59d" /bin/monitor.sh
  743. sed -i '59i #EstadoServicio dropbear' /bin/monitor.sh
  744. [[ "$mondropbear" = "s" || "$mondropbear" = "S" ]] && mondropbear
  745. msg -bar
  746. echo -e "\033[1;34m ¿Monitorear Protocolo SSL?"
  747. msg -bar
  748. read -p " [ s | n ]: " monssl
  749. sed -i "61d" /bin/monitor.sh
  750. sed -i '61i #EstadoServicio stunnel4' /bin/monitor.sh
  751. [[ "$monssl" = "s" || "$monssl" = "S" ]] && monssl
  752. msg -bar
  753. echo -e "\033[1;34m ¿Monitorear Protocolo SQUID?"
  754. msg -bar
  755. read -p " [ s | n ]: " monsquid
  756. sed -i "63d" /bin/monitor.sh
  757. sed -i '63i #[[ $(EstadoServicio squid) ]] && EstadoServicio squid3' /bin/monitor.sh
  758. [[ "$monsquid" = "s" || "$monsquid" = "S" ]] && monsquid
  759. msg -bar
  760. echo -e "\033[1;34m ¿Monitorear Protocolo APACHE?"
  761. msg -bar
  762. read -p " [ s | n ]: " monapache
  763. sed -i "65d" /bin/monitor.sh
  764. sed -i '65i #EstadoServicio apache2' /bin/monitor.sh
  765. [[ "$monapache" = "s" || "$monapache" = "S" ]] && monapache
  766. msg -bar
  767. echo -e "\033[1;34m ¿Monitorear Protocolo V2RAY?"
  768. msg -bar
  769. read -p " [ s | n ]: " monv2ray
  770. sed -i "55d" /bin/monitor.sh
  771. sed -i '55i #EstadoServicio v2ray' /bin/monitor.sh
  772. [[ "$monv2ray" = "s" || "$monv2ray" = "S" ]] && monv2ray
  773. #echo "screen -dmS very3 /etc/VPS-MX/menu monitorservi" >> /bin/resetsshdrop
  774. cd ${SCPdir}
  775. screen -dmS very3 ${SCPdir}/menu monitorservi
  776. screen -dmS monis2 ${SCPdir}/menu moni2
  777. else
  778. for pid in $(echo $PIDVRF3); do
  779. kill -9 $pid &>/dev/null
  780. sed -i "6d" /bin/resetsshdrop
  781. done
  782. for pid in $(echo $PIDVRF5); do
  783. kill -9 $pid &>/dev/null
  784. done
  785. fi
  786. msg -bar
  787. echo -e " Puedes Monitorear desde:\n \033[1;32m http://$(meu_ip):81/monitor.html"
  788. msg -bar
  789. [[ -z ${VERY3} ]] && monitorservi="\033[1;32m ACTIVADO " || monitorservi="\033[1;31m DESACTIVADO "
  790. echo -e " $monitorservi -- CON EXITO"
  791. msg -bar
  792. }
  793. monitor_auto() {
  794. while true; do
  795. monitor.sh 2>/dev/null
  796. sleep 120s
  797. done
  798. }
  799. if [[ "$1" = "monitorservi" ]]; then
  800. monitor_auto
  801. exit
  802. fi
  803. pid_kill() {
  804. [[ -z $1 ]] && refurn 1
  805. pids="$@"
  806. for pid in $(echo $pids); do
  807. kill -9 $pid &>/dev/null
  808. done
  809. }
  810. monitorport_fun() {
  811. while true; do
  812. pidproxy3=$(ps x | grep "PDirect.py" | grep -v "grep" | awk -F "pts" '{print $1}') && [[ ! -z $pidproxy3 ]] && pid_kill $pidproxy3
  813. pidpyssl=$(ps x | grep "python.py" | grep -v "grep" | awk -F "pts" '{print $1}') && [[ ! -z $pidpyssl ]] && pid_kill $pidpyssl
  814. sleep 6h
  815. done
  816. }
  817. if [[ "$1" = "moni2" ]]; then
  818. monitorport_fun
  819. exit
  820. fi
  821. SSHN="$(grep -c home /etc/passwd)"
  822. SSH2="$(echo ${SSHN} | bc)-2"
  823. echo "${SSH2}" | bc >/etc/VPS-MX/controlador/SSH20.log
  824. SSH3="$(less /etc/VPS-MX/controlador/SSH20.log)"
  825. SSH4="$(echo $SSH3)"
  826. user_info=$(cd /usr/local/shadowsocksr &>/dev/null && python mujson_mgr.py -l)
  827. user_total=$(echo "${user_info}" | wc -l)
  828. on="\033[1;92m[ON]" && off="\033[1;31m[OFF]"
  829. [[ $(ps x | grep badvpn | grep -v grep | awk '{print $1}') ]] && badvpn=$on || badvpn=$off
  830. echo -e "\033[1;97m SSH REG:\033[1;92m $SSH4 \033[1;97m SS-SSRR REG:\033[1;92m $user_total \033[1;97m BADVPN: $badvpn"
  831. VERY="$(ps aux | grep "${SCPusr}/usercodes verificar" | grep -v grep)"
  832. VERY2="$(ps aux | grep "${SCPusr}/usercodes desbloqueo" | grep -v grep)"
  833. VERY3="$(ps aux | grep "${SCPdir}/menu monitorservi" | grep -v grep)"
  834. limseg="$(less /etc/VPS-MX/controlador/tiemlim.log)"
  835. [[ -z ${VERY} ]] && verificar="\033[1;31m[OFF]" || verificar="\033[1;32m[ON]"
  836. [[ -z ${VERY2} ]] && desbloqueo="\033[1;31m[OFF]" || desbloqueo="\033[1;32m[ON]"
  837. [[ -z ${VERY3} ]] && monitorservi="\033[1;31m[OFF]" || monitorservi="\033[1;32m[ON]"
  838. [[ -e ${SCPdir}/USRonlines ]] && msg -bar && msg -ne "\033[1;97m LIMITADOR:\033[1;92m $verificar \033[1;97m DESBLOQUEO AUTOMATICO:\033[1;92m $desbloqueo\n \033[1;32mCONECTADOS: " && echo -ne "\033[1;97m$(cat ${SCPdir}/USRonlines) "
  839. [[ -e ${SCPdir}/USRexpired ]] && msg -ne " EXPIRADOS: " && echo -ne "\033[1;97m$(cat ${SCPdir}/USRexpired) " && msg -ne " \033[1;95m BLOQUEADOS: " && echo -e "\033[1;97m$(cat ${SCPdir}/USRbloqueados) \n\033[1;97m ACTULIZACION DE MONITOR CADA: \033[1;34m $limseg s"
  840. creditoss() {
  841. clear
  842. msg -bar
  843. msg -tit
  844. echo -ne " \033[1;93m CREDITOS Y REGISTRO DE CAMBIOS\n"
  845. msg -bar
  846. [[ -e ${SCPdir}/message.txt ]] && msg -bra " RESELLER AUTORIZADO: \n\033[1;96m $(cat ${SCPdir}/message.txt) "
  847. [[ -e ${SCPdir}/key.txt ]] && msg -bra " KEY DE REGISTRO:\n \033[1;93m $(cat ${SCPdir}/key.txt)"
  848. msg -bar
  849. echo -ne "\033[1;97m CAMBIOS DE LA VERSION 8.5.2\n"
  850. echo -ne " - Se acorrigieron algunas mejoras\n"
  851. echo -ne " - Compatible con Ubuntu's 14,16,18,20\n"
  852. echo -ne " (Server live's ext 0.4)\n"
  853. echo -ne " - Compatibilidad Ubuntu 20, Squid,Openvpn,Dropbear\n"
  854. echo -ne " - Cambio en el proceso del usercode\n"
  855. echo -ne " - Menus Mas limpios\n"
  856. echo -ne " - Se ajustaron menus con retorno\n"
  857. echo -ne " - Ejecusion mas rapida de Comandos\n"
  858. echo -ne " - Instalador mejorado retro Compatible \n"
  859. echo -ne " - Add v2ray, opcion de port y tls manual \n"
  860. echo -ne " - Se agregaron 2 comandos mas al BOT Gestor \n"
  861. echo -ne " (Bloquear y Desbloquear Usuarios, Como Ver Bloqueados)\n"
  862. echo -ne " + Auto Install Python para Install Inicial \n"
  863. echo -ne " + Selecionable Upgrade de S.O \n"
  864. echo -ne " + Cambio de pass root \n"
  865. echo -ne " + Se habilito el updater de menu \n"
  866. echo -ne " + Mas liviano y sencillo de actulizar\n"
  867. echo -ne " + Auto Reinicio Forzado (Actulizaciones de Ubuntu) \n"
  868. echo -ne " + Auto root Directo \n"
  869. echo -ne " + Error de IP Privada e IP Publica en menu \n"
  870. msg -bar
  871. }
  872. monhtop() {
  873. clear
  874. msg -bar
  875. msg -tit
  876. echo -ne " \033[1;93m MONITOR DE PROCESOS HTOP\n"
  877. msg -bar
  878. msg -bra " RECUERDA SALIR CON : \033[1;96m CTRL + C o FIN + F10 "
  879. [[ $(dpkg --get-selections | grep -w "htop" | head -1) ]] || apt-get install htop -y &>/dev/null
  880. msg -bar
  881. read -t 10 -n 1 -rsp $'\033[1;39m Preciona Enter Para continuar\n'
  882. clear
  883. sudo htop
  884. msg -bar
  885. msg -tit
  886. echo -ne " \033[1;93m MONITOR DE PROCESOS HTOP\n"
  887. msg -bar
  888. echo -e "\e[97m FIN DEL MONITOR"
  889. msg -bar
  890. }
  891. #VPS-MX 8.5 OFICIAL
  892. install_vps_mx_85_oficial() {
  893. clear && clear
  894. msgi -bar
  895. echo -ne "\033[1;97m Digite su slogan: \033[1;32m" && read slogan
  896. tput cuu1 && tput dl1
  897. echo -e "$slogan"
  898. msgi -bar
  899. clear && clear
  900. mkdir /etc/VPS-MX >/dev/null 2>&1
  901. cd /etc
  902. wget https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/VPS-MX.tar >/dev/null 2>&1
  903. tar -xvf VPS-MX.tar >/dev/null 2>&1
  904. chmod +x VPS-MX.tar >/dev/null 2>&1
  905. rm -rf VPS-MX.tar.xz
  906. cd
  907. chmod -R 755 /etc/VPS-MX
  908. rm -rf /etc/VPS-MX/MEUIPvps
  909. echo "/etc/VPS-MX/menu" >/usr/bin/menu && chmod +x /usr/bin/menu
  910. echo "/etc/VPS-MX/menu" >/usr/bin/VPSMX && chmod +x /usr/bin/VPSMX
  911. wget -O /etc/VPS-MX/setup_services.sh https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/Systemd/setup_services.sh
  912. bash /etc/VPS-MX/setup_services.sh
  913. echo "$slogan" >/etc/VPS-MX/message.txt
  914. [[ ! -d /usr/local/lib ]] && mkdir /usr/local/lib
  915. [[ ! -d /usr/local/lib/ubuntn ]] && mkdir /usr/local/lib/ubuntn
  916. [[ ! -d /usr/local/lib/ubuntn/apache ]] && mkdir /usr/local/lib/ubuntn/apache
  917. [[ ! -d /usr/local/lib/ubuntn/apache/ver ]] && mkdir /usr/local/lib/ubuntn/apache/ver
  918. [[ ! -d /usr/share ]] && mkdir /usr/share
  919. [[ ! -d /usr/share/mediaptre ]] && mkdir /usr/share/mediaptre
  920. [[ ! -d /usr/share/mediaptre/local ]] && mkdir /usr/share/mediaptre/local
  921. [[ ! -d /usr/share/mediaptre/local/log ]] && mkdir /usr/share/mediaptre/local/log
  922. [[ ! -d /usr/share/mediaptre/local/log/lognull ]] && mkdir /usr/share/mediaptre/local/log/lognull
  923. [[ ! -d /etc/VPS-MX/B-VPS-MXuser ]] && mkdir /etc/VPS-MX/B-VPS-MXuser
  924. [[ ! -d /usr/local/protec ]] && mkdir /usr/local/protec
  925. [[ ! -d /usr/local/protec/rip ]] && mkdir /usr/local/protec/rip
  926. [[ ! -d /etc/protecbin ]] && mkdir /etc/protecbin
  927. cd
  928. [[ ! -d /etc/VPS-MX/v2ray ]] && mkdir /etc/VPS-MX/v2ray
  929. [[ ! -d /etc/VPS-MX/Slow ]] && mkdir /etc/VPS-MX/Slow
  930. [[ ! -d /etc/VPS-MX/Slow/install ]] && mkdir /etc/VPS-MX/Slow/install
  931. [[ ! -d /etc/VPS-MX/Slow/Key ]] && mkdir /etc/VPS-MX/Slow/Key
  932. touch /usr/share/lognull &>/dev/null
  933. wget -O /bin/resetsshdrop https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/Otros/resetsshdrop &>/dev/null
  934. chmod +x /bin/resetsshdrop
  935. # 1. Limpiamos cualquier rastro previo de PasswordAuthentication
  936. grep -v "^PasswordAuthentication" /etc/ssh/sshd_config > /tmp/sshd_temp && mv /tmp/sshd_temp /etc/ssh/sshd_config
  937. # 2. Agregamos la configuración limpia al archivo REAL
  938. echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
  939. # 3. Imprimimos el mensaje de éxito EN LA TERMINAL (no en el archivo)
  940. echo -e "\e[1;92m >> INSTALACION COMPLETADA <<"
  941. # 4. Ejecutamos tu comando personalizado
  942. msgi -bar
  943. rm -rf /usr/local/lib/systemubu1 &>/dev/null
  944. rm -rf /etc/versin_script &>/dev/null
  945. v1=$(curl -sSL "https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/Otros/Version")
  946. echo "$v1" >/etc/versin_script
  947. wget -O /etc/versin_script_new https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/Otros/Version &>/dev/null
  948. echo '#!/bin/sh -e' >/etc/rc.local
  949. sudo chmod +x /etc/rc.local
  950. echo "sudo resetsshdrop" >>/etc/rc.local
  951. echo "sleep 2s" >>/etc/rc.local
  952. echo "exit 0" >>/etc/rc.local
  953. echo 'clear' >>.bashrc
  954. echo 'echo ""' >>.bashrc
  955. echo 'echo -e "\t\033[91m __ ______ ____ __ ____ __ " ' >>.bashrc
  956. echo 'echo -e "\t\033[91m \ \ / / _ \/ ___| | \/ \ \/ / " ' >>.bashrc
  957. echo 'echo -e "\t\033[91m \ \ / /| |_) \___ \ _____| |\/| |\ / " ' >>.bashrc
  958. echo 'echo -e "\t\033[91m \ V / | __/ ___) |_____| | | |/ \ " ' >>.bashrc
  959. echo 'echo -e "\t\033[91m \_/ |_| |____/ |_| |_/_/\_\ " ' >>.bashrc
  960. echo 'wget -O /etc/versin_script_new https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/VPS-MX-8.5-Final%20Oficial/Otros/Version &>/dev/null' >>.bashrc
  961. echo 'echo "" ' >>.bashrc
  962. echo 'mess1="$(less /etc/VPS-MX/message.txt)" ' >>.bashrc
  963. echo 'echo "" ' >>.bashrc
  964. echo 'echo -e "\t\033[92mRESELLER : $mess1 "' >>.bashrc
  965. echo 'echo -e "\t\e[1;33mVERSION: \e[1;31m$(cat /etc/versin_script_new)"' >>.bashrc
  966. echo 'echo "" ' >>.bashrc
  967. echo 'echo -e "\t\033[97mPARA MOSTAR PANEL BASH ESCRIBA: sudo VPSMX o menu "' >>.bashrc
  968. echo 'echo ""' >>.bashrc
  969. rm -rf /usr/bin/pytransform &>/dev/null
  970. rm -rf VPS-MX.sh
  971. rm -rf lista-arq
  972. service ssh restart &>/dev/null
  973. clear && clear
  974. msgi -bar
  975. echo -e "\e[1;92m >> ACTUAKIZACION COMPLETADA <<" && msgi -bar
  976. echo -e " COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  977. echo -e " \033[1;41m menu \033[0;37m" && msgi -bar
  978. cd /etc/ssh/
  979. rm /etc/ssh/sshd_config
  980. wget -qO /etc/ssh/sshd_config https://repo.yosoyhendrix.com/yosoyhendrix/Multi_Script/raw/main/Otros/sshd_config
  981. chmod 600 /etc/ssh/sshd_config
  982. chown root:root /etc/ssh/sshd_config
  983. for i in {5..0}; do echo -ne "\rReiniciando en $i... "; sleep 1; done; echo ""; reboot
  984. }
  985. msg -bar
  986. menu_func "ADMINISTRAR CUENTAS | SSH/SSL/DROPBEAR" "ADMINISTRAR CUENTAS | SS/SSRR" "ADMINISTRAR CUENTAS | V2RAY" "\033[1;100mINSTALADORES DE PROTOCOLOS" "PUERTOS ACTIVOS" "HERRAMIENTAS y EXTRAS" "CAMBIAR COLORES DEL PANEL" "MONITOR DE PROTOCOLOS --------> ${monitorservi}" " AUTO INICIAR SCRIPT ----------> $AutoRun "
  987. msg -bar
  988. echo -ne " $(msg -verd " [10]") $(msg -verm2 "=>>") \e[36m MONITOR DE PROCESOS DE SISTEMA CON HTOP \e[97m \n"
  989. msg -bar
  990. echo -ne " \e[93m [11] \e[97m $(msg -verm2 "=>>") $(msg -verd "ACTUALIZAR ") " && echo -ne "\e[93m [12] \e[97m $(msg -verm2 "=>>") " && msg -bra "\033[1;31m DESINSTALAR "
  991. msg -bar
  992. echo -ne "$(msg -verd " [13]") $(msg -verm2 "=>>") " && echo -ne "\033[1;97mCREDITOS" && echo -ne "$(msg -verd " [0]") $(msg -verm2 "=>>") " && msg -bra "\033[1;41m ❗️ SALIR DEL SCRIPT ❗️ "
  993. msg -bar
  994. selection=$(selection_fun 13)
  995. case ${selection} in
  996. 1) ${SCPusr}/usercodes "${idioma}" ;;
  997. 2) ${SCPinst}/C-SSR.sh ;;
  998. 3) ${SCPinst}/v2ray.sh ;;
  999. 4) menu_inst ;;
  1000. 5) mine_port ;;
  1001. 6) ferramentas_fun ;;
  1002. 7) canbio_color ;;
  1003. 8) monservi_fun ;;
  1004. 9) fun_autorun ;;
  1005. 10) monhtop ;;
  1006. 11) atualiza_fun ;;
  1007. 12) remove_script ;;
  1008. 13) creditoss ;;
  1009. 0) cd $HOME && exit 0 ;;
  1010. esac
  1011. msg -ne "Enter Para Continuar" && read enter
  1012. ${SCPdir}/menu