install.sh 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  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. #LACASITA V9
  283. install_LACASITA_90() {
  284. clear && clear
  285. msgi -bar2
  286. echo -ne "\033[1;97m Digite su slogan: \033[1;32m" && read slogan
  287. tput cuu1 && tput dl1
  288. echo -e "$slogan"
  289. msgi -bar2
  290. clear && clear
  291. mkdir /etc/VPS-MX >/dev/null 2>&1
  292. cd /etc
  293. wget https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/VPS-MX.tar.gz >/dev/null 2>&1
  294. tar -xf VPS-MX.tar.gz >/dev/null 2>&1
  295. chmod +x VPS-MX.tar.gz >/dev/null 2>&1
  296. rm -rf VPS-MX.tar.gz
  297. cd
  298. chmod -R 755 /etc/VPS-MX
  299. rm -rf /etc/VPS-MX/MEUIPvps
  300. echo "/etc/VPS-MX/menu" >/usr/bin/menu && chmod +x /usr/bin/menu
  301. echo "/etc/VPS-MX/menu" >/usr/bin/VPSMX && chmod +x /usr/bin/VPSMX
  302. echo "$slogan" >/etc/VPS-MX/message.txt
  303. #UNLOKERS
  304. [[ ! -d /usr/local/lib ]] && mkdir /usr/local/lib
  305. [[ ! -d /usr/local/lib/ubuntn ]] && mkdir /usr/local/lib/ubuntn
  306. [[ ! -d /usr/local/lib/ubuntn/apache ]] && mkdir /usr/local/lib/ubuntn/apache
  307. [[ ! -d /usr/local/lib/ubuntn/apache/ver ]] && mkdir /usr/local/lib/ubuntn/apache/ver
  308. [[ ! -d /usr/share ]] && mkdir /usr/share
  309. [[ ! -d /usr/share/mediaptre ]] && mkdir /usr/share/mediaptre
  310. [[ ! -d /usr/share/mediaptre/local ]] && mkdir /usr/share/mediaptre/local
  311. [[ ! -d /usr/share/mediaptre/local/log ]] && mkdir /usr/share/mediaptre/local/log
  312. [[ ! -d /usr/share/mediaptre/local/log/lognull ]] && mkdir /usr/share/mediaptre/local/log/lognull
  313. [[ ! -d /etc/VPS-MX/B-VPS-MXuser ]] && mkdir /etc/VPS-MX/B-VPS-MXuser
  314. [[ ! -d /usr/local/megat ]] && mkdir /usr/local/megat
  315. [[ ! -d /usr/local/include ]] && mkdir /usr/local/include
  316. [[ ! -d /usr/local/include/snaps ]] && mkdir /usr/local/include/snaps
  317. [[ ! -d /usr/local/lib/sped ]] && mkdir /usr/local/lib/sped
  318. [[ ! -d /usr/local/lib/rm ]] && mkdir /usr/local/lib/rm
  319. [[ ! -d /usr/local/libreria ]] && mkdir /usr/local/libreria
  320. [[ ! -d /usr/local/lib/rm ]] && mkdir /usr/local/lib/rm
  321. cd /etc/VPS-MX/herramientas
  322. wget https://raw.githubusercontent.com/lacasitamx/VPSMX/master/code/speedtest_v1.tar >/dev/null 2>&1
  323. tar -xf speedtest_v1.tar >/dev/null 2>&1
  324. rm -rf speedtest_v1.tar >/dev/null 2>&1
  325. cd
  326. [[ ! -d /etc/VPS-MX/v2ray ]] && mkdir /etc/VPS-MX/v2ray
  327. [[ ! -d /etc/VPS-MX/Slow ]] && mkdir /etc/VPS-MX/Slow
  328. [[ ! -d /etc/VPS-MX/Slow/install ]] && mkdir /etc/VPS-MX/Slow/install
  329. [[ ! -d /etc/VPS-MX/Slow/Key ]] && mkdir /etc/VPS-MX/Slow/Key
  330. touch /usr/share/lognull &>/dev/null
  331. wget https://raw.githubusercontent.com/lacasitamx/VPSMX/master/SR/SPR -O /usr/bin/SPR &>/dev/null &>/dev/null
  332. chmod 775 /usr/bin/SPR &>/dev/null
  333. wget -O /bin/rebootnb https://raw.githubusercontent.com/lacasitamx/VPSMX/master/SCRIPT-8.4/Utilidad/rebootnb &>/dev/null
  334. chmod +x /bin/rebootnb
  335. wget -O /bin/resetsshdrop https://raw.githubusercontent.com/lacasitamx/VPSMX/master/SCRIPT-8.4/Utilidad/resetsshdrop &>/dev/null
  336. chmod +x /bin/resetsshdrop
  337. wget -O /etc/versin_script_new https://raw.githubusercontent.com/lacasitamx/version/master/vercion &>/dev/null
  338. wget -O /etc/ssh/sshd_config https://raw.githubusercontent.com/lacasitamx/ZETA/master/sshd &>/dev/null
  339. chmod 777 /etc/ssh/sshd_config
  340. wget -O /usr/bin/trans https://raw.githubusercontent.com/scriptsmx/script/master/Install/trans &>/dev/null
  341. wget -O /bin/Desbloqueo.sh https://www.dropbox.com/s/75c93cyv4l81qci/desbloqueo.sh &>/dev/null
  342. chmod +x /bin/Desbloqueo.sh
  343. wget -O /bin/monitor.sh https://raw.githubusercontent.com/lacasitamx/VPSMX/master/SCRIPT-8.4/Utilidad/monitor.sh &>/dev/null
  344. chmod +x /bin/monitor.sh
  345. wget -O /var/www/html/estilos.css https://raw.githubusercontent.com/lacasitamx/VPSMX/master/SCRIPT-8.4/Utilidad/estilos.css &>/dev/null
  346. [[ -f "/usr/sbin/ufw" ]] && ufw allow 443/tcp &>/dev/null
  347. ufw allow 80/tcp &>/dev/null
  348. ufw allow 3128/tcp &>/dev/null
  349. ufw allow 8799/tcp &>/dev/null
  350. ufw allow 8080/tcp &>/dev/null
  351. ufw allow 81/tcp &>/dev/null
  352. wget -O /bin/resetsshdrop https://raw.githubusercontent.com/NetVPS/VPS-MX_Oficial/master/LINKS-LIBRERIAS/resetsshdrop &>/dev/null
  353. chmod +x /bin/resetsshdrop
  354. grep -v "^PasswordAuthentication" /etc/ssh/sshd_config >/tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config
  355. echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
  356. rm -rf /usr/local/lib/systemubu1 &>/dev/null
  357. rm -rf /etc/versin_script &>/dev/null
  358. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/Version")
  359. echo "$v1" >/etc/versin_script
  360. wget -O /etc/versin_script_new https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/Version &>/dev/null
  361. echo '#!/bin/sh -e' >/etc/rc.local
  362. sudo chmod +x /etc/rc.local
  363. echo "sudo rebootnb" >>/etc/rc.local
  364. echo "sudo resetsshdrop" >>/etc/rc.local
  365. echo "sleep 2s" >>/etc/rc.local
  366. echo "exit 0" >>/etc/rc.local
  367. /bin/cp /etc/skel/.bashrc ~/
  368. echo 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/' >>/etc/profile
  369. echo 'clear' >>.bashrc
  370. echo 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/' >>.bashrc
  371. echo 'echo ""' >>.bashrc
  372. #
  373. echo 'figlet -f slant "LACASITA" |lolcat' >>.bashrc
  374. echo 'mess1="$(less /etc/VPS-MX/message.txt)" ' >>.bashrc
  375. echo 'echo "" ' >>.bashrc
  376. echo 'echo -e "\t\033[92mRESELLER : $mess1 "' >>.bashrc
  377. echo 'echo -e "\t\e[1;33mVERSION: \e[1;31m$(cat /etc/versin_script_new)"' >>.bashrc
  378. echo 'echo "" ' >>.bashrc
  379. echo 'echo -e "\t\033[1;100mPARA MOSTAR PANEL BASH ESCRIBA:\e[0m\e[1;41m sudo menu \e[0m"' >>.bashrc
  380. echo 'echo ""' >>.bashrc
  381. rm -rf /usr/bin/pytransform &>/dev/null
  382. rm -rf LACASITA.sh
  383. rm -rf lista-arq
  384. [[ ! -e /etc/autostart ]] && {
  385. echo '#!/bin/bash
  386. clear
  387. #INICIO AUTOMATICO' >/etc/autostart
  388. chmod +x /etc/autostart
  389. } || {
  390. #[[ $(ps x | grep "bot_plus" | grep -v grep | wc -l) != '0' ]] && wget -qO- https://raw.githubusercontent.com/carecagm/main/Install/ShellBot.sh >/etc/SSHPlus/ShellBot.sh
  391. for proc in $(ps x | grep 'dmS' | grep -v 'grep' | awk {'print $1'}); do
  392. screen -r -S "$proc" -X quit
  393. done
  394. screen -wipe >/dev/null
  395. echo '#!/bin/bash
  396. clear
  397. #INICIO AUTOMATICO' >/etc/autostart
  398. chmod +x /etc/autostart
  399. }
  400. crontab -r >/dev/null 2>&1
  401. (
  402. crontab -l 2>/dev/null
  403. echo "@reboot /etc/autostart"
  404. echo "* * * * * /etc/autostart"
  405. ) | crontab -
  406. service ssh restart &>/dev/null
  407. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/
  408. rm -rf /usr/bin/pytransform &>/dev/null
  409. rm -rf VPS-MX.sh
  410. rm -rf lista-arq
  411. service ssh restart &>/dev/null
  412. clear && clear
  413. msgi -bar2
  414. echo -e "\e[1;92m >> INSTALACION COMPLETADA <<" && msgi -bar2
  415. echo -e " COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  416. echo -e " \033[1;41m menu \033[0;37m" && msgi -bar2
  417. }
  418. #SCRIPT LATAM 2.0
  419. install_latam() {
  420. #CARPETAS PRINCIPALES
  421. mkdir -p /etc/SCRIPT-LATAM >/dev/null 2>&1
  422. mkdir -p /etc/SCRIPT-LATAM/temp >/dev/null 2>&1
  423. mkdir -p /etc/SCRIPT-LATAM/filespy >/dev/null 2>&1
  424. mkdir -p /etc/SCRIPT-LATAM/botmanager >/dev/null 2>&1
  425. mkdir -p /etc/SCRIPT-LATAM/PortM >/dev/null 2>&1
  426. mkdir -p /etc/SCRIPT-LATAM/v2ray >/dev/null 2>&1
  427. mkdir -p /root/.ssh >/dev/null 2>&1
  428. Install_key() {
  429. wget /root/LATAM https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
  430. chmod +x /usr/bin/LATAM
  431. /bin/cp /etc/skel/.bashrc ~/
  432. clear && clear
  433. SCPdir="/etc/SCRIPT-LATAM"
  434. SCPinstal="$HOME/install"
  435. Filbot="${SCPdir}/botmanager"
  436. Filpy="${SCPdir}/filespy"
  437. Filotros="${SCPdir}/temp"
  438. IP=$(cat /root/.ssh/authrized_key.reg)
  439. function_verify() {
  440. permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Control-IP")
  441. [[ $(echo $permited | grep "${IP}") = "" ]] && {
  442. clear && clear
  443. echo -e "\n\n\n\e[1;91m————————————————————————————————————————————————————\n ¡ESTA KEY NO CONCUERDA CON EL INSTALADOR! \n CONATACTE A @Kalix1\n————————————————————————————————————————————————————\n\n\n"
  444. # [[ -d /etc/SCRIPT-LATAM ]] && rm -rf /etc/SCRIPT-LATAM
  445. exit 1
  446. } || {
  447. ### INSTALAR VERSION DE SCRIPT
  448. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version")
  449. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  450. FIns=$(printf '%(%D-%H:%M:%S)T')
  451. echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion
  452. }
  453. }
  454. fun_idi() {
  455. clear && clear
  456. msgi -bar2
  457. echo -e "\e[1;32m————————————————————————————————————————————————————"
  458. figlet -w 85 -f smslant " SCRIPT
  459. LATAM " | lolcat
  460. msgi -ama " [ ----- \e[1;97m 🐲 By @Kalix1 🐲\e[1;33m ----- ]"
  461. echo -e "\e[1;32m————————————————————————————————————————————————————"
  462. pv="$(echo es)"
  463. [[ ${#id} -gt 2 ]] && id="es" || id="$pv"
  464. byinst="true"
  465. }
  466. install_fim() {
  467. echo -e " \e[1;4;32mFinalizando Instalacion\e[0;39m"
  468. wget -O /bin/rebootnb https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/rebootnb.sh &>/dev/null
  469. chmod +x /bin/rebootnb
  470. wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null
  471. msgi -bar2
  472. echo '#!/bin/sh -e' >/etc/rc.local
  473. sudo chmod +x /etc/rc.local
  474. echo "sudo rebootnb reboot" >>/etc/rc.local
  475. echo "sleep 2s" >>/etc/rc.local
  476. echo "exit 0" >>/etc/rc.local
  477. echo 'clear && clear' >>.bashrc
  478. echo 'rebootnb login >/dev/null 2>&1' >>.bashrc
  479. echo 'echo -e "\e[1;31m————————————————————————————————————————————————————" ' >>.bashrc
  480. echo 'echo -e "\e[1;93m════════════════════════════════════════════════════" ' >>.bashrc
  481. echo 'sudo figlet -w 85 -f smslant " SCRIPT
  482. LATAM" | lolcat' >>.bashrc
  483. echo 'echo -e "\e[1;93m════════════════════════════════════════════════════" ' >>.bashrc
  484. echo 'echo -e "\e[1;31m————————————————————————————————————————————————————" ' >>.bashrc
  485. echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt)" ' >>.bashrc
  486. echo 'echo "" ' >>.bashrc
  487. echo 'echo -e "\e[92m -->> SLOGAN:\e[93m $mess1 "' >>.bashrc
  488. echo 'echo "" ' >>.bashrc
  489. echo 'echo -e "\e[1;97m ❗️ PARA MOSTAR PANEL BASH ESCRIBA ❗️\e[92m menu "' >>.bashrc
  490. echo 'wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null' >>.bashrc
  491. echo 'echo ""' >>.bashrc
  492. #-BASH SOPORTE ONLINE
  493. wget https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Fixs%20Remotos/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1
  494. chmod +x /usr/bin/SPR
  495. SPR >/dev/null 2>&1
  496. timeespera="1"
  497. times="10"
  498. if [ "$timeespera" = "1" ]; then
  499. echo -e "\e[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ "
  500. msgi -bar2
  501. while [ $times -gt 0 ]; do
  502. echo -ne " -$times-\e[0K\r"
  503. sleep 1
  504. : $((times--))
  505. done
  506. tput cuu1 && tput dl1
  507. tput cuu1 && tput dl1
  508. tput cuu1 && tput dl1
  509. msgi -bar2
  510. echo -e " \e[1;92m LISTO REGISTRO COMPLETO "
  511. echo -e " \e[1;97m COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  512. echo -e " \e[1;41m menu o MENU \e[0;37m" && msgi -bar2
  513. fi
  514. meu_ip() {
  515. if [[ -e /tmp/IP ]]; then
  516. echo "$(cat /tmp/IP)"
  517. else
  518. MEU_IP=$(wget -qO- ifconfig.me)
  519. echo "$MEU_IP" >/tmp/IP
  520. fi
  521. }
  522. meu_ip
  523. exit
  524. }
  525. ofus() {
  526. unset server
  527. server=$(echo ${txt_ofuscatw} | cut -d':' -f1)
  528. unset txtofus
  529. number=$(expr length $1)
  530. for ((i = 1; i < $number + 1; i++)); do
  531. txt[$i]=$(echo "$1" | cut -b $i)
  532. case ${txt[$i]} in
  533. ".") txt[$i]="v" ;;
  534. "v") txt[$i]="." ;;
  535. "1") txt[$i]="@" ;;
  536. "@") txt[$i]="1" ;;
  537. "2") txt[$i]="?" ;;
  538. "?") txt[$i]="2" ;;
  539. "4") txt[$i]="p" ;;
  540. "p") txt[$i]="4" ;;
  541. "-") txt[$i]="L" ;;
  542. "L") txt[$i]="-" ;;
  543. esac
  544. txtofus+="${txt[$i]}"
  545. done
  546. echo "$txtofus" | rev
  547. }
  548. verificar_arq() {
  549. case $1 in
  550. "menu.sh" | "message.txt") ARQ="${SCPdir}/" ;;
  551. "LATAMbot.sh") ARQ="${Filbot}/" ;;
  552. "PDirect.py" | "PPub.py" | "PPriv.py" | "POpen.py" | "PGet.py") ARQ="${Filpy}/" ;;
  553. *) ARQ="${Filotros}/" ;;
  554. esac
  555. mv -f ${SCPinstal}/$1 ${ARQ}/$1
  556. chmod +x ${ARQ}/$1
  557. }
  558. #fun_ip
  559. [[ $1 = "" ]] && fun_idi || {
  560. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  561. }
  562. error_fun() {
  563. msgi -bar2
  564. msgi -bar2
  565. sleep 3s
  566. clear && clear
  567. echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
  568. msgi -bar2
  569. [[ $1 = "" ]] && fun_idi || {
  570. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  571. }
  572. echo -e "\e[1;31m ¡# ERROR INESPERADO #¡\n ESTA KEY YA FUE USADA O EXPIRO "
  573. echo -e "\e[0;93m -SI EL ERROR PERCISTE REVISAR PUERTO 81 TCP -"
  574. msgi -bar2
  575. 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
  576. service apache2 restart >/dev/null 2>&1
  577. [[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
  578. clear && clear
  579. msgi -bar2
  580. msgi -bar2
  581. rm -rf lista-arq
  582. echo -e "\e[1;97m ---- INSTALACION CANCELADA -----"
  583. msgi -bar2
  584. msgi -bar2
  585. exit 1
  586. }
  587. invalid_key() {
  588. msgi -bar2
  589. msgi -bar2
  590. sleep 3s
  591. clear && clear
  592. echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
  593. msgi -bar2
  594. [[ $1 = "" ]] && fun_idi || {
  595. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  596. }
  597. echo -e "\e[1;31m CIFRADO INVALIDO -- #¡La Key fue Invalida#! "
  598. msgi -bar2
  599. 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
  600. [[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
  601. clear && clear
  602. msgi -bar2
  603. msgi -bar2
  604. echo -e "\e[1;97m ---- INSTALACION CANCELADA -----"
  605. msgi -bar2
  606. msgi -bar2
  607. exit 1
  608. }
  609. incertar_key() {
  610. [[ -d /etc/SCRIPT-LATAM/errorkey ]] && rm -rf /etc/SCRIPT-LATAM/errorkey >/dev/null 2>&1
  611. echo "By Kalix1" >/etc/SCRIPT-LATAM/errorkey
  612. msgi -bar2
  613. echo -ne "\e[1;93m OBTEN DOS KEYS FREE AL DIA EN EL BOT \n \e[1;97m https://t.me/Panel_NetVPS_bot\n\n"
  614. echo -ne "\e[1;96m >>> INTRODUZCA LA KEY ABAJO <<<\n\e[1;31m " && read Key
  615. [[ -z "$Key" ]] && Key="NULL"
  616. tput cuu1 && tput dl1
  617. msgi -ne " \e[1;93m# Verificando Key # : "
  618. cd $HOME
  619. IPL=$(cat /root/.ssh/authrized_key.reg)
  620. wget -O $HOME/lista-arq $(ofus "$Key")/$IPL >/dev/null 2>&1 && echo -e "\e[1;32m Codificacion Correcta" || {
  621. echo -e "\e[1;31m Codificacion Incorrecta"
  622. invalid_key
  623. exit
  624. }
  625. 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
  626. sleep 1s
  627. function_verify
  628. updatedb
  629. if [[ -e $HOME/lista-arq ]] && [[ ! $(cat /etc/SCRIPT-LATAM/errorkey | grep "Codificacion Incorrecta") ]]; then
  630. msgi -bar2
  631. msgi -verd " Ficheros Copiados \e[97m[\e[93m Key By @Panel_NetVPS_bot \e[97m]"
  632. REQUEST=$(ofus "$Key" | cut -d'/' -f2)
  633. [[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
  634. pontos="."
  635. stopping="Configurando Directorios"
  636. for arqx in $(cat $HOME/lista-arq); do
  637. msgi -verm "${stopping}${pontos}"
  638. wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}" || {
  639. error_fun
  640. exit
  641. }
  642. tput cuu1 && tput dl1
  643. pontos+="."
  644. done
  645. sleep 1s
  646. msgi -bar2
  647. listaarqs="$(locate "lista-arq" | head -1)" && [[ -e ${listaarqs} ]] && rm $listaarqs
  648. cat /etc/bash.bashrc | grep -v '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >/etc/bash.bashrc.2
  649. echo -e '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >>/etc/bash.bashrc.2
  650. mv -f /etc/bash.bashrc.2 /etc/bash.bashrc
  651. echo "${SCPdir}/menu.sh" >/usr/bin/menu && chmod +x /usr/bin/menu
  652. echo "${SCPdir}/menu.sh" >/usr/bin/MENU && chmod +x /usr/bin/MENU
  653. echo "$Key" >${SCPdir}/key.txt
  654. [[ -d ${SCPinstal} ]] && rm -rf ${SCPinstal}
  655. [[ ${byinst} = "true" ]] && install_fim
  656. else
  657. invalid_key
  658. fi
  659. }
  660. incertar_key
  661. }
  662. Install_key
  663. }
  664. #MENUS
  665. clear && clear
  666. /bin/cp /etc/skel/.bashrc ~/
  667. /bin/cp /etc/skel/.bashrc /etc/bash.bashrc
  668. msgi -bar2
  669. echo -e " \e[5m\e[1;100m =====>> ►► MENU DE INSTALACION ◄◄ <<===== \e[1;37m"
  670. msgi -bar2
  671. #-- VERIFICAR VERSION
  672. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/Vercion")
  673. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  674. v22=$(cat /etc/SCRIPT-LATAM/temp/version_instalacion)
  675. vesaoSCT="\e[1;31m [ \e[1;32m( $v22 )\e[1;97m\e[1;31m ]"
  676. msgi -ama " PREPARANDO INSTALACION | VERSION: $vesaoSCT"
  677. msgi -bar2
  678. 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"
  679. echo -ne "\e[1;93m [\e[1;32m2\e[1;93m]\e[1;31m >\e[1;97m LACASITAMX............(9X) \e[1;31m 🎁 FREE \e[97m \n"
  680. 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"
  681. echo -ne "\e[1;93m [\e[1;32m4\e[1;93m]\e[1;31m >\e[1;97m ChumoGH...............(5.7u) \e[1;31m 🎁 FREE\e[97m \n"
  682. 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"
  683. msgi -bar2
  684. 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"
  685. msgi -bar2
  686. echo -ne "\e[1;97mDigite solo el numero segun su respuesta:\e[32m "
  687. read opcao
  688. case $opcao in
  689. 1)
  690. install_vps_mx_85_oficial
  691. ;;
  692. 2)
  693. install_LACASITA_90
  694. ;;
  695. 3)
  696. install_ADMRufu
  697. ;;
  698. 4)
  699. install_ChumoGH
  700. ;;
  701. 5)
  702. install_latam
  703. ;;
  704. esac
  705. exit