| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009 |
- #!/bin/bash
- #user=$(echo ${saks:0:5})
- cco=1
- #------- BANKEY --------------
- function chekKEY {
- Key="$(cat /etc/cghkey)"
- IiP="$(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}')"
- [[ ! -e /etc/folteto ]] && wget --no-check-certificate -O /etc/folteto $IiP:81/ChumoGH/checkIP.log
- cheklist="$(cat /etc/folteto)"
- chekKEY="$(echo -e "$cheklist" | grep ${Key} | awk '{print $5}')"
- chekIP="$(echo -e "$cheklist" | grep ${IP} | awk '{print $3}')"
- [[ -z ${chekKEY} || -z ${chekIP} ]] && {
- xyz=$(curl -sSL "https://www.dropbox.com/s/jzkd6fzey2u0m0g/token.sh")
- ID="$(echo $xyz| awk '{print $2}')"
- TOKEN="$(echo $xyz| awk '{print $1}')"
- urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
- echo 'clear&&clear
- echo -e "\n\n\n \033[0;31m==================================================
- ┬í ƒÜ½ KEY BANEADA ƒÜ½ ! CONTACTE Su ADMINISTRADOR
- ================================================== \n\n"
- ' > /bin/menu \
- [[ ! -d /etc/banned ]] && mkdir /etc/banned \
- chmod +x /bin/menu \
- mv /etc/adm-lite/menu /etc/banned/ \
- mv /etc/adm-lite/usercodes /etc/banned/ \
- rm -f /etc/folteto
- MENSAJE="${TTini}${m3ssg}MSG RECIVIDO${m3ssg}${TTfin}\n"
- MENSAJE+=" IP : ${IP} NO DETECTADA EN EL GENERADOR\n"
- MENSAJE+=" $(msg -bar4)\n"
- MENSAJE+=" HORA : $(printf '%(%D-%H:%M:%S)T')\n"
- MENSAJE+=" $(msg -bar4)\n"
- MENSAJE+=" ${rUlq} Bot generador de key ${rUlq}\n"
- MENSAJE+=" ${pUn5A} By @ChumoGH ${pUn5A} \n"
- MENSAJE+=" $(msg -bar4)\n"
- curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null
- exit && exit
- }
- }
- #-----------------------------
- users=$(cat /etc/passwd|grep 'home'|grep 'false'|grep -v 'syslog'|awk -F ':' '{print $1}')
- _ps="$(ps x)"
- unset tmm ext tempo tempoin
- uskk=$(cat /bin/ejecutar/uskill)
- [[ ! -d /etc/adm-lite/userDIR ]] && mkdir /etc/adm-lite/userDIR
- source /etc/adm-lite/cabecalho
- mem_free=$(free --mega -h | awk 'NR==2{printf $4}')
- cpu_used="$(top -b -n1 | grep 'Cpu(s)' | awk '{print $2 + $4}')"%
- if [ "$_userlock" > 0 ]; then
- ul="\033[1;33m( \033[1;31m$_userlock \033[1;32mLOCKED \033[1;33m)"
- else
- ul="\033[1;33m( \033[1;32mALL UNLOCK \033[1;33m)"
- fi
- [[ -z $(echo -e ${_ps} | grep "ultimatebot" | grep -v "grep") ]] && bt="\033[1;31mOFF\033[0m" || bt="\033[1;32mON\033[0m"
- var_sks1=$(echo -e ${_ps} | grep "checkuser" | grep -v grep >/dev/null && echo -e "\033[1;32mON\033[0m" || echo -e "\033[1;31mOFF\033[0m")
- echo -e "${cor[2]} ƒÖÄÔÇì ${cor[5]}CUENTAS SSH / SSL / DROPBEAR By @ChumoGH ƒÖÄÔÇì"
- msg -bar
- echo -e " \033[1;34m Ôû© M LIBRE: \033[1;32m${mem_free} \033[1;34m Ôû© USO DE CPU:\033[1;32m ${cpu_used} "
- msg -bar
- echo -e "\033[0;35m [\033[0;36m01\033[0;35m]\033[0;31m >${cor[3]} AGREGAR USUARIO\033[0;31m(\033[0;33mHWID\033[0;31m/\033[0;33mNORMAL\033[0;31m/\033[0;33mTOKEN\033[0;31m) ƒôØ" # ${cor[2]} [-] >${cor[3]} - "
- echo -e "\033[0;35m [\033[0;36m02\033[0;35m]\033[0;31m >${cor[3]} BORRAR 1/TODOS LOS USUARIO/s"
- echo -e "\033[0;35m [\033[0;36m03\033[0;35m]\033[0;31m >${cor[3]} EDITAR USUARIOS REGISTRADOS"
- echo -e "\033[0;35m [\033[0;36m04\033[0;35m]\033[0;31m >${cor[3]} MOSTRAR USUARIOS REGISTRADOS"
- echo -e "\033[0;35m [\033[0;36m05\033[0;35m]\033[0;31m >${cor[3]} MOSTRAR USUARIOS CONECTADOS "
- echo -e "\033[0;35m [\033[0;36m06\033[0;35m]\033[0;31m >${cor[3]} EDITAR BANNER ( SSH/Dropbear )"
- echo -e "\033[0;35m [\033[0;36m07\033[0;35m]\033[0;31m >${cor[3]} LOG DE CONSUMO ( Artificial )"
- echo -e "\033[0;35m [\033[0;36m08\033[0;35m]\033[0;31m >${cor[3]} BLOQUEAR / DESBLOQUEAR USUARIOS $ul"
- echo -e "\033[0;35m [\033[0;36m09\033[0;35m]\033[0;31m >${cor[3]} BACKUP USUARIOS \033[0;32m(#OFFICIAL)"
- echo -e "\033[0;35m [\033[0;36m10\033[0;35m]\033[0;31m >${cor[3]} MENU CUENTAS SSR/SS \033[0;32m(#OFFICIAL)"
- echo -e "\033[0;35m [\033[0;36m11\033[0;35m]\033[0;31m >${cor[3]} MENU DE CUENTAS V2RAY \033[0;33m(#BETA)"
- echo -e "\033[0;35m [\033[0;36m12\033[0;35m]\033[0;31m >${cor[3]} CONTROL SSH ( BotTelegram $bt ) "
- echo -e "\033[0;35m [\033[0;36m13\033[0;35m]\033[0;31m >${cor[3]} CHECKUSER ONLINE ( $var_sks1 ) "
- #echo -e "\033[0;35m [\033[0;36m15\033[0;35m]\033[0;31m >${cor[3]} MENU DE CUENTAS TROJAN \033[0;33m(#BETA)"
- msg -bar
- echo -e " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m > $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
- msg -bar
- if [ -e /etc/systemd/system/killadm.service ]; then
- echo -e "\033[1;31m \033[1;36m KILL MULTILOGUIN \033[1;32m(ON) \033[1;36mY FUNCIONANDO "
- else
- [[ -z $limiter_on ]] && limiter_on="\033[1;31mOFF\033[0m"
- echo -e "\033[0;33m(\033[0;32mCONTADOR :$limiter_on\033[0;33m) \033[1;36mActiva en MENU 7-OPCION 6\033[1;31m\033[1;36m\033[1;31m (Kill OFF)\033[0m"
- fi
- msg -bar
- #chekKEY &> /dev/null 2>&1
- mportas () {
- unset portas
- portas_var=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN")
- while read port; do
- var1=$(echo $port | awk '{print $1}') && var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
- [[ "$(echo -e $portas|grep "$var1 $var2")" ]] || portas+="$var1 $var2\n"
- done <<< "$portas_var"
- i=1
- echo -e "$portas"
- }
- selection_fun () {
- local selection="null"
- local range
- for((i=0; i<=$1; i++)); do range[$i]="$i "; done
- while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
- echo -ne "\033[1;31m NUMERO DE OPCION : " >&2
- read selection
- tput cuu1 >&2 && tput dl1 >&2
- done
- echo $selection
- }
- fk () {
- #echo -e "\033[1;39m "
- local _netCAT="$(netstat -tunlp)"
- echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mEn APPS como HTTP Inyector,CUSTOM,KPN Rev,etc" #| pv -qL 15
- [[ $(mportas|grep dropbear|head -1) ]] && {
- if echo -e "${_netCAT}" |grep sslh 1> /dev/null 2> /dev/null; then
- sslhp=`echo -e "${_netCAT}" | grep sslh| grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/sslh.txt && echo | cat /tmp/sslh.txt | tr '\n' ' ' > /etc/adm-lite/sslh.txt && cat /etc/adm-lite/sslh.txt`;
- #PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- for PORT in ${sslhp}; do
- echo -e "ÒÇÉ DROPBEAR >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
- done
- else
- #echo -e "\033[1;39mPara uso Dropbear usa la Sintaxis"
- dropbearports=`echo -e "${_netCAT}" | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
- #PORT=$(cat /etc/adm-lite/dropbearports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- for PORT in ${dropbearports}; do
- echo -e "ÒÇÉ Dropbear >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
- done
- fi
- } || {
- echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe Dropbear" | pv -qL 80
- }
- ######
- [[ $(mportas|grep stunnel|head -1) ]] && {
- if echo -e "${_netCAT}" |grep sslh 1> /dev/null 2> /dev/null; then
- sslhp=`echo -e "${_netCAT}" | grep sslh| grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/sslh.txt && echo | cat /tmp/sslh.txt | tr '\n' ' ' > /etc/adm-lite/sslh.txt && cat /etc/adm-lite/sslh.txt`;
- #PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- for PORT in ${sslhp}; do
- echo -e "ÒÇÉ SSL ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
- done
- else
- #echo -e "\033[1;39mPara uso SSL usa la Sintaxis"
- sslports=`echo -e "${_netCAT}" | grep stunnel | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/ssl.txt && echo | cat /tmp/ssl.txt | tr '\n' ' ' > /etc/adm-lite/sslports.txt && cat /etc/adm-lite/sslports.txt`;
- #PORT=$(cat /etc/adm-lite/sslports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- for PORT in ${sslports}; do
- echo -e "ÒÇÉ SSL ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
- done
- fi
- } || {
- echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe SSL" | pv -qL 80
- #echo -e "\033[1;39m"
- }
- [[ -e /etc/adm-lite/slow/dnsi/server.pub && -e /etc/adm-lite/slow/dnsi/domain_ns ]] && {
- echo -e "ÒÇÉ SLOWDNS KEY >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/server.pub) ÒÇæ"
- echo -e "ÒÇÉ DOMINIO NS >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/domain_ns) ÒÇæ"
- echo -e "ÒÇÉ CONEXION REDIRECCIONADA VIA PUERTO ->${cor[4]} $(cat /etc/adm-lite/slow/dnsi/puerto) ÒÇæ"
- }
- msg -bar
- }
- fkhwid () {
- local _netCAT="$(netstat -tunlp)"
- echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m En APPS como HTTP Inyector, CUSTOM, etc" #| pv -qL 15
- #echo -ne " " && msg -bra " \033[1;41m En APPS como HTTP Inyector, CUSTOM, etc"
- [[ $(mportas|grep dropbear|head -1) ]] && {
- if netstat -tunlp |grep sslh 1> /dev/null 2> /dev/null; then
- sslhp=`echo -e "${_netCAT}" | grep sslh| grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/sslh.txt && echo | cat /tmp/sslh.txt | tr '\n' ' ' > /etc/adm-lite/sslh.txt && cat /etc/adm-lite/sslh.txt`;
- PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- echo -e " ÒÇÉ DROPBEAR >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
- else
- #echo -e "\033[1;39mPara uso Dropbear usa la Sintaxis"
- dropbearports=`echo -e "${_netCAT}" | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/adm-lite/dropbearports.txt && cat /etc/adm-lite/dropbearports.txt`;
- PORT=$(cat /etc/adm-lite/dropbearports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- echo -e " ÒÇÉ Dropbear >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
- fi
- } || {
- echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe Dropbear" | pv -qL 80
- }
- ######
- [[ $(mportas|grep stunnel|head -1) ]] && {
- if netstat -tunlp |grep sslh 1> /dev/null 2> /dev/null; then
- local sslhp=`echo -e "${_netCAT}"| grep sslh| grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/sslh.txt && echo | cat /tmp/sslh.txt | tr '\n' ' ' > /etc/adm-lite/sslh.txt && cat /etc/adm-lite/sslh.txt`;
- local PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- echo -e " ÒÇÉ SSL ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
- else
- #echo -e "\033[1;39mPara uso SSL usa la Sintaxis"
- local sslports=`echo -e "${_netCAT}" | grep stunnel4 | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/ssl.txt && echo | cat /tmp/ssl.txt | tr '\n' ' ' > /etc/adm-lite/sslports.txt && cat /etc/adm-lite/sslports.txt`;
- local PORT=$(cat /etc/adm-lite/sslports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
- echo -e " ÒÇÉ SSL ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
- fi
- } || {
- echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe SSL" | pv -qL 80
- #echo -e "\033[1;39m"
- }
- [[ -e /etc/adm-lite/slow/dnsi/server.pub && -e /etc/adm-lite/slow/dnsi/domain_ns ]] && {
- echo -e "ÒÇÉ SLOWDNS KEY >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/server.pub) ÒÇæ"
- echo -e "ÒÇÉ DOMINIO NS >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/domain_ns) ÒÇæ"
- echo -e "ÒÇÉ CONEXION REDIRECCIONADA VIA PUERTO ->${cor[4]} $(cat /etc/adm-lite/slow/dnsi/puerto) ÒÇæ"
- }
- msg -bar
- }
- fun_ovpn_onl () {
- for userovpn in `cat /etc/passwd | grep ovpn | awk -F: '{print $1}'`; do
- us=$(cat /etc/openvpn/openvpn-status.log | grep $userovpn | wc -l)
- if [ "$us" != "0" ]; then
- echo "$userovpn"
- fi
- done
- }
- time-us () {
- if [[ -z "${tempoin}" ]];then
- tempoin="30"
- tempoin=$(( $tempoin * 60 ))
- tempoin=$tempoin"s"
- echo "Default 30 minutos"
- fi
- tempo=$(echo "$tempoin" |sed 's/ //g')
- tmm=$(echo $tempo |sed 's/[0-9]//g')
- if [ "$tmm" = "s" ]; then
- ext=$(echo $tempo |sed 's/[a-z]//g')
- let tempo=$ext*1
- tempo=$tempo"s"
- #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
- ext=1
- fi
- if [ "$tmm" = "m" ]; then
- ext=$(echo $tempo |sed 's/[a-z]//g')
- let tempo=$ext*60
- tempo=$tempo"s"
- #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
- ext=1
- fi
- if [ "$tmm" = "h" ]; then
- ext=$(echo $tempo |sed 's/[a-z]//g')
- if [ "$ext" > "23" ]; then
- ext=$(echo $tempo |sed 's/[a-z]//g')
- let tempo=$ext*3600
- tempo=$tempo"s"
- else
- let tempo=$ext*3600
- tempo=$tempo"s"
- ext=1
- fi
- #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
- fi
- if [ "$tmm" = "d" ]; then
- ext=$(echo $tempo |sed 's/[a-z]//g')
- let tempo=$ext*3600
- tempo=$tempo"s"
- #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
- fi
- }
- recuva1 () {
- source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/sd)
- }
- function criarusuarioteste(){
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- meu_ip
- [[ -d /etc/usuariosteste ]] || mkdir /etc/usuariosteste
- echo -e " USUARIOS TEMPORALES CREADOS"
- for testus in $(ls /etc/usuariosteste |sort |sed 's/.sh//g')
- do
- echo "$testus"
- done
- printf "\n"
- echo -e "${cor[5]} Ingrese Nombre del Usuario:"; read -p "Digita : " -e -i demo-$(($RANDOM*10))
- nome="demo-$(date | md5sum | head -c10)"
- if [ -z $nome ]; then
- echo -e "${cor[5]} ÔÜá´©Å ÔÜá´©Å${cor[0]}"
- return
- fi
- if cat /etc/passwd |grep $nome: |grep -vi [a-z]$nome |grep -v [0-9]$nome > /dev/null
- then
- echo -e "${cor[5]} ÔÜá´©Å USUARIO YA EXISTE, REGISTRE OTRO ÔÜá´©Å${cor[0]}"
- return
- fi
- msg -bar
- echo -e "${cor[5]} Contrase├▒a para el usuario $nome"
- name=$nome
- pass="$(date | md5sum | head -c10)"
- msg -bar
- echo -e "${cor[5]} Duraci├│n para el Usuario $nome"
- echo -e " Use s = segundos, m = minutos, h = horas e d = dias EX: 14s ."
- read -p " VALIDEZ: " tempoin
- echo -e "${cor[5]} LIMITE DE CONEXIONES PARA $name"
- read -p " LIMITE: " limit
- if [[ -z "${limit}" ]];then
- limit="5"
- echo "Default 5 Logins"
- fi
- msg -bar
- time-us
- valides=$(date '+%C%y-%m-%d' -d " +$ext days")
- useradd -M -N -s /bin/false $nome -e $valides
- (echo $pass;echo $pass) |passwd $nome 1>/dev/null 2>/dev/null
- chage -I 1 $nome 2> /dev/null
- if [ "$OPENVPN" = "on" ]; then
- open_1 $nome $pass $daysrnf $limit s
- echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
- echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
- echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
- echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
- echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
- msg -bar
- rm -f ./$CLIENT.ovpn > /dev/null
- return
- fi
- echo "#!/bin/bash" > /etc/usuariosteste/$nome.sh
- echo "sleep $tempo" >> /etc/usuariosteste/$nome.sh
- echo "uskk=$(cat /bin/ejecutar/uskill)" >> /etc/usuariosteste/$nome.sh
- echo 'uskk=$(($uskk + 1))' >> /etc/usuariosteste/$nome.sh
- echo 'echo $uskk > /bin/ejecutar/uskill' >> /etc/usuariosteste/$nome.sh
- echo "kill"' $(ps -u '"$nome |awk '{print"' $1'"}') 1>/dev/null 2>/dev/null
- userdel --force $nome
- rm -rf ./$CLIENT.ovpn > /dev/null
- rm -rf /etc/usuariosteste/$nome.sh
- exit" >> /etc/usuariosteste/$nome.sh
- screen -dmS ${nome} bash /etc/usuariosteste/$nome.sh
- #figlet $nome | lolcat
- echo -e "${cor[5]} * Registrar Usuario Temporal *"
- echo -e "${cor[5]} * Puertas Activas en su Servidor *"
- msg -bar
- ports_
- msg -bar
- echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
- echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
- echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
- echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
- echo -e "${cor[5]} VALIDEZ : ${cor[4]}$tempo"
- msg -bar
- echo "senha: $pass" > $dir_user/$nome
- echo "limite: $limit" >> $dir_user/$nome
- echo "data: $valid" >> $dir_user/$nome
- echo -ne "${cor[2]}"
- fk
- echo -e " Despues de expirar !!!!"
- echo -e " Este usuario sera desconectados y eliminados."
- echo -ne "${cor[2]}"
- return
- }
- #USUARIO TEST DE PRUEBA
- net_meter () {
- net_dir="/etc/adm-lite/userDIR/usr_cnx"
- if [ ! -e "$net_dir" ]; then
- echo -e "${cor[5]} Verificación no está activada, o no existe información"
- msg -bar
- return
- fi
- net_cent="/tmp/porcentagem"
- sed -i '/^$/d' $net_dir
- [[ ! -e "$net_cent" ]] && touch $net_cent
- while read cent; do
- echo "$cent" | awk '{print $2}' >> $net_cent
- done < $net_dir
- por_cent=$(paste -sd+ $net_cent | bc)
- rm $net_cent
- bb=$(printf '%-18s' "USO APROXIMADO")
- aa=$(printf '%-19s' "USUARIOS")
- cc=$(printf '%-18s' "CONSUMO TOTAL")
- msg -bar
- echo -e "\033[1;33m $aa $bb $cc"
- msg -bar
- while read u; do
- b=$(printf '%-18s' "$(($(echo $u | awk '{print $2}')/970)) - MB")
- a=$(printf '%-20s' "$(echo $u | awk '{print $1}')")
- [[ "$por_cent" = "0" || "$por_cent" = "" ]] && por_cent="1"
- pip=$(echo $u | awk '{print $2}')
- [[ "$pip" = "" || "$pip" = "0" ]] && pip="1"
- percent_user=$(($pip*100/$por_cent)) > /dev/null 2>&1
- [[ $percent_user = "0" ]] && percent_user="1"
- c=$(printf '%-18s' "$percent_user %%")
- if [ "$(($(echo $u | awk '{print $2}')/970))" -gt "1" ]; then
- echo -e "\033[1;32m $a \033[1;31m$b \033[1;32m$c"
- fi
- done < $net_dir
- [[ "$(cat $net_dir)" = "" ]] && echo -e "${cor[5]} Verificación no está activada, o no existe información"
- msg -bar
- echo -e "${cor[1]} Controlar Consumo de Cada Usuario Por Separado ${cor[0]}"
- unset net_dir
- #monit_user
- }
- drop_kill () {
- user="$1"
- echo "$user $for_kill"
- for pid in `$(dropbear_pids | grep "$user" | awk '{print $2}')`; do
- kill $pid
- done
- }
- botusers () {
- unset bot_ini
- PIDGEN=$(echo -e ${_ps}|grep -v grep|grep "ultimatebot")
- killall $PIDGEN > /dev/null 2>&1
- if [[ ! $PIDGEN ]]; then
- msg -bar
- echo -ne "\033[1;97m Deseas Activar el Bot Telegram [s/n]: "
- read bot_ini
- msg -bar
- [[ $bot_ini = @(s|S|y|Y) ]] && source <(curl -sSL https://www.dropbox.com/s/zvn8naajedzldno/telebot.sh.sh)
- else
- kill -9 $(echo -e ${_ps} | grep "ultimatebot" | grep -v "grep" | awk '{print $1}') > /dev/null 2>&1 && echo "BOT DETENIDO EXITOSAMENTE"
- fi
- }
- consul_cli () {
- botusers
- dir_user="/etc/adm-lite/userDIR"
- msg -bar
- echo -e "${cor[4]} CONSULTA DATOS DE CLIENTE INDIVIDUAL"
- msg -bar
- select_users
- if [ "$select_name" = "" ]; then
- return
- fi
- namer="$select_name"
- [[ $(cat /etc/adm-lite/userDIR/$namer | grep "limite" | awk '{print $2}') = "HWID" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
- [[ $(cat /etc/adm-lite/userDIR/$namer | grep "limite" | awk '{print $2}') = "TOKEN" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
- echo -e "${cor[5]} Que opci├│n va a editar de: $namer"
- echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m >${cor[3]} Consultar estado de Usuario: $nameFX"
- echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m >${cor[3]} Reiniciar Usuario: $nameFX"
- msg -bar
- read -p " ESCOJE: " _opt
- if [ "$_opt" = "1" ]; then
- unset limite
- data=$(cat $dir_user/$namer | grep "data" | awk '{print $2}')
- data_sec=$(date +%s)
- data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
- data_user_sec=$(date +%s --date="$data_user")
- variavel_soma=$(($data_user_sec - $data_sec))
- dias_use=$(($variavel_soma / 86400))
- if [ -z "$limite" ]; then
- limite="null"
- fi
- if [ "$dias_use" -le 0 ]; then
- echo -e " Ô£¡ Eiii, Malas Noticias Ôÿ╣!!\n Usuario : $nameFX. Esta Caducado Ôÿ╣ \n!! Contacta Cliente, Para Renobar su Membresia\n" | pv -qL 80
- echo -e "${cor[5]} Usuario $nameFX: VENCIDO EL: $data"
- pkill -u $namer
- else
- limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
- date="$dias_use"
- datexp=$(date "+%d/%m/%Y" -d " + $date days")
- valid=$(date '+%C%y-%m-%d' -d " + $date days")
- echo -e " Ô£¡ SU CLIENTE : $namer, ES VALIDO HASTA -> $data Ôÿ║"
- echo -e " Ô£¡ CON ÒÇÉ $limite ÒÇæ CONEXIONES SIMULTANEAS!!. "
- echo -e "${cor[5]} RENUEVA EN $dias_use DIAS, DISFRUTE SU ESTANCIA!. "
- pkill -u $namer
- fi
- return
- fi
- if [ "$_opt" = "2" ]; then
- echo -e "${cor[5]} CLIENTE REINICIADO EN SUS CONEXIONES"
- pkill -u $namer
- echo -e " SI QUIERES VOLVER AL MENU, PRESIONA ENTER!."
- read -p " DIGITA ÒÇÄ ok ÒÇÅ PARA REINICIAR SERVICIO SSH Ôûó TUNNEL : " _ok
- if [ "$_ok" = "ok" ]; then
- echo -ne " \033[1;31m[ ! ] Services dropbear restart"
- service dropbear restart > /dev/null 2>&1
- [[ -e /etc/init.d/dropbear ]] && /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
- echo -ne " \033[1;31m[ ! ] Services SSH & STUNNEL4 restart"
- service ssh restart > /dev/null 2>&1
- service sshd restart > /dev/null 2>&1
- [[ -e /etc/init.d/ssh ]] && /etc/init.d/ssh restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
- service stunnel4 restart > /dev/null 2>&1
- echo "SERVICIOS REINICIADOS EXITOSAMENTE " | pv -qL 50
- fi
- return
- fi
- }
- fun_time_user () {
- declare -A data
- usr_pids_var="./userDIR"
- user_x="$1"
- if [ -e $usr_pids_var/$user_x.pid2 ]; then
- source $usr_pids_var/$user_x.pid2
- [[ ${data[$user_x]} != +([0-9]) ]] && data[$user_x]="0"
- _data_now=$(date +%s)
- time[$user_x]=$((${_data_now} - ${data[$user_x]}))
- else
- time[$user_x]="0"
- fi
- }
- fun_us() {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- echo -e " \033[0;50m ÔÜ£´©Å CREADOR DE CUENTAS TIPO ÔÜ£´©Å "
- msg -bar
- echo -e " \033[0;35m[\033[0;32m01\033[0;35m] \033[0;33m >\033[0;33m SSH|DROPBEAR (DEMO) "
- echo -e " \033[0;35m[\033[0;32m02\033[0;35m] \033[0;33m >\033[0;33m SSH|DROPBEAR "
- echo -e " \033[0;35m[\033[0;32m03\033[0;35m] \033[0;33m >\033[0;33m HWID "
- echo -e " \033[0;35m[\033[0;32m04\033[0;35m] \033[0;33m >\033[0;31m TOKEN "
- msg -bar
- echo -e " \033[0;35m[\033[0;32m05\033[0;35m] \033[0;33m >\033[0;31m MODIFICAR CONTRASEÑA TOKEN "
- msg -bar
- echo -e " \033[0;35m[\033[1;32m00\033[0;35m] \033[0;33m  $(msg -bra "\e[3;33m[ VOLVER ]\e[0m")"
- msg -bar
- selection=$(selection_fun 5)
- case ${selection} in
- 0|00)
- return
- ;;
- 1|01)
- cd /etc/adm-lite/ && criarusuarioteste
- ;;
- 2|02)
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- function_1
- ;;
- 3|03)
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- fun_us_hwid
- ;;
- 4|04)
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- fun_us_tk
- ;;
- 5)
- [[ ! -e /bin/ejecutar/token ]] && touch /bin/ejecutar/token
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- echo -e "${cor[5]} ÔÜá´©Å CLAVE ACTUAL : $(cat < /bin/ejecutar/token) ÔÜá´©Å${cor[0]}"
- msg -bar
- echo -e "${cor[5]} ÔÜá´©Å ATENCION ANTES DE CONTINUAR ÔÜá´©Å${cor[0]}"
- echo -e ""
- echo -e " SE DEFINIRA SU CONTRASEÑA TOKEN UNICA"
- echo -e " UNA VEZ COLOCADA SE RECOMIENDA NO CAMBIARLA"
- echo ""
- msg -bar
- echo -ne "${cor[5]} ÔÄÜ CONTRASE├æA "; read -p "TOKEN : " passtok
- echo ${passtok} > /bin/ejecutar/token
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- ;;
- esac
- }
- fun_us_hwid(){
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- echo -ne "${cor[5]} ÔÄÜ NOMBRE DE"; read -p " USUARIO : " name
- tput cuu1 && tput dl1
- [[ -z $name ]] && echo -e "${cor[5]} ÔÜá´©Å NO REGISTRO NOMBRE, RETORNANDO ÔÜá´©Å${cor[0]}" && return
- msg -bar
- echo -e "${cor[5]} INGRESA HWID PARA $name"
- read -p " HWID: " hwid
- if cat /etc/passwd |grep $hwid: |grep -vi [a-z]$hwid |grep -v [0-9]$hwid > /dev/null
- then
- echo -e "${cor[5]} ÔÜá´©Å HWID YA EXISTE, REGISTRE OTRO ÔÜá´©Å${cor[0]}"
- return
- fi
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- [[ -z "${hwid}" ]] && echo " ÔÜá´©Å No se Ingreso HWID , RETORNANDO! ÔÜá´©Å" && return
- msg -bar
- echo -e "${cor[5]} TIEMPO DE DURACION EN DIAS PARA $name"
- read -p " VALIDEZ : " daysrnf
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- [[ -z "${daysrnf}" ]] && daysrnf="2"
- msg -bar
- meu_ip
- valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
- datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
- useradd -M -s /bin/false $hwid -e $valid
- (echo $hwid; echo $hwid)|passwd $hwid 2>/dev/null
- echo "$hwid 1" >>/root/usuarios.db
- tput cuu1 >&2 && tput dl1 >&2
- #figlet $name | lolcat
- echo -e "${cor[5]} * Puertas Activas en su Servidor *"
- msg -bar
- ports_
- msg -bar
- echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
- echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
- echo -e "${cor[5]} HWID : ${cor[4]}$hwid"
- echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
- msg -bar
- echo "senha: $name" > $dir_user/$hwid
- echo "limite: HWID" >> $dir_user/$hwid
- echo "data: $valid" >> $dir_user/$hwid
- fkhwid
- msg -bar
- tput cuu1 >&2 && tput dl1 >&2
- echo -ne "${cor[2]}"
- return
- }
- fun_us_tk(){
- [[ ! -e /bin/ejecutar/token ]] && {
- echo -e "${cor[5]} ÔÜá´©Å ATENCION ANTES DE CONTINUAR ÔÜá´©Å${cor[0]}"
- echo -e ""
- echo -e " SE DEFINIRA SU CONTRASEÑA TOKEN UNICA"
- echo -e " UNA VEZ COLOCADA NO PODRA SER MANIPULADA"
- echo ""
- msg -bar
- echo -ne "${cor[5]} ÔÄÜ CONTRASE├æA "; read -p "TOKEN : " passtok
- echo ${passtok} > /bin/ejecutar/token
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- }
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- echo -ne "${cor[5]} ÔÄÜ NOMBRE DE"; read -p " USUARIO : " name
- tput cuu1 && tput dl1
- [[ -z $name ]] && echo -e "${cor[5]} ÔÜá´©Å NO REGISTRO NOMBRE, RETORNANDO ÔÜá´©Å${cor[0]}" && return
- msg -bar
- echo -e "${cor[5]} INGRESA TOKEN PARA $name"
- read -p " TOKEN: " hwid
- if cat /etc/passwd |grep $hwid: |grep -vi [a-z]$hwid |grep -v [0-9]$hwid > /dev/null
- then
- echo -e "${cor[5]} ÔÜá´©Å TOKEN YA EXISTE, REGISTRE OTRO ÔÜá´©Å${cor[0]}"
- return
- fi
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- [[ -z "${hwid}" ]] && echo " ÔÜá´©Å No se Ingreso TOKEN , RETORNANDO! ÔÜá´©Å" && return
- msg -bar
- echo -e "${cor[5]} TIEMPO DE DURACION EN DIAS PARA $name"
- read -p " VALIDEZ : " daysrnf
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- [[ -z "${daysrnf}" ]] && daysrnf="2"
- msg -bar
- meu_ip
- valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
- datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
- [[ -e /bin/ejecutar/token ]] && passTOKEN=$(less /bin/ejecutar/token) || passTOKEN="ChumoGHPlus"
- if useradd -M -s /bin/false $hwid -e $valid ; then
- (echo $passTOKEN; echo $passTOKEN)|passwd $hwid 2>/dev/null
- echo "$hwid 1" >>/root/usuarios.db
- clear&&clear
- echo -e "${cor[5]} * Puertas Activas en su Servidor *"
- msg -bar
- ports_
- msg -bar
- echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
- echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
- echo -e "${cor[5]} TOKEN : ${cor[4]}$hwid"
- echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
- msg -bar
- echo "senha: $name" > $dir_user/$hwid
- echo "limite: TOKEN" >> $dir_user/$hwid
- echo "data: $valid" >> $dir_user/$hwid
- fkhwid
- msg -bar
- else
- echo -e "${cor[5]} ÔÜá´©Å ERROR AL REGISTRAR SU TOKEN | REINTENTE ÔÜá´©Å${cor[0]}"
- fi
- echo -ne "${cor[2]}"
- return
- }
- function_1 () {
- echo -e "${cor[4]} ÔØæ MENU DE CREACION DE USUARIOS ÔØÆ "
- msg -bar
- echo -ne "${cor[5]} > NOMBRE DE"; read -p " USUARIO : " name
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [ -z $name ]; then
- echo -e "${cor[5]} ÔÜá´©Å NO REGISTRO NOMBRE, RETORNANDO ÔÜá´©Å${cor[0]}"
- return
- fi
- if cat /etc/passwd |grep $name: |grep -vi [a-z]$name |grep -v [0-9]$name > /dev/null
- then
- echo -e "${cor[5]} ÔÜá´©Å USUARIO YA EXISTE, USE OTRO NOMBRE ÔÜá´©Å${cor[0]}"
- return
- fi
- msg -bar
- echo -e "${cor[5]} CONTRASEÑA PARA $name"
- read -p " CONTRASEÑA : " pass
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [[ -f "${pass}" ]];then
- pass="$(date | md5sum | head -c10)"
- fi
- msg -bar
- echo -e "${cor[5]} TIEMPO DE DURACION EN DIAS PARA $name"
- read -p " VALIDEZ : " daysrnf
- daysrnf=$(echo -e "$daysrnf" |sed -e 's/[^0-9]//ig')
- number_var $daysrnf
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [[ -f "${daysrnf}" ]];then
- daysrnf="2"
- fi
- msg -bar
- echo -e "${cor[5]} LIMITE DE CONEXIONES PARA $name"
- read -p " LIMITE : " limit
- limit=$(echo -e "$limit" |sed -e 's/[^0-9]//ig')
- number_var $limit
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [[ -f "${limit}" ]];then
- limit="1"
- fi
- msg -bar
- meu_ip
- if [ "$OPENVPN" = "on" ]; then
- open_1 $name $pass $daysrnf $limit s
- msg -bar
- ports_
- msg -bar
- echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
- echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
- echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
- echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
- echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
- msg -bar
- fk
- rm -rf ./$CLIENT.ovpn > /dev/null 2>&1
- rm -f ./$CLIENT.ovpn > /dev/null 2>&1
- msg -bar
- return
- fi
- valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
- datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
- #echo -ne " USUARIO"
- #(
- if useradd -M -s /bin/false $name -e $valid ; then
- (echo $pass; echo $pass)|passwd $name >/dev/null 2>&1 &
- echo "$name $limit" >>/root/usuarios.db
- tput cuu1 >&2 && tput dl1 >&2
- figlet $name | lolcat
- echo -e "${cor[5]} * Puertas Activas en su Servidor *"
- msg -bar
- ports_
- msg -bar
- echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
- echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
- echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
- echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
- echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
- msg -bar
- echo "senha: $pass" > $dir_user/$name
- echo "limite: $limit" >> $dir_user/$name
- echo "data: $valid" >> $dir_user/$name
- fk
- msg -bar
- tput cuu1 >&2 && tput dl1 >&2
- [[ -e /etc/v2ray/config.json ]] && {
- echo -e "\033[1;41m AÑADIR USUARIO VMESS ?\033[0;33m :v"
- echo -ne "\033[0;32m "
- read -p " Responde [ s | n ] : " -e -i "n" x
- tput cuu1 >&2 && tput dl1 >&2
- tput cuu1 >&2 && tput dl1 >&2
- [[ $x = @(s|S|y|Y) ]] && source <(curl -sSL https://www.dropbox.com/s/z6txyjygpri7ede/adduser.sh) $name $daysrnf
- msg -bar
- }
- else
- echo -e "${cor[5]} ÔÜá´©Å ERROR AL REGISTRAR SU USUARIO | REINTENTE ÔÜá´©Å${cor[0]}"
- fi
- echo -ne "${cor[2]}"
- return
- }
- function_2 () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- echo -e "${cor[4]} ELIMINAR USUARIOS"
- msg -bar
- echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;33m >${cor[3]} ELIMINAR 1 USER"
- echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;33m >${cor[3]} ELIMINAR TODOS"
- echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;33m >${cor[3]} ELIMINAR TODOS LOS CADUCADOS"
- msg -bar
- selection=$(selection_fun 3)
- case ${selection} in
- 0)
- return
- ;;
- 1)
- msg -bar
- echo -e "${cor[4]} USUARIOS REGISTRADOS"
- msg -bar
- select_users
- name="$select_name"
- [[ -z $name ]] && return
- [[ $(cat /etc/adm-lite/userDIR/$name | grep "limite" | awk '{print $2}') = "HWID" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$name | grep "senha" | awk '{print $2}')" || nameFX=$name
- [[ $(cat /etc/adm-lite/userDIR/$name | grep "limite" | awk '{print $2}') = "TOKEN" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$name | grep "senha" | awk '{print $2}')" || nameFX=$name
- [[ "$OPENVPN" = "on" ]] && open_2 $name && msg -bar&& return
- userdel --force $name > /dev/null 2>/dev/null
- kill -9 `ps aux |grep -vi '[a-z]$name' |grep -vi '$name[a-z]' |grep -v '[1-9]$name' |grep -v '$name[1-9]' |grep $name |awk {'print $2'}` 2> /dev/null
- pid_kill=$(dropbear_pids | grep "$name" | awk '{print $2}')
- uskk=$(cat /bin/ejecutar/uskill)
- let uskk=$uskk+$cco
- echo $uskk > /bin/ejecutar/uskill
- [[ ! -z $pid_kill ]] && drop_kill $name
- [[ -e /etc/usuariosteste/$name ]] && rm /etc/usuariosteste/$name && msg -bar
- echo -e " $nameFX ${cor[2]} ELIMINADO "
- msg -bar
- return
- ;;
- 2)
- for name in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1 |sort`; do
- msg -bar
- echo -e "${cor[5]} ELIMINAR A $name ?"
- read -p " [S/N]: " _remover_
- if [[ "$_remover_" = "s" || "$_remover_" = "S" ]]; then
- if [ "$OPENVPN" = "on" ]; then
- open_2 $name
- else
- userdel --force $name > /dev/null 2>&1
- kill -9 `ps aux |grep -vi '[a-z]$name' |grep -vi '$name[a-z]' |grep -v '[1-9]$name' |grep -v '$name[1-9]' |grep $name |awk {'print $2'}` > /dev/null 2>&1
- pid_kill=$(dropbear_pids | grep "$name" | awk '{print $2}')
- uskk=$(cat /bin/ejecutar/uskill)
- let uskk=$uskk+$cco
- echo $uskk > /bin/ejecutar/uskill
- [[ ! -z $pid_kill ]] && drop_kill $name
- [[ -e $dir_user/$name ]] && rm $dir_user/$name
- echo -e "\033[1;37m $name ${cor[5]} ELIMINADO"
- fi
- fi
- done
- msg -bar
- ;;
- 3)
- function_6
- msg -bar
- return
- ;;
- esac
- }
- function_3 () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- echo -e "${cor[4]} MODIFICAR DATOS DE USUARIOS"
- msg -bar
- select_users
- if [ "$select_name" = "" ]; then
- return
- fi
- namer="$select_name"
- [[ $(cat /etc/adm-lite/userDIR/$namer | grep "limite" | awk '{print $2}') = "HWID" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
- [[ $(cat /etc/adm-lite/userDIR/$namer | grep "limite" | awk '{print $2}') = "TOKEN" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
- meu_ip
- echo -e "${cor[5]} ESCOJE LA OPCION A CAMBIAR DE $namer"
- echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m >${cor[3]} NUMERO DE LOGINS DE \033[0;36m$nameFX"
- echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m >${cor[3]} FECHA DE EXPIRACION DE \033[0;36m$nameFX"
- echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;31m >${cor[3]} CONTRASEÑA LOGIN DE \033[0;36m$nameFX"
- msg -bar
- read -p " SELECCIONA UNA OPC : " _opt
- [[ "$_opt" = "1" ]] && {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- read -p " NUEVO LIMITE DE CONEXIONES : " new_limit
- number_var $new_limit
- tput cuu1 && tput dl1
- if [ "$new_limit" = "" ]; then
- echo -e "${cor[5]} \033[1;31m NO SE REGISTRO LIMITE! REGRESANDO. . ."
- return
- fi
- usr_var=$(cat $dir_user/$namer | grep -v "limite:")
- echo "$usr_var" > $dir_user/$namer
- echo "limite: $new_limit" >> $dir_user/$namer
- msg -bar
- echo -e " Ô£¡ Perfecto, HEMOS CAMBIADO SU LIMITE DE CONEXIONES!! Ô£¡ "
- echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
- echo -e " Host / IP : ${cor[4]}$IP"
- echo -e " SU CLIENTE : $nameFX "
- echo -e " NUEVO LIMITE : $new_limit "
- pkill -u $nameFX
- msg -bar
- unset new_limit
- unset usr_var
- return
- }
- [[ "$_opt" = "2" ]] && {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- add_dias() {
- echo -ne "${cor[5]} NUMEROS DE DIAS A AGREGAR"
- read -p " : " date
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [ "$date" = "" ]; then
- echo -e "\033[1;31m ÔÜá´©Å NO SE REGISTRO DIAS! REGRESANDO ÔÜá´©Å"
- return
- fi
- #echo -e " CALCULANDO DIAS RESTANTES DE $namer" | pv -qL 40
- data=$(cat $dir_user/$namer | grep "data" | awk '{print $2}')
- data_sec=$(date +%s)
- data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
- data_user_sec=$(date +%s --date="$data_user")
- variavel_soma=$(($data_user_sec - $data_sec))
- dias_use=$(($variavel_soma / 86400))
- #echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
- [[ $dias_use -ge 0 ]] && {
- date=$(($dias_use + $date))
- echo -e "\033[1;32m $dias_use DIAS RECUPERADOS &&"
- tput cuu1 && tput dl1
- } || {
- #[[ $dias_use < 0 ]] && dias_use=0
- echo -e "\033[1;31m $dias_use DIAS RECUPERADOS &&"
- tput cuu1 && tput dl1
- }
- limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
- if [ -z "$limite" ]; then
- limite="null"
- fi
- clear&&clear
- datexp=$(date "+%d/%m/%Y" -d " + $date days")
- valid=$(date '+%C%y-%m-%d' -d " + $date days")
- if [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]]; then
- usermod -U $namer
- sleep 2
- msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
- fi
- chage -E $valid $namer 2> /dev/null
- [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && {
- pass="$(cat < /etc/adm-lite/userDIR/$namer.exp)"
- (echo "$pass" ; echo "$pass" ) |passwd $namer > /dev/null 2>/dev/null
- rm -f /etc/adm-lite/userDIR/$namer.exp
- }
- usr_var=$(cat $dir_user/$namer | grep -v "data")
- echo -e "$usr_var" > $dir_user/$namer
- echo -e "data: $valid" >> $dir_user/$namer
- msg -bar
- echo -e " Ô£¡ Perfecto, Hemos Renovado tu Membresia!! Ô£¡ "
- echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
- echo -e " Host / IP : ${cor[4]}$IP"
- echo -e " SU CLIENTE : $nameFX "
- echo -e " USER LIMITED : $limite "
- echo -e " VALIDO HASTA : $datexp"
- echo -e "${cor[5]} RENUEVA EN $date DIAS, DISFRUTE SU ESTANCIA!. "
- pkill -u $namer
- msg -bar
- unset datexp
- unset valid
- unset usr_var
- return
- }
- del_dias() {
- echo -ne "${cor[5]} NUMEROS DE DIAS A QUITAR"
- read -p " : " date
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [ "$date" = "" ]; then
- echo -e "\033[1;31m ÔÜá´©Å NO SE REGISTRO DIAS! REGRESANDO ÔÜá´©Å"
- return
- fi
- data=$(cat $dir_user/$namer | grep "data" | awk '{print $2}')
- data_sec=$(date +%s)
- data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
- data_user_sec=$(date +%s --date="$data_user")
- variavel_soma=$(($data_user_sec - $data_sec))
- dias_use=$(($variavel_soma / 86400))
- [[ $dias_use -ge 0 ]] && {
- date=$(($dias_use - $date))
- echo -e "\033[1;32m $dias_use DIAS RECUPERADOS &&"
- tput cuu1 && tput dl1
- } || {
- echo -e "\033[1;31m $dias_use DIAS RECUPERADOS &&"
- tput cuu1 && tput dl1
- }
- limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
- if [ -z "$limite" ]; then
- limite="null"
- fi
- clear&&clear
- datexp=$(date "+%d/%m/%Y" -d " + $date days")
- valid=$(date '+%C%y-%m-%d' -d " + $date days")
- if [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]]; then
- usermod -U $namer
- sleep 2
- msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
- fi
- chage -E $valid $namer 2> /dev/null
- [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && {
- pass="$(cat < /etc/adm-lite/userDIR/$namer.exp)"
- (echo "$pass" ; echo "$pass" ) |passwd $namer > /dev/null 2>/dev/null
- rm -f /etc/adm-lite/userDIR/$namer.exp
- }
- usr_var=$(cat $dir_user/$namer | grep -v "data")
- echo -e "$usr_var" > $dir_user/$namer
- echo -e "data: $valid" >> $dir_user/$namer
- echo -e " Ô£¡ Perfecto, Hemos Renovado tu Membresia!! Ô£¡ "
- echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
- echo -e " Host / IP : ${cor[4]}$IP"
- echo -e " SU CLIENTE : $nameFX "
- echo -e " ƒô▒ PERMITIDOS : $limite "
- echo -e " VALIDO HASTA : $datexp"
- echo -e "${cor[5]} RENUEVA EN $(($date + 1 )) DIAS, DISFRUTE SU ESTANCIA!. "
- msg -bar
- pkill -u $namer
- unset datexp
- unset valid
- unset usr_var
- return
- }
- ren_dias() {
- echo -ne "${cor[5]} NUMEROS DE DIAS "
- read -p " : " date
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- if [ "$date" = "" ]; then
- echo -e "\033[1;31m ÔÜá´©Å NO SE REGISTRO DIAS! REGRESANDO ÔÜá´©Å"
- return
- fi
- limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
- if [ -z "$limite" ]; then
- limite="null"
- fi
- clear&&clear
- datexp=$(date "+%d/%m/%Y" -d " + $date days")
- valid=$(date '+%C%y-%m-%d' -d " + $date days")
- if [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]]; then
- usermod -U $namer
- sleep 2
- msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
- fi
- chage -E $valid $namer 2> /dev/null
- [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && {
- pass="$(cat < /etc/adm-lite/userDIR/$namer.exp)"
- (echo "$pass" ; echo "$pass" ) |passwd $namer > /dev/null 2>/dev/null
- rm -f /etc/adm-lite/userDIR/$namer.exp
- }
- echo -e "${cor[5]} CAMBIADO !"
- usr_var=$(cat $dir_user/$namer | grep -v "data")
- echo -e "$usr_var" > $dir_user/$namer
- echo -e "data: $valid" >> $dir_user/$namer
- msg -bar
- echo -e " Ô£¡ Perfecto, Hemos Renovado tu Membresia!! Ô£¡ "
- echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
- echo -e " Host / IP : ${cor[4]}$IP"
- echo -e " SU CLIENTE : $nameFX "
- echo -e " ƒô▒ PERMITIDOS : $limite "
- echo -e " VALIDO HASTA : $datexp"
- echo -e "${cor[5]} RENUEVA EN $(($date + 1 )) DIAS, DISFRUTE SU ESTANCIA!. "
- pkill -u $namer
- msg -bar
- unset datexp
- unset valid
- unset usr_var
- return
- }
- echo -e "${cor[5]} ESCOJE LA OPCION A CAMBIAR DE $nameFX"
- msg -bar
- echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m >${cor[3]} AÑADIR DIAS A \033[0;36m$nameFX"
- echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m >${cor[3]} QUITAR DIAS A \033[0;36m$nameFX"
- echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;31m >${cor[3]} REINICIAR DIAS A \033[0;36m$nameFX"
- msg -bar
- read -p " OPCION " _ropt
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- [[ $_ropt = "1" ]] && add_dias
- [[ $_ropt = "2" ]] && del_dias
- [[ $_ropt = "3" ]] && ren_dias
- return
- }
- [[ "$_opt" = "3" ]] && {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- echo -e "${cor[5]} NUEVA CONTRASEÑA PARA $nameFX"
- read -p " : " nova_senha
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- [[ "$nova_senha" = "" ]] && echo -e "${cor[5]}ÔØî CONTRASE├æA NO MODIFICADA ÔØî" && return
- (echo "$nova_senha" ; echo "$nova_senha" ) |passwd $namer > /dev/null 2>/dev/null
- usr_var1=$(cat $dir_user/$namer | grep -v "senha")
- echo -e "$usr_var1" > $dir_user/$namer
- echo -e "senha: $nova_senha" >> $dir_user/$namer
- [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && rm -f /etc/adm-lite/userDIR/$namer.exp
- msg -bar
- echo -e " Ô£¡ Perfecto, HEMOS CAMBIADO SU CONTRASE├æA!! Ô£¡ "
- echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
- echo -e " Host / IP : ${cor[4]}$IP"
- echo -e " SU CLIENTE : $nameFX "
- echo -e " NUEVA CLAVE : $nova_senha "
- pkill -u $namer
- msg -bar
- unset nova_senha
- unset usr_var1
- return
- }
- [[ -z $_opt ]] && echo "ÔÜá´©Å SIN SELECCION ÔÜá´©Å"
- }
- block_user () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- #msg -bar
- echo -e "${cor[4]} LOCK / UNLOCK USUARIO PRIVADO "
- msg -bar
- select_users
- [[ -z $select_name ]] && return
- namer="$select_name"
- local lmt="$(cat /etc/adm-lite/userDIR/$namer | grep "limite" | awk '{print $2}')"
- [[ $(echo $lmt) = "HWID" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
- [[ $(echo $lmt) = "TOKEN" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
- echo -e "${cor[5]} VERIFICANDO ESTADO DE $nameFX "
- msg -bar
- ########
- if [[ $(passwd --status $namer|cut -d ' ' -f2) = "P" ]]; then
- echo -e "${cor[5]}Bloqueando USER "
- pkill -u $namer &>/dev/null
- droplim=`dropbear_pids|grep -w "$namer"|awk '{print $2}'`
- kill -9 $droplim &>/dev/null
- usermod -L $namer &>/dev/null
- sleep 2
- msg -verm2 " ÔÜá´©Å LOCK ÔÜá´©Å"
- else
- usermod -U $namer
- sleep 2
- msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
- fi
- pkill -u $namer
- kill -9 `ps aux |grep -vi '[a-z]$namer' |grep -vi '$namer[a-z]' |grep -v '[1-9]$namer' |grep -v '$namer[1-9]' |grep $namer |awk {'print $2'}` 2> /dev/null
- return
- }
- function_4 () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- echo -e "${cor[4]} > USUARIO CONTRASEÑA LIMITE USO TIEMPO"
- msg -bar
- _cont="0"
- for namer in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
- if [ "$namer" = "" ]; then
- break
- fi
- if [ -e $dir_user/$namer ]; then
- _sen=$(cat $dir_user/$namer | grep "senha" | awk '{print $2}')
- _limit=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
- [[ ${_limit} = "HWID" ]] && token="$_sen"
- else
- _limit="Ôê×"
- _sen="Ôê×"
- fi
- [[ -z "$_limit" ]] && _limit="ÔÜá´©Å ?? ÔÜá´©Å"
- [[ -z "$_sen" ]] && _sen="ÔÜá´©Å ?? ÔÜá´©Å"
- data_sec=$(date +%s)
- data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
- if [ "$data_user" = " never" ]; then
- dias_user="\033[1;37mINDEFINIDO"
- else
- data_user_sec=$(date +%s --date="$data_user")
- if [ "$data_sec" -gt "$data_user_sec" ]; then
- dias_user="\033[1;31mEXP"
- else
- variavel_soma=$(($data_user_sec - $data_sec))
- dias_use=$(($variavel_soma / 86400))
- dias_user="\033[1;32m$dias_use DIAS"
- fi
- fi
- unset SEC
- unset MIN
- unset HOR
- #SEC=$(cat $namer.time | grep "$namer" | awk '{print $2}')
- [[ -e /etc/adm-lite/userDIR/$namer.time ]] && SEC=$(cat /etc/adm-lite/userDIR/$namer.time) || SEC="0"
- number_var $SEC
- if [ "$var_number" = "" ]; then
- SEC="0"
- else
- SEC="$var_number"
- fi
- hour_var=$(echo "HORAS" | cut -b 1)
- min_var=$(echo "ACTA" | cut -b 1)
- MIN=$(($SEC / 60))
- SEC=$(($SEC - $MIN * 60))
- HOR=$(($MIN / 60))
- MIN=$(($MIN - $HOR * 60))
- txto[1]=$(printf '%-10s' "$namer")
- txto[2]=$(printf '%-12s' "$_sen")
- txto[3]=$(printf '%-10s' "$_limit")
- txto[4]=$(printf '%-10s' "${HOR}h:${MIN}m:${SEC}s")
- [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]] && txto[5]="\033[1;31mLOCK" || txto[5]=$(printf '%-2s' "$dias_user")
- #$dir_user/$namer.block
- unset open_vpn
- tmp="$(cat /etc/passwd | grep -v ovpn | cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1)"
- open_vpn=$(echo "$tmp" | grep "$namer")
- _cont=$(($_cont + 1))
- #[[ ${#_cont} < 2 ]] && _contx="0$_cont"
- if [ "$open_vpn" != "" ]; then
- #user ssh
- [[ -e $dir_user/$namer ]] && [[ $(cat $dir_user/$namer | grep "limite" | awk '{print $2}') = "HWID" || $(cat $dir_user/$namer | grep "limite" | awk '{print $2}') = "TOKEN" ]] && {
- [[ $(cat $dir_user/$namer | grep "limite" | awk '{print $2}') = "HWID" ]] && echo -e "\033[0;35m [\033[0;36m$_cont\033[0;35m]\033[0;31m ${cor[2]}${cor[7]} ${txto[2]} ${txto[3]} ${txto[4]} ${txto[5]}" && echo -e " \033[1;32m ÔñÀ HWID ${cor[2]}- \033[1;31m${txto[1]} "
- [[ $(cat $dir_user/$namer | grep "limite" | awk '{print $2}') = "TOKEN" ]] && echo -e "\033[0;35m [\033[0;36m$_cont\033[0;35m]\033[0;31m ${cor[2]}${cor[7]} ${txto[2]} ${txto[3]} ${txto[4]} ${txto[5]}" && echo -e " \033[1;32m ÔñÀ TOKEN ${cor[2]}- \033[1;31m${txto[1]} "
- } || {
- echo -e "\033[0;35m [\033[0;36m$_cont\033[0;35m]\033[0;31m ${cor[2]}${cor[7]} ${txto[1]} ${txto[2]} ${txto[3]} ${txto[4]} ${txto[5]}"
- }
- else
- #user openvpn
- echo -e "\033[0;35m [\033[0;36m$_cont\033[0;35m]\033[0;31m ${cor[5]} ${txto[1]} ${txto[2]} ${txto[3]} ${txto[4]} ${txto[5]}"
- fi
- done
- msg -bar
- echo -e " \033[1;32m ƒö░ # TIENES \033[1;33m [ \033[1;36m${_cont}\033[1;33m ]\033[1;32m CLIENTES EN TU SERVIDOR ƒö░ #"
- msg -bar
- unset txt_
- }
- function_5 () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- cab=$(printf '%-15s%-15s%-9s' 'USUARIO' 'CONEXIONES' 'TIEMPO HH:MM:SS')
- msg -bar
- echo -e "\E[41;1;37m $cab\E[0m"
- unset conex1
- msg -bar
- _data_now=$(date +%s)
- for user in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
- i=${user}
- sqd="$(ps -u $user | grep sshd | wc -l)"
- [[ "$sqd" = "" ]] && sqd=0
- [[ -e /etc/openvpn/openvpn-status.log ]] && ovp="$(cat /etc/openvpn/openvpn-status.log | grep -E ,"$user", | wc -l)" || ovp=0
- if netstat -nltp|grep 'dropbear'> /dev/null;then
- drop="$(dropbear_pids | grep "$user" | wc -l)"
- else
- drop=0
- fi
- cnx=$(($sqd + $drop))
- conex=$(($cnx + $ovp))
- if [[ $cnx -gt 0 ]]; then
- tst="$(ps -o etime $(ps -u $user |grep sshd |awk 'NR==1 {print $1}')|awk 'NR==2 {print $1}')"
- tst1=$(echo "$tst" | wc -c)
- if [[ "$tst1" == "9" ]]; then
- timerr="$(ps -o etime $(ps -u $user |grep sshd |awk 'NR==1 {print $1}')|awk 'NR==2 {print $1}')"
- else
- timerr="$(echo "00:$tst")"
- fi
- elif [[ $ovp -gt 0 ]]; then
- tmp2=$(printf '%(%H:%M:%S)T\n')
- tmp1="$(grep -w "$i" /etc/openvpn/openvpn-status.log |awk '{print $4}'| head -1)"
- [[ "$tmp1" = "" ]] && tmp1="00:00:00" && tmp2="00:00:00"
- var1=`echo $tmp1 | cut -c 1-2`
- var2=`echo $tmp1 | cut -c 4-5`
- var3=`echo $tmp1 | cut -c 7-8`
- var4=`echo $tmp2 | cut -c 1-2`
- var5=`echo $tmp2 | cut -c 4-5`
- var6=`echo $tmp2 | cut -c 7-8`
- calc1=`echo $var1*3600 + $var2*60 + $var3 | bc`
- calc2=`echo $var4*3600 + $var5*60 + $var6 | bc`
- seg=$(($calc2 - $calc1))
- min=$(($seg/60))
- seg=$(($seg-$min*60))
- hor=$(($min/60))
- min=$(($min-$hor*60))
- timerusr=`printf "%02d:%02d:%02d \n" $hor $min $seg;`
- timerr=$(echo "$timerusr" | sed -e 's/[^0-9:]//ig' )
- else
- timerr="00:00:00"
- fi
- #timerr=$(printf '%-11s' "${timerr}")
- #######################
- [[ -e $dir_user/${user} ]] && [[ $(cat $dir_user/${user} | grep "limite" | awk '{print $2}') = "HWID" ]] && {
- user="$(cat $dir_user/${user} | grep "senha" | awk '{print $2}') \033[1;33m[\033[1;34mHWID\033[1;33m]\033[1;32m"
- _limiter='/1'
- }
- [[ -e $dir_user/${user} ]] && [[ $(cat $dir_user/${user} | grep "limite" | awk '{print $2}') = "TOKEN" ]] && {
- user="$(cat $dir_user/${user} | grep "senha" | awk '{print $2}') \033[1;33m[\033[1;35mTOKEN\033[1;33m]\033[1;32m"
- _limiter='/1'
- }
- [[ -e $dir_user/${user} ]] && _limiter="\033[1;32m/\033[1;31m$(cat $dir_user/${user} | grep "limit" | awk '{print $2}')\033[1;33m]\033[1;32m" || _limiter='/ÔÜá´©Å\033[1;33m]\033[1;32m'
- if [ "$conex" -gt "0" ]; then
- conex1+="${conex}+"
- #echo -e " \033[1;32m$(printf '%-12s' "${user}")|\033[1;33m[\033[1;35m$(printf '%-7s' "${user_pid}${_limiter}")|$(printf '%-1s' "${HOR}h:${MIN}m:${SEC}s")${cor[0]}" |column -t -s '|'
- #echo -e " \033[1;32m$(printf '%-15s' "${user}") \033[1;33m[\033[1;35m$(printf '%-11s' "${conex}${_limiter}") ${timerr}${cor[0]}"
- user="${user}"
- lim="\033[1;33m[\033[1;35m$(printf '%-7s' ${conex}${_limiter})"
- local users+=" ${user}, $lim, ${timerr}, ${cor[0]}\n"
- #else
- #[[ -e $usr_pids_var/$user.pid2 ]] && rm $usr_pids_var/$user.pid2
- fi
- done
- [[ -z $(locale | grep "LANG=" | cut -d "=" -f2) ]] && export LANG=en_US.UTF-8
- echo -e "$users" | column -e -t -s ","
- tput cuu1 && tput dl1
- conex1+="0"
- conex1=$(echo $conex1|bc)
- [[ "$conex1" = "" ]] && echo -e "\033[1;31m ÔÜá´©Å NO TIENES USUARIOS CONECTADOS ! ÔÜá´©Å "
- msg -bar
- echo -e " \033[1;32m ƒö░ # TIENES \033[1;33m [ \033[1;36m${conex1}\033[1;33m ]\033[1;32m USUARIOS CONECTADOS ƒö░ #"
- msg -bar
- }
- function_6 () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- unset _removidos
- msg -bar
- datenow=$(date +%s)
- for user in $(awk -F: '{print $1}' /etc/passwd); do
- expdate=$(chage -l $user|awk -F: '/Account expires/{print $2}')
- echo $expdate|grep -q never && continue
- datanormal=$(date -d"$expdate" '+%d/%m/%Y')
- expsec=$(date +%s --date="$expdate")
- diff=$(echo $datenow - $expsec|bc -l)
- echo $diff|grep -q ^\- && continue
- userdel --force $user > /dev/null 2>/dev/null
- kill -9 `ps aux |grep -vi '[a-z]$user' |grep -vi '$user[a-z]' |grep -v '[1-9]$user' |grep -v '$user[1-9]' |grep $user |awk {'print $2'}` 2> /dev/null
- pid_kill=$(dropbear_pids | grep "$user" | awk '{print $2}')
- uskk=$(cat /bin/ejecutar/uskill)
- let uskk=$uskk+$cco
- echo $uskk > /bin/ejecutar/uskill
- [[ "$pid_kill" != "" ]] && drop_kill $user
- [[ "$OPENVPN" = "on" ]] && open_2 $name
- [[ -e $dir_user/$user ]] && rm $dir_user/$user
- _removidos="on"
- echo -e "\033[1;37m $user ${cor[2]} ELIMINADO "
- done
- if [ "$_removidos" = "" ]; then
- echo -e "${cor[5]} ÔÜá´©Å No hay Usuarios Vencidos! ÔÜá´©Å "
- unset _removidos
- fi
- msg -bar
- }
- ban_per () {
- clear
- local="/etc/bannerssh"
- msg -bar
- echo -e "\033[1;37m Ôêå Linux Dist: $_os\033[0m"
- msg -bar
- echo -e "\033[1;37m - BANNER Manipulado - \033[0m"
- msg -bar
- echo -e "\033[1;37mSeleccione su Sistema: Para Salir Ctrl + C o 0 Para Regresar\033[1;33m"
- echo -e " \033[1;31m[ !!! ]\033[1;33m PEGA AQUI TU BANNER \033[1;31m\033[1;33m"
- msg -bar
- echo -e " \033[1;31mLuego de Pegar tu banner Presiona Ctrl + O y Enter \033[1;33m \033[1;31m\033[1;33m"
- echo -e " \033[1;31m Por Ultimo Ctrl + X \033[1;33m \033[1;31m\033[1;33m"
- echo -ne "\033[1;37m"
- read -p " Presiona Enter para Continuar "
- apt install nano -y > /dev/null 2>&1
- nano /bin/ejecutar/bannerssh
- cat /bin/ejecutar/bannerssh > /etc/bannerssh
- rm /bin/ejecutar/bannerssh
- fun_bar
- #[[ ! -e /root/name ]] && credi="@ChumoGH" || credi=$(cat < /root/name)
- #echo '<p style="text-align: center;"><strong><span style="color: #FF00FF;">'$(cat /bin/ejecutar/menu_credito)'®</span> | </strong><span style="color: #483D8B;"><strong>'$credi'</strong></span></p>' >> /etc/bannerssh
- [[ -d /etc/dropbear ]] && {
- [[ -e /etc/bannerssh ]] && cat /etc/bannerssh > /etc/dropbear/banner
- } || men="NO EXISTE DROPBEAR"
- msg -bar
- echo -ne " \033[1;31m[ ! ] VERIFICANDO DROPBEAR "
- service dropbear restart > /dev/null 2>&1
- [[ -e /etc/init.d/dropbear ]] && {
- /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || {
- echo -e "\033[1;31m - BANNER INCOMPATIBLE CON DROPBEAR -\n" && echo "DESTRUYENDO DISEÑO"
- echo "" > /etc/dropbear/banner
- /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]"
- }
- } || echo -e "\033[0;35m [ $men ]"
- echo -ne " \033[1;31m[ ! ] VERIFICANDO SSH"
- service ssh restart > /dev/null 2>&1
- service sshd restart > /dev/null 2>&1
- [[ -e /etc/init.d/ssh ]] && /etc/init.d/ssh restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
- sleep 0.1s
- exit
- }
- txt_font () {
- echo -e "\n\033[1;31m[\033[1;36m01\033[1;31m]\033[1;33m Letra Peque├▒a"
- echo -e "\033[1;31m[\033[1;36m02\033[1;31m]\033[1;33m Letra Media"
- echo -e "\033[1;31m[\033[1;36m03\033[1;31m]\033[1;33m Letra Grande"
- echo -e "\033[1;31m[\033[1;36m04\033[1;31m]\033[1;33m Letra ExtraGrande"
- echo ""
- echo -ne "\033[1;32mEscoje el Tama├▒o de Letra\033[1;31m ?\033[1;37m : "; read opc
- if [[ "$opc" = "1" ]] || [[ "$opc" = "01" ]]; then
- _size='6'
- elif [[ "$opc" = "2" ]] || [[ "$opc" = "02" ]]; then
- _size='4'
- elif [[ "$opc" = "3" ]] || [[ "$opc" = "03" ]]; then
- _size='3'
- elif [[ "$opc" = "4" ]] || [[ "$opc" = "04" ]]; then
- _size='1'
- else
- _size='6'
- fi
- msg -bar
- echo -ne "\033[1;37m"
- read -p " INGRESA TU MENSAJE : " ban_ner2
- msg -bar
- unset x
- echo -e "\033[1;42m Deseas centrar el contenido del banner\033[0;33m :v"
- echo ""
- echo -ne "\033[0;32m Responde [ s | n ] : " && read -e -i "s" x
- msg -bar
- [[ "$x" = @(s|S|y|Y) ]] && echo -e '<p style="text-align: center;">' >> /etc/bannerssh
- echo -e " \033[1;31m[ 1 ]\033[1;33m > VERDE \033[1;31m[ 9 ]\033[1;33m > AZUL PIZARRA OSCURO"
- echo -e " \033[1;31m[ 2 ]\033[1;33m > ROJO \033[1;31m[ 10 ]\033[1;33m > MAGENTA"
- echo -e " \033[1;31m[ 3 ]\033[1;33m > AZUL \033[1;31m[ 11 ]\033[1;33m > CHOCOLATE"
- echo -e " \033[1;31m[ 4 ]\033[1;33m > AMARILLO \033[1;31m[ 12 ]\033[1;33m > VERDE CLARO"
- echo -e " \033[1;31m[ 5 ]\033[1;33m > PURPURA \033[1;31m[ 13 ]\033[1;33m > GRIS"
- echo -e " \033[1;31m[ 6 ]\033[1;33m > Naranja \033[1;31m[ 14 ]\033[1;33m > VERDE MAR"
- echo -e " \033[1;31m[ 7 ]\033[1;33m > Crema \033[1;31m[ 15 ]\033[1;33m > CIAN OSCURO"
- echo -e " \033[1;31m[ 8 ]\033[1;33m > Cyano \033[1;31m[ * ]\033[1;33m > Negro"
- read -p " Digite A Cor [ 1 Ôç┐ 15 ]: " ban_ner2_cor
- if [[ "$ban_ner2_cor" = "1" ]]; then
- echo '<h'$_size'><font color="green">' >> /etc/bannerssh
- elif [[ "$ban_ner2_cor" = "2" ]]; then
- echo '<h'$_size'><font color="red">' >> /etc/bannerssh
- elif [[ "$ban_ner2_cor" = "3" ]]; then
- echo '<h'$_size'><font color="blue">' >> /etc/bannerssh
- elif [[ "$ban_ner2_cor" = "4" ]]; then
- echo '<h'$_size'><font color="yellow">' >> /etc/bannerssh
- elif [[ "$ban_ner2_cor" = "5" ]]; then
- echo '<h'$_size'><font color="purple">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "6" ]; then
- echo '<h'$_size'><font color="#FF7F00">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "7" ]; then
- echo '<h'$_size'><font color="#AEB404">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "8" ]; then
- echo '<h'$_size'><font color="cyan">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "9" ]; then
- echo '<h'$_size'><font color="#483D8B">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "10" ]; then
- echo '<h'$_size'><font color="#FF00FF">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "11" ]; then
- echo '<h'$_size'><font color="#D2691E">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "12" ]; then
- echo '<h'$_size'><font color="#90EE90">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "13" ]; then
- echo '<h'$_size'><font color="#BEBEBE">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "14" ]; then
- echo '<h'$_size'><font color="#2E8B57">' >> /etc/bannerssh
- elif [ "$ban_ner2_cor" = "15" ]; then
- echo '<h'$_size'><font color="#008B8B">' >> /etc/bannerssh
- else
- echo '<h'$_size'><font color="black">' >> /etc/bannerssh
- fi
- echo "$ban_ner2" >> /etc/bannerssh
- echo "</h"$_size"></font>" >> /etc/bannerssh
- [[ "$x" = @(s|S|y|Y) ]] && echo "</p>" >> /etc/bannerssh
- }
- function_7 () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- echo -e "${cor[2]}MENU BANNER (RECOMENDADO 2):
- $(msg -bar)"
- echo -e "\033[0;35m [\033[0;36m01\033[0;35m]\033[0;31m >${cor[3]} Pegar BANNER Personalizado ( html , etc )"
- echo -e "\033[0;35m [\033[0;36m02\033[0;35m]\033[0;31m >${cor[3]} AGREGAR MENSAJES BANNER SSH"
- echo -e "\033[0;35m [\033[0;36m03\033[0;35m]\033[0;31m >${cor[3]} ELIMINAR BANNER ( SSH Ôç┐ DROPBEAR )"
- msg -bar
- echo -e " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m > $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
- msg -bar
- selection=$(selection_fun 3)
- case ${selection} in
- 1)
- unset sshsn
- unset sin_nao
- echo -e " Al escojer que coloques tu Banner creado fuera del Script, ADM no se "
- echo -e " Responsabiliza por el Fallo de ciertos recursos del SISTEMA"
- echo -e "RECUERDA QUE EL SCRIPT ESTA REALIZADO PARA FUNCIONAR CON SUS FUNCIONES"
- echo -e " Y esta es EXPERIMENTAL"
- echo -e "Esta SEGURO de usar esta funcion ?:"
- read -p " [S/N]: " -e -i n sshsn
- [[ "$sshsn" = @(s|S|y|Y) ]] && {
- local2="/etc/bannerssh"
- chk=$(cat /etc/ssh/sshd_config | grep Banner)
- if [ "$(echo "$chk" | grep -v "#Banner" | grep Banner)" != "" ]; then
- local=$(echo "$chk" |grep -v "#Banner" | grep Banner | awk '{print $2}')
- else
- echo "Banner /etc/bannerssh" >> /etc/ssh/sshd_config
- local="/etc/bannerssh"
- fi
- while true; do
- echo -e " ESTAS SEGURO QUE TIENES TU BANNER BIEN ESTRUCTURADO "
- read -p " [ s | n ]: " sin_nao
- if [[ "$sin_nao" = @(s|S|y|Y) ]]; then
- ban_per
- elif [[ "$sin_nao" = @(n|N) ]]; then
- break
- fi
- done
- }
- ;;
- 2)
- unset sshsn
- unset sin_nao
- echo -e "${cor[3]} Buena ELECCION, Tienes un 99% mas Garantia"
- echo -e "${cor[3]} Esta SEGURO:"
- read -p " [S/N]: " -e -i s sshsn
- [[ "$sshsn" = @(s|S|y|Y) ]] && {
- local2="/etc/bannerssh"
- chk=$(cat /etc/ssh/sshd_config | grep Banner)
- if [ "$(echo "$chk" | grep -v "#Banner" | grep Banner)" != "" ]; then
- local=$(echo "$chk" |grep -v "#Banner" | grep Banner | awk '{print $2}')
- else
- echo "Banner /etc/bannerssh" >> /etc/ssh/sshd_config
- local="/etc/bannerssh"
- fi
- msg -bar
- echo -e "\n\033[1;31m[\033[1;36m01\033[1;31m]\033[1;33m Letra Peque├▒a"
- echo -e "\033[1;31m[\033[1;36m02\033[1;31m]\033[1;33m Letra Media"
- echo -e "\033[1;31m[\033[1;36m03\033[1;31m]\033[1;33m Letra Grande"
- echo -e "\033[1;31m[\033[1;36m04\033[1;31m]\033[1;33m Letra ExtraGrande"
- echo ""
- echo -ne "\033[1;32mEscoje el Tama├▒o de Letra\033[1;31m ?\033[1;37m : "; read opc
- if [[ "$opc" = "1" ]] || [[ "$opc" = "01" ]]; then
- _size='6'
- elif [[ "$opc" = "2" ]] || [[ "$opc" = "02" ]]; then
- _size='4'
- elif [[ "$opc" = "3" ]] || [[ "$opc" = "03" ]]; then
- _size='3'
- elif [[ "$opc" = "4" ]] || [[ "$opc" = "04" ]]; then
- _size='1'
- else
- _size='6'
- fi
- msg -bar
- echo -ne "\033[1;37m"
- read -p " INGRESA TU MENSAJE : " ban_ner
- msg -bar
- echo -e " \033[1;31m[ 1 ]\033[1;33m > VERDE \033[1;31m[ 9 ]\033[1;33m > AZUL PIZARRA OSCURO"
- echo -e " \033[1;31m[ 2 ]\033[1;33m > ROJO \033[1;31m[ 10 ]\033[1;33m > MAGENTA"
- echo -e " \033[1;31m[ 3 ]\033[1;33m > AZUL \033[1;31m[ 11 ]\033[1;33m > CHOCOLATE"
- echo -e " \033[1;31m[ 4 ]\033[1;33m > AMARILLO \033[1;31m[ 12 ]\033[1;33m > VERDE CLARO"
- echo -e " \033[1;31m[ 5 ]\033[1;33m > PURPURA \033[1;31m[ 13 ]\033[1;33m > GRIS"
- echo -e " \033[1;31m[ 6 ]\033[1;33m > Naranja \033[1;31m[ 14 ]\033[1;33m > VERDE MAR"
- echo -e " \033[1;31m[ 7 ]\033[1;33m > Crema \033[1;31m[ 15 ]\033[1;33m > CIAN OSCURO"
- echo -e " \033[1;31m[ 8 ]\033[1;33m > Cyano \033[1;31m[ * ]\033[1;33m > Negro"
- read -p " [ 1 Ôç┐ 15 ]: " ban_ner_cor
- unset local
- unset x
- echo -e "\033[1;42m Deseas centrar el contenido del banner\033[0;33m :v"
- echo ""
- echo -ne "\033[0;32m Responde [ s | n ] : " && read -e -i "s" x
- msg -bar
- [[ "$x" = @(s|S|y|Y) ]] && echo -e '<p style="text-align: center;">' > /etc/bannerssh
- if [[ "$ban_ner_cor" = "1" ]]; then
- echo '<h'$_size' style="text-align:center;"><font color="green">' >> /etc/bannerssh
- elif [[ "$ban_ner_cor" = "2" ]]; then
- echo '<h'$_size' style="text-align:center;"><font color="red">' >> /etc/bannerssh
- elif [[ "$ban_ner_cor" = "3" ]]; then
- echo '<h'$_size' style="text-align:center;"><font color="blue">' >> /etc/bannerssh
- elif [[ "$ban_ner_cor" = "4" ]]; then
- echo '<h'$_size' style="text-align:center;"><font color="yellow">' >> /etc/bannerssh
- elif [[ "$ban_ner_cor" = "5" ]]; then
- echo '<h'$_size' style="text-align:center;"><font color="purple">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "6" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#FF7F00">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "7" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#AEB404">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "8" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="cyan">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "9" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#483D8B">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "10" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#FF00FF">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "11" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#D2691E">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "12" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#90EE90">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "13" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#BEBEBE">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "14" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#2E8B57">' >> /etc/bannerssh
- elif [ "$ban_ner_cor" = "15" ]; then
- echo '<h'$_size' style="text-align:center;"><font color="#008B8B">' >> /etc/bannerssh
- else
- echo '<h'$_size' style="text-align:center;"><font color="black">' >> /etc/bannerssh
- fi
- echo "$ban_ner" >> /etc/bannerssh
- echo '</font></h'$_size'>' >> /etc/bannerssh
- [[ "$x" = @(s|S|y|Y) ]] && echo "</p>" >> /etc/bannerssh
- while true; do
- echo -e " DESEAS AÑADIR MAS TEXTOS A TU BANNER?"
- read -p " [ s | n ]: " sin_nao
- if [[ "$sin_nao" = @(s|S|y|Y) ]]; then
- txt_font
- elif [[ "$sin_nao" = @(n|N) ]]; then
- break
- fi
- done
- [[ -e /root/name ]] && credi=$(cat < /root/name) || credi="@ChumoGH"
- credit=$(cat < /bin/ejecutar/menu_credito)
- echo -e '<p style="text-align: center;"><strong><span style="color: #FF00FF;">'" $credit "'®</span> | </strong><span style="color: #483D8B;"><strong>'"$credi"'</strong></span></p>' >> /etc/bannerssh
- #echo '<font color="#FF00FF">┬® 2020 ChumoGH, ®</font>' >> /etc/bannerssh
- [[ -d /etc/dropbear ]] && {
- [[ -e /etc/bannerssh ]] && cat /etc/bannerssh > /etc/dropbear/banner
- } || men="NO EXISTE DROPBEAR"
- msg -bar
- echo -ne " \033[1;31m[ ! ] VERIFICANDO DROPBEAR "
- service dropbear restart > /dev/null 2>&1
- [[ -e /etc/init.d/dropbear ]] && {
- /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || {
- echo -e "\033[1;31m Ôûó BANNER INCOMPATIBLE CON DROPBEAR -\n" && echo "DESTRUYENDO DISE├æO"
- echo "" > /etc/dropbear/banner
- /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]"
- }
- } || echo -e "\033[0;35m [ $men ]"
- echo -ne " \033[1;31m[ ! ] VERIFICANDO SSH "
- service ssh restart > /dev/null 2>&1
- service sshd restart > /dev/null 2>&1
- [[ -e /etc/init.d/ssh ]] && /etc/init.d/ssh restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
- }
- return 0
- ;;
- 3)
- echo "Verificando existencia de BANNER"
- echo ""
- [[ -e /etc/bannerssh ]] && {
- echo "DESTRUYENDO BANNER SSH "
- echo "" > /etc/bannerssh
- } || echo "NO EXISTE BANNER DROPBEAR ESTRUCTURADO"
- [[ -e /etc/dropbear/banner ]] && {
- echo "DESTRUYENDO BANNER DROPBEAR "
- echo "" > /etc/dropbear/banner
- } || echo "NO EXISTE BANNER SSH ESTRUCTURADO"
- return 0
- ;;
- *)
- echo "LO SENTIMOS DIGITASTE MAL"
- sleep 0.1s
- return 0
- ;;
- esac
- #TERMINA CASE
- }
- meu-v2ray () {
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- tput cuu1 && tput dl1
- msg -bar
- echo -e "\e[97m\033[1;41m PROYECTOS V2RAY REFACTORIZADO By @ChumoGH 11-12-2022 \033[0m"
- msg -bar
- echo -ne "\033[1;37m
- 1)- V2ray Manager UNIVERSAL
- 2)- V2ray Manager by @Rufu99
- $(msg -bar)
- 0)- Salir \n" | lolcat
- msg -bar
- selection=$(selection_fun 2)
- case ${selection} in
- 1)
- [[ ! -z $(which v2ray.menu) ]] && v2ray.menu || source <(curl -sSL https://www.dropbox.com/s/id3llagyfvwceyr/v2ray1.sh)
- ;;
- 2)
- [[ ! -z $(which v2r.sh) ]] && v2r.sh || source <(curl -sSL https://www.dropbox.com/s/xzp8zmar5ljbl3x/v2ray_manager.sh)
- ;;
- 0)
- return 0
- ;;
- esac
- }
- ssrmenu () {
- source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/ssrrmu.sh)
- }
- selection=$(selection_fun 14)
- case ${selection} in
- 1)
- cd /etc/adm-lite/ && fun_us
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 2)
- cd /etc/adm-lite/ && function_2
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 3)
- cd /etc/adm-lite/ && function_3
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 4)
- cd /etc/adm-lite/ && function_4
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 5)
- cd /etc/adm-lite/ && function_5
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 6)
- cd /etc/adm-lite/ && function_7
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 7)
- cd /etc/adm-lite/ && net_meter
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 8)
- cd /etc/adm-lite/ && block_user
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 9)
- cd /etc/adm-lite/ && recuva1
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 10)
- cd /etc/adm-lite/ && ssrmenu
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 11)
- cd /etc/adm-lite/ && meu-v2ray
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 12)
- cd /etc/adm-lite/ && consul_cli
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- 13)
- #[[ ! -z $(which troj.sh) ]] && troj.sh || echo -e " NO SE HA HABILITADO ACCESO AL PANNEL"
- #echo -ne "${cor[5]}"
- #read -p " ¡Enter, para volver!"
- #source /etc/adm-lite/usercodes
- #;;
- #14)
- wget -q -O /tmp/instCHEKC.sh https://www.dropbox.com/s/8bfsy201cycqvne/initcheck.sh && bash /tmp/instCHEKC.sh
- echo -ne "${cor[5]}"
- read -p " ¡Enter, para volver!"
- source /etc/adm-lite/usercodes
- ;;
- esac
|