install.sh 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. #!/bin/bash
  2. # INSTALADO --- ACTULIZADO EL 12-01-2023 --By @Kalix1
  3. clear && clear
  4. colores="$(pwd)/colores"
  5. rm -rf ${colores}
  6. wget -O ${colores} "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/colores" &>/dev/null
  7. [[ ! -e ${colores} ]] && exit
  8. chmod +x ${colores} &>/dev/null
  9. source ${colores}
  10. CTRL_C() {
  11. rm -rf ${colores}
  12. rm -rf /root/LATAM
  13. exit
  14. }
  15. trap "CTRL_C" INT TERM EXIT
  16. #rm $(pwd)/$0 &>/dev/null
  17. #-- VERIFICAR ROOT
  18. if [ $(whoami) != 'root' ]; then
  19. echo ""
  20. echo -e "\e[1;31m NECESITAS SER USER ROOT PARA EJECUTAR EL SCRIPT \n\n\e[97m DIGITE: \e[1;32m sudo su\n"
  21. exit
  22. fi
  23. os_system() {
  24. system=$(cat -n /etc/issue | grep 1 | cut -d ' ' -f6,7,8 | sed 's/1//' | sed 's/ //')
  25. distro=$(echo "$system" | awk '{print $1}')
  26. case $distro in
  27. Debian) vercion=$(echo $system | awk '{print $3}' | cut -d '.' -f1) ;;
  28. Ubuntu) vercion=$(echo $system | awk '{print $2}' | cut -d '.' -f1,2) ;;
  29. esac
  30. }
  31. repo() {
  32. link="https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Source-List/$1.list"
  33. case $1 in
  34. 8 | 9 | 10 | 11 | 16.04 | 18.04 | 20.04 | 20.10 | 21.04 | 21.10 | 22.04) wget -O /etc/apt/sources.list ${link} &>/dev/null ;;
  35. esac
  36. }
  37. ## PRIMER PASO DE INSTALACION
  38. install_inicial() {
  39. clear && clear
  40. #--VERIFICAR IP MANUAL
  41. tu_ip() {
  42. echo ""
  43. echo -ne "\e[1;96m #Digite tu IP Publica (IPV4): \e[32m" && read IP
  44. val_ip() {
  45. local ip=$IP
  46. local stat=1
  47. if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
  48. OIFS=$IFS
  49. IFS='.'
  50. ip=($ip)
  51. IFS=$OIFS
  52. [[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
  53. stat=$?
  54. fi
  55. return $stat
  56. }
  57. if val_ip $IP; then
  58. echo "$IP" >/root/.ssh/authrized_key.reg
  59. else
  60. echo ""
  61. echo -e "\e[31mLa IP Digitada no es valida, Verifiquela"
  62. echo ""
  63. sleep 5s
  64. fun_ip
  65. fi
  66. }
  67. #CONFIGURAR SSH-ROOT PRINCIPAL AMAZON, GOOGLE
  68. pass_root() {
  69. wget -O /etc/ssh/sshd_config https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/sshd_config >/dev/null 2>&1
  70. chmod +rwx /etc/ssh/sshd_config
  71. service ssh restart
  72. msgi -bar
  73. echo -ne "\e[1;97m DIGITE NUEVA CONTRASEÑA: \e[1;31m" && read pass
  74. (
  75. echo $pass
  76. echo $pass
  77. ) | passwd root 2>/dev/null
  78. sleep 1s
  79. msgi -bar
  80. echo -e "\e[1;94m CONTRASEÑA AGREGADA O EDITADA CORECTAMENTE"
  81. echo -e "\e[1;97m TU CONTRASEÑA ROOT AHORA ES: \e[41m $pass \e[0;37m"
  82. }
  83. #-- VERIFICAR VERSION
  84. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/Vercion")
  85. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  86. v22=$(cat /etc/SCRIPT-LATAM/temp/version_instalacion)
  87. vesaoSCT="\e[1;31m [ \e[1;32m( $v22 )\e[1;97m\e[1;31m ]"
  88. #-- CONFIGURACION BASICA
  89. os_system
  90. repo "${vercion}"
  91. msgi -bar2
  92. echo -e " \e[5m\e[1;100m =====>> ►► MULTI SCRIPT ◄◄ <<===== \e[1;37m"
  93. msgi -bar2
  94. #-- VERIFICAR VERSION
  95. msgi -ama " PREPARANDO INSTALACION | VERSION: $vesaoSCT"
  96. ## PAQUETES-UBUNTU PRINCIPALES
  97. echo ""
  98. echo -e "\e[1;97m 🔎 IDENTIFICANDO SISTEMA OPERATIVO"
  99. echo -e "\e[1;32m | $distro $vercion |"
  100. echo ""
  101. echo -e "\e[1;97m ◽️ DESACTIVANDO PASS ALFANUMERICO "
  102. sed -i 's/.*pam_cracklib.so.*/password sufficient pam_unix.so sha512 shadow nullok try_first_pass #use_authtok/' /etc/pam.d/common-password >/dev/null 2>&1
  103. barra_intallb "service ssh restart > /dev/null 2>&1 "
  104. echo ""
  105. msgi -bar2
  106. fun_ip() {
  107. TUIP=$(wget -qO- ifconfig.me)
  108. echo "$TUIP" >/root/.ssh/authrized_key.reg
  109. echo -e "\e[1;97m ESTA ES TU IP PUBLICA? \e[32m$TUIP"
  110. msgi -bar2
  111. echo -ne "\e[1;97m Seleccione \e[1;31m[\e[1;93m S \e[1;31m/\e[1;93m N \e[1;31m]\e[1;97m: \e[1;93m" && read tu_ip
  112. #read -p " Seleccione [ S / N ]: " tu_ip
  113. [[ "$tu_ip" = "n" || "$tu_ip" = "N" ]] && tu_ip
  114. }
  115. fun_ip
  116. msgi -bar2
  117. echo -e "\e[1;93m AGREGAR Y EDITAR PASS ROOT\e[1;97m"
  118. msgi -bar
  119. echo -e "\e[1;97m CAMBIAR PASS ROOT? \e[32m"
  120. msgi -bar2
  121. echo -ne "\e[1;97m Seleccione \e[1;31m[\e[1;93m S \e[1;31m/\e[1;93m N \e[1;31m]\e[1;97m: \e[1;93m" && read pass_root
  122. #read -p " Seleccione [ S / N ]: " tu_ip
  123. [[ "$pass_root" = "s" || "$pass_root" = "S" ]] && pass_root
  124. msgi -bar2
  125. echo -e "\e[1;93m\a\a\a SE PROCEDERA A INSTALAR LAS ACTULIZACIONES\n PERTINENTES DEL SISTEMA, ESTE PROCESO PUEDE TARDAR\n VARIOS MINUTOS Y PUEDE PEDIR ALGUNAS CONFIRMACIONES \e[0;37m"
  126. msgi -bar
  127. read -t 120 -n 1 -rsp $'\e[1;97m Preciona Enter Para continuar\n'
  128. clear && clear
  129. apt update
  130. apt upgrade -y
  131. wget -O /bin/install https://raw.githubusercontent.com/NetVPS/Multi-Script/main/0-Instalador/install.sh &>/dev/null
  132. chmod +rwx /bin/install
  133. }
  134. post_reboot() {
  135. /bin/cp /etc/skel/.bashrc ~/
  136. install -c
  137. }
  138. time_reboot() {
  139. clear && clear
  140. msgi -bar
  141. echo -e "\e[1;93m CONTINUARA INSTALACION DESPUES DEL REBOOT"
  142. echo -e "\e[1;93m O EJECUTE EL COMANDO: \e[1;92mLATAM -c "
  143. msgi -bar
  144. REBOOT_TIMEOUT="$1"
  145. while [ $REBOOT_TIMEOUT -gt 0 ]; do
  146. print_center -ne "-$REBOOT_TIMEOUT-\r"
  147. sleep 1
  148. : $((REBOOT_TIMEOUT--))
  149. done
  150. reboot
  151. }
  152. dependencias() {
  153. dpkg --configure -a >/dev/null 2>&1
  154. apt -f install -y >/dev/null 2>&1
  155. soft="sudo bsdmainutils zip unzip ufw curl python python3 python3-pip openssl cron iptables lsof pv boxes at mlocate gawk bc jq curl npm nodejs socat netcat netcat-traditional net-tools cowsay figlet lolcat apache2"
  156. for i in $soft; do
  157. paquete="$i"
  158. echo -e "\e[1;97m INSTALANDO PAQUETE \e[93m >>> \e[36m $i"
  159. barra_intall "apt-get install $i -y"
  160. done
  161. }
  162. install_paquetes() {
  163. clear && clear
  164. #------- BARRA DE ESPERA
  165. msgi -bar2
  166. echo -e " \e[5m\e[1;100m =====>> ►► MULTI SCRIPT ◄◄ <<===== \e[1;37m"
  167. msgi -bar
  168. echo -e " \e[1;41m -- INSTALACION DE PAQUETES MULTI -- \e[49m"
  169. msgi -bar
  170. dependencias
  171. sed -i "s;Listen 80;Listen 81;g" /etc/apache2/ports.conf >/dev/null 2>&1
  172. service apache2 restart >/dev/null 2>&1
  173. [[ $(sudo lsof -i :81) ]] || ESTATUSP=$(echo -e "\e[1;91m >>> FALLO DE INSTALACION EN APACHE <<<") &>/dev/null
  174. [[ $(sudo lsof -i :81) ]] && ESTATUSP=$(echo -e "\e[1;92m PUERTO APACHE ACTIVO CON EXITO") &>/dev/null
  175. echo ""
  176. echo -e "$ESTATUSP"
  177. echo ""
  178. echo -e "\e[1;97m REMOVIENDO PAQUETES OBSOLETOS - \e[1;32m OK"
  179. apt autoremove -y &>/dev/null
  180. echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
  181. echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
  182. msgi -bar2
  183. read -t 30 -n 1 -rsp $'\e[1;97m Preciona Enter Para continuar\n'
  184. }
  185. #SELECTOR DE INSTALACION
  186. while :; do
  187. case $1 in
  188. -s | --start) install_inicial && post_reboot ;;
  189. #&& time_reboot "15"
  190. -c | --continue)
  191. install_paquetes
  192. rm -rf /root/LATAM &>/dev/null
  193. break
  194. ;;
  195. -m | --menu)
  196. clear && clear
  197. break
  198. ;;
  199. *) exit ;;
  200. esac
  201. done
  202. #VPS-MX 8.5 OFICIAL
  203. install_vps_mx_85_oficial() {
  204. clear && clear
  205. msgi -bar2
  206. echo -ne "\033[1;97m Digite su slogan: \033[1;32m" && read slogan
  207. tput cuu1 && tput dl1
  208. echo -e "$slogan"
  209. msgi -bar2
  210. clear && clear
  211. mkdir /etc/VPS-MX >/dev/null 2>&1
  212. cd /etc
  213. wget https://raw.githubusercontent.com/NetVPS/Multi-Script/main/VPS-MX-8.5-Final%20Oficial/VPS-MX.tar.xz >/dev/null 2>&1
  214. tar -xf VPS-MX.tar.xz >/dev/null 2>&1
  215. chmod +x VPS-MX.tar.xz >/dev/null 2>&1
  216. rm -rf VPS-MX.tar.xz
  217. cd
  218. chmod -R 755 /etc/VPS-MX
  219. rm -rf /etc/VPS-MX/MEUIPvps
  220. echo "/etc/VPS-MX/menu" >/usr/bin/menu && chmod +x /usr/bin/menu
  221. echo "/etc/VPS-MX/menu" >/usr/bin/VPSMX && chmod +x /usr/bin/VPSMX
  222. echo "$slogan" >/etc/VPS-MX/message.txt
  223. [[ ! -d /usr/local/lib ]] && mkdir /usr/local/lib
  224. [[ ! -d /usr/local/lib/ubuntn ]] && mkdir /usr/local/lib/ubuntn
  225. [[ ! -d /usr/local/lib/ubuntn/apache ]] && mkdir /usr/local/lib/ubuntn/apache
  226. [[ ! -d /usr/local/lib/ubuntn/apache/ver ]] && mkdir /usr/local/lib/ubuntn/apache/ver
  227. [[ ! -d /usr/share ]] && mkdir /usr/share
  228. [[ ! -d /usr/share/mediaptre ]] && mkdir /usr/share/mediaptre
  229. [[ ! -d /usr/share/mediaptre/local ]] && mkdir /usr/share/mediaptre/local
  230. [[ ! -d /usr/share/mediaptre/local/log ]] && mkdir /usr/share/mediaptre/local/log
  231. [[ ! -d /usr/share/mediaptre/local/log/lognull ]] && mkdir /usr/share/mediaptre/local/log/lognull
  232. [[ ! -d /etc/VPS-MX/B-VPS-MXuser ]] && mkdir /etc/VPS-MX/B-VPS-MXuser
  233. [[ ! -d /usr/local/protec ]] && mkdir /usr/local/protec
  234. [[ ! -d /usr/local/protec/rip ]] && mkdir /usr/local/protec/rip
  235. [[ ! -d /etc/protecbin ]] && mkdir /etc/protecbin
  236. cd
  237. [[ ! -d /etc/VPS-MX/v2ray ]] && mkdir /etc/VPS-MX/v2ray
  238. [[ ! -d /etc/VPS-MX/Slow ]] && mkdir /etc/VPS-MX/Slow
  239. [[ ! -d /etc/VPS-MX/Slow/install ]] && mkdir /etc/VPS-MX/Slow/install
  240. [[ ! -d /etc/VPS-MX/Slow/Key ]] && mkdir /etc/VPS-MX/Slow/Key
  241. touch /usr/share/lognull &>/dev/null
  242. wget -O /bin/resetsshdrop https://raw.githubusercontent.com/NetVPS/Multi-Script/main/VPS-MX-8.5-Final%20Oficial/Otros/resetsshdrop &>/dev/null
  243. chmod +x /bin/resetsshdrop
  244. grep -v "^PasswordAuthentication" /etc/ssh/sshd_config >/tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config
  245. echo "PasswordAuthentication yes" -e "\e[1;92m >> INSTALACION COMPLETADA <<" >>/etc/ssh/sshd_configecho && msgi -bar2
  246. rm -rf /usr/local/lib/systemubu1 &>/dev/null
  247. rm -rf /etc/versin_script &>/dev/null
  248. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/VPS-MX-8.5-Final%20Oficial/Otros/Version")
  249. echo "$v1" >/etc/versin_script
  250. wget -O /etc/versin_script_new https://raw.githubusercontent.com/NetVPS/Multi-Script/main/VPS-MX-8.5-Final%20Oficial/Otros/Version &>/dev/null
  251. echo '#!/bin/sh -e' >/etc/rc.local
  252. sudo chmod +x /etc/rc.local
  253. echo "sudo resetsshdrop" >>/etc/rc.local
  254. echo "sleep 2s" >>/etc/rc.local
  255. echo "exit 0" >>/etc/rc.local
  256. echo 'clear' >>.bashrc
  257. echo 'echo ""' >>.bashrc
  258. echo 'echo -e "\t\033[91m __ ______ ____ __ ____ __ " ' >>.bashrc
  259. echo 'echo -e "\t\033[91m \ \ / / _ \/ ___| | \/ \ \/ / " ' >>.bashrc
  260. echo 'echo -e "\t\033[91m \ \ / /| |_) \___ \ _____| |\/| |\ / " ' >>.bashrc
  261. echo 'echo -e "\t\033[91m \ V / | __/ ___) |_____| | | |/ \ " ' >>.bashrc
  262. echo 'echo -e "\t\033[91m \_/ |_| |____/ |_| |_/_/\_\ " ' >>.bashrc
  263. echo 'wget -O /etc/versin_script_new https://raw.githubusercontent.com/NetVPS/Multi-Script/main/VPS-MX-8.5-Final%20Oficial/Otros/Version &>/dev/null' >>.bashrc
  264. echo 'echo "" ' >>.bashrc
  265. echo 'mess1="$(less /etc/VPS-MX/message.txt)" ' >>.bashrc
  266. echo 'echo "" ' >>.bashrc
  267. echo 'echo -e "\t\033[92mRESELLER : $mess1 "' >>.bashrc
  268. echo 'echo -e "\t\e[1;33mVERSION: \e[1;31m$(cat /etc/versin_script_new)"' >>.bashrc
  269. echo 'echo "" ' >>.bashrc
  270. echo 'echo -e "\t\033[97mPARA MOSTAR PANEL BASH ESCRIBA: sudo VPSMX o menu "' >>.bashrc
  271. echo 'echo ""' >>.bashrc
  272. rm -rf /usr/bin/pytransform &>/dev/null
  273. rm -rf VPS-MX.sh
  274. rm -rf lista-arq
  275. service ssh restart &>/dev/null
  276. clear && clear
  277. msgi -bar2
  278. echo -e "\e[1;92m >> INSTALACION COMPLETADA <<" && msgi -bar2
  279. echo -e " COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  280. echo -e " \033[1;41m menu \033[0;37m" && msgi -bar2
  281. }
  282. #SCRIPT LATAM 2.0
  283. install_latam() {
  284. #CARPETAS PRINCIPALES
  285. mkdir -p /etc/SCRIPT-LATAM >/dev/null 2>&1
  286. mkdir -p /etc/SCRIPT-LATAM/temp >/dev/null 2>&1
  287. mkdir -p /etc/SCRIPT-LATAM/filespy >/dev/null 2>&1
  288. mkdir -p /etc/SCRIPT-LATAM/botmanager >/dev/null 2>&1
  289. mkdir -p /etc/SCRIPT-LATAM/PortM >/dev/null 2>&1
  290. mkdir -p /etc/SCRIPT-LATAM/v2ray >/dev/null 2>&1
  291. mkdir -p /root/.ssh >/dev/null 2>&1
  292. Install_key() {
  293. wget /root/LATAM https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
  294. chmod +x /usr/bin/LATAM
  295. /bin/cp /etc/skel/.bashrc ~/
  296. clear && clear
  297. SCPdir="/etc/SCRIPT-LATAM"
  298. SCPinstal="$HOME/install"
  299. Filbot="${SCPdir}/botmanager"
  300. Filpy="${SCPdir}/filespy"
  301. Filotros="${SCPdir}/temp"
  302. IP=$(cat /root/.ssh/authrized_key.reg)
  303. function_verify() {
  304. permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Control-IP")
  305. [[ $(echo $permited | grep "${IP}") = "" ]] && {
  306. clear && clear
  307. echo -e "\n\n\n\e[1;91m————————————————————————————————————————————————————\n ¡ESTA KEY NO CONCUERDA CON EL INSTALADOR! \n CONATACTE A @Kalix1\n————————————————————————————————————————————————————\n\n\n"
  308. # [[ -d /etc/SCRIPT-LATAM ]] && rm -rf /etc/SCRIPT-LATAM
  309. exit 1
  310. } || {
  311. ### INSTALAR VERSION DE SCRIPT
  312. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version")
  313. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  314. FIns=$(printf '%(%D-%H:%M:%S)T')
  315. echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion
  316. }
  317. }
  318. fun_idi() {
  319. clear && clear
  320. msgi -bar2
  321. echo -e "\e[1;32m————————————————————————————————————————————————————"
  322. figlet -w 85 -f smslant " SCRIPT
  323. LATAM " | lolcat
  324. msgi -ama " [ ----- \e[1;97m 🐲 By @Kalix1 🐲\e[1;33m ----- ]"
  325. echo -e "\e[1;32m————————————————————————————————————————————————————"
  326. pv="$(echo es)"
  327. [[ ${#id} -gt 2 ]] && id="es" || id="$pv"
  328. byinst="true"
  329. }
  330. install_fim() {
  331. echo -e " \e[1;4;32mFinalizando Instalacion\e[0;39m"
  332. wget -O /bin/rebootnb https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/rebootnb.sh &>/dev/null
  333. chmod +x /bin/rebootnb
  334. wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null
  335. msgi -bar2
  336. echo '#!/bin/sh -e' >/etc/rc.local
  337. sudo chmod +x /etc/rc.local
  338. echo "sudo rebootnb reboot" >>/etc/rc.local
  339. echo "sleep 2s" >>/etc/rc.local
  340. echo "exit 0" >>/etc/rc.local
  341. echo 'clear && clear' >>.bashrc
  342. echo 'rebootnb login >/dev/null 2>&1' >>.bashrc
  343. echo 'echo -e "\e[1;31m————————————————————————————————————————————————————" ' >>.bashrc
  344. echo 'echo -e "\e[1;93m════════════════════════════════════════════════════" ' >>.bashrc
  345. echo 'sudo figlet -w 85 -f smslant " SCRIPT
  346. LATAM" | lolcat' >>.bashrc
  347. echo 'echo -e "\e[1;93m════════════════════════════════════════════════════" ' >>.bashrc
  348. echo 'echo -e "\e[1;31m————————————————————————————————————————————————————" ' >>.bashrc
  349. echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt)" ' >>.bashrc
  350. echo 'echo "" ' >>.bashrc
  351. echo 'echo -e "\e[92m -->> SLOGAN:\e[93m $mess1 "' >>.bashrc
  352. echo 'echo "" ' >>.bashrc
  353. echo 'echo -e "\e[1;97m ❗️ PARA MOSTAR PANEL BASH ESCRIBA ❗️\e[92m menu "' >>.bashrc
  354. echo 'wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null' >>.bashrc
  355. echo 'echo ""' >>.bashrc
  356. #-BASH SOPORTE ONLINE
  357. wget https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Fixs%20Remotos/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1
  358. chmod +x /usr/bin/SPR
  359. SPR >/dev/null 2>&1
  360. timeespera="1"
  361. times="10"
  362. if [ "$timeespera" = "1" ]; then
  363. echo -e "\e[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ "
  364. msgi -bar2
  365. while [ $times -gt 0 ]; do
  366. echo -ne " -$times-\e[0K\r"
  367. sleep 1
  368. : $((times--))
  369. done
  370. tput cuu1 && tput dl1
  371. tput cuu1 && tput dl1
  372. tput cuu1 && tput dl1
  373. msgi -bar2
  374. echo -e " \e[1;92m LISTO REGISTRO COMPLETO "
  375. echo -e " \e[1;97m COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  376. echo -e " \e[1;41m menu o MENU \e[0;37m" && msgi -bar2
  377. fi
  378. meu_ip() {
  379. if [[ -e /tmp/IP ]]; then
  380. echo "$(cat /tmp/IP)"
  381. else
  382. MEU_IP=$(wget -qO- ifconfig.me)
  383. echo "$MEU_IP" >/tmp/IP
  384. fi
  385. }
  386. meu_ip
  387. exit
  388. }
  389. ofus() {
  390. unset server
  391. server=$(echo ${txt_ofuscatw} | cut -d':' -f1)
  392. unset txtofus
  393. number=$(expr length $1)
  394. for ((i = 1; i < $number + 1; i++)); do
  395. txt[$i]=$(echo "$1" | cut -b $i)
  396. case ${txt[$i]} in
  397. ".") txt[$i]="v" ;;
  398. "v") txt[$i]="." ;;
  399. "1") txt[$i]="@" ;;
  400. "@") txt[$i]="1" ;;
  401. "2") txt[$i]="?" ;;
  402. "?") txt[$i]="2" ;;
  403. "4") txt[$i]="p" ;;
  404. "p") txt[$i]="4" ;;
  405. "-") txt[$i]="L" ;;
  406. "L") txt[$i]="-" ;;
  407. esac
  408. txtofus+="${txt[$i]}"
  409. done
  410. echo "$txtofus" | rev
  411. }
  412. verificar_arq() {
  413. case $1 in
  414. "menu.sh" | "message.txt") ARQ="${SCPdir}/" ;;
  415. "LATAMbot.sh") ARQ="${Filbot}/" ;;
  416. "PDirect.py" | "PPub.py" | "PPriv.py" | "POpen.py" | "PGet.py") ARQ="${Filpy}/" ;;
  417. *) ARQ="${Filotros}/" ;;
  418. esac
  419. mv -f ${SCPinstal}/$1 ${ARQ}/$1
  420. chmod +x ${ARQ}/$1
  421. }
  422. #fun_ip
  423. [[ $1 = "" ]] && fun_idi || {
  424. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  425. }
  426. error_fun() {
  427. msgi -bar2
  428. msgi -bar2
  429. sleep 3s
  430. clear && clear
  431. echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
  432. msgi -bar2
  433. [[ $1 = "" ]] && fun_idi || {
  434. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  435. }
  436. echo -e "\e[1;31m ¡# ERROR INESPERADO #¡\n ESTA KEY YA FUE USADA O EXPIRO "
  437. echo -e "\e[0;93m -SI EL ERROR PERCISTE REVISAR PUERTO 81 TCP -"
  438. msgi -bar2
  439. echo -ne "\e[1;97m DESEAS REINTENTAR CON OTRA KEY \e[1;31m[\e[1;93m S \e[1;31m/\e[1;93m N \e[1;31m]\e[1;97m: \e[1;93m" && read incertar_key
  440. service apache2 restart >/dev/null 2>&1
  441. [[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
  442. clear && clear
  443. msgi -bar2
  444. msgi -bar2
  445. rm -rf lista-arq
  446. echo -e "\e[1;97m ---- INSTALACION CANCELADA -----"
  447. msgi -bar2
  448. msgi -bar2
  449. exit 1
  450. }
  451. invalid_key() {
  452. msgi -bar2
  453. msgi -bar2
  454. sleep 3s
  455. clear && clear
  456. echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
  457. msgi -bar2
  458. [[ $1 = "" ]] && fun_idi || {
  459. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  460. }
  461. echo -e "\e[1;31m CIFRADO INVALIDO -- #¡La Key fue Invalida#! "
  462. msgi -bar2
  463. echo -ne "\e[1;97m DESEAS REINTENTAR CON OTRA KEY \e[1;31m[\e[1;93m S \e[1;31m/\e[1;93m N \e[1;31m]\e[1;93m: \e[1;93m" && read incertar_key
  464. [[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
  465. clear && clear
  466. msgi -bar2
  467. msgi -bar2
  468. echo -e "\e[1;97m ---- INSTALACION CANCELADA -----"
  469. msgi -bar2
  470. msgi -bar2
  471. exit 1
  472. }
  473. incertar_key() {
  474. [[ -d /etc/SCRIPT-LATAM/errorkey ]] && rm -rf /etc/SCRIPT-LATAM/errorkey >/dev/null 2>&1
  475. echo "By Kalix1" >/etc/SCRIPT-LATAM/errorkey
  476. msgi -bar2
  477. echo -ne "\e[1;96m >>> INTRODUZCA LA KEY ABAJO <<<\n\e[1;31m " && read Key
  478. [[ -z "$Key" ]] && Key="NULL"
  479. tput cuu1 && tput dl1
  480. msgi -ne " \e[1;93m# Verificando Key # : "
  481. cd $HOME
  482. IPL=$(cat /root/.ssh/authrized_key.reg)
  483. wget -O $HOME/lista-arq $(ofus "$Key")/$IPL >/dev/null 2>&1 && echo -e "\e[1;32m Codificacion Correcta" || {
  484. echo -e "\e[1;31m Codificacion Incorrecta"
  485. invalid_key
  486. exit
  487. }
  488. IP=$(ofus "$Key" | 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}') && echo "$IP" >/usr/bin/vendor_code
  489. sleep 1s
  490. function_verify
  491. updatedb
  492. if [[ -e $HOME/lista-arq ]] && [[ ! $(cat /etc/SCRIPT-LATAM/errorkey | grep "Codificacion Incorrecta") ]]; then
  493. msgi -bar2
  494. msgi -verd " Ficheros Copiados \e[97m[\e[93m Key By @Panel_NetVPS_bot \e[97m]"
  495. REQUEST=$(ofus "$Key" | cut -d'/' -f2)
  496. [[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
  497. pontos="."
  498. stopping="Configurando Directorios"
  499. for arqx in $(cat $HOME/lista-arq); do
  500. msgi -verm "${stopping}${pontos}"
  501. wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}" || {
  502. error_fun
  503. exit
  504. }
  505. tput cuu1 && tput dl1
  506. pontos+="."
  507. done
  508. sleep 1s
  509. msgi -bar2
  510. listaarqs="$(locate "lista-arq" | head -1)" && [[ -e ${listaarqs} ]] && rm $listaarqs
  511. cat /etc/bash.bashrc | grep -v '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >/etc/bash.bashrc.2
  512. echo -e '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >>/etc/bash.bashrc.2
  513. mv -f /etc/bash.bashrc.2 /etc/bash.bashrc
  514. echo "${SCPdir}/menu.sh" >/usr/bin/menu && chmod +x /usr/bin/menu
  515. echo "${SCPdir}/menu.sh" >/usr/bin/MENU && chmod +x /usr/bin/MENU
  516. echo "$Key" >${SCPdir}/key.txt
  517. [[ -d ${SCPinstal} ]] && rm -rf ${SCPinstal}
  518. [[ ${byinst} = "true" ]] && install_fim
  519. else
  520. invalid_key
  521. fi
  522. }
  523. incertar_key
  524. }
  525. Install_key
  526. }
  527. #MENUS
  528. clear && clear
  529. /bin/cp /etc/skel/.bashrc ~/
  530. /bin/cp /etc/skel/.bashrc /etc/bash.bashrc
  531. msgi -bar2
  532. echo -e " \e[5m\e[1;100m =====>> ►► MENU DE INSTALACION ◄◄ <<===== \e[1;37m"
  533. msgi -bar2
  534. #-- VERIFICAR VERSION
  535. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/Vercion")
  536. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  537. v22=$(cat /etc/SCRIPT-LATAM/temp/version_instalacion)
  538. vesaoSCT="\e[1;31m [ \e[1;32m( $v22 )\e[1;97m\e[1;31m ]"
  539. msgi -ama " PREPARANDO INSTALACION | VERSION: $vesaoSCT"
  540. msgi -bar2
  541. echo -ne "\e[1;93m [\e[1;32m1\e[1;93m]\e[1;31m >\e[1;97m VPS-MX FINAL OFICIAL..(8.5) \e[1;31m 🎁 FREE \e[97m \n"
  542. echo -ne "\e[1;93m [\e[1;32m2\e[1;93m]\e[1;31m >\e[1;97m LACASITAMX............(9.0X) \e[1;31m 🎁 FREE \e[97m \n"
  543. echo -ne "\e[1;93m [\e[1;32m3\e[1;93m]\e[1;31m >\e[1;97m ADMRufu \e[1;31m 🎁 FREE\e[97m \n"
  544. echo -ne "\e[1;93m [\e[1;32m4\e[1;93m]\e[1;31m >\e[1;97m ChumoGH...............(5.6) \e[1;31m 🎁 FREE\e[97m \n"
  545. echo -ne "\e[1;93m [\e[1;32m5\e[1;93m]\e[1;31m >\e[1;97m LATAM.................(2.0) \e[1;96m 💎 VIP\e[97m \n"
  546. msgi -bar2
  547. echo -ne "\e[1;93m [\e[1;32m ARCHIVOS Y LINKS TOTALMENTE ABIERTOS Y PUBLICOS \e[1;93m]\e[1;96m\n https://github.com/NetVPS/Multi-Script\e[97m \n"
  548. msgi -bar2
  549. echo -ne "\e[1;97mDigite solo el numero segun su respuesta:\e[32m "
  550. read opcao
  551. case $opcao in
  552. 1)
  553. install_vps_mx_85_oficial
  554. ;;
  555. 2)
  556. install_mod
  557. ;;
  558. 3)
  559. install_ADMRufu
  560. ;;
  561. 4)
  562. install_ChumoGH
  563. ;;
  564. 5)
  565. install_latam
  566. ;;
  567. esac
  568. exit