#!/bin/bash BARRA="\033[1;36m-----------------------------------------------------\033[0m" IVAR="/etc/http-instas" SCPT_DIR="/etc/SCRIPT" SCPinstal="$HOME/install" rm $(pwd)/$0 add-apt-repository universe apt update -y; apt upgrade -y install_ini () { clear echo -e "$BARRA" echo -e "\033[92m -- INSTALANDO PAQUETES NECESARIOS -- " echo -e "$BARRA" #bc [[ $(dpkg --get-selections|grep -w "bc"|head -1) ]] || apt-get install bc -y &>/dev/null [[ $(dpkg --get-selections|grep -w "bc"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "bc"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install bc................... $ESTATUS " #jq [[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || apt-get install jq -y &>/dev/null [[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "jq"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install jq................... $ESTATUS " #curl [[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || apt-get install curl -y &>/dev/null [[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "curl"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install curl................. $ESTATUS " #npm [[ $(dpkg --get-selections|grep -w "npm"|head -1) ]] || apt-get install npm -y &>/dev/null [[ $(dpkg --get-selections|grep -w "npm"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "npm"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install npm.................. $ESTATUS " #nodejs [[ $(dpkg --get-selections|grep -w "nodejs"|head -1) ]] || apt-get install nodejs -y &>/dev/null [[ $(dpkg --get-selections|grep -w "nodejs"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "nodejs"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install nodejs............... $ESTATUS " #socat [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || apt-get install socat -y &>/dev/null [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "socat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install socat................ $ESTATUS " #netcat [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || apt-get install netcat -y &>/dev/null [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "netcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install netcat............... $ESTATUS " #netcat-traditional [[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || apt-get install netcat-traditional -y &>/dev/null [[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "netcat-traditional"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install netcat-traditional... $ESTATUS " #net-tools [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || apt-get net-tools -y &>/dev/null [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "net-tools"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install net-tools............ $ESTATUS " #cowsay [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || apt-get install cowsay -y &>/dev/null [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "cowsay"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install cowsay............... $ESTATUS " #figlet [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || apt-get install figlet -y &>/dev/null [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "figlet"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install figlet............... $ESTATUS " #lolcat apt-get install lolcat -y &>/dev/null sudo gem install lolcat &>/dev/null [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] || ESTATUS=`echo -e "\033[91mFALLO DE INSTALACION"` &>/dev/null [[ $(dpkg --get-selections|grep -w "lolcat"|head -1) ]] && ESTATUS=`echo -e "\033[92mINSTALADO"` &>/dev/null echo -e "\033[97m # apt-get install lolcat............... $ESTATUS " echo -e "$BARRA" echo -e "\033[92m La instalacion de paquetes necesarios a finalizado" echo -e "$BARRA" echo -e "\033[97m Si la instalacion de paquetes tiene fallas" echo -ne "\033[97m Puede intentar de nuevo [s/n]: " read inst [[ $inst = @(s|S|y|Y) ]] && install_ini } msg () { BRAN='\033[1;37m' && VERMELHO='\e[31m' && VERDE='\e[32m' && AMARELO='\e[33m' AZUL='\e[34m' && MAGENTA='\e[35m' && MAG='\033[1;36m' &&NEGRITO='\e[1m' && SEMCOR='\e[0m' case $1 in -ne)cor="${VERMELHO}${NEGRITO}" && echo -ne "${cor}${2}${SEMCOR}";; -ama)cor="${AMARELO}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; -verm)cor="${AMARELO}${NEGRITO}[!] ${VERMELHO}" && echo -e "${cor}${2}${SEMCOR}";; -azu)cor="${MAG}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; -verd)cor="${VERDE}${NEGRITO}" && echo -e "${cor}${2}${SEMCOR}";; -bra)cor="${VERMELHO}" && echo -ne "${cor}${2}${SEMCOR}";; "-bar2"|"-bar")cor="${VERMELHO}======================================================" && echo -e "${SEMCOR}${cor}${SEMCOR}";; esac } ofus () { unset server server=$(echo ${txt_ofuscatw}|cut -d':' -f1) unset txtofus number=$(expr length $1) for((i=1; i<$number+1; i++)); do txt[$i]=$(echo "$1" | cut -b $i) case ${txt[$i]} in ".")txt[$i]="*";; "*")txt[$i]=".";; "1")txt[$i]="@";; "@")txt[$i]="1";; "2")txt[$i]="?";; "?")txt[$i]="2";; "4")txt[$i]="%";; "%")txt[$i]="4";; "-")txt[$i]="K";; "K")txt[$i]="-";; esac txtofus+="${txt[$i]}" done echo "$txtofus" | rev } verificar_arq () { unset ARQ case $1 in "v2r.sh")ARQ="/usr/bin/";; esac mv -f ${SCPinstal}/$1 ${ARQ}/$1 chmod +x ${ARQ}/$1 } meu_ip () { MIP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1) MIP2=$(wget -qO- ipv4.icanhazip.com) [[ "$MIP" != "$MIP2" ]] && IP="$MIP2" || IP="$MIP" } function_verify () { permited=$(curl -sSL "https://raw.githubusercontent.com/rudi9999/Control/master/Control-IP") [[ $(echo $permited|grep "${IP}") = "" ]] && { echo -e "\n\n\n\033[1;31m=====================================================" echo -e "\033[1;31m ¡LA IP $(wget -qO- ipv4.icanhazip.com) NO ESTA AUTORIZADA!" echo -e "\033[1;31m CONTACTE A @Rufu99" echo -e "\033[1;31m=====================================================\n\n\n" exit 1 } || { ### INTALAR VERCION DE SCRIPT [[ ! -d /etc/v2r ]] && mkdir /etc/v2r ver=$(curl -sSL "https://raw.githubusercontent.com/rudi9999/v2ray_manager/main/vercion") echo "$ver" > /etc/v2r/vercion [[ -e /usr/bin/v2r.sh ]] && rm -rf /usr/bin/v2r.sh &>/dev/null [[ -e /usr/bin/v2r ]] && rm -rf /usr/bin/v2r &>/dev/null } } error_fun () { msg -bar2 && msg -verm "ERROR de enlace VPS<-->GENERADOR" && msg -bar2 exit 1 } invalid_key () { msg -bar2 && msg -verm "#¡Key Invalida#! " && msg -bar2 [[ -e $HOME/lista-arq ]] && rm $HOME/lista-arq exit 1 } install_ini meu_ip clear msg -bar2 figlet " -V2RAY-" | lolcat while [[ ! $Key ]]; do msg -bar2 && msg -ne "# DIGITE LA KEY #: " && read Key tput cuu1 && tput dl1 done msg -ne "# Verificando Key # : " cd $HOME wget -O $HOME/lista-arq $(ofus "$Key")/$IP > /dev/null 2>&1 && echo -e "\033[1;32m Key Completa" || { echo -e "\033[1;91m Key Incompleta" invalid_key exit } 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 sleep 1s function_verify if [[ -e $HOME/lista-arq ]] && [[ ! $(cat $HOME/lista-arq|grep "KEY INVALIDA!") ]]; then msg -bar2 msg -e "\033[1;33mDescargando archivos... \033[1;31m[Proyect by @Rufu99]" REQUEST=$(ofus "$Key"|cut -d'/' -f2) [[ ! -d ${SCPinstal} ]] && mkdir ${SCPinstal} for arqx in $(cat $HOME/lista-arq); do echo -ne "\033[1;33mDescargando: \033[1;31m[$arqx] " wget --no-check-certificate -O ${SCPinstal}/${arqx} ${IP}:81/${REQUEST}/${arqx} > /dev/null 2>&1 && { echo -e "\033[1;31m- \033[1;32mRecibido!" verificar_arq "${arqx}" } || { echo -e "\033[1;31m- \033[1;31mFalla (no recibido!)" error_fun } done sleep 1s rm -rf FERRAMENTA KEY KEY! INVALIDA! rm $HOME/lista-arq [[ -d ${SCPinstal} ]] && rm -rf ${SCPinstal} echo "/usr/bin/v2r.sh" > /usr/bin/v2r && chmod +x /usr/bin/v2r clear echo -e "$BARRA" echo -e "\033[92m -- INSTALANDO V2RAY -- " echo -e "$BARRA" sleep 2 source <(curl -sL https://multi.netlify.app/v2ray.sh) clear echo -e "$BARRA" echo -e "\033[1;33m Perfecto, utilize el comando\n \033[1;31mv2r.sh o v2r\n \033[1;33mpara administrar v2ray" echo -e "$BARRA" echo -ne "\033[0m" else invalid_key fi rm -rf install-v2r.sh