rxnx113

ngl toool python

Jan 16th, 2025
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.79 KB | None | 0 0
  1. import random
  2. import time
  3. import requests
  4. import sys
  5. import os
  6. from concurrent.futures import ThreadPoolExecutor
  7. import threading
  8. import win32console
  9.  
  10. os.system('cls' if os.name == 'nt' else 'clear')
  11.  
  12. win32console.SetConsoleTitle("NGLipser V1")
  13.  
  14. sent, errored = 0, 0
  15.  
  16. class Console:
  17. @staticmethod
  18. def get_time() -> str:
  19. return time.strftime("%H:%M:%S", time.gmtime())
  20.  
  21. @staticmethod
  22. def logger(*content: tuple, status: str) -> None:
  23. lock = threading.Lock()
  24. current_time = Console.get_time()
  25.  
  26. colors = {
  27. "g": "\033[92m", # Green
  28. "r": "\033[91m", # Red
  29. "y": "\033[93m", # Yellow
  30. "cyan": "\033[96m", # Cyan
  31. "reset": "\033[0m"
  32. }
  33. with lock:
  34. if status == "g":
  35. sys.stdout.write(
  36. f'{colors["y"]}[{current_time}]{colors["reset"]}{colors["g"]}{" ".join(content)}{colors["reset"]}\n'
  37. )
  38. elif status == "r":
  39. sys.stdout.write(
  40. f'{colors["y"]}[{current_time}]{colors["reset"]}{colors["r"]}{" ".join(content)}{colors["reset"]}\n'
  41. )
  42. elif status == "y":
  43. sys.stdout.write(
  44. f'{colors["y"]}[{current_time}]{colors["reset"]}{colors["y"]}{" ".join(content)}{colors["reset"]}\n'
  45. )
  46.  
  47. @staticmethod
  48. def clear() -> None:
  49. os.system("cls" if os.name == "nt" else "clear")
  50.  
  51.  
  52. def main(username, message, deviceid):
  53. global errored
  54. global sent
  55.  
  56. headers = {
  57. "Content-Type": "application/x-www-form-urlencoded",
  58. "Accept-Language": "en-US,en;q=0.5",
  59. "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
  60. "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0",
  61. }
  62.  
  63. try:
  64. postresp = requests.post(
  65. "https://ngl.link/api/submit",
  66. headers=headers,
  67. data={
  68. "username": username,
  69. "question": message,
  70. "deviceId": deviceid,
  71. }
  72. )
  73. if postresp.status_code == 200:
  74. sent += 1
  75. Console.logger(
  76. f"Sent {message} to victim, Message Number: {sent}, {errored} blocked messages",
  77. status="g",
  78. )
  79. elif postresp.status_code == 404:
  80. Console.logger(f"User {username} does not exist", status="r")
  81. exit()
  82. elif postresp.status_code == 429:
  83. Console.logger(f"User {username} is rate limited", status="r")
  84. else:
  85. Console.logger(postresp.status_code, status="r")
  86. except Exception as e:
  87. errored += 1
  88. Console.logger(f"Error: {e}", status="y")
  89.  
  90.  
  91. def messages():
  92. randomQuestions = ["Hello", "How are you?", "What's up?"]
  93. return random.choice(randomQuestions)
  94.  
  95.  
  96. def deviceid():
  97. return "".join(
  98. random.choice("0123456789abcdefghijklmnopqrstuvwxyz-") for _ in range(36)
  99. )
  100.  
  101.  
  102. def center_text(text: str) -> str:
  103. terminal_width = os.get_terminal_size().columns
  104. centered_lines = [line.center(terminal_width) for line in text.split('\n')]
  105. return '\n'.join(centered_lines)
  106.  
  107.  
  108. def handler():
  109. ascii_art = """
  110. _____ __ __________
  111. ___ | / /______ ___ /__(_)___________________________
  112. __ |/ /__ __ `/_ /__ /___ __ \\_ ___/ _ \\_ ___/
  113. _ /| / _ /_/ /_ / _ / __ /_/ /(__ )/ __/ /
  114. /_/ |_/ _\\__, / /_/ /_/ _ .___//____/ \\___//_/
  115. /____/ /_/
  116. dsc.gg/wearentdevs
  117. """
  118.  
  119. cyan = "\033[96m"
  120. reset = "\033[0m"
  121.  
  122. centered_art = center_text(ascii_art)
  123. print(f"{cyan}{centered_art}{reset}")
  124.  
  125. username = str(input("Enter username (/...): "))
  126. threadcount = int(input("Enter message count: "))
  127.  
  128. delay = 0.05
  129. messagestatus = input("Send random messages (y/n)? ").strip().lower() == "y"
  130.  
  131. if messagestatus:
  132. with ThreadPoolExecutor(max_workers=threadcount) as executor:
  133. for _ in range(threadcount):
  134. executor.submit(
  135. main, username, messages(), deviceid()
  136. )
  137. else:
  138. message = str(input("Enter message: "))
  139. with ThreadPoolExecutor(max_workers=threadcount) as executor:
  140. futures = [executor.submit(
  141. main, username, message, deviceid()
  142. ) for _ in range(threadcount)]
  143. for future in futures:
  144. future.result()
  145. time.sleep(delay)
  146.  
  147. Console.logger(f"Successfully, sents messages to {username}.", status="g")
  148.  
  149.  
  150. if __name__ == "__main__":
  151. handler()
  152.  
Advertisement
Add Comment
Please, Sign In to add comment