usercodes 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009
  1. #!/bin/bash
  2. #user=$(echo ${saks:0:5})
  3. cco=1
  4. #------- BANKEY --------------
  5. function chekKEY {
  6. Key="$(cat /etc/cghkey)"
  7. 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}')"
  8. [[ ! -e /etc/folteto ]] && wget --no-check-certificate -O /etc/folteto $IiP:81/ChumoGH/checkIP.log
  9. cheklist="$(cat /etc/folteto)"
  10. chekKEY="$(echo -e "$cheklist" | grep ${Key} | awk '{print $5}')"
  11. chekIP="$(echo -e "$cheklist" | grep ${IP} | awk '{print $3}')"
  12. [[ -z ${chekKEY} || -z ${chekIP} ]] && {
  13. xyz=$(curl -sSL "https://www.dropbox.com/s/jzkd6fzey2u0m0g/token.sh")
  14. ID="$(echo $xyz| awk '{print $2}')"
  15. TOKEN="$(echo $xyz| awk '{print $1}')"
  16. urlBOT="https://api.telegram.org/bot$TOKEN/sendMessage"
  17. echo 'clear&&clear
  18. echo -e "\n\n\n \033[0;31m==================================================
  19. ┬í ­ƒÜ½ KEY BANEADA ­ƒÜ½ ! CONTACTE Su ADMINISTRADOR
  20. ================================================== \n\n"
  21. ' > /bin/menu \
  22. [[ ! -d /etc/banned ]] && mkdir /etc/banned \
  23. chmod +x /bin/menu \
  24. mv /etc/adm-lite/menu /etc/banned/ \
  25. mv /etc/adm-lite/usercodes /etc/banned/ \
  26. rm -f /etc/folteto
  27. MENSAJE="${TTini}${m3ssg}MSG RECIVIDO${m3ssg}${TTfin}\n"
  28. MENSAJE+=" IP : ${IP} NO DETECTADA EN EL GENERADOR\n"
  29. MENSAJE+=" $(msg -bar4)\n"
  30. MENSAJE+=" HORA : $(printf '%(%D-%H:%M:%S)T')\n"
  31. MENSAJE+=" $(msg -bar4)\n"
  32. MENSAJE+=" ${rUlq} Bot generador de key ${rUlq}\n"
  33. MENSAJE+=" ${pUn5A} By @ChumoGH ${pUn5A} \n"
  34. MENSAJE+=" $(msg -bar4)\n"
  35. curl -s --max-time 10 -d "chat_id=$ID&disable_web_page_preview=1&text=$(echo -e "$MENSAJE")" $urlBOT &>/dev/null
  36. exit && exit
  37. }
  38. }
  39. #-----------------------------
  40. users=$(cat /etc/passwd|grep 'home'|grep 'false'|grep -v 'syslog'|awk -F ':' '{print $1}')
  41. _ps="$(ps x)"
  42. unset tmm ext tempo tempoin
  43. uskk=$(cat /bin/ejecutar/uskill)
  44. [[ ! -d /etc/adm-lite/userDIR ]] && mkdir /etc/adm-lite/userDIR
  45. source /etc/adm-lite/cabecalho
  46. mem_free=$(free --mega -h | awk 'NR==2{printf $4}')
  47. cpu_used="$(top -b -n1 | grep 'Cpu(s)' | awk '{print $2 + $4}')"%
  48. if [ "$_userlock" > 0 ]; then
  49. ul="\033[1;33m( \033[1;31m$_userlock \033[1;32mLOCKED \033[1;33m)"
  50. else
  51. ul="\033[1;33m( \033[1;32mALL UNLOCK \033[1;33m)"
  52. fi
  53. [[ -z $(echo -e ${_ps} | grep "ultimatebot" | grep -v "grep") ]] && bt="\033[1;31mOFF\033[0m" || bt="\033[1;32mON\033[0m"
  54. 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")
  55. echo -e "${cor[2]} ­ƒÖÄÔÇì ${cor[5]}CUENTAS SSH / SSL / DROPBEAR By @ChumoGH ­ƒÖÄÔÇì"
  56. msg -bar
  57. echo -e " \033[1;34m Ôû© M LIBRE: \033[1;32m${mem_free} \033[1;34m Ôû© USO DE CPU:\033[1;32m ${cpu_used} "
  58. msg -bar
  59. 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]} - "
  60. echo -e "\033[0;35m [\033[0;36m02\033[0;35m]\033[0;31m >${cor[3]} BORRAR 1/TODOS LOS USUARIO/s"
  61. echo -e "\033[0;35m [\033[0;36m03\033[0;35m]\033[0;31m >${cor[3]} EDITAR USUARIOS REGISTRADOS"
  62. echo -e "\033[0;35m [\033[0;36m04\033[0;35m]\033[0;31m >${cor[3]} MOSTRAR USUARIOS REGISTRADOS"
  63. echo -e "\033[0;35m [\033[0;36m05\033[0;35m]\033[0;31m >${cor[3]} MOSTRAR USUARIOS CONECTADOS "
  64. echo -e "\033[0;35m [\033[0;36m06\033[0;35m]\033[0;31m >${cor[3]} EDITAR BANNER ( SSH/Dropbear )"
  65. echo -e "\033[0;35m [\033[0;36m07\033[0;35m]\033[0;31m >${cor[3]} LOG DE CONSUMO ( Artificial )"
  66. echo -e "\033[0;35m [\033[0;36m08\033[0;35m]\033[0;31m >${cor[3]} BLOQUEAR / DESBLOQUEAR USUARIOS $ul"
  67. echo -e "\033[0;35m [\033[0;36m09\033[0;35m]\033[0;31m >${cor[3]} BACKUP USUARIOS \033[0;32m(#OFFICIAL)"
  68. echo -e "\033[0;35m [\033[0;36m10\033[0;35m]\033[0;31m >${cor[3]} MENU CUENTAS SSR/SS \033[0;32m(#OFFICIAL)"
  69. echo -e "\033[0;35m [\033[0;36m11\033[0;35m]\033[0;31m >${cor[3]} MENU DE CUENTAS V2RAY \033[0;33m(#BETA)"
  70. echo -e "\033[0;35m [\033[0;36m12\033[0;35m]\033[0;31m >${cor[3]} CONTROL SSH ( BotTelegram $bt ) "
  71. echo -e "\033[0;35m [\033[0;36m13\033[0;35m]\033[0;31m >${cor[3]} CHECKUSER ONLINE ( $var_sks1 ) "
  72. #echo -e "\033[0;35m [\033[0;36m15\033[0;35m]\033[0;31m >${cor[3]} MENU DE CUENTAS TROJAN \033[0;33m(#BETA)"
  73. msg -bar
  74. echo -e " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m > $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
  75. msg -bar
  76. if [ -e /etc/systemd/system/killadm.service ]; then
  77. echo -e "\033[1;31m \033[1;36m KILL MULTILOGUIN \033[1;32m(ON) \033[1;36mY FUNCIONANDO "
  78. else
  79. [[ -z $limiter_on ]] && limiter_on="\033[1;31mOFF\033[0m"
  80. 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"
  81. fi
  82. msg -bar
  83. #chekKEY &> /dev/null 2>&1
  84. mportas () {
  85. unset portas
  86. portas_var=$(lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN")
  87. while read port; do
  88. var1=$(echo $port | awk '{print $1}') && var2=$(echo $port | awk '{print $9}' | awk -F ":" '{print $2}')
  89. [[ "$(echo -e $portas|grep "$var1 $var2")" ]] || portas+="$var1 $var2\n"
  90. done <<< "$portas_var"
  91. i=1
  92. echo -e "$portas"
  93. }
  94. selection_fun () {
  95. local selection="null"
  96. local range
  97. for((i=0; i<=$1; i++)); do range[$i]="$i "; done
  98. while [[ ! $(echo ${range[*]}|grep -w "$selection") ]]; do
  99. echo -ne "\033[1;31m NUMERO DE OPCION : " >&2
  100. read selection
  101. tput cuu1 >&2 && tput dl1 >&2
  102. done
  103. echo $selection
  104. }
  105. fk () {
  106. #echo -e "\033[1;39m "
  107. local _netCAT="$(netstat -tunlp)"
  108. echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mEn APPS como HTTP Inyector,CUSTOM,KPN Rev,etc" #| pv -qL 15
  109. [[ $(mportas|grep dropbear|head -1) ]] && {
  110. if echo -e "${_netCAT}" |grep sslh 1> /dev/null 2> /dev/null; then
  111. 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`;
  112. #PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  113. for PORT in ${sslhp}; do
  114. echo -e "ÒÇÉ DROPBEAR >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
  115. done
  116. else
  117. #echo -e "\033[1;39mPara uso Dropbear usa la Sintaxis"
  118. 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`;
  119. #PORT=$(cat /etc/adm-lite/dropbearports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  120. for PORT in ${dropbearports}; do
  121. echo -e "ÒÇÉ Dropbear >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
  122. done
  123. fi
  124. } || {
  125. echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe Dropbear" | pv -qL 80
  126. }
  127. ######
  128. [[ $(mportas|grep stunnel|head -1) ]] && {
  129. if echo -e "${_netCAT}" |grep sslh 1> /dev/null 2> /dev/null; then
  130. 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`;
  131. #PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  132. for PORT in ${sslhp}; do
  133. echo -e "ÒÇÉ SSL ­ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
  134. done
  135. else
  136. #echo -e "\033[1;39mPara uso SSL usa la Sintaxis"
  137. 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`;
  138. #PORT=$(cat /etc/adm-lite/sslports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  139. for PORT in ${sslports}; do
  140. echo -e "ÒÇÉ SSL ­ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]}@${cor[4]}$name${cor[2]}:${cor[4]}$pass ÒÇæ" | pv -qL 80
  141. done
  142. fi
  143. } || {
  144. echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe SSL" | pv -qL 80
  145. #echo -e "\033[1;39m"
  146. }
  147. [[ -e /etc/adm-lite/slow/dnsi/server.pub && -e /etc/adm-lite/slow/dnsi/domain_ns ]] && {
  148. echo -e "ÒÇÉ SLOWDNS KEY >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/server.pub) ÒÇæ"
  149. echo -e "ÒÇÉ DOMINIO NS >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/domain_ns) ÒÇæ"
  150. echo -e "ÒÇÉ CONEXION REDIRECCIONADA VIA PUERTO ->${cor[4]} $(cat /etc/adm-lite/slow/dnsi/puerto) ÒÇæ"
  151. }
  152. msg -bar
  153. }
  154. fkhwid () {
  155. local _netCAT="$(netstat -tunlp)"
  156. echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m En APPS como HTTP Inyector, CUSTOM, etc" #| pv -qL 15
  157. #echo -ne " " && msg -bra " \033[1;41m En APPS como HTTP Inyector, CUSTOM, etc"
  158. [[ $(mportas|grep dropbear|head -1) ]] && {
  159. if netstat -tunlp |grep sslh 1> /dev/null 2> /dev/null; then
  160. 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`;
  161. PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  162. echo -e " ÒÇÉ DROPBEAR >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
  163. else
  164. #echo -e "\033[1;39mPara uso Dropbear usa la Sintaxis"
  165. 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`;
  166. PORT=$(cat /etc/adm-lite/dropbearports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  167. echo -e " ÒÇÉ Dropbear >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
  168. fi
  169. } || {
  170. echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe Dropbear" | pv -qL 80
  171. }
  172. ######
  173. [[ $(mportas|grep stunnel|head -1) ]] && {
  174. if netstat -tunlp |grep sslh 1> /dev/null 2> /dev/null; then
  175. 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`;
  176. local PORT=$(cat /etc/adm-lite/sslh.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  177. echo -e " ÒÇÉ SSL ­ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
  178. else
  179. #echo -e "\033[1;39mPara uso SSL usa la Sintaxis"
  180. 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`;
  181. local PORT=$(cat /etc/adm-lite/sslports.txt | sed 's/\s\+/,/g' | cut -d , -f1)
  182. echo -e " ÒÇÉ SSL ­ƒÿè >${cor[4]} $IP${cor[2]}:${cor[5]}$PORT${cor[2]} ÒÇæ" | pv -qL 80
  183. fi
  184. } || {
  185. echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41mNo existe SSL" | pv -qL 80
  186. #echo -e "\033[1;39m"
  187. }
  188. [[ -e /etc/adm-lite/slow/dnsi/server.pub && -e /etc/adm-lite/slow/dnsi/domain_ns ]] && {
  189. echo -e "ÒÇÉ SLOWDNS KEY >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/server.pub) ÒÇæ"
  190. echo -e "ÒÇÉ DOMINIO NS >${cor[4]} $(cat /etc/adm-lite/slow/dnsi/domain_ns) ÒÇæ"
  191. echo -e "ÒÇÉ CONEXION REDIRECCIONADA VIA PUERTO ->${cor[4]} $(cat /etc/adm-lite/slow/dnsi/puerto) ÒÇæ"
  192. }
  193. msg -bar
  194. }
  195. fun_ovpn_onl () {
  196. for userovpn in `cat /etc/passwd | grep ovpn | awk -F: '{print $1}'`; do
  197. us=$(cat /etc/openvpn/openvpn-status.log | grep $userovpn | wc -l)
  198. if [ "$us" != "0" ]; then
  199. echo "$userovpn"
  200. fi
  201. done
  202. }
  203. time-us () {
  204. if [[ -z "${tempoin}" ]];then
  205. tempoin="30"
  206. tempoin=$(( $tempoin * 60 ))
  207. tempoin=$tempoin"s"
  208. echo "Default 30 minutos"
  209. fi
  210. tempo=$(echo "$tempoin" |sed 's/ //g')
  211. tmm=$(echo $tempo |sed 's/[0-9]//g')
  212. if [ "$tmm" = "s" ]; then
  213. ext=$(echo $tempo |sed 's/[a-z]//g')
  214. let tempo=$ext*1
  215. tempo=$tempo"s"
  216. #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
  217. ext=1
  218. fi
  219. if [ "$tmm" = "m" ]; then
  220. ext=$(echo $tempo |sed 's/[a-z]//g')
  221. let tempo=$ext*60
  222. tempo=$tempo"s"
  223. #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
  224. ext=1
  225. fi
  226. if [ "$tmm" = "h" ]; then
  227. ext=$(echo $tempo |sed 's/[a-z]//g')
  228. if [ "$ext" > "23" ]; then
  229. ext=$(echo $tempo |sed 's/[a-z]//g')
  230. let tempo=$ext*3600
  231. tempo=$tempo"s"
  232. else
  233. let tempo=$ext*3600
  234. tempo=$tempo"s"
  235. ext=1
  236. fi
  237. #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
  238. fi
  239. if [ "$tmm" = "d" ]; then
  240. ext=$(echo $tempo |sed 's/[a-z]//g')
  241. let tempo=$ext*3600
  242. tempo=$tempo"s"
  243. #echo -ne "$(msg -verd "") $(msg -verm2 "") "&& msg -bra "\033[1;41m"
  244. fi
  245. }
  246. recuva1 () {
  247. source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/sd)
  248. }
  249. function criarusuarioteste(){
  250. tput cuu1 && tput dl1
  251. tput cuu1 && tput dl1
  252. tput cuu1 && tput dl1
  253. tput cuu1 && tput dl1
  254. tput cuu1 && tput dl1
  255. tput cuu1 && tput dl1
  256. tput cuu1 && tput dl1
  257. tput cuu1 && tput dl1
  258. tput cuu1 && tput dl1
  259. tput cuu1 && tput dl1
  260. tput cuu1 && tput dl1
  261. tput cuu1 && tput dl1
  262. tput cuu1 && tput dl1
  263. tput cuu1 && tput dl1
  264. tput cuu1 && tput dl1
  265. tput cuu1 && tput dl1
  266. tput cuu1 && tput dl1
  267. tput cuu1 && tput dl1
  268. tput cuu1 && tput dl1
  269. meu_ip
  270. [[ -d /etc/usuariosteste ]] || mkdir /etc/usuariosteste
  271. echo -e " USUARIOS TEMPORALES CREADOS"
  272. for testus in $(ls /etc/usuariosteste |sort |sed 's/.sh//g')
  273. do
  274. echo "$testus"
  275. done
  276. printf "\n"
  277. echo -e "${cor[5]} Ingrese Nombre del Usuario:"; read -p "Digita : " -e -i demo-$(($RANDOM*10))
  278. nome="demo-$(date | md5sum | head -c10)"
  279. if [ -z $nome ]; then
  280. echo -e "${cor[5]} ÔÜá´©Å ÔÜá´©Å${cor[0]}"
  281. return
  282. fi
  283. if cat /etc/passwd |grep $nome: |grep -vi [a-z]$nome |grep -v [0-9]$nome > /dev/null
  284. then
  285. echo -e "${cor[5]} ÔÜá´©Å USUARIO YA EXISTE, REGISTRE OTRO ÔÜá´©Å${cor[0]}"
  286. return
  287. fi
  288. msg -bar
  289. echo -e "${cor[5]} Contrase├▒a para el usuario $nome"
  290. name=$nome
  291. pass="$(date | md5sum | head -c10)"
  292. msg -bar
  293. echo -e "${cor[5]} Duraci├│n para el Usuario $nome"
  294. echo -e " Use s = segundos, m = minutos, h = horas e d = dias EX: 14s ."
  295. read -p " VALIDEZ: " tempoin
  296. echo -e "${cor[5]} LIMITE DE CONEXIONES PARA $name"
  297. read -p " LIMITE: " limit
  298. if [[ -z "${limit}" ]];then
  299. limit="5"
  300. echo "Default 5 Logins"
  301. fi
  302. msg -bar
  303. time-us
  304. valides=$(date '+%C%y-%m-%d' -d " +$ext days")
  305. useradd -M -N -s /bin/false $nome -e $valides
  306. (echo $pass;echo $pass) |passwd $nome 1>/dev/null 2>/dev/null
  307. chage -I 1 $nome 2> /dev/null
  308. if [ "$OPENVPN" = "on" ]; then
  309. open_1 $nome $pass $daysrnf $limit s
  310. echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
  311. echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
  312. echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
  313. echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
  314. echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
  315. msg -bar
  316. rm -f ./$CLIENT.ovpn > /dev/null
  317. return
  318. fi
  319. echo "#!/bin/bash" > /etc/usuariosteste/$nome.sh
  320. echo "sleep $tempo" >> /etc/usuariosteste/$nome.sh
  321. echo "uskk=$(cat /bin/ejecutar/uskill)" >> /etc/usuariosteste/$nome.sh
  322. echo 'uskk=$(($uskk + 1))' >> /etc/usuariosteste/$nome.sh
  323. echo 'echo $uskk > /bin/ejecutar/uskill' >> /etc/usuariosteste/$nome.sh
  324. echo "kill"' $(ps -u '"$nome |awk '{print"' $1'"}') 1>/dev/null 2>/dev/null
  325. userdel --force $nome
  326. rm -rf ./$CLIENT.ovpn > /dev/null
  327. rm -rf /etc/usuariosteste/$nome.sh
  328. exit" >> /etc/usuariosteste/$nome.sh
  329. screen -dmS ${nome} bash /etc/usuariosteste/$nome.sh
  330. #figlet $nome | lolcat
  331. echo -e "${cor[5]} * Registrar Usuario Temporal *"
  332. echo -e "${cor[5]} * Puertas Activas en su Servidor *"
  333. msg -bar
  334. ports_
  335. msg -bar
  336. echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
  337. echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
  338. echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
  339. echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
  340. echo -e "${cor[5]} VALIDEZ : ${cor[4]}$tempo"
  341. msg -bar
  342. echo "senha: $pass" > $dir_user/$nome
  343. echo "limite: $limit" >> $dir_user/$nome
  344. echo "data: $valid" >> $dir_user/$nome
  345. echo -ne "${cor[2]}"
  346. fk
  347. echo -e " Despues de expirar !!!!"
  348. echo -e " Este usuario sera desconectados y eliminados."
  349. echo -ne "${cor[2]}"
  350. return
  351. }
  352. #USUARIO TEST DE PRUEBA
  353. net_meter () {
  354. net_dir="/etc/adm-lite/userDIR/usr_cnx"
  355. if [ ! -e "$net_dir" ]; then
  356. echo -e "${cor[5]} Verificación no está activada, o no existe información"
  357. msg -bar
  358. return
  359. fi
  360. net_cent="/tmp/porcentagem"
  361. sed -i '/^$/d' $net_dir
  362. [[ ! -e "$net_cent" ]] && touch $net_cent
  363. while read cent; do
  364. echo "$cent" | awk '{print $2}' >> $net_cent
  365. done < $net_dir
  366. por_cent=$(paste -sd+ $net_cent | bc)
  367. rm $net_cent
  368. bb=$(printf '%-18s' "USO APROXIMADO")
  369. aa=$(printf '%-19s' "USUARIOS")
  370. cc=$(printf '%-18s' "CONSUMO TOTAL")
  371. msg -bar
  372. echo -e "\033[1;33m $aa $bb $cc"
  373. msg -bar
  374. while read u; do
  375. b=$(printf '%-18s' "$(($(echo $u | awk '{print $2}')/970)) - MB")
  376. a=$(printf '%-20s' "$(echo $u | awk '{print $1}')")
  377. [[ "$por_cent" = "0" || "$por_cent" = "" ]] && por_cent="1"
  378. pip=$(echo $u | awk '{print $2}')
  379. [[ "$pip" = "" || "$pip" = "0" ]] && pip="1"
  380. percent_user=$(($pip*100/$por_cent)) > /dev/null 2>&1
  381. [[ $percent_user = "0" ]] && percent_user="1"
  382. c=$(printf '%-18s' "$percent_user %%")
  383. if [ "$(($(echo $u | awk '{print $2}')/970))" -gt "1" ]; then
  384. echo -e "\033[1;32m $a \033[1;31m$b \033[1;32m$c"
  385. fi
  386. done < $net_dir
  387. [[ "$(cat $net_dir)" = "" ]] && echo -e "${cor[5]} Verificación no está activada, o no existe información"
  388. msg -bar
  389. echo -e "${cor[1]} Controlar Consumo de Cada Usuario Por Separado ${cor[0]}"
  390. unset net_dir
  391. #monit_user
  392. }
  393. drop_kill () {
  394. user="$1"
  395. echo "$user $for_kill"
  396. for pid in `$(dropbear_pids | grep "$user" | awk '{print $2}')`; do
  397. kill $pid
  398. done
  399. }
  400. botusers () {
  401. unset bot_ini
  402. PIDGEN=$(echo -e ${_ps}|grep -v grep|grep "ultimatebot")
  403. killall $PIDGEN > /dev/null 2>&1
  404. if [[ ! $PIDGEN ]]; then
  405. msg -bar
  406. echo -ne "\033[1;97m Deseas Activar el Bot Telegram [s/n]: "
  407. read bot_ini
  408. msg -bar
  409. [[ $bot_ini = @(s|S|y|Y) ]] && source <(curl -sSL https://www.dropbox.com/s/zvn8naajedzldno/telebot.sh.sh)
  410. else
  411. kill -9 $(echo -e ${_ps} | grep "ultimatebot" | grep -v "grep" | awk '{print $1}') > /dev/null 2>&1 && echo "BOT DETENIDO EXITOSAMENTE"
  412. fi
  413. }
  414. consul_cli () {
  415. botusers
  416. dir_user="/etc/adm-lite/userDIR"
  417. msg -bar
  418. echo -e "${cor[4]} CONSULTA DATOS DE CLIENTE INDIVIDUAL"
  419. msg -bar
  420. select_users
  421. if [ "$select_name" = "" ]; then
  422. return
  423. fi
  424. namer="$select_name"
  425. [[ $(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
  426. [[ $(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
  427. echo -e "${cor[5]} Que opci├│n va a editar de: $namer"
  428. echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m >${cor[3]} Consultar estado de Usuario: $nameFX"
  429. echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m >${cor[3]} Reiniciar Usuario: $nameFX"
  430. msg -bar
  431. read -p " ESCOJE: " _opt
  432. if [ "$_opt" = "1" ]; then
  433. unset limite
  434. data=$(cat $dir_user/$namer | grep "data" | awk '{print $2}')
  435. data_sec=$(date +%s)
  436. data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
  437. data_user_sec=$(date +%s --date="$data_user")
  438. variavel_soma=$(($data_user_sec - $data_sec))
  439. dias_use=$(($variavel_soma / 86400))
  440. if [ -z "$limite" ]; then
  441. limite="null"
  442. fi
  443. if [ "$dias_use" -le 0 ]; then
  444. echo -e " Ô£¡ Eiii, Malas Noticias Ôÿ╣!!\n Usuario : $nameFX. Esta Caducado Ôÿ╣ \n!! Contacta Cliente, Para Renobar su Membresia\n" | pv -qL 80
  445. echo -e "${cor[5]} Usuario $nameFX: VENCIDO EL: $data"
  446. pkill -u $namer
  447. else
  448. limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
  449. date="$dias_use"
  450. datexp=$(date "+%d/%m/%Y" -d " + $date days")
  451. valid=$(date '+%C%y-%m-%d' -d " + $date days")
  452. echo -e " Ô£¡ SU CLIENTE : $namer, ES VALIDO HASTA -> $data Ôÿ║"
  453. echo -e " Ô£¡ CON ÒÇÉ $limite ÒÇæ CONEXIONES SIMULTANEAS!!. "
  454. echo -e "${cor[5]} RENUEVA EN $dias_use DIAS, DISFRUTE SU ESTANCIA!. "
  455. pkill -u $namer
  456. fi
  457. return
  458. fi
  459. if [ "$_opt" = "2" ]; then
  460. echo -e "${cor[5]} CLIENTE REINICIADO EN SUS CONEXIONES"
  461. pkill -u $namer
  462. echo -e " SI QUIERES VOLVER AL MENU, PRESIONA ENTER!."
  463. read -p " DIGITA ÒÇÄ ok ÒÇÅ PARA REINICIAR SERVICIO SSH Ôûó TUNNEL : " _ok
  464. if [ "$_ok" = "ok" ]; then
  465. echo -ne " \033[1;31m[ ! ] Services dropbear restart"
  466. service dropbear restart > /dev/null 2>&1
  467. [[ -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]"
  468. echo -ne " \033[1;31m[ ! ] Services SSH & STUNNEL4 restart"
  469. service ssh restart > /dev/null 2>&1
  470. service sshd restart > /dev/null 2>&1
  471. [[ -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]"
  472. service stunnel4 restart > /dev/null 2>&1
  473. echo "SERVICIOS REINICIADOS EXITOSAMENTE " | pv -qL 50
  474. fi
  475. return
  476. fi
  477. }
  478. fun_time_user () {
  479. declare -A data
  480. usr_pids_var="./userDIR"
  481. user_x="$1"
  482. if [ -e $usr_pids_var/$user_x.pid2 ]; then
  483. source $usr_pids_var/$user_x.pid2
  484. [[ ${data[$user_x]} != +([0-9]) ]] && data[$user_x]="0"
  485. _data_now=$(date +%s)
  486. time[$user_x]=$((${_data_now} - ${data[$user_x]}))
  487. else
  488. time[$user_x]="0"
  489. fi
  490. }
  491. fun_us() {
  492. tput cuu1 && tput dl1
  493. tput cuu1 && tput dl1
  494. tput cuu1 && tput dl1
  495. tput cuu1 && tput dl1
  496. tput cuu1 && tput dl1
  497. tput cuu1 && tput dl1
  498. tput cuu1 && tput dl1
  499. tput cuu1 && tput dl1
  500. tput cuu1 && tput dl1
  501. tput cuu1 && tput dl1
  502. tput cuu1 && tput dl1
  503. tput cuu1 && tput dl1
  504. tput cuu1 && tput dl1
  505. tput cuu1 && tput dl1
  506. tput cuu1 && tput dl1
  507. tput cuu1 && tput dl1
  508. tput cuu1 && tput dl1
  509. tput cuu1 && tput dl1
  510. tput cuu1 && tput dl1
  511. tput cuu1 && tput dl1
  512. tput cuu1 && tput dl1
  513. tput cuu1 && tput dl1
  514. tput cuu1 && tput dl1
  515. msg -bar
  516. echo -e " \033[0;50m ÔÜ£´©Å CREADOR DE CUENTAS TIPO ÔÜ£´©Å "
  517. msg -bar
  518. echo -e " \033[0;35m[\033[0;32m01\033[0;35m] \033[0;33m >\033[0;33m SSH|DROPBEAR (DEMO) "
  519. echo -e " \033[0;35m[\033[0;32m02\033[0;35m] \033[0;33m >\033[0;33m SSH|DROPBEAR "
  520. echo -e " \033[0;35m[\033[0;32m03\033[0;35m] \033[0;33m >\033[0;33m HWID "
  521. echo -e " \033[0;35m[\033[0;32m04\033[0;35m] \033[0;33m >\033[0;31m TOKEN "
  522. msg -bar
  523. echo -e " \033[0;35m[\033[0;32m05\033[0;35m] \033[0;33m >\033[0;31m MODIFICAR CONTRASEÑA TOKEN "
  524. msg -bar
  525. echo -e " \033[0;35m[\033[1;32m00\033[0;35m] \033[0;33m  $(msg -bra "\e[3;33m[ VOLVER ]\e[0m")"
  526. msg -bar
  527. selection=$(selection_fun 5)
  528. case ${selection} in
  529. 0|00)
  530. return
  531. ;;
  532. 1|01)
  533. cd /etc/adm-lite/ && criarusuarioteste
  534. ;;
  535. 2|02)
  536. tput cuu1 && tput dl1
  537. tput cuu1 && tput dl1
  538. tput cuu1 && tput dl1
  539. tput cuu1 && tput dl1
  540. tput cuu1 && tput dl1
  541. tput cuu1 && tput dl1
  542. tput cuu1 && tput dl1
  543. tput cuu1 && tput dl1
  544. tput cuu1 && tput dl1
  545. tput cuu1 && tput dl1
  546. tput cuu1 && tput dl1
  547. function_1
  548. ;;
  549. 3|03)
  550. tput cuu1 && tput dl1
  551. tput cuu1 && tput dl1
  552. tput cuu1 && tput dl1
  553. tput cuu1 && tput dl1
  554. tput cuu1 && tput dl1
  555. tput cuu1 && tput dl1
  556. tput cuu1 && tput dl1
  557. tput cuu1 && tput dl1
  558. tput cuu1 && tput dl1
  559. tput cuu1 && tput dl1
  560. tput cuu1 && tput dl1
  561. fun_us_hwid
  562. ;;
  563. 4|04)
  564. tput cuu1 && tput dl1
  565. tput cuu1 && tput dl1
  566. tput cuu1 && tput dl1
  567. tput cuu1 && tput dl1
  568. tput cuu1 && tput dl1
  569. tput cuu1 && tput dl1
  570. tput cuu1 && tput dl1
  571. tput cuu1 && tput dl1
  572. tput cuu1 && tput dl1
  573. tput cuu1 && tput dl1
  574. tput cuu1 && tput dl1
  575. fun_us_tk
  576. ;;
  577. 5)
  578. [[ ! -e /bin/ejecutar/token ]] && touch /bin/ejecutar/token
  579. tput cuu1 && tput dl1
  580. tput cuu1 && tput dl1
  581. tput cuu1 && tput dl1
  582. tput cuu1 && tput dl1
  583. tput cuu1 && tput dl1
  584. tput cuu1 && tput dl1
  585. echo -e "${cor[5]} ÔÜá´©Å CLAVE ACTUAL : $(cat < /bin/ejecutar/token) ÔÜá´©Å${cor[0]}"
  586. msg -bar
  587. echo -e "${cor[5]} ÔÜá´©Å ATENCION ANTES DE CONTINUAR ÔÜá´©Å${cor[0]}"
  588. echo -e ""
  589. echo -e " SE DEFINIRA SU CONTRASEÑA TOKEN UNICA"
  590. echo -e " UNA VEZ COLOCADA SE RECOMIENDA NO CAMBIARLA"
  591. echo ""
  592. msg -bar
  593. echo -ne "${cor[5]} ÔÄÜ CONTRASE├æA "; read -p "TOKEN : " passtok
  594. echo ${passtok} > /bin/ejecutar/token
  595. tput cuu1 && tput dl1
  596. tput cuu1 && tput dl1
  597. tput cuu1 && tput dl1
  598. tput cuu1 && tput dl1
  599. tput cuu1 && tput dl1
  600. tput cuu1 && tput dl1
  601. tput cuu1 && tput dl1
  602. ;;
  603. esac
  604. }
  605. fun_us_hwid(){
  606. tput cuu1 && tput dl1
  607. tput cuu1 && tput dl1
  608. echo -ne "${cor[5]} ÔÄÜ NOMBRE DE"; read -p " USUARIO : " name
  609. tput cuu1 && tput dl1
  610. [[ -z $name ]] && echo -e "${cor[5]} ÔÜá´©Å NO REGISTRO NOMBRE, RETORNANDO ÔÜá´©Å${cor[0]}" && return
  611. msg -bar
  612. echo -e "${cor[5]} INGRESA HWID PARA $name"
  613. read -p " HWID: " hwid
  614. if cat /etc/passwd |grep $hwid: |grep -vi [a-z]$hwid |grep -v [0-9]$hwid > /dev/null
  615. then
  616. echo -e "${cor[5]} ÔÜá´©Å HWID YA EXISTE, REGISTRE OTRO ÔÜá´©Å${cor[0]}"
  617. return
  618. fi
  619. tput cuu1 && tput dl1
  620. tput cuu1 && tput dl1
  621. tput cuu1 && tput dl1
  622. [[ -z "${hwid}" ]] && echo " ÔÜá´©Å No se Ingreso HWID , RETORNANDO! ÔÜá´©Å" && return
  623. msg -bar
  624. echo -e "${cor[5]} TIEMPO DE DURACION EN DIAS PARA $name"
  625. read -p " VALIDEZ : " daysrnf
  626. tput cuu1 && tput dl1
  627. tput cuu1 && tput dl1
  628. tput cuu1 && tput dl1
  629. [[ -z "${daysrnf}" ]] && daysrnf="2"
  630. msg -bar
  631. meu_ip
  632. valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
  633. datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
  634. useradd -M -s /bin/false $hwid -e $valid
  635. (echo $hwid; echo $hwid)|passwd $hwid 2>/dev/null
  636. echo "$hwid 1" >>/root/usuarios.db
  637. tput cuu1 >&2 && tput dl1 >&2
  638. #figlet $name | lolcat
  639. echo -e "${cor[5]} * Puertas Activas en su Servidor *"
  640. msg -bar
  641. ports_
  642. msg -bar
  643. echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
  644. echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
  645. echo -e "${cor[5]} HWID : ${cor[4]}$hwid"
  646. echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
  647. msg -bar
  648. echo "senha: $name" > $dir_user/$hwid
  649. echo "limite: HWID" >> $dir_user/$hwid
  650. echo "data: $valid" >> $dir_user/$hwid
  651. fkhwid
  652. msg -bar
  653. tput cuu1 >&2 && tput dl1 >&2
  654. echo -ne "${cor[2]}"
  655. return
  656. }
  657. fun_us_tk(){
  658. [[ ! -e /bin/ejecutar/token ]] && {
  659. echo -e "${cor[5]} ÔÜá´©Å ATENCION ANTES DE CONTINUAR ÔÜá´©Å${cor[0]}"
  660. echo -e ""
  661. echo -e " SE DEFINIRA SU CONTRASEÑA TOKEN UNICA"
  662. echo -e " UNA VEZ COLOCADA NO PODRA SER MANIPULADA"
  663. echo ""
  664. msg -bar
  665. echo -ne "${cor[5]} ÔÄÜ CONTRASE├æA "; read -p "TOKEN : " passtok
  666. echo ${passtok} > /bin/ejecutar/token
  667. tput cuu1 && tput dl1
  668. tput cuu1 && tput dl1
  669. tput cuu1 && tput dl1
  670. tput cuu1 && tput dl1
  671. tput cuu1 && tput dl1
  672. tput cuu1 && tput dl1
  673. tput cuu1 && tput dl1
  674. }
  675. tput cuu1 && tput dl1
  676. tput cuu1 && tput dl1
  677. echo -ne "${cor[5]} ÔÄÜ NOMBRE DE"; read -p " USUARIO : " name
  678. tput cuu1 && tput dl1
  679. [[ -z $name ]] && echo -e "${cor[5]} ÔÜá´©Å NO REGISTRO NOMBRE, RETORNANDO ÔÜá´©Å${cor[0]}" && return
  680. msg -bar
  681. echo -e "${cor[5]} INGRESA TOKEN PARA $name"
  682. read -p " TOKEN: " hwid
  683. if cat /etc/passwd |grep $hwid: |grep -vi [a-z]$hwid |grep -v [0-9]$hwid > /dev/null
  684. then
  685. echo -e "${cor[5]} ÔÜá´©Å TOKEN YA EXISTE, REGISTRE OTRO ÔÜá´©Å${cor[0]}"
  686. return
  687. fi
  688. tput cuu1 && tput dl1
  689. tput cuu1 && tput dl1
  690. tput cuu1 && tput dl1
  691. [[ -z "${hwid}" ]] && echo " ÔÜá´©Å No se Ingreso TOKEN , RETORNANDO! ÔÜá´©Å" && return
  692. msg -bar
  693. echo -e "${cor[5]} TIEMPO DE DURACION EN DIAS PARA $name"
  694. read -p " VALIDEZ : " daysrnf
  695. tput cuu1 && tput dl1
  696. tput cuu1 && tput dl1
  697. tput cuu1 && tput dl1
  698. [[ -z "${daysrnf}" ]] && daysrnf="2"
  699. msg -bar
  700. meu_ip
  701. valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
  702. datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
  703. [[ -e /bin/ejecutar/token ]] && passTOKEN=$(less /bin/ejecutar/token) || passTOKEN="ChumoGHPlus"
  704. if useradd -M -s /bin/false $hwid -e $valid ; then
  705. (echo $passTOKEN; echo $passTOKEN)|passwd $hwid 2>/dev/null
  706. echo "$hwid 1" >>/root/usuarios.db
  707. clear&&clear
  708. echo -e "${cor[5]} * Puertas Activas en su Servidor *"
  709. msg -bar
  710. ports_
  711. msg -bar
  712. echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
  713. echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
  714. echo -e "${cor[5]} TOKEN : ${cor[4]}$hwid"
  715. echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
  716. msg -bar
  717. echo "senha: $name" > $dir_user/$hwid
  718. echo "limite: TOKEN" >> $dir_user/$hwid
  719. echo "data: $valid" >> $dir_user/$hwid
  720. fkhwid
  721. msg -bar
  722. else
  723. echo -e "${cor[5]} ÔÜá´©Å ERROR AL REGISTRAR SU TOKEN | REINTENTE ÔÜá´©Å${cor[0]}"
  724. fi
  725. echo -ne "${cor[2]}"
  726. return
  727. }
  728. function_1 () {
  729. echo -e "${cor[4]} ÔØæ MENU DE CREACION DE USUARIOS ÔØÆ "
  730. msg -bar
  731. echo -ne "${cor[5]} > NOMBRE DE"; read -p " USUARIO : " name
  732. tput cuu1 && tput dl1
  733. tput cuu1 && tput dl1
  734. if [ -z $name ]; then
  735. echo -e "${cor[5]} ÔÜá´©Å NO REGISTRO NOMBRE, RETORNANDO ÔÜá´©Å${cor[0]}"
  736. return
  737. fi
  738. if cat /etc/passwd |grep $name: |grep -vi [a-z]$name |grep -v [0-9]$name > /dev/null
  739. then
  740. echo -e "${cor[5]} ÔÜá´©Å USUARIO YA EXISTE, USE OTRO NOMBRE ÔÜá´©Å${cor[0]}"
  741. return
  742. fi
  743. msg -bar
  744. echo -e "${cor[5]} CONTRASEÑA PARA $name"
  745. read -p " CONTRASEÑA : " pass
  746. tput cuu1 && tput dl1
  747. tput cuu1 && tput dl1
  748. tput cuu1 && tput dl1
  749. if [[ -f "${pass}" ]];then
  750. pass="$(date | md5sum | head -c10)"
  751. fi
  752. msg -bar
  753. echo -e "${cor[5]} TIEMPO DE DURACION EN DIAS PARA $name"
  754. read -p " VALIDEZ : " daysrnf
  755. daysrnf=$(echo -e "$daysrnf" |sed -e 's/[^0-9]//ig')
  756. number_var $daysrnf
  757. tput cuu1 && tput dl1
  758. tput cuu1 && tput dl1
  759. tput cuu1 && tput dl1
  760. if [[ -f "${daysrnf}" ]];then
  761. daysrnf="2"
  762. fi
  763. msg -bar
  764. echo -e "${cor[5]} LIMITE DE CONEXIONES PARA $name"
  765. read -p " LIMITE : " limit
  766. limit=$(echo -e "$limit" |sed -e 's/[^0-9]//ig')
  767. number_var $limit
  768. tput cuu1 && tput dl1
  769. tput cuu1 && tput dl1
  770. tput cuu1 && tput dl1
  771. if [[ -f "${limit}" ]];then
  772. limit="1"
  773. fi
  774. msg -bar
  775. meu_ip
  776. if [ "$OPENVPN" = "on" ]; then
  777. open_1 $name $pass $daysrnf $limit s
  778. msg -bar
  779. ports_
  780. msg -bar
  781. echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
  782. echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
  783. echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
  784. echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
  785. echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
  786. msg -bar
  787. fk
  788. rm -rf ./$CLIENT.ovpn > /dev/null 2>&1
  789. rm -f ./$CLIENT.ovpn > /dev/null 2>&1
  790. msg -bar
  791. return
  792. fi
  793. valid=$(date '+%C%y-%m-%d' -d " +$daysrnf days")
  794. datexp=$(date "+%d/%m/%Y" -d " +$daysrnf days")
  795. #echo -ne " USUARIO"
  796. #(
  797. if useradd -M -s /bin/false $name -e $valid ; then
  798. (echo $pass; echo $pass)|passwd $name >/dev/null 2>&1 &
  799. echo "$name $limit" >>/root/usuarios.db
  800. tput cuu1 >&2 && tput dl1 >&2
  801. figlet $name | lolcat
  802. echo -e "${cor[5]} * Puertas Activas en su Servidor *"
  803. msg -bar
  804. ports_
  805. msg -bar
  806. echo -e "${cor[5]} Host/IP-Address : ${cor[4]}$IP"
  807. echo -e "${cor[5]} USUARIO : ${cor[4]}$name"
  808. echo -e "${cor[5]} PASSWD : ${cor[4]}$pass"
  809. echo -e "${cor[5]} LIMITE : ${cor[4]}$limit"
  810. echo -e "${cor[5]} VALIDEZ : ${cor[4]}$datexp"
  811. msg -bar
  812. echo "senha: $pass" > $dir_user/$name
  813. echo "limite: $limit" >> $dir_user/$name
  814. echo "data: $valid" >> $dir_user/$name
  815. fk
  816. msg -bar
  817. tput cuu1 >&2 && tput dl1 >&2
  818. [[ -e /etc/v2ray/config.json ]] && {
  819. echo -e "\033[1;41m AÑADIR USUARIO VMESS ?\033[0;33m :v"
  820. echo -ne "\033[0;32m "
  821. read -p " Responde [ s | n ] : " -e -i "n" x
  822. tput cuu1 >&2 && tput dl1 >&2
  823. tput cuu1 >&2 && tput dl1 >&2
  824. [[ $x = @(s|S|y|Y) ]] && source <(curl -sSL https://www.dropbox.com/s/z6txyjygpri7ede/adduser.sh) $name $daysrnf
  825. msg -bar
  826. }
  827. else
  828. echo -e "${cor[5]} ÔÜá´©Å ERROR AL REGISTRAR SU USUARIO | REINTENTE ÔÜá´©Å${cor[0]}"
  829. fi
  830. echo -ne "${cor[2]}"
  831. return
  832. }
  833. function_2 () {
  834. tput cuu1 && tput dl1
  835. tput cuu1 && tput dl1
  836. tput cuu1 && tput dl1
  837. tput cuu1 && tput dl1
  838. tput cuu1 && tput dl1
  839. tput cuu1 && tput dl1
  840. tput cuu1 && tput dl1
  841. tput cuu1 && tput dl1
  842. tput cuu1 && tput dl1
  843. tput cuu1 && tput dl1
  844. tput cuu1 && tput dl1
  845. tput cuu1 && tput dl1
  846. tput cuu1 && tput dl1
  847. tput cuu1 && tput dl1
  848. tput cuu1 && tput dl1
  849. tput cuu1 && tput dl1
  850. tput cuu1 && tput dl1
  851. tput cuu1 && tput dl1
  852. tput cuu1 && tput dl1
  853. msg -bar
  854. echo -e "${cor[4]} ELIMINAR USUARIOS"
  855. msg -bar
  856. echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;33m >${cor[3]} ELIMINAR 1 USER"
  857. echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;33m >${cor[3]} ELIMINAR TODOS"
  858. echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;33m >${cor[3]} ELIMINAR TODOS LOS CADUCADOS"
  859. msg -bar
  860. selection=$(selection_fun 3)
  861. case ${selection} in
  862. 0)
  863. return
  864. ;;
  865. 1)
  866. msg -bar
  867. echo -e "${cor[4]} USUARIOS REGISTRADOS"
  868. msg -bar
  869. select_users
  870. name="$select_name"
  871. [[ -z $name ]] && return
  872. [[ $(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
  873. [[ $(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
  874. [[ "$OPENVPN" = "on" ]] && open_2 $name && msg -bar&& return
  875. userdel --force $name > /dev/null 2>/dev/null
  876. 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
  877. pid_kill=$(dropbear_pids | grep "$name" | awk '{print $2}')
  878. uskk=$(cat /bin/ejecutar/uskill)
  879. let uskk=$uskk+$cco
  880. echo $uskk > /bin/ejecutar/uskill
  881. [[ ! -z $pid_kill ]] && drop_kill $name
  882. [[ -e /etc/usuariosteste/$name ]] && rm /etc/usuariosteste/$name && msg -bar
  883. echo -e " $nameFX ${cor[2]} ELIMINADO "
  884. msg -bar
  885. return
  886. ;;
  887. 2)
  888. for name in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1 |sort`; do
  889. msg -bar
  890. echo -e "${cor[5]} ELIMINAR A $name ?"
  891. read -p " [S/N]: " _remover_
  892. if [[ "$_remover_" = "s" || "$_remover_" = "S" ]]; then
  893. if [ "$OPENVPN" = "on" ]; then
  894. open_2 $name
  895. else
  896. userdel --force $name > /dev/null 2>&1
  897. 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
  898. pid_kill=$(dropbear_pids | grep "$name" | awk '{print $2}')
  899. uskk=$(cat /bin/ejecutar/uskill)
  900. let uskk=$uskk+$cco
  901. echo $uskk > /bin/ejecutar/uskill
  902. [[ ! -z $pid_kill ]] && drop_kill $name
  903. [[ -e $dir_user/$name ]] && rm $dir_user/$name
  904. echo -e "\033[1;37m $name ${cor[5]} ELIMINADO"
  905. fi
  906. fi
  907. done
  908. msg -bar
  909. ;;
  910. 3)
  911. function_6
  912. msg -bar
  913. return
  914. ;;
  915. esac
  916. }
  917. function_3 () {
  918. tput cuu1 && tput dl1
  919. tput cuu1 && tput dl1
  920. tput cuu1 && tput dl1
  921. tput cuu1 && tput dl1
  922. tput cuu1 && tput dl1
  923. tput cuu1 && tput dl1
  924. tput cuu1 && tput dl1
  925. tput cuu1 && tput dl1
  926. tput cuu1 && tput dl1
  927. tput cuu1 && tput dl1
  928. tput cuu1 && tput dl1
  929. tput cuu1 && tput dl1
  930. tput cuu1 && tput dl1
  931. tput cuu1 && tput dl1
  932. tput cuu1 && tput dl1
  933. tput cuu1 && tput dl1
  934. tput cuu1 && tput dl1
  935. tput cuu1 && tput dl1
  936. tput cuu1 && tput dl1
  937. msg -bar
  938. echo -e "${cor[4]} MODIFICAR DATOS DE USUARIOS"
  939. msg -bar
  940. select_users
  941. if [ "$select_name" = "" ]; then
  942. return
  943. fi
  944. namer="$select_name"
  945. [[ $(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
  946. [[ $(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
  947. meu_ip
  948. echo -e "${cor[5]} ESCOJE LA OPCION A CAMBIAR DE $namer"
  949. echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m >${cor[3]} NUMERO DE LOGINS DE \033[0;36m$nameFX"
  950. echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m >${cor[3]} FECHA DE EXPIRACION DE \033[0;36m$nameFX"
  951. echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;31m >${cor[3]} CONTRASEÑA LOGIN DE \033[0;36m$nameFX"
  952. msg -bar
  953. read -p " SELECCIONA UNA OPC : " _opt
  954. [[ "$_opt" = "1" ]] && {
  955. tput cuu1 && tput dl1
  956. tput cuu1 && tput dl1
  957. tput cuu1 && tput dl1
  958. tput cuu1 && tput dl1
  959. tput cuu1 && tput dl1
  960. tput cuu1 && tput dl1
  961. read -p " NUEVO LIMITE DE CONEXIONES : " new_limit
  962. number_var $new_limit
  963. tput cuu1 && tput dl1
  964. if [ "$new_limit" = "" ]; then
  965. echo -e "${cor[5]} \033[1;31m NO SE REGISTRO LIMITE! REGRESANDO. . ."
  966. return
  967. fi
  968. usr_var=$(cat $dir_user/$namer | grep -v "limite:")
  969. echo "$usr_var" > $dir_user/$namer
  970. echo "limite: $new_limit" >> $dir_user/$namer
  971. msg -bar
  972. echo -e " Ô£¡ Perfecto, HEMOS CAMBIADO SU LIMITE DE CONEXIONES!! Ô£¡ "
  973. echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
  974. echo -e " Host / IP : ${cor[4]}$IP"
  975. echo -e " SU CLIENTE : $nameFX "
  976. echo -e " NUEVO LIMITE : $new_limit "
  977. pkill -u $nameFX
  978. msg -bar
  979. unset new_limit
  980. unset usr_var
  981. return
  982. }
  983. [[ "$_opt" = "2" ]] && {
  984. tput cuu1 && tput dl1
  985. tput cuu1 && tput dl1
  986. tput cuu1 && tput dl1
  987. tput cuu1 && tput dl1
  988. tput cuu1 && tput dl1
  989. tput cuu1 && tput dl1
  990. tput cuu1 && tput dl1
  991. tput cuu1 && tput dl1
  992. tput cuu1 && tput dl1
  993. add_dias() {
  994. echo -ne "${cor[5]} NUMEROS DE DIAS A AGREGAR"
  995. read -p " : " date
  996. tput cuu1 && tput dl1
  997. tput cuu1 && tput dl1
  998. tput cuu1 && tput dl1
  999. tput cuu1 && tput dl1
  1000. if [ "$date" = "" ]; then
  1001. echo -e "\033[1;31m ÔÜá´©Å NO SE REGISTRO DIAS! REGRESANDO ÔÜá´©Å"
  1002. return
  1003. fi
  1004. #echo -e " CALCULANDO DIAS RESTANTES DE $namer" | pv -qL 40
  1005. data=$(cat $dir_user/$namer | grep "data" | awk '{print $2}')
  1006. data_sec=$(date +%s)
  1007. data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
  1008. data_user_sec=$(date +%s --date="$data_user")
  1009. variavel_soma=$(($data_user_sec - $data_sec))
  1010. dias_use=$(($variavel_soma / 86400))
  1011. #echo -e "\033[1;32m [OK]" || echo -e "\033[1;31m [FAIL]"
  1012. [[ $dias_use -ge 0 ]] && {
  1013. date=$(($dias_use + $date))
  1014. echo -e "\033[1;32m $dias_use DIAS RECUPERADOS &&"
  1015. tput cuu1 && tput dl1
  1016. } || {
  1017. #[[ $dias_use < 0 ]] && dias_use=0
  1018. echo -e "\033[1;31m $dias_use DIAS RECUPERADOS &&"
  1019. tput cuu1 && tput dl1
  1020. }
  1021. limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
  1022. if [ -z "$limite" ]; then
  1023. limite="null"
  1024. fi
  1025. clear&&clear
  1026. datexp=$(date "+%d/%m/%Y" -d " + $date days")
  1027. valid=$(date '+%C%y-%m-%d' -d " + $date days")
  1028. if [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]]; then
  1029. usermod -U $namer
  1030. sleep 2
  1031. msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
  1032. fi
  1033. chage -E $valid $namer 2> /dev/null
  1034. [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && {
  1035. pass="$(cat < /etc/adm-lite/userDIR/$namer.exp)"
  1036. (echo "$pass" ; echo "$pass" ) |passwd $namer > /dev/null 2>/dev/null
  1037. rm -f /etc/adm-lite/userDIR/$namer.exp
  1038. }
  1039. usr_var=$(cat $dir_user/$namer | grep -v "data")
  1040. echo -e "$usr_var" > $dir_user/$namer
  1041. echo -e "data: $valid" >> $dir_user/$namer
  1042. msg -bar
  1043. echo -e " Ô£¡ Perfecto, Hemos Renovado tu Membresia!! Ô£¡ "
  1044. echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
  1045. echo -e " Host / IP : ${cor[4]}$IP"
  1046. echo -e " SU CLIENTE : $nameFX "
  1047. echo -e " USER LIMITED : $limite "
  1048. echo -e " VALIDO HASTA : $datexp"
  1049. echo -e "${cor[5]} RENUEVA EN $date DIAS, DISFRUTE SU ESTANCIA!. "
  1050. pkill -u $namer
  1051. msg -bar
  1052. unset datexp
  1053. unset valid
  1054. unset usr_var
  1055. return
  1056. }
  1057. del_dias() {
  1058. echo -ne "${cor[5]} NUMEROS DE DIAS A QUITAR"
  1059. read -p " : " date
  1060. tput cuu1 && tput dl1
  1061. tput cuu1 && tput dl1
  1062. tput cuu1 && tput dl1
  1063. tput cuu1 && tput dl1
  1064. if [ "$date" = "" ]; then
  1065. echo -e "\033[1;31m ÔÜá´©Å NO SE REGISTRO DIAS! REGRESANDO ÔÜá´©Å"
  1066. return
  1067. fi
  1068. data=$(cat $dir_user/$namer | grep "data" | awk '{print $2}')
  1069. data_sec=$(date +%s)
  1070. data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
  1071. data_user_sec=$(date +%s --date="$data_user")
  1072. variavel_soma=$(($data_user_sec - $data_sec))
  1073. dias_use=$(($variavel_soma / 86400))
  1074. [[ $dias_use -ge 0 ]] && {
  1075. date=$(($dias_use - $date))
  1076. echo -e "\033[1;32m $dias_use DIAS RECUPERADOS &&"
  1077. tput cuu1 && tput dl1
  1078. } || {
  1079. echo -e "\033[1;31m $dias_use DIAS RECUPERADOS &&"
  1080. tput cuu1 && tput dl1
  1081. }
  1082. limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
  1083. if [ -z "$limite" ]; then
  1084. limite="null"
  1085. fi
  1086. clear&&clear
  1087. datexp=$(date "+%d/%m/%Y" -d " + $date days")
  1088. valid=$(date '+%C%y-%m-%d' -d " + $date days")
  1089. if [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]]; then
  1090. usermod -U $namer
  1091. sleep 2
  1092. msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
  1093. fi
  1094. chage -E $valid $namer 2> /dev/null
  1095. [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && {
  1096. pass="$(cat < /etc/adm-lite/userDIR/$namer.exp)"
  1097. (echo "$pass" ; echo "$pass" ) |passwd $namer > /dev/null 2>/dev/null
  1098. rm -f /etc/adm-lite/userDIR/$namer.exp
  1099. }
  1100. usr_var=$(cat $dir_user/$namer | grep -v "data")
  1101. echo -e "$usr_var" > $dir_user/$namer
  1102. echo -e "data: $valid" >> $dir_user/$namer
  1103. echo -e " Ô£¡ Perfecto, Hemos Renovado tu Membresia!! Ô£¡ "
  1104. echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
  1105. echo -e " Host / IP : ${cor[4]}$IP"
  1106. echo -e " SU CLIENTE : $nameFX "
  1107. echo -e " ­ƒô▒ PERMITIDOS : $limite "
  1108. echo -e " VALIDO HASTA : $datexp"
  1109. echo -e "${cor[5]} RENUEVA EN $(($date + 1 )) DIAS, DISFRUTE SU ESTANCIA!. "
  1110. msg -bar
  1111. pkill -u $namer
  1112. unset datexp
  1113. unset valid
  1114. unset usr_var
  1115. return
  1116. }
  1117. ren_dias() {
  1118. echo -ne "${cor[5]} NUMEROS DE DIAS "
  1119. read -p " : " date
  1120. tput cuu1 && tput dl1
  1121. tput cuu1 && tput dl1
  1122. tput cuu1 && tput dl1
  1123. tput cuu1 && tput dl1
  1124. if [ "$date" = "" ]; then
  1125. echo -e "\033[1;31m ÔÜá´©Å NO SE REGISTRO DIAS! REGRESANDO ÔÜá´©Å"
  1126. return
  1127. fi
  1128. limite=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
  1129. if [ -z "$limite" ]; then
  1130. limite="null"
  1131. fi
  1132. clear&&clear
  1133. datexp=$(date "+%d/%m/%Y" -d " + $date days")
  1134. valid=$(date '+%C%y-%m-%d' -d " + $date days")
  1135. if [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]]; then
  1136. usermod -U $namer
  1137. sleep 2
  1138. msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
  1139. fi
  1140. chage -E $valid $namer 2> /dev/null
  1141. [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && {
  1142. pass="$(cat < /etc/adm-lite/userDIR/$namer.exp)"
  1143. (echo "$pass" ; echo "$pass" ) |passwd $namer > /dev/null 2>/dev/null
  1144. rm -f /etc/adm-lite/userDIR/$namer.exp
  1145. }
  1146. echo -e "${cor[5]} CAMBIADO !"
  1147. usr_var=$(cat $dir_user/$namer | grep -v "data")
  1148. echo -e "$usr_var" > $dir_user/$namer
  1149. echo -e "data: $valid" >> $dir_user/$namer
  1150. msg -bar
  1151. echo -e " Ô£¡ Perfecto, Hemos Renovado tu Membresia!! Ô£¡ "
  1152. echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
  1153. echo -e " Host / IP : ${cor[4]}$IP"
  1154. echo -e " SU CLIENTE : $nameFX "
  1155. echo -e " ­ƒô▒ PERMITIDOS : $limite "
  1156. echo -e " VALIDO HASTA : $datexp"
  1157. echo -e "${cor[5]} RENUEVA EN $(($date + 1 )) DIAS, DISFRUTE SU ESTANCIA!. "
  1158. pkill -u $namer
  1159. msg -bar
  1160. unset datexp
  1161. unset valid
  1162. unset usr_var
  1163. return
  1164. }
  1165. echo -e "${cor[5]} ESCOJE LA OPCION A CAMBIAR DE $nameFX"
  1166. msg -bar
  1167. echo -e "\033[0;35m [\033[0;36m1\033[0;35m]\033[0;31m >${cor[3]} AÑADIR DIAS A \033[0;36m$nameFX"
  1168. echo -e "\033[0;35m [\033[0;36m2\033[0;35m]\033[0;31m >${cor[3]} QUITAR DIAS A \033[0;36m$nameFX"
  1169. echo -e "\033[0;35m [\033[0;36m3\033[0;35m]\033[0;31m >${cor[3]} REINICIAR DIAS A \033[0;36m$nameFX"
  1170. msg -bar
  1171. read -p " OPCION " _ropt
  1172. tput cuu1 && tput dl1
  1173. tput cuu1 && tput dl1
  1174. tput cuu1 && tput dl1
  1175. tput cuu1 && tput dl1
  1176. tput cuu1 && tput dl1
  1177. [[ $_ropt = "1" ]] && add_dias
  1178. [[ $_ropt = "2" ]] && del_dias
  1179. [[ $_ropt = "3" ]] && ren_dias
  1180. return
  1181. }
  1182. [[ "$_opt" = "3" ]] && {
  1183. tput cuu1 && tput dl1
  1184. tput cuu1 && tput dl1
  1185. tput cuu1 && tput dl1
  1186. tput cuu1 && tput dl1
  1187. tput cuu1 && tput dl1
  1188. tput cuu1 && tput dl1
  1189. echo -e "${cor[5]} NUEVA CONTRASEÑA PARA $nameFX"
  1190. read -p " : " nova_senha
  1191. tput cuu1 && tput dl1
  1192. tput cuu1 && tput dl1
  1193. [[ "$nova_senha" = "" ]] && echo -e "${cor[5]}ÔØî CONTRASE├æA NO MODIFICADA ÔØî" && return
  1194. (echo "$nova_senha" ; echo "$nova_senha" ) |passwd $namer > /dev/null 2>/dev/null
  1195. usr_var1=$(cat $dir_user/$namer | grep -v "senha")
  1196. echo -e "$usr_var1" > $dir_user/$namer
  1197. echo -e "senha: $nova_senha" >> $dir_user/$namer
  1198. [[ -e /etc/adm-lite/userDIR/$namer.exp ]] && rm -f /etc/adm-lite/userDIR/$namer.exp
  1199. msg -bar
  1200. echo -e " Ô£¡ Perfecto, HEMOS CAMBIADO SU CONTRASE├æA!! Ô£¡ "
  1201. echo -e " RENOVADO EL : $(date "+%d/%m/%Y") "
  1202. echo -e " Host / IP : ${cor[4]}$IP"
  1203. echo -e " SU CLIENTE : $nameFX "
  1204. echo -e " NUEVA CLAVE : $nova_senha "
  1205. pkill -u $namer
  1206. msg -bar
  1207. unset nova_senha
  1208. unset usr_var1
  1209. return
  1210. }
  1211. [[ -z $_opt ]] && echo "ÔÜá´©Å SIN SELECCION ÔÜá´©Å"
  1212. }
  1213. block_user () {
  1214. tput cuu1 && tput dl1
  1215. tput cuu1 && tput dl1
  1216. tput cuu1 && tput dl1
  1217. tput cuu1 && tput dl1
  1218. tput cuu1 && tput dl1
  1219. tput cuu1 && tput dl1
  1220. tput cuu1 && tput dl1
  1221. tput cuu1 && tput dl1
  1222. tput cuu1 && tput dl1
  1223. tput cuu1 && tput dl1
  1224. tput cuu1 && tput dl1
  1225. tput cuu1 && tput dl1
  1226. tput cuu1 && tput dl1
  1227. tput cuu1 && tput dl1
  1228. tput cuu1 && tput dl1
  1229. tput cuu1 && tput dl1
  1230. tput cuu1 && tput dl1
  1231. tput cuu1 && tput dl1
  1232. tput cuu1 && tput dl1
  1233. msg -bar
  1234. #msg -bar
  1235. echo -e "${cor[4]} LOCK / UNLOCK USUARIO PRIVADO "
  1236. msg -bar
  1237. select_users
  1238. [[ -z $select_name ]] && return
  1239. namer="$select_name"
  1240. local lmt="$(cat /etc/adm-lite/userDIR/$namer | grep "limite" | awk '{print $2}')"
  1241. [[ $(echo $lmt) = "HWID" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
  1242. [[ $(echo $lmt) = "TOKEN" ]] && nameFX="$(cat /etc/adm-lite/userDIR/$u | grep "senha" | awk '{print $2}')" || nameFX=$namer
  1243. echo -e "${cor[5]} VERIFICANDO ESTADO DE $nameFX "
  1244. msg -bar
  1245. ########
  1246. if [[ $(passwd --status $namer|cut -d ' ' -f2) = "P" ]]; then
  1247. echo -e "${cor[5]}Bloqueando USER "
  1248. pkill -u $namer &>/dev/null
  1249. droplim=`dropbear_pids|grep -w "$namer"|awk '{print $2}'`
  1250. kill -9 $droplim &>/dev/null
  1251. usermod -L $namer &>/dev/null
  1252. sleep 2
  1253. msg -verm2 " ÔÜá´©Å LOCK ÔÜá´©Å"
  1254. else
  1255. usermod -U $namer
  1256. sleep 2
  1257. msg -verd " ÔÜá´©Å UNLOCK ÔÜá´©Å "
  1258. fi
  1259. pkill -u $namer
  1260. 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
  1261. return
  1262. }
  1263. function_4 () {
  1264. tput cuu1 && tput dl1
  1265. tput cuu1 && tput dl1
  1266. tput cuu1 && tput dl1
  1267. tput cuu1 && tput dl1
  1268. tput cuu1 && tput dl1
  1269. tput cuu1 && tput dl1
  1270. tput cuu1 && tput dl1
  1271. tput cuu1 && tput dl1
  1272. tput cuu1 && tput dl1
  1273. tput cuu1 && tput dl1
  1274. tput cuu1 && tput dl1
  1275. tput cuu1 && tput dl1
  1276. tput cuu1 && tput dl1
  1277. tput cuu1 && tput dl1
  1278. tput cuu1 && tput dl1
  1279. tput cuu1 && tput dl1
  1280. tput cuu1 && tput dl1
  1281. tput cuu1 && tput dl1
  1282. tput cuu1 && tput dl1
  1283. msg -bar
  1284. echo -e "${cor[4]} > USUARIO CONTRASEÑA LIMITE USO TIEMPO"
  1285. msg -bar
  1286. _cont="0"
  1287. for namer in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
  1288. if [ "$namer" = "" ]; then
  1289. break
  1290. fi
  1291. if [ -e $dir_user/$namer ]; then
  1292. _sen=$(cat $dir_user/$namer | grep "senha" | awk '{print $2}')
  1293. _limit=$(cat $dir_user/$namer | grep "limite" | awk '{print $2}')
  1294. [[ ${_limit} = "HWID" ]] && token="$_sen"
  1295. else
  1296. _limit="Ôê×"
  1297. _sen="Ôê×"
  1298. fi
  1299. [[ -z "$_limit" ]] && _limit="ÔÜá´©Å ?? ÔÜá´©Å"
  1300. [[ -z "$_sen" ]] && _sen="ÔÜá´©Å ?? ÔÜá´©Å"
  1301. data_sec=$(date +%s)
  1302. data_user=$(chage -l "$namer" |grep -i co |awk -F ":" '{print $2}')
  1303. if [ "$data_user" = " never" ]; then
  1304. dias_user="\033[1;37mINDEFINIDO"
  1305. else
  1306. data_user_sec=$(date +%s --date="$data_user")
  1307. if [ "$data_sec" -gt "$data_user_sec" ]; then
  1308. dias_user="\033[1;31mEXP"
  1309. else
  1310. variavel_soma=$(($data_user_sec - $data_sec))
  1311. dias_use=$(($variavel_soma / 86400))
  1312. dias_user="\033[1;32m$dias_use DIAS"
  1313. fi
  1314. fi
  1315. unset SEC
  1316. unset MIN
  1317. unset HOR
  1318. #SEC=$(cat $namer.time | grep "$namer" | awk '{print $2}')
  1319. [[ -e /etc/adm-lite/userDIR/$namer.time ]] && SEC=$(cat /etc/adm-lite/userDIR/$namer.time) || SEC="0"
  1320. number_var $SEC
  1321. if [ "$var_number" = "" ]; then
  1322. SEC="0"
  1323. else
  1324. SEC="$var_number"
  1325. fi
  1326. hour_var=$(echo "HORAS" | cut -b 1)
  1327. min_var=$(echo "ACTA" | cut -b 1)
  1328. MIN=$(($SEC / 60))
  1329. SEC=$(($SEC - $MIN * 60))
  1330. HOR=$(($MIN / 60))
  1331. MIN=$(($MIN - $HOR * 60))
  1332. txto[1]=$(printf '%-10s' "$namer")
  1333. txto[2]=$(printf '%-12s' "$_sen")
  1334. txto[3]=$(printf '%-10s' "$_limit")
  1335. txto[4]=$(printf '%-10s' "${HOR}h:${MIN}m:${SEC}s")
  1336. [[ $(passwd --status $namer|cut -d ' ' -f2) = "L" ]] && txto[5]="\033[1;31mLOCK" || txto[5]=$(printf '%-2s' "$dias_user")
  1337. #$dir_user/$namer.block
  1338. unset open_vpn
  1339. tmp="$(cat /etc/passwd | grep -v ovpn | cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1)"
  1340. open_vpn=$(echo "$tmp" | grep "$namer")
  1341. _cont=$(($_cont + 1))
  1342. #[[ ${#_cont} < 2 ]] && _contx="0$_cont"
  1343. if [ "$open_vpn" != "" ]; then
  1344. #user ssh
  1345. [[ -e $dir_user/$namer ]] && [[ $(cat $dir_user/$namer | grep "limite" | awk '{print $2}') = "HWID" || $(cat $dir_user/$namer | grep "limite" | awk '{print $2}') = "TOKEN" ]] && {
  1346. [[ $(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]} "
  1347. [[ $(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]} "
  1348. } || {
  1349. 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]}"
  1350. }
  1351. else
  1352. #user openvpn
  1353. 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]}"
  1354. fi
  1355. done
  1356. msg -bar
  1357. echo -e " \033[1;32m ­ƒö░ # TIENES \033[1;33m [ \033[1;36m${_cont}\033[1;33m ]\033[1;32m CLIENTES EN TU SERVIDOR ­ƒö░ #"
  1358. msg -bar
  1359. unset txt_
  1360. }
  1361. function_5 () {
  1362. tput cuu1 && tput dl1
  1363. tput cuu1 && tput dl1
  1364. tput cuu1 && tput dl1
  1365. tput cuu1 && tput dl1
  1366. tput cuu1 && tput dl1
  1367. tput cuu1 && tput dl1
  1368. tput cuu1 && tput dl1
  1369. tput cuu1 && tput dl1
  1370. tput cuu1 && tput dl1
  1371. tput cuu1 && tput dl1
  1372. tput cuu1 && tput dl1
  1373. tput cuu1 && tput dl1
  1374. tput cuu1 && tput dl1
  1375. tput cuu1 && tput dl1
  1376. tput cuu1 && tput dl1
  1377. tput cuu1 && tput dl1
  1378. tput cuu1 && tput dl1
  1379. tput cuu1 && tput dl1
  1380. tput cuu1 && tput dl1
  1381. tput cuu1 && tput dl1
  1382. tput cuu1 && tput dl1
  1383. cab=$(printf '%-15s%-15s%-9s' 'USUARIO' 'CONEXIONES' 'TIEMPO HH:MM:SS')
  1384. msg -bar
  1385. echo -e "\E[41;1;37m $cab\E[0m"
  1386. unset conex1
  1387. msg -bar
  1388. _data_now=$(date +%s)
  1389. for user in `cat "/etc/passwd"|grep 'home'|grep 'false'|grep -v 'syslog' | cut -d: -f1`; do
  1390. i=${user}
  1391. sqd="$(ps -u $user | grep sshd | wc -l)"
  1392. [[ "$sqd" = "" ]] && sqd=0
  1393. [[ -e /etc/openvpn/openvpn-status.log ]] && ovp="$(cat /etc/openvpn/openvpn-status.log | grep -E ,"$user", | wc -l)" || ovp=0
  1394. if netstat -nltp|grep 'dropbear'> /dev/null;then
  1395. drop="$(dropbear_pids | grep "$user" | wc -l)"
  1396. else
  1397. drop=0
  1398. fi
  1399. cnx=$(($sqd + $drop))
  1400. conex=$(($cnx + $ovp))
  1401. if [[ $cnx -gt 0 ]]; then
  1402. tst="$(ps -o etime $(ps -u $user |grep sshd |awk 'NR==1 {print $1}')|awk 'NR==2 {print $1}')"
  1403. tst1=$(echo "$tst" | wc -c)
  1404. if [[ "$tst1" == "9" ]]; then
  1405. timerr="$(ps -o etime $(ps -u $user |grep sshd |awk 'NR==1 {print $1}')|awk 'NR==2 {print $1}')"
  1406. else
  1407. timerr="$(echo "00:$tst")"
  1408. fi
  1409. elif [[ $ovp -gt 0 ]]; then
  1410. tmp2=$(printf '%(%H:%M:%S)T\n')
  1411. tmp1="$(grep -w "$i" /etc/openvpn/openvpn-status.log |awk '{print $4}'| head -1)"
  1412. [[ "$tmp1" = "" ]] && tmp1="00:00:00" && tmp2="00:00:00"
  1413. var1=`echo $tmp1 | cut -c 1-2`
  1414. var2=`echo $tmp1 | cut -c 4-5`
  1415. var3=`echo $tmp1 | cut -c 7-8`
  1416. var4=`echo $tmp2 | cut -c 1-2`
  1417. var5=`echo $tmp2 | cut -c 4-5`
  1418. var6=`echo $tmp2 | cut -c 7-8`
  1419. calc1=`echo $var1*3600 + $var2*60 + $var3 | bc`
  1420. calc2=`echo $var4*3600 + $var5*60 + $var6 | bc`
  1421. seg=$(($calc2 - $calc1))
  1422. min=$(($seg/60))
  1423. seg=$(($seg-$min*60))
  1424. hor=$(($min/60))
  1425. min=$(($min-$hor*60))
  1426. timerusr=`printf "%02d:%02d:%02d \n" $hor $min $seg;`
  1427. timerr=$(echo "$timerusr" | sed -e 's/[^0-9:]//ig' )
  1428. else
  1429. timerr="00:00:00"
  1430. fi
  1431. #timerr=$(printf '%-11s' "${timerr}")
  1432. #######################
  1433. [[ -e $dir_user/${user} ]] && [[ $(cat $dir_user/${user} | grep "limite" | awk '{print $2}') = "HWID" ]] && {
  1434. user="$(cat $dir_user/${user} | grep "senha" | awk '{print $2}') \033[1;33m[\033[1;34mHWID\033[1;33m]\033[1;32m"
  1435. _limiter='/1'
  1436. }
  1437. [[ -e $dir_user/${user} ]] && [[ $(cat $dir_user/${user} | grep "limite" | awk '{print $2}') = "TOKEN" ]] && {
  1438. user="$(cat $dir_user/${user} | grep "senha" | awk '{print $2}') \033[1;33m[\033[1;35mTOKEN\033[1;33m]\033[1;32m"
  1439. _limiter='/1'
  1440. }
  1441. [[ -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'
  1442. if [ "$conex" -gt "0" ]; then
  1443. conex1+="${conex}+"
  1444. #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 '|'
  1445. #echo -e " \033[1;32m$(printf '%-15s' "${user}") \033[1;33m[\033[1;35m$(printf '%-11s' "${conex}${_limiter}") ${timerr}${cor[0]}"
  1446. user="${user}"
  1447. lim="\033[1;33m[\033[1;35m$(printf '%-7s' ${conex}${_limiter})"
  1448. local users+=" ${user}, $lim, ${timerr}, ${cor[0]}\n"
  1449. #else
  1450. #[[ -e $usr_pids_var/$user.pid2 ]] && rm $usr_pids_var/$user.pid2
  1451. fi
  1452. done
  1453. [[ -z $(locale | grep "LANG=" | cut -d "=" -f2) ]] && export LANG=en_US.UTF-8
  1454. echo -e "$users" | column -e -t -s ","
  1455. tput cuu1 && tput dl1
  1456. conex1+="0"
  1457. conex1=$(echo $conex1|bc)
  1458. [[ "$conex1" = "" ]] && echo -e "\033[1;31m ÔÜá´©Å NO TIENES USUARIOS CONECTADOS ! ÔÜá´©Å "
  1459. msg -bar
  1460. echo -e " \033[1;32m ­ƒö░ # TIENES \033[1;33m [ \033[1;36m${conex1}\033[1;33m ]\033[1;32m USUARIOS CONECTADOS ­ƒö░ #"
  1461. msg -bar
  1462. }
  1463. function_6 () {
  1464. tput cuu1 && tput dl1
  1465. tput cuu1 && tput dl1
  1466. tput cuu1 && tput dl1
  1467. tput cuu1 && tput dl1
  1468. tput cuu1 && tput dl1
  1469. tput cuu1 && tput dl1
  1470. tput cuu1 && tput dl1
  1471. tput cuu1 && tput dl1
  1472. tput cuu1 && tput dl1
  1473. tput cuu1 && tput dl1
  1474. tput cuu1 && tput dl1
  1475. tput cuu1 && tput dl1
  1476. tput cuu1 && tput dl1
  1477. tput cuu1 && tput dl1
  1478. tput cuu1 && tput dl1
  1479. tput cuu1 && tput dl1
  1480. tput cuu1 && tput dl1
  1481. tput cuu1 && tput dl1
  1482. tput cuu1 && tput dl1
  1483. unset _removidos
  1484. msg -bar
  1485. datenow=$(date +%s)
  1486. for user in $(awk -F: '{print $1}' /etc/passwd); do
  1487. expdate=$(chage -l $user|awk -F: '/Account expires/{print $2}')
  1488. echo $expdate|grep -q never && continue
  1489. datanormal=$(date -d"$expdate" '+%d/%m/%Y')
  1490. expsec=$(date +%s --date="$expdate")
  1491. diff=$(echo $datenow - $expsec|bc -l)
  1492. echo $diff|grep -q ^\- && continue
  1493. userdel --force $user > /dev/null 2>/dev/null
  1494. 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
  1495. pid_kill=$(dropbear_pids | grep "$user" | awk '{print $2}')
  1496. uskk=$(cat /bin/ejecutar/uskill)
  1497. let uskk=$uskk+$cco
  1498. echo $uskk > /bin/ejecutar/uskill
  1499. [[ "$pid_kill" != "" ]] && drop_kill $user
  1500. [[ "$OPENVPN" = "on" ]] && open_2 $name
  1501. [[ -e $dir_user/$user ]] && rm $dir_user/$user
  1502. _removidos="on"
  1503. echo -e "\033[1;37m $user ${cor[2]} ELIMINADO "
  1504. done
  1505. if [ "$_removidos" = "" ]; then
  1506. echo -e "${cor[5]} ÔÜá´©Å No hay Usuarios Vencidos! ÔÜá´©Å "
  1507. unset _removidos
  1508. fi
  1509. msg -bar
  1510. }
  1511. ban_per () {
  1512. clear
  1513. local="/etc/bannerssh"
  1514. msg -bar
  1515. echo -e "\033[1;37m Ôêå Linux Dist: $_os\033[0m"
  1516. msg -bar
  1517. echo -e "\033[1;37m - BANNER Manipulado - \033[0m"
  1518. msg -bar
  1519. echo -e "\033[1;37mSeleccione su Sistema: Para Salir Ctrl + C o 0 Para Regresar\033[1;33m"
  1520. echo -e " \033[1;31m[ !!! ]\033[1;33m PEGA AQUI TU BANNER \033[1;31m\033[1;33m"
  1521. msg -bar
  1522. echo -e " \033[1;31mLuego de Pegar tu banner Presiona Ctrl + O y Enter \033[1;33m \033[1;31m\033[1;33m"
  1523. echo -e " \033[1;31m Por Ultimo Ctrl + X \033[1;33m \033[1;31m\033[1;33m"
  1524. echo -ne "\033[1;37m"
  1525. read -p " Presiona Enter para Continuar "
  1526. apt install nano -y > /dev/null 2>&1
  1527. nano /bin/ejecutar/bannerssh
  1528. cat /bin/ejecutar/bannerssh > /etc/bannerssh
  1529. rm /bin/ejecutar/bannerssh
  1530. fun_bar
  1531. #[[ ! -e /root/name ]] && credi="@ChumoGH" || credi=$(cat < /root/name)
  1532. #echo '<p style="text-align: center;"><strong><span style="color: #FF00FF;">'$(cat /bin/ejecutar/menu_credito)'&reg;</span> |&nbsp;</strong><span style="color: #483D8B;"><strong>'$credi'</strong></span></p>' >> /etc/bannerssh
  1533. [[ -d /etc/dropbear ]] && {
  1534. [[ -e /etc/bannerssh ]] && cat /etc/bannerssh > /etc/dropbear/banner
  1535. } || men="NO EXISTE DROPBEAR"
  1536. msg -bar
  1537. echo -ne " \033[1;31m[ ! ] VERIFICANDO DROPBEAR "
  1538. service dropbear restart > /dev/null 2>&1
  1539. [[ -e /etc/init.d/dropbear ]] && {
  1540. /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || {
  1541. echo -e "\033[1;31m - BANNER INCOMPATIBLE CON DROPBEAR -\n" && echo "DESTRUYENDO DISEÑO"
  1542. echo "" > /etc/dropbear/banner
  1543. /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]"
  1544. }
  1545. } || echo -e "\033[0;35m [ $men ]"
  1546. echo -ne " \033[1;31m[ ! ] VERIFICANDO SSH"
  1547. service ssh restart > /dev/null 2>&1
  1548. service sshd restart > /dev/null 2>&1
  1549. [[ -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]"
  1550. sleep 0.1s
  1551. exit
  1552. }
  1553. txt_font () {
  1554. echo -e "\n\033[1;31m[\033[1;36m01\033[1;31m]\033[1;33m Letra Peque├▒a"
  1555. echo -e "\033[1;31m[\033[1;36m02\033[1;31m]\033[1;33m Letra Media"
  1556. echo -e "\033[1;31m[\033[1;36m03\033[1;31m]\033[1;33m Letra Grande"
  1557. echo -e "\033[1;31m[\033[1;36m04\033[1;31m]\033[1;33m Letra ExtraGrande"
  1558. echo ""
  1559. echo -ne "\033[1;32mEscoje el Tama├▒o de Letra\033[1;31m ?\033[1;37m : "; read opc
  1560. if [[ "$opc" = "1" ]] || [[ "$opc" = "01" ]]; then
  1561. _size='6'
  1562. elif [[ "$opc" = "2" ]] || [[ "$opc" = "02" ]]; then
  1563. _size='4'
  1564. elif [[ "$opc" = "3" ]] || [[ "$opc" = "03" ]]; then
  1565. _size='3'
  1566. elif [[ "$opc" = "4" ]] || [[ "$opc" = "04" ]]; then
  1567. _size='1'
  1568. else
  1569. _size='6'
  1570. fi
  1571. msg -bar
  1572. echo -ne "\033[1;37m"
  1573. read -p " INGRESA TU MENSAJE : " ban_ner2
  1574. msg -bar
  1575. unset x
  1576. echo -e "\033[1;42m Deseas centrar el contenido del banner\033[0;33m :v"
  1577. echo ""
  1578. echo -ne "\033[0;32m Responde [ s | n ] : " && read -e -i "s" x
  1579. msg -bar
  1580. [[ "$x" = @(s|S|y|Y) ]] && echo -e '<p style="text-align: center;">' >> /etc/bannerssh
  1581. echo -e " \033[1;31m[ 1 ]\033[1;33m > VERDE \033[1;31m[ 9 ]\033[1;33m > AZUL PIZARRA OSCURO"
  1582. echo -e " \033[1;31m[ 2 ]\033[1;33m > ROJO \033[1;31m[ 10 ]\033[1;33m > MAGENTA"
  1583. echo -e " \033[1;31m[ 3 ]\033[1;33m > AZUL \033[1;31m[ 11 ]\033[1;33m > CHOCOLATE"
  1584. echo -e " \033[1;31m[ 4 ]\033[1;33m > AMARILLO \033[1;31m[ 12 ]\033[1;33m > VERDE CLARO"
  1585. echo -e " \033[1;31m[ 5 ]\033[1;33m > PURPURA \033[1;31m[ 13 ]\033[1;33m > GRIS"
  1586. echo -e " \033[1;31m[ 6 ]\033[1;33m > Naranja \033[1;31m[ 14 ]\033[1;33m > VERDE MAR"
  1587. echo -e " \033[1;31m[ 7 ]\033[1;33m > Crema \033[1;31m[ 15 ]\033[1;33m > CIAN OSCURO"
  1588. echo -e " \033[1;31m[ 8 ]\033[1;33m > Cyano \033[1;31m[ * ]\033[1;33m > Negro"
  1589. read -p " Digite A Cor [ 1 Ôç┐ 15 ]: " ban_ner2_cor
  1590. if [[ "$ban_ner2_cor" = "1" ]]; then
  1591. echo '<h'$_size'><font color="green">' >> /etc/bannerssh
  1592. elif [[ "$ban_ner2_cor" = "2" ]]; then
  1593. echo '<h'$_size'><font color="red">' >> /etc/bannerssh
  1594. elif [[ "$ban_ner2_cor" = "3" ]]; then
  1595. echo '<h'$_size'><font color="blue">' >> /etc/bannerssh
  1596. elif [[ "$ban_ner2_cor" = "4" ]]; then
  1597. echo '<h'$_size'><font color="yellow">' >> /etc/bannerssh
  1598. elif [[ "$ban_ner2_cor" = "5" ]]; then
  1599. echo '<h'$_size'><font color="purple">' >> /etc/bannerssh
  1600. elif [ "$ban_ner2_cor" = "6" ]; then
  1601. echo '<h'$_size'><font color="#FF7F00">' >> /etc/bannerssh
  1602. elif [ "$ban_ner2_cor" = "7" ]; then
  1603. echo '<h'$_size'><font color="#AEB404">' >> /etc/bannerssh
  1604. elif [ "$ban_ner2_cor" = "8" ]; then
  1605. echo '<h'$_size'><font color="cyan">' >> /etc/bannerssh
  1606. elif [ "$ban_ner2_cor" = "9" ]; then
  1607. echo '<h'$_size'><font color="#483D8B">' >> /etc/bannerssh
  1608. elif [ "$ban_ner2_cor" = "10" ]; then
  1609. echo '<h'$_size'><font color="#FF00FF">' >> /etc/bannerssh
  1610. elif [ "$ban_ner2_cor" = "11" ]; then
  1611. echo '<h'$_size'><font color="#D2691E">' >> /etc/bannerssh
  1612. elif [ "$ban_ner2_cor" = "12" ]; then
  1613. echo '<h'$_size'><font color="#90EE90">' >> /etc/bannerssh
  1614. elif [ "$ban_ner2_cor" = "13" ]; then
  1615. echo '<h'$_size'><font color="#BEBEBE">' >> /etc/bannerssh
  1616. elif [ "$ban_ner2_cor" = "14" ]; then
  1617. echo '<h'$_size'><font color="#2E8B57">' >> /etc/bannerssh
  1618. elif [ "$ban_ner2_cor" = "15" ]; then
  1619. echo '<h'$_size'><font color="#008B8B">' >> /etc/bannerssh
  1620. else
  1621. echo '<h'$_size'><font color="black">' >> /etc/bannerssh
  1622. fi
  1623. echo "$ban_ner2" >> /etc/bannerssh
  1624. echo "</h"$_size"></font>" >> /etc/bannerssh
  1625. [[ "$x" = @(s|S|y|Y) ]] && echo "</p>" >> /etc/bannerssh
  1626. }
  1627. function_7 () {
  1628. tput cuu1 && tput dl1
  1629. tput cuu1 && tput dl1
  1630. tput cuu1 && tput dl1
  1631. tput cuu1 && tput dl1
  1632. tput cuu1 && tput dl1
  1633. tput cuu1 && tput dl1
  1634. tput cuu1 && tput dl1
  1635. tput cuu1 && tput dl1
  1636. tput cuu1 && tput dl1
  1637. tput cuu1 && tput dl1
  1638. tput cuu1 && tput dl1
  1639. tput cuu1 && tput dl1
  1640. tput cuu1 && tput dl1
  1641. tput cuu1 && tput dl1
  1642. tput cuu1 && tput dl1
  1643. tput cuu1 && tput dl1
  1644. tput cuu1 && tput dl1
  1645. tput cuu1 && tput dl1
  1646. tput cuu1 && tput dl1
  1647. msg -bar
  1648. echo -e "${cor[2]}MENU BANNER (RECOMENDADO 2):
  1649. $(msg -bar)"
  1650. echo -e "\033[0;35m [\033[0;36m01\033[0;35m]\033[0;31m >${cor[3]} Pegar BANNER Personalizado ( html , etc )"
  1651. echo -e "\033[0;35m [\033[0;36m02\033[0;35m]\033[0;31m >${cor[3]} AGREGAR MENSAJES BANNER SSH"
  1652. echo -e "\033[0;35m [\033[0;36m03\033[0;35m]\033[0;31m >${cor[3]} ELIMINAR BANNER ( SSH Ôç┐ DROPBEAR )"
  1653. msg -bar
  1654. echo -e " \033[0;35m [\033[0;36m0\033[0;35m]\033[0;31m > $(msg -bra "\033[1;41m[ REGRESAR ]\e[0m")"
  1655. msg -bar
  1656. selection=$(selection_fun 3)
  1657. case ${selection} in
  1658. 1)
  1659. unset sshsn
  1660. unset sin_nao
  1661. echo -e " Al escojer que coloques tu Banner creado fuera del Script, ADM no se "
  1662. echo -e " Responsabiliza por el Fallo de ciertos recursos del SISTEMA"
  1663. echo -e "RECUERDA QUE EL SCRIPT ESTA REALIZADO PARA FUNCIONAR CON SUS FUNCIONES"
  1664. echo -e " Y esta es EXPERIMENTAL"
  1665. echo -e "Esta SEGURO de usar esta funcion ?:"
  1666. read -p " [S/N]: " -e -i n sshsn
  1667. [[ "$sshsn" = @(s|S|y|Y) ]] && {
  1668. local2="/etc/bannerssh"
  1669. chk=$(cat /etc/ssh/sshd_config | grep Banner)
  1670. if [ "$(echo "$chk" | grep -v "#Banner" | grep Banner)" != "" ]; then
  1671. local=$(echo "$chk" |grep -v "#Banner" | grep Banner | awk '{print $2}')
  1672. else
  1673. echo "Banner /etc/bannerssh" >> /etc/ssh/sshd_config
  1674. local="/etc/bannerssh"
  1675. fi
  1676. while true; do
  1677. echo -e " ESTAS SEGURO QUE TIENES TU BANNER BIEN ESTRUCTURADO "
  1678. read -p " [ s | n ]: " sin_nao
  1679. if [[ "$sin_nao" = @(s|S|y|Y) ]]; then
  1680. ban_per
  1681. elif [[ "$sin_nao" = @(n|N) ]]; then
  1682. break
  1683. fi
  1684. done
  1685. }
  1686. ;;
  1687. 2)
  1688. unset sshsn
  1689. unset sin_nao
  1690. echo -e "${cor[3]} Buena ELECCION, Tienes un 99% mas Garantia"
  1691. echo -e "${cor[3]} Esta SEGURO:"
  1692. read -p " [S/N]: " -e -i s sshsn
  1693. [[ "$sshsn" = @(s|S|y|Y) ]] && {
  1694. local2="/etc/bannerssh"
  1695. chk=$(cat /etc/ssh/sshd_config | grep Banner)
  1696. if [ "$(echo "$chk" | grep -v "#Banner" | grep Banner)" != "" ]; then
  1697. local=$(echo "$chk" |grep -v "#Banner" | grep Banner | awk '{print $2}')
  1698. else
  1699. echo "Banner /etc/bannerssh" >> /etc/ssh/sshd_config
  1700. local="/etc/bannerssh"
  1701. fi
  1702. msg -bar
  1703. echo -e "\n\033[1;31m[\033[1;36m01\033[1;31m]\033[1;33m Letra Peque├▒a"
  1704. echo -e "\033[1;31m[\033[1;36m02\033[1;31m]\033[1;33m Letra Media"
  1705. echo -e "\033[1;31m[\033[1;36m03\033[1;31m]\033[1;33m Letra Grande"
  1706. echo -e "\033[1;31m[\033[1;36m04\033[1;31m]\033[1;33m Letra ExtraGrande"
  1707. echo ""
  1708. echo -ne "\033[1;32mEscoje el Tama├▒o de Letra\033[1;31m ?\033[1;37m : "; read opc
  1709. if [[ "$opc" = "1" ]] || [[ "$opc" = "01" ]]; then
  1710. _size='6'
  1711. elif [[ "$opc" = "2" ]] || [[ "$opc" = "02" ]]; then
  1712. _size='4'
  1713. elif [[ "$opc" = "3" ]] || [[ "$opc" = "03" ]]; then
  1714. _size='3'
  1715. elif [[ "$opc" = "4" ]] || [[ "$opc" = "04" ]]; then
  1716. _size='1'
  1717. else
  1718. _size='6'
  1719. fi
  1720. msg -bar
  1721. echo -ne "\033[1;37m"
  1722. read -p " INGRESA TU MENSAJE : " ban_ner
  1723. msg -bar
  1724. echo -e " \033[1;31m[ 1 ]\033[1;33m > VERDE \033[1;31m[ 9 ]\033[1;33m > AZUL PIZARRA OSCURO"
  1725. echo -e " \033[1;31m[ 2 ]\033[1;33m > ROJO \033[1;31m[ 10 ]\033[1;33m > MAGENTA"
  1726. echo -e " \033[1;31m[ 3 ]\033[1;33m > AZUL \033[1;31m[ 11 ]\033[1;33m > CHOCOLATE"
  1727. echo -e " \033[1;31m[ 4 ]\033[1;33m > AMARILLO \033[1;31m[ 12 ]\033[1;33m > VERDE CLARO"
  1728. echo -e " \033[1;31m[ 5 ]\033[1;33m > PURPURA \033[1;31m[ 13 ]\033[1;33m > GRIS"
  1729. echo -e " \033[1;31m[ 6 ]\033[1;33m > Naranja \033[1;31m[ 14 ]\033[1;33m > VERDE MAR"
  1730. echo -e " \033[1;31m[ 7 ]\033[1;33m > Crema \033[1;31m[ 15 ]\033[1;33m > CIAN OSCURO"
  1731. echo -e " \033[1;31m[ 8 ]\033[1;33m > Cyano \033[1;31m[ * ]\033[1;33m > Negro"
  1732. read -p " [ 1 Ôç┐ 15 ]: " ban_ner_cor
  1733. unset local
  1734. unset x
  1735. echo -e "\033[1;42m Deseas centrar el contenido del banner\033[0;33m :v"
  1736. echo ""
  1737. echo -ne "\033[0;32m Responde [ s | n ] : " && read -e -i "s" x
  1738. msg -bar
  1739. [[ "$x" = @(s|S|y|Y) ]] && echo -e '<p style="text-align: center;">' > /etc/bannerssh
  1740. if [[ "$ban_ner_cor" = "1" ]]; then
  1741. echo '<h'$_size' style="text-align:center;"><font color="green">' >> /etc/bannerssh
  1742. elif [[ "$ban_ner_cor" = "2" ]]; then
  1743. echo '<h'$_size' style="text-align:center;"><font color="red">' >> /etc/bannerssh
  1744. elif [[ "$ban_ner_cor" = "3" ]]; then
  1745. echo '<h'$_size' style="text-align:center;"><font color="blue">' >> /etc/bannerssh
  1746. elif [[ "$ban_ner_cor" = "4" ]]; then
  1747. echo '<h'$_size' style="text-align:center;"><font color="yellow">' >> /etc/bannerssh
  1748. elif [[ "$ban_ner_cor" = "5" ]]; then
  1749. echo '<h'$_size' style="text-align:center;"><font color="purple">' >> /etc/bannerssh
  1750. elif [ "$ban_ner_cor" = "6" ]; then
  1751. echo '<h'$_size' style="text-align:center;"><font color="#FF7F00">' >> /etc/bannerssh
  1752. elif [ "$ban_ner_cor" = "7" ]; then
  1753. echo '<h'$_size' style="text-align:center;"><font color="#AEB404">' >> /etc/bannerssh
  1754. elif [ "$ban_ner_cor" = "8" ]; then
  1755. echo '<h'$_size' style="text-align:center;"><font color="cyan">' >> /etc/bannerssh
  1756. elif [ "$ban_ner_cor" = "9" ]; then
  1757. echo '<h'$_size' style="text-align:center;"><font color="#483D8B">' >> /etc/bannerssh
  1758. elif [ "$ban_ner_cor" = "10" ]; then
  1759. echo '<h'$_size' style="text-align:center;"><font color="#FF00FF">' >> /etc/bannerssh
  1760. elif [ "$ban_ner_cor" = "11" ]; then
  1761. echo '<h'$_size' style="text-align:center;"><font color="#D2691E">' >> /etc/bannerssh
  1762. elif [ "$ban_ner_cor" = "12" ]; then
  1763. echo '<h'$_size' style="text-align:center;"><font color="#90EE90">' >> /etc/bannerssh
  1764. elif [ "$ban_ner_cor" = "13" ]; then
  1765. echo '<h'$_size' style="text-align:center;"><font color="#BEBEBE">' >> /etc/bannerssh
  1766. elif [ "$ban_ner_cor" = "14" ]; then
  1767. echo '<h'$_size' style="text-align:center;"><font color="#2E8B57">' >> /etc/bannerssh
  1768. elif [ "$ban_ner_cor" = "15" ]; then
  1769. echo '<h'$_size' style="text-align:center;"><font color="#008B8B">' >> /etc/bannerssh
  1770. else
  1771. echo '<h'$_size' style="text-align:center;"><font color="black">' >> /etc/bannerssh
  1772. fi
  1773. echo "$ban_ner" >> /etc/bannerssh
  1774. echo '</font></h'$_size'>' >> /etc/bannerssh
  1775. [[ "$x" = @(s|S|y|Y) ]] && echo "</p>" >> /etc/bannerssh
  1776. while true; do
  1777. echo -e " DESEAS AÑADIR MAS TEXTOS A TU BANNER?"
  1778. read -p " [ s | n ]: " sin_nao
  1779. if [[ "$sin_nao" = @(s|S|y|Y) ]]; then
  1780. txt_font
  1781. elif [[ "$sin_nao" = @(n|N) ]]; then
  1782. break
  1783. fi
  1784. done
  1785. [[ -e /root/name ]] && credi=$(cat < /root/name) || credi="@ChumoGH"
  1786. credit=$(cat < /bin/ejecutar/menu_credito)
  1787. echo -e '<p style="text-align: center;"><strong><span style="color: #FF00FF;">'" $credit "'&reg;</span> |&nbsp;</strong><span style="color: #483D8B;"><strong>'"$credi"'</strong></span></p>' >> /etc/bannerssh
  1788. #echo '<font color="#FF00FF">┬® 2020 ChumoGH, &reg</font>' >> /etc/bannerssh
  1789. [[ -d /etc/dropbear ]] && {
  1790. [[ -e /etc/bannerssh ]] && cat /etc/bannerssh > /etc/dropbear/banner
  1791. } || men="NO EXISTE DROPBEAR"
  1792. msg -bar
  1793. echo -ne " \033[1;31m[ ! ] VERIFICANDO DROPBEAR "
  1794. service dropbear restart > /dev/null 2>&1
  1795. [[ -e /etc/init.d/dropbear ]] && {
  1796. /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]" || {
  1797. echo -e "\033[1;31m Ôûó BANNER INCOMPATIBLE CON DROPBEAR -\n" && echo "DESTRUYENDO DISE├æO"
  1798. echo "" > /etc/dropbear/banner
  1799. /etc/init.d/dropbear restart > /dev/null 2>&1 && echo -e "\033[1;32m [OK]"
  1800. }
  1801. } || echo -e "\033[0;35m [ $men ]"
  1802. echo -ne " \033[1;31m[ ! ] VERIFICANDO SSH "
  1803. service ssh restart > /dev/null 2>&1
  1804. service sshd restart > /dev/null 2>&1
  1805. [[ -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]"
  1806. }
  1807. return 0
  1808. ;;
  1809. 3)
  1810. echo "Verificando existencia de BANNER"
  1811. echo ""
  1812. [[ -e /etc/bannerssh ]] && {
  1813. echo "DESTRUYENDO BANNER SSH "
  1814. echo "" > /etc/bannerssh
  1815. } || echo "NO EXISTE BANNER DROPBEAR ESTRUCTURADO"
  1816. [[ -e /etc/dropbear/banner ]] && {
  1817. echo "DESTRUYENDO BANNER DROPBEAR "
  1818. echo "" > /etc/dropbear/banner
  1819. } || echo "NO EXISTE BANNER SSH ESTRUCTURADO"
  1820. return 0
  1821. ;;
  1822. *)
  1823. echo "LO SENTIMOS DIGITASTE MAL"
  1824. sleep 0.1s
  1825. return 0
  1826. ;;
  1827. esac
  1828. #TERMINA CASE
  1829. }
  1830. meu-v2ray () {
  1831. tput cuu1 && tput dl1
  1832. tput cuu1 && tput dl1
  1833. tput cuu1 && tput dl1
  1834. tput cuu1 && tput dl1
  1835. tput cuu1 && tput dl1
  1836. tput cuu1 && tput dl1
  1837. tput cuu1 && tput dl1
  1838. tput cuu1 && tput dl1
  1839. tput cuu1 && tput dl1
  1840. tput cuu1 && tput dl1
  1841. tput cuu1 && tput dl1
  1842. tput cuu1 && tput dl1
  1843. tput cuu1 && tput dl1
  1844. tput cuu1 && tput dl1
  1845. tput cuu1 && tput dl1
  1846. tput cuu1 && tput dl1
  1847. tput cuu1 && tput dl1
  1848. tput cuu1 && tput dl1
  1849. tput cuu1 && tput dl1
  1850. msg -bar
  1851. echo -e "\e[97m\033[1;41m PROYECTOS V2RAY REFACTORIZADO By @ChumoGH 11-12-2022 \033[0m"
  1852. msg -bar
  1853. echo -ne "\033[1;37m
  1854. 1)- V2ray Manager UNIVERSAL
  1855. 2)- V2ray Manager by @Rufu99
  1856. $(msg -bar)
  1857. 0)- Salir \n" | lolcat
  1858. msg -bar
  1859. selection=$(selection_fun 2)
  1860. case ${selection} in
  1861. 1)
  1862. [[ ! -z $(which v2ray.menu) ]] && v2ray.menu || source <(curl -sSL https://www.dropbox.com/s/id3llagyfvwceyr/v2ray1.sh)
  1863. ;;
  1864. 2)
  1865. [[ ! -z $(which v2r.sh) ]] && v2r.sh || source <(curl -sSL https://www.dropbox.com/s/xzp8zmar5ljbl3x/v2ray_manager.sh)
  1866. ;;
  1867. 0)
  1868. return 0
  1869. ;;
  1870. esac
  1871. }
  1872. ssrmenu () {
  1873. source <(curl -sL https://raw.githubusercontent.com/ChumoGH/ChumoGH-Script/master/back/ssrrmu.sh)
  1874. }
  1875. selection=$(selection_fun 14)
  1876. case ${selection} in
  1877. 1)
  1878. cd /etc/adm-lite/ && fun_us
  1879. echo -ne "${cor[5]}"
  1880. read -p " ¡Enter, para volver!"
  1881. source /etc/adm-lite/usercodes
  1882. ;;
  1883. 2)
  1884. cd /etc/adm-lite/ && function_2
  1885. echo -ne "${cor[5]}"
  1886. read -p " ¡Enter, para volver!"
  1887. source /etc/adm-lite/usercodes
  1888. ;;
  1889. 3)
  1890. cd /etc/adm-lite/ && function_3
  1891. echo -ne "${cor[5]}"
  1892. read -p " ¡Enter, para volver!"
  1893. source /etc/adm-lite/usercodes
  1894. ;;
  1895. 4)
  1896. cd /etc/adm-lite/ && function_4
  1897. echo -ne "${cor[5]}"
  1898. read -p " ¡Enter, para volver!"
  1899. source /etc/adm-lite/usercodes
  1900. ;;
  1901. 5)
  1902. cd /etc/adm-lite/ && function_5
  1903. echo -ne "${cor[5]}"
  1904. read -p " ¡Enter, para volver!"
  1905. source /etc/adm-lite/usercodes
  1906. ;;
  1907. 6)
  1908. cd /etc/adm-lite/ && function_7
  1909. echo -ne "${cor[5]}"
  1910. read -p " ¡Enter, para volver!"
  1911. source /etc/adm-lite/usercodes
  1912. ;;
  1913. 7)
  1914. cd /etc/adm-lite/ && net_meter
  1915. echo -ne "${cor[5]}"
  1916. read -p " ¡Enter, para volver!"
  1917. source /etc/adm-lite/usercodes
  1918. ;;
  1919. 8)
  1920. cd /etc/adm-lite/ && block_user
  1921. echo -ne "${cor[5]}"
  1922. read -p " ¡Enter, para volver!"
  1923. source /etc/adm-lite/usercodes
  1924. ;;
  1925. 9)
  1926. cd /etc/adm-lite/ && recuva1
  1927. echo -ne "${cor[5]}"
  1928. read -p " ¡Enter, para volver!"
  1929. source /etc/adm-lite/usercodes
  1930. ;;
  1931. 10)
  1932. cd /etc/adm-lite/ && ssrmenu
  1933. echo -ne "${cor[5]}"
  1934. read -p " ¡Enter, para volver!"
  1935. source /etc/adm-lite/usercodes
  1936. ;;
  1937. 11)
  1938. cd /etc/adm-lite/ && meu-v2ray
  1939. echo -ne "${cor[5]}"
  1940. read -p " ¡Enter, para volver!"
  1941. source /etc/adm-lite/usercodes
  1942. ;;
  1943. 12)
  1944. cd /etc/adm-lite/ && consul_cli
  1945. echo -ne "${cor[5]}"
  1946. read -p " ¡Enter, para volver!"
  1947. source /etc/adm-lite/usercodes
  1948. ;;
  1949. 13)
  1950. #[[ ! -z $(which troj.sh) ]] && troj.sh || echo -e " NO SE HA HABILITADO ACCESO AL PANNEL"
  1951. #echo -ne "${cor[5]}"
  1952. #read -p " ¡Enter, para volver!"
  1953. #source /etc/adm-lite/usercodes
  1954. #;;
  1955. #14)
  1956. wget -q -O /tmp/instCHEKC.sh https://www.dropbox.com/s/8bfsy201cycqvne/initcheck.sh && bash /tmp/instCHEKC.sh
  1957. echo -ne "${cor[5]}"
  1958. read -p " ¡Enter, para volver!"
  1959. source /etc/adm-lite/usercodes
  1960. ;;
  1961. esac