listID 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #!/bin/bash
  2. # -*- ENCODING: UTF-8 -*-
  3. listID_GEN () {
  4. unset bot_lin
  5. n=1
  6. for i in $(cat /etc/ADM-db/User-ID | awk '{print $1}' | sed -e 's/[^a-z0-9 -]//ig'); do
  7. idlog=$(cat /etc/ADM-db/User-ID | grep "$i" | awk '{print $3}')
  8. #idGEN=$(grep -o -i $idlog /etc/ADM-db/num-key.cont | wc -l)
  9. [[ -e /etc/ADM-db/num-key.cont ]] && idGEN=$(cat /etc/ADM-db/num-key.cont | grep $i | wc -l) || idGEN=0
  10. bot_lin+=" $n] > <tg-spoiler>${i}</tg-spoiler> | $idlog | ${idGEN}\n"
  11. #lsid=$(cat -n ${CID})
  12. let n++
  13. done
  14. local bot_retorno="$LINE\n"
  15. bot_retorno+=' - ID´S AUTORIZADOS + GENERADAS -\n'
  16. bot_retorno+="$LINE\n"
  17. bot_retorno+=" $(echo -e ${bot_lin}) " #|column -t -s '-')"
  18. bot_retorno+="$LINE\n"
  19. msj_fun
  20. }
  21. listID_src () {
  22. lsid=$(cat -n ${CID})
  23. local bot_retorno=" $LINE\n"
  24. bot_retorno+=" - ID'S AUTORIZADOS -\n"
  25. bot_retorno+="$LINE\n"
  26. bot_retorno+="${lsid}\n"
  27. bot_retorno+="$LINE\n"
  28. msj_fun
  29. }
  30. ChatADM () {
  31. local bot_retorno=" $LINE\n"
  32. bot_retorno+=" ENVIA TU ARCHIVO O COMPROBANTE AL ADM\n"
  33. bot_retorno+=" MODELO EN EVOLUCCION DE @ChumoGH\n"
  34. bot_retorno+="\n"
  35. bot_retorno+="$LINE\n"
  36. msj_fun
  37. }
  38. list_IP () {
  39. unset lsid
  40. unset idchek
  41. [[ -z ${idchek} ]] && idchek="${message_from_id}"
  42. [[ -z ${idchek} ]] && idchek="${callback_query_from_id}"
  43. [[ -z "$(cat /etc/ADM-db/User-ID | grep ${idchek} )" ]] && {
  44. [[ "$(cat /etc/ADM-db/Admin-ID)" == "${idchek}" ]] && {
  45. cat /var/www/html/ChumoGH/checkIP.log > /tmp/ips
  46. echo -e " $(cat /tmp/ips | awk '{print $3}' | uniq)" > /tmp/ipchek
  47. lsid=$(cat -n /tmp/ipchek)
  48. local bot_retorno=" $LINE\n"
  49. bot_retorno+=' - ULTIMOS IP´S UNICOS CAPTURADOS \n'
  50. bot_retorno+=" - TIENES $(cat /var/www/html/ChumoGH/checkIP.log | wc -l) IP´s CAPTURADAS \n"
  51. bot_retorno+="$LINE\n"
  52. bot_retorno+=" ${lsid}\n"
  53. bot_retorno+="$LINE\n"
  54. }
  55. } || {
  56. cat /var/www/html/ChumoGH/checkIP.log | grep "${idchek}" > /tmp/ips
  57. echo -e " $(cat /tmp/ips | awk '{print $3}' | uniq)" > /tmp/ipchek
  58. lsid=$(cat -n /tmp/ipchek)
  59. local bot_retorno=" $LINE\n"
  60. bot_retorno+=' - ULTIMOS IP´S UNICOS CAPTURADOS \n'
  61. bot_retorno+=" - TIENES $(cat /var/www/html/ChumoGH/checkIP.log | grep ${idchek} | wc -l) IP´s CAPTURADAS DE TUS GENERADAS \n"
  62. bot_retorno+="$LINE\n"
  63. bot_retorno+=" ${lsid}\n"
  64. bot_retorno+="$LINE\n"
  65. }
  66. msj_fun
  67. }
  68. listID_RESS () {
  69. i=1
  70. for lRES in $(ls ${CIDRESS}); do
  71. echo " $i /$lRES"
  72. let i++
  73. done
  74. lsid=$(ls ${CIDRESS})
  75. local bot_retorno="$LINE\n"
  76. bot_retorno+="Lista de id permitidos\n"
  77. bot_retorno+="$LINE\n"
  78. bot_retorno+="${lsid}\n"
  79. bot_retorno+="$LINE\n"
  80. msj_fun
  81. }