install.sh 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  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/Multi-Script/main/Otros/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/Multi-Script/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/Multi-Script/main/Otros/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/NetVPS/Multi-Script/main/LACASITAMX-v9x/VPS-MX.tar.gz >/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/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/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/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/rebootnb &>/dev/null
  334. chmod +x /bin/rebootnb
  335. wget -O /bin/resetsshdrop https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/resetsshdrop &>/dev/null
  336. chmod +x /bin/resetsshdrop
  337. wget -O /etc/versin_script_new https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/Version &>/dev/null
  338. wget -O /etc/ssh/sshd_config https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/sshd &>/dev/null
  339. chmod 777 /etc/ssh/sshd_config
  340. wget -O /usr/bin/trans https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/trans &>/dev/null
  341. wget -O /bin/Desbloqueo.sh https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/desbloqueo.sh &>/dev/null
  342. chmod +x /bin/Desbloqueo.sh
  343. wget -O /bin/monitor.sh https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/monitor.sh &>/dev/null
  344. chmod +x /bin/monitor.sh
  345. wget -O /var/www/html/estilos.css https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/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. grep -v "^PasswordAuthentication" /etc/ssh/sshd_config >/tmp/passlogin && mv /tmp/passlogin /etc/ssh/sshd_config
  353. echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
  354. rm -rf /usr/local/lib/systemubu1 &>/dev/null
  355. rm -rf /etc/versin_script &>/dev/null
  356. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/Version")
  357. echo "$v1" >/etc/versin_script
  358. wget -O /etc/versin_script_new https://raw.githubusercontent.com/NetVPS/Multi-Script/main/LACASITAMX-v9x/Otros/Version &>/dev/null
  359. echo '#!/bin/sh -e' >/etc/rc.local
  360. sudo chmod +x /etc/rc.local
  361. echo "sudo rebootnb" >>/etc/rc.local
  362. echo "sudo resetsshdrop" >>/etc/rc.local
  363. echo "sleep 2s" >>/etc/rc.local
  364. echo "exit 0" >>/etc/rc.local
  365. /bin/cp /etc/skel/.bashrc ~/
  366. echo 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/' >>/etc/profile
  367. echo 'clear' >>.bashrc
  368. echo 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/' >>.bashrc
  369. echo 'echo ""' >>.bashrc
  370. #
  371. echo 'figlet -f slant "LACASITA" |lolcat' >>.bashrc
  372. echo 'mess1="$(less /etc/VPS-MX/message.txt)" ' >>.bashrc
  373. echo 'echo "" ' >>.bashrc
  374. echo 'echo -e "\t\033[92mRESELLER : $mess1 "' >>.bashrc
  375. echo 'echo -e "\t\e[1;33mVERSION: \e[1;31m$(cat /etc/versin_script_new)"' >>.bashrc
  376. echo 'echo "" ' >>.bashrc
  377. echo 'echo -e "\t\033[1;100mPARA MOSTAR PANEL BASH ESCRIBA:\e[0m\e[1;41m sudo menu \e[0m"' >>.bashrc
  378. echo 'echo ""' >>.bashrc
  379. rm -rf /usr/bin/pytransform &>/dev/null
  380. rm -rf LACASITA.sh
  381. rm -rf lista-arq
  382. [[ ! -e /etc/autostart ]] && {
  383. echo '#!/bin/bash
  384. clear
  385. #INICIO AUTOMATICO' >/etc/autostart
  386. chmod +x /etc/autostart
  387. } || {
  388. #[[ $(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
  389. for proc in $(ps x | grep 'dmS' | grep -v 'grep' | awk {'print $1'}); do
  390. screen -r -S "$proc" -X quit
  391. done
  392. screen -wipe >/dev/null
  393. echo '#!/bin/bash
  394. clear
  395. #INICIO AUTOMATICO' >/etc/autostart
  396. chmod +x /etc/autostart
  397. }
  398. crontab -r >/dev/null 2>&1
  399. (
  400. crontab -l 2>/dev/null
  401. echo "@reboot /etc/autostart"
  402. echo "* * * * * /etc/autostart"
  403. ) | crontab -
  404. service ssh restart &>/dev/null
  405. export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/
  406. rm -rf /usr/bin/pytransform &>/dev/null
  407. rm -rf VPS-MX.sh
  408. rm -rf lista-arq
  409. service ssh restart &>/dev/null
  410. clear && clear
  411. msgi -bar2
  412. echo -e "\e[1;92m >> INSTALACION COMPLETADA <<" && msgi -bar2
  413. echo -e " COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  414. echo -e " \033[1;41m menu \033[0;37m" && msgi -bar2
  415. }
  416. #ADMRufus
  417. install_ADMRufu() {
  418. clear && clear
  419. msgi -bar2
  420. echo -ne "\033[1;97m Digite su slogan: \033[1;32m" && read slogan
  421. tput cuu1 && tput dl1
  422. echo -e "$slogan"
  423. msgi -bar2
  424. clear && clear
  425. mkdir /etc/ADMRufu >/dev/null 2>&1
  426. cd /etc
  427. wget https://raw.githubusercontent.com/NetVPS/Multi-Script/main/R9/ADMRufu.tar.xz >/dev/null 2>&1
  428. tar -xf ADMRufu.tar.xz >/dev/null 2>&1
  429. chmod +x ADMRufu.tar.xz >/dev/null 2>&1
  430. rm -rf ADMRufu.tar.xz
  431. cd
  432. chmod -R 755 /etc/ADMRufu
  433. ADMRufu="/etc/ADMRufu" && [[ ! -d ${ADMRufu} ]] && mkdir ${ADMRufu}
  434. ADM_inst="${ADMRufu}/install" && [[ ! -d ${ADM_inst} ]] && mkdir ${ADM_inst}
  435. SCPinstal="$HOME/install"
  436. rm -rf /usr/bin/menu
  437. rm -rf /usr/bin/adm
  438. rm -rf /usr/bin/ADMRufu
  439. echo "$slogan" >/etc/ADMRufu/tmp/message.txt
  440. echo "${ADMRufu}/menu" >/usr/bin/menu && chmod +x /usr/bin/menu
  441. echo "${ADMRufu}/menu" >/usr/bin/adm && chmod +x /usr/bin/adm
  442. echo "${ADMRufu}/menu" >/usr/bin/ADMRufu && chmod +x /usr/bin/ADMRufu
  443. [[ -z $(echo $PATH | grep "/usr/games") ]] && echo 'if [[ $(echo $PATH|grep "/usr/games") = "" ]]; then PATH=$PATH:/usr/games; fi' >>/etc/bash.bashrc
  444. echo '[[ $UID = 0 ]] && screen -dmS up /etc/ADMRufu/chekup.sh' >>/etc/bash.bashrc
  445. echo 'v=$(cat /etc/ADMRufu/vercion)' >>/etc/bash.bashrc
  446. echo '[[ -e /etc/ADMRufu/new_vercion ]] && up=$(cat /etc/ADMRufu/new_vercion) || up=$v' >>/etc/bash.bashrc
  447. echo -e "[[ \$(date '+%s' -d \$up) -gt \$(date '+%s' -d \$(cat /etc/ADMRufu/vercion)) ]] && v2=\"Nueva Vercion disponible: \$v >>> \$up\" || v2=\"Script Vercion: \$v\"" >>/etc/bash.bashrc
  448. echo '[[ -e "/etc/ADMRufu/tmp/message.txt" ]] && mess1="$(less /etc/ADMRufu/tmp/message.txt)"' >>/etc/bash.bashrc
  449. echo '[[ -z "$mess1" ]] && mess1="@Rufu99"' >>/etc/bash.bashrc
  450. echo 'clear && echo -e "\n$(figlet -f big.flf " ADMRufu")\n RESELLER : $mess1 \n\n Para iniciar ADMRufu escriba: menu \n\n $v2\n\n"|lolcat' >>/etc/bash.bashrc
  451. update-locale LANG=en_US.UTF-8 LANGUAGE=en
  452. clear && clear
  453. msgi -bar2
  454. echo -e "\e[1;92m >> INSTALACION COMPLETADA <<" && msgi -bar2
  455. echo -e " COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  456. echo -e " \033[1;41m menu \033[0;37m" && msgi -bar2
  457. }
  458. #CHUMOGH
  459. install_ChumoGH() {
  460. clear && clear
  461. msgi -bar2
  462. echo -ne "\033[1;97m Digite su slogan: \033[1;32m" && read slogan
  463. echo -ne "\033[1;97m Nombre del Servidor: \033[1;32m" && read name
  464. msgi -bar2
  465. clear && clear
  466. mkdir /etc/adm-lite >/dev/null 2>&1
  467. cd /etc
  468. wget https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuG/adm-lite.tar.xz >/dev/null 2>&1
  469. tar -xf adm-lite.tar.xz >/dev/null 2>&1
  470. chmod +x adm-lite.tar.xz >/dev/null 2>&1
  471. rm -rf /etc/adm-lite.tar.xz
  472. cd
  473. chmod -R 755 /etc/adm-lite
  474. /bin/cp /etc/skel/.bashrc ~/
  475. rm -rf /etc/bash.bashrc >/dev/null 2>&1
  476. echo "$slogan" >/etc/adm-lite/menu_credito
  477. fecha=$(date +"%d-%m-%y")
  478. dom='base64 -d'
  479. SCPdir="/etc/adm-lite"
  480. SCPinstal="$HOME/install"
  481. SCPidioma="${SCPdir}"
  482. SCPusr="${SCPdir}"
  483. SCPfrm="${SCPdir}"
  484. SCPinst="${SCPdir}"
  485. cd /etc/adm-lite
  486. echo "cd /etc/adm-lite && ./menu" >/bin/menu
  487. echo "cd /etc/adm-lite && ./menu" >/bin/cgh
  488. echo "cd /etc/adm-lite && ./menu" >/bin/adm
  489. chmod +x /bin/menu
  490. chmod +x /bin/cgh
  491. chmod +x /bin/adm
  492. cd $HOME
  493. echo ""
  494. rm -rf mkdir /bin/ejecutar >/dev/null
  495. [[ -e /etc/adm-lite/menu_credito ]] && ress="$(cat </etc/adm-lite/menu_credito) " || ress="NULL ( no found ) "
  496. chmod +x /etc/adm-lite/*
  497. [[ -e ${SCPinstal}/v-local.log ]] && vv="$(cat <${SCPinstal}/v-local.log)" || vv="NULL"
  498. #cd /etc/adm-lite && bash cabecalho --instalar
  499. echo "verify" >$(echo -e $(echo 2f62696e2f766572696679737973 | sed 's/../\\x&/g;s/$/ /'))
  500. fecha=$(date +"%d-%m-%y")
  501. [[ -d /bin/ejecutar ]] && rm -rf /bin/ejecutar
  502. [[ -e /etc/adm-lite/gerar.sh ]] && rm -f /etc/adm-lite/gerar.sh
  503. mkdir /bin/ejecutar
  504. echo $fecha >/bin/ejecutar/fecha
  505. [[ -e /bin/ejecutar/menu_credito ]] && echo "" || echo "$(cat /etc/adm-lite/menu_credito)" >/bin/ejecutar/menu_credito && chmod +x /bin/ejecutar/menu_credito
  506. wget -q -O /bin/toolmaster https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuG/utilitarios/toolmaster
  507. chmod +x /bin/toolmaster
  508. echo 'source <(curl -sSL https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuG/utilitarios/free-men.sh)' >/bin/ejecutar/echo-ram.sh
  509. echo 'wget -q -O /bin/ejecutar/v-new.log https://raw.githubusercontent.com/NetVPS/Multi-Script/main/ChuG/utilitarios/v-new.log' >>/bin/ejecutar/echo-ram.sh && bash /bin/ejecutar/echo-ram.sh
  510. echo "clear" >>/root/.bashrc
  511. echo 'killall menu > /dev/null 2>&1' >>/root/.bashrc
  512. sed '/ChumoGH/ d' /root/.bashrc >/root/.bashrc.cp
  513. sed '/echo/ d' /root/.bashrc.cp >/root/.bashrc
  514. sed '/ejecutar/ d' /root/.bashrc >/root/.bashrc.cp
  515. sed '/date/ d' /root/.bashrc.cp >/root/.bashrc
  516. rm -f /root/.bashrc.cp
  517. echo 'DATE=$(date +"%d-%m-%y")' >>/root/.bashrc
  518. echo 'TIME=$(date +"%T")' >>/root/.bashrc
  519. echo 'figlet -k ChumoGH | lolcat' >>/root/.bashrc
  520. echo 'echo -e ""' >>/root/.bashrc
  521. echo 'bash /bin/ejecutar/echo-ram.sh' >>/root/.bashrc
  522. echo 'echo -e " Fecha de Instalacion : " $(cat < /bin/ejecutar/fecha)' >>/root/.bashrc
  523. echo 'echo -e " Nombre del Servidor : $HOSTNAME"' >>/root/.bashrc
  524. echo 'echo -e " Tiempo en Linea : $(uptime -p)"' >>/root/.bashrc
  525. echo 'echo -e " Memoria Libre : $(cat < /bin/ejecutar/raml)"' >>/root/.bashrc
  526. echo 'echo -e " Fecha del Servidor : $DATE"' >>/root/.bashrc
  527. echo 'echo -e " Hora del Servidor : $TIME"' >>/root/.bashrc
  528. echo 'echo -e ""' >>/root/.bashrc
  529. echo 'echo -e " Bienvenido!"' >>.bashrc
  530. echo 'echo -e "\033[1;43m Teclee cgh , menu o adm para ver el MENU\033[0m."' >>/root/.bashrc
  531. echo 'echo -e ""' >>/root/.bashrc
  532. [[ -z $name ]] && {
  533. rm -f /root/name
  534. } || {
  535. echo $name >/etc/adm-lite/name
  536. chmod +x /etc/adm-lite/name
  537. echo $name >/root/name
  538. }
  539. opti=0
  540. echo 0 >/bin/ejecutar/val
  541. echo 0 >/bin/ejecutar/uskill
  542. echo "desactivado" >/bin/ejecutar/val1
  543. [[ -e /bin/ejecutar/menu_credito ]] && echo "" || echo "$(cat /etc/adm-lite/menu_credito)" >/bin/ejecutar/menu_credito && chmod +x /bin/ejecutar/menu_credito
  544. echo "Verified【 $(cat /bin/ejecutar/menu_credito)" >/bin/ejecutar/exito
  545. clear && clear
  546. msgi -bar2
  547. echo -e "\e[1;92m >> INSTALACION COMPLETADA <<" && msgi -bar2
  548. echo -e " COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  549. echo -e " \033[1;41m menu \033[0;37m" && msgi -bar2
  550. }
  551. #SCRIPT LATAM 2.0
  552. install_latam() {
  553. #CARPETAS PRINCIPALES
  554. mkdir -p /etc/SCRIPT-LATAM >/dev/null 2>&1
  555. mkdir -p /etc/SCRIPT-LATAM/temp >/dev/null 2>&1
  556. mkdir -p /etc/SCRIPT-LATAM/filespy >/dev/null 2>&1
  557. mkdir -p /etc/SCRIPT-LATAM/botmanager >/dev/null 2>&1
  558. mkdir -p /etc/SCRIPT-LATAM/PortM >/dev/null 2>&1
  559. mkdir -p /etc/SCRIPT-LATAM/v2ray >/dev/null 2>&1
  560. mkdir -p /root/.ssh >/dev/null 2>&1
  561. Install_key() {
  562. wget /root/LATAM https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Instalador/LATAM -O /usr/bin/LATAM &>/dev/null
  563. chmod +x /usr/bin/LATAM
  564. /bin/cp /etc/skel/.bashrc ~/
  565. clear && clear
  566. SCPdir="/etc/SCRIPT-LATAM"
  567. SCPinstal="$HOME/install"
  568. Filbot="${SCPdir}/botmanager"
  569. Filpy="${SCPdir}/filespy"
  570. Filotros="${SCPdir}/temp"
  571. IP=$(cat /root/.ssh/authrized_key.reg)
  572. function_verify() {
  573. permited=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Control-IP")
  574. [[ $(echo $permited | grep "${IP}") = "" ]] && {
  575. clear && clear
  576. echo -e "\n\n\n\e[1;91m————————————————————————————————————————————————————\n ¡ESTA KEY NO CONCUERDA CON EL INSTALADOR! \n CONATACTE A @Kalix1\n————————————————————————————————————————————————————\n\n\n"
  577. # [[ -d /etc/SCRIPT-LATAM ]] && rm -rf /etc/SCRIPT-LATAM
  578. exit 1
  579. } || {
  580. ### INSTALAR VERSION DE SCRIPT
  581. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version")
  582. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  583. FIns=$(printf '%(%D-%H:%M:%S)T')
  584. echo "$FIns" >/etc/SCRIPT-LATAM/F-Instalacion
  585. }
  586. }
  587. fun_idi() {
  588. clear && clear
  589. msgi -bar2
  590. echo -e "\e[1;32m————————————————————————————————————————————————————"
  591. figlet -w 85 -f smslant " SCRIPT
  592. LATAM " | lolcat
  593. msgi -ama " [ ----- \e[1;97m 🐲 By @Kalix1 🐲\e[1;33m ----- ]"
  594. echo -e "\e[1;32m————————————————————————————————————————————————————"
  595. pv="$(echo es)"
  596. [[ ${#id} -gt 2 ]] && id="es" || id="$pv"
  597. byinst="true"
  598. }
  599. install_fim() {
  600. echo -e " \e[1;4;32mFinalizando Instalacion\e[0;39m"
  601. wget -O /bin/rebootnb https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Ejecutables/rebootnb.sh &>/dev/null
  602. chmod +x /bin/rebootnb
  603. wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null
  604. msgi -bar2
  605. echo '#!/bin/sh -e' >/etc/rc.local
  606. sudo chmod +x /etc/rc.local
  607. echo "sudo rebootnb reboot" >>/etc/rc.local
  608. echo "sleep 2s" >>/etc/rc.local
  609. echo "exit 0" >>/etc/rc.local
  610. echo 'clear && clear' >>.bashrc
  611. echo 'rebootnb login >/dev/null 2>&1' >>.bashrc
  612. echo 'echo -e "\e[1;31m————————————————————————————————————————————————————" ' >>.bashrc
  613. echo 'echo -e "\e[1;93m════════════════════════════════════════════════════" ' >>.bashrc
  614. echo 'sudo figlet -w 85 -f smslant " SCRIPT
  615. LATAM" | lolcat' >>.bashrc
  616. echo 'echo -e "\e[1;93m════════════════════════════════════════════════════" ' >>.bashrc
  617. echo 'echo -e "\e[1;31m————————————————————————————————————————————————————" ' >>.bashrc
  618. echo 'mess1="$(less -f /etc/SCRIPT-LATAM/message.txt)" ' >>.bashrc
  619. echo 'echo "" ' >>.bashrc
  620. echo 'echo -e "\e[92m -->> SLOGAN:\e[93m $mess1 "' >>.bashrc
  621. echo 'echo "" ' >>.bashrc
  622. echo 'echo -e "\e[1;97m ❗️ PARA MOSTAR PANEL BASH ESCRIBA ❗️\e[92m menu "' >>.bashrc
  623. echo 'wget -O /etc/SCRIPT-LATAM/temp/version_actual https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Version &>/dev/null' >>.bashrc
  624. echo 'echo ""' >>.bashrc
  625. #-BASH SOPORTE ONLINE
  626. wget https://raw.githubusercontent.com/NetVPS/LATAM_Oficial/main/Fixs%20Remotos/SPR.sh -O /usr/bin/SPR >/dev/null 2>&1
  627. chmod +x /usr/bin/SPR
  628. SPR >/dev/null 2>&1
  629. timeespera="1"
  630. times="10"
  631. if [ "$timeespera" = "1" ]; then
  632. echo -e "\e[1;97m ❗️ REGISTRANDO IP y KEY EN LA BASE ❗️ "
  633. msgi -bar2
  634. while [ $times -gt 0 ]; do
  635. echo -ne " -$times-\e[0K\r"
  636. sleep 1
  637. : $((times--))
  638. done
  639. tput cuu1 && tput dl1
  640. tput cuu1 && tput dl1
  641. tput cuu1 && tput dl1
  642. msgi -bar2
  643. echo -e " \e[1;92m LISTO REGISTRO COMPLETO "
  644. echo -e " \e[1;97m COMANDO PRINCIPAL PARA ENTRAR AL PANEL "
  645. echo -e " \e[1;41m menu o MENU \e[0;37m" && msgi -bar2
  646. fi
  647. meu_ip() {
  648. if [[ -e /tmp/IP ]]; then
  649. echo "$(cat /tmp/IP)"
  650. else
  651. MEU_IP=$(wget -qO- ifconfig.me)
  652. echo "$MEU_IP" >/tmp/IP
  653. fi
  654. }
  655. meu_ip
  656. exit
  657. }
  658. ofus() {
  659. unset server
  660. server=$(echo ${txt_ofuscatw} | cut -d':' -f1)
  661. unset txtofus
  662. number=$(expr length $1)
  663. for ((i = 1; i < $number + 1; i++)); do
  664. txt[$i]=$(echo "$1" | cut -b $i)
  665. case ${txt[$i]} in
  666. ".") txt[$i]="v" ;;
  667. "v") txt[$i]="." ;;
  668. "1") txt[$i]="@" ;;
  669. "@") txt[$i]="1" ;;
  670. "2") txt[$i]="?" ;;
  671. "?") txt[$i]="2" ;;
  672. "4") txt[$i]="p" ;;
  673. "p") txt[$i]="4" ;;
  674. "-") txt[$i]="L" ;;
  675. "L") txt[$i]="-" ;;
  676. esac
  677. txtofus+="${txt[$i]}"
  678. done
  679. echo "$txtofus" | rev
  680. }
  681. verificar_arq() {
  682. case $1 in
  683. "menu.sh" | "message.txt") ARQ="${SCPdir}/" ;;
  684. "LATAMbot.sh") ARQ="${Filbot}/" ;;
  685. "PDirect.py" | "PPub.py" | "PPriv.py" | "POpen.py" | "PGet.py") ARQ="${Filpy}/" ;;
  686. *) ARQ="${Filotros}/" ;;
  687. esac
  688. mv -f ${SCPinstal}/$1 ${ARQ}/$1
  689. chmod +x ${ARQ}/$1
  690. }
  691. #fun_ip
  692. [[ $1 = "" ]] && fun_idi || {
  693. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  694. }
  695. error_fun() {
  696. msgi -bar2
  697. msgi -bar2
  698. sleep 3s
  699. clear && clear
  700. echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
  701. msgi -bar2
  702. [[ $1 = "" ]] && fun_idi || {
  703. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  704. }
  705. echo -e "\e[1;31m ¡# ERROR INESPERADO #¡\n ESTA KEY YA FUE USADA O EXPIRO "
  706. echo -e "\e[0;93m -SI EL ERROR PERCISTE REVISAR PUERTO 81 TCP -"
  707. msgi -bar2
  708. 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
  709. service apache2 restart >/dev/null 2>&1
  710. [[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
  711. clear && clear
  712. msgi -bar2
  713. msgi -bar2
  714. rm -rf lista-arq
  715. echo -e "\e[1;97m ---- INSTALACION CANCELADA -----"
  716. msgi -bar2
  717. msgi -bar2
  718. exit 1
  719. }
  720. invalid_key() {
  721. msgi -bar2
  722. msgi -bar2
  723. sleep 3s
  724. clear && clear
  725. echo "Codificacion Incorrecta" >/etc/SCRIPT-LATAM/errorkey
  726. msgi -bar2
  727. [[ $1 = "" ]] && fun_idi || {
  728. [[ ${#1} -gt 2 ]] && fun_idi || id="$1"
  729. }
  730. echo -e "\e[1;31m CIFRADO INVALIDO -- #¡La Key fue Invalida#! "
  731. msgi -bar2
  732. 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
  733. [[ "$incertar_key" = "s" || "$incertar_key" = "S" ]] && incertar_key
  734. clear && clear
  735. msgi -bar2
  736. msgi -bar2
  737. echo -e "\e[1;97m ---- INSTALACION CANCELADA -----"
  738. msgi -bar2
  739. msgi -bar2
  740. exit 1
  741. }
  742. incertar_key() {
  743. [[ -d /etc/SCRIPT-LATAM/errorkey ]] && rm -rf /etc/SCRIPT-LATAM/errorkey >/dev/null 2>&1
  744. echo "By Kalix1" >/etc/SCRIPT-LATAM/errorkey
  745. msgi -bar2
  746. 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"
  747. echo -ne "\e[1;96m >>> INTRODUZCA LA KEY ABAJO <<<\n\e[1;31m " && read Key
  748. [[ -z "$Key" ]] && Key="NULL"
  749. tput cuu1 && tput dl1
  750. msgi -ne " \e[1;93m# Verificando Key # : "
  751. cd $HOME
  752. IPL=$(cat /root/.ssh/authrized_key.reg)
  753. wget -O $HOME/lista-arq $(ofus "$Key")/$IPL >/dev/null 2>&1 && echo -e "\e[1;32m Codificacion Correcta" || {
  754. echo -e "\e[1;31m Codificacion Incorrecta"
  755. invalid_key
  756. exit
  757. }
  758. 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
  759. sleep 1s
  760. function_verify
  761. updatedb
  762. if [[ -e $HOME/lista-arq ]] && [[ ! $(cat /etc/SCRIPT-LATAM/errorkey | grep "Codificacion Incorrecta") ]]; then
  763. msgi -bar2
  764. msgi -verd " Ficheros Copiados \e[97m[\e[93m Key By @Panel_NetVPS_bot \e[97m]"
  765. REQUEST=$(ofus "$Key" | cut -d'/' -f2)
  766. [[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal}
  767. pontos="."
  768. stopping="Configurando Directorios"
  769. for arqx in $(cat $HOME/lista-arq); do
  770. msgi -verm "${stopping}${pontos}"
  771. wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} >/dev/null 2>&1 && verificar_arq "${arqx}" || {
  772. error_fun
  773. exit
  774. }
  775. tput cuu1 && tput dl1
  776. pontos+="."
  777. done
  778. sleep 1s
  779. msgi -bar2
  780. listaarqs="$(locate "lista-arq" | head -1)" && [[ -e ${listaarqs} ]] && rm $listaarqs
  781. cat /etc/bash.bashrc | grep -v '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >/etc/bash.bashrc.2
  782. echo -e '[[ $UID != 0 ]] && TMOUT=15 && export TMOUT' >>/etc/bash.bashrc.2
  783. mv -f /etc/bash.bashrc.2 /etc/bash.bashrc
  784. echo "${SCPdir}/menu.sh" >/usr/bin/menu && chmod +x /usr/bin/menu
  785. echo "${SCPdir}/menu.sh" >/usr/bin/MENU && chmod +x /usr/bin/MENU
  786. echo "$Key" >${SCPdir}/key.txt
  787. [[ -d ${SCPinstal} ]] && rm -rf ${SCPinstal}
  788. [[ ${byinst} = "true" ]] && install_fim
  789. else
  790. invalid_key
  791. fi
  792. }
  793. incertar_key
  794. }
  795. Install_key
  796. }
  797. #MENUS
  798. clear && clear
  799. /bin/cp /etc/skel/.bashrc ~/
  800. /bin/cp /etc/skel/.bashrc /etc/bash.bashrc
  801. msgi -bar2
  802. echo -e " \e[5m\e[1;100m =====>> ►► MENU DE INSTALACION ◄◄ <<===== \e[1;37m"
  803. msgi -bar2
  804. #-- VERIFICAR VERSION
  805. v1=$(curl -sSL "https://raw.githubusercontent.com/NetVPS/Multi-Script/main/Vercion")
  806. echo "$v1" >/etc/SCRIPT-LATAM/temp/version_instalacion
  807. v22=$(cat /etc/SCRIPT-LATAM/temp/version_instalacion)
  808. vesaoSCT="\e[1;31m [ \e[1;32m( $v22 )\e[1;97m\e[1;31m ]"
  809. msgi -ama " PREPARANDO INSTALACION | VERSION: $vesaoSCT"
  810. msgi -bar2
  811. 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"
  812. 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"
  813. echo -ne "\e[1;93m [\e[1;32m3\e[1;93m]\e[1;31m >\e[1;97m ADMRufu \e[1;31m 🎁 FREE OBSOLETO\e[97m \n"
  814. echo -ne "\e[1;93m [\e[1;32m4\e[1;93m]\e[1;31m >\e[1;97m ChumoGH...............(5.7u) \e[1;31m 🎁 FREE PENDIENTE\e[97m \n"
  815. 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"
  816. msgi -bar2
  817. 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"
  818. msgi -bar2
  819. echo -ne "\e[1;97mDigite solo el numero segun su respuesta:\e[32m "
  820. read opcao
  821. case $opcao in
  822. 1)
  823. install_vps_mx_85_oficial
  824. ;;
  825. 2)
  826. install_LACASITA_90
  827. ;;
  828. 3)
  829. install_ADMRufu
  830. ;;
  831. 4)
  832. install_ChumoGH
  833. ;;
  834. 5)
  835. install_latam
  836. ;;
  837. esac
  838. exit