installer.sh 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #!/bin/bash
  2. dateFromServer=$(curl -v --insecure --silent https://google.com/ 2>&1 | grep Date | sed -e 's/< Date: //')
  3. biji=`date +"%Y-%m-%d" -d "$dateFromServer"`
  4. #########################
  5. [[ ! -f /usr/bin/jq ]] && {
  6. red "Downloading jq file!"
  7. wget -q --no-check-certificate "https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64" -O /usr/bin/jq
  8. chmod +x usr/bin/jq
  9. }
  10. dircreate() {
  11. [[ -d /etc/.maAsiss ]] || mkdir /etc/.maAsiss
  12. [[ -d /etc/.maAsiss/db_reseller ]] || mkdir /etc/.maAsiss/db_reseller
  13. [[ -d /etc/.maAsiss/info-user-ss ]] || mkdir /etc/.maAsiss/info-user-ss
  14. [[ -d /etc/.maAsiss/info-user-ssr ]] || mkdir /etc/.maAsiss/info-user-ssr
  15. [[ -d /etc/.maAsiss/info-user-sstp ]] || mkdir /etc/.maAsiss/info-user-sstp
  16. [[ -d /etc/.maAsiss/info-user-trgo ]] || mkdir /etc/.maAsiss/info-user-trgo
  17. [[ -d /etc/.maAsiss/info-user-trojan ]] || mkdir /etc/.maAsiss/info-user-trojan
  18. [[ -d /etc/.maAsiss/info-user-v2ray ]] || mkdir /etc/.maAsiss/info-user-v2ray
  19. [[ -d /etc/.maAsiss/info-user-vless ]] || mkdir /etc/.maAsiss/info-user-vless
  20. [[ -d /etc/.maAsiss/info-user-wg ]] || mkdir /etc/.maAsiss/info-user-wg
  21. [[ -d /etc/.maAsiss/info-users ]] || mkdir /etc/.maAsiss/info-users
  22. [[ -d /etc/.maAsiss/info-user-l2tp ]] || mkdir /etc/.maAsiss/info-user-l2tp
  23. [[ -d /etc/.maAsiss/info-user-pptp ]] || mkdir /etc/.maAsiss/info-user-pptp
  24. [[ -f /etc/.maAsiss/list_user ]] || touch /etc/.maAsiss/list_user
  25. [[ ! -f /etc/.maAsiss/res_token ]] && touch /etc/.maAsiss/res_token
  26. [[ ! -f /etc/.maAsiss/User_Generate_Token ]] && touch /etc/.maAsiss/User_Generate_Token
  27. [[ -f /etc/.maAsiss/price ]] || {
  28. cat <<-EOF >/etc/.maAsiss/price
  29. Price SSH : 1
  30. Price VMess : 1
  31. Price VLess : 1
  32. Price Trojan : 1
  33. Price Trojan-GO : 1
  34. Price Wireguard : 1
  35. Price Shadowsocks : 1
  36. Price Shadowsocks-R : 1
  37. Price SSTP : 1
  38. Price L2TP : 1
  39. Price PPTP : 1
  40. EOF
  41. }
  42. }
  43. fun_botOnOff() {
  44. dircreate
  45. [[ ! -f /etc/.maAsiss/bot.conf ]] && {
  46. echo -e "Scvps Bot Panel Installer
  47. "
  48. [[ ! -f /root/ResBotAuth ]] && {
  49. echo -ne "Input your Bot TOKEN : "
  50. read bot_tkn
  51. echo "Toket='$bot_tkn'" > /root/ResBotAuth
  52. echo -ne "Input your Admin ID : "
  53. read adm_ids
  54. echo "Admin_ID=$adm_ids" >> /root/ResBotAuth
  55. }
  56. echo -ne "Username admin panel use '@' [Ex: @ApaItuLeee] : "
  57. read admin_pnl
  58. [[ -z $admin_pnl ]] && admin_pnl="@ApaItuLeee"
  59. echo ""
  60. echo -ne "Limit trial for reseller create user trial [default:1] : "
  61. read limit_pnl
  62. [[ -z $limit_pnl ]] && limit_pnl="1"
  63. echo ""
  64. echo -ne "Your name store [dafult: SCVPS-STORE] : "
  65. read store_pnl
  66. [[ -z $store_pnl ]] && store_pnl="SCVPS-STORE"
  67. echo ""
  68. cat <<-EOF >/etc/.maAsiss/bot.conf
  69. admin_panel : $admin_pnl
  70. limite_trial : $limit_pnl
  71. store_name : $store_pnl
  72. EOF
  73. clear
  74. echo -e "Info...\n"
  75. fun_bot1() {
  76. [[ ! -e "/etc/.maAsiss/.Shellbtsss" ]] && {
  77. wget -qO- https://scrzoke.000webhostapp.com/crud/ShellBot.sh >/etc/.maAsiss/.Shellbtsss
  78. }
  79. [[ "$(grep -wc "scvps_bot" "/etc/rc.local")" = '0' ]] && {
  80. sed -i '$ i\screen -dmS scvps_bot bbt' /etc/rc.local >/dev/null 2>&1
  81. }
  82. }
  83. screen -dmS scvps_bot bbt >/dev/null 2>&1
  84. fun_bot1
  85. [[ $(ps x | grep "scvps_bot" | grep -v grep | wc -l) != '0' ]] && echo -e "\nBot successfully activated !" || echo -e "\nError1! Information not valid !"
  86. sleep 2
  87. menu
  88. } || {
  89. clear
  90. echo -e "Info...\n"
  91. fun_bot2() {
  92. screen -r -S "scvps_bot" -X quit >/dev/null 2>&1
  93. [[ $(grep -wc "scvps_bot" /etc/rc.local) != '0' ]] && {
  94. sed -i '/scvps_bot/d' /etc/rc.local
  95. }
  96. rm -f /etc/.maAsiss/bot.conf
  97. sleep 1
  98. }
  99. fun_bot2
  100. echo -e "\nBot Scvps Stopped!"
  101. sleep 2
  102. menu
  103. }
  104. }
  105. fun_instbot() {
  106. echo -e "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
  107. echo -e " ⚠️ ATTENTION ⚠️"
  108. echo -e "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
  109. echo -e " • Go to @BotFather Create Your own Bot by Type : /newbot"
  110. echo -e " • Go to @MissRose_bot And Get Your ID by Type : /id"
  111. echo -e "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
  112. echo -e "Note:
  113. y = to start bot panel
  114. n = to cancel start bot panel
  115. d = delete configuration file before
  116. "
  117. echo -ne "Do you want to continue ? [y/n/d]: "
  118. read resposta
  119. if [[ "$resposta" = 'd' ]]; then
  120. rm -f /etc/.maAsiss/bot.conf
  121. menu
  122. elif [[ "$resposta" = 'y' ]] || [[ "$resposta" = 'Y' ]]; then
  123. fun_botOnOff
  124. else
  125. echo -e "Returning..."
  126. sleep 1
  127. menu
  128. fi
  129. }
  130. [[ -f "/etc/.maAsiss/.Shellbtsss" ]] && fun_botOnOff || fun_instbot