File size: 547 Bytes
474b9ef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import os
import subprocess
# Set your mining configuration
wallet_address = "your_wallet_address"
pool_url = "your_pool_url"
rig_id = "your_rig_id"
# Create a config.json file for XMRig
config_json = f"""
{{
"algo": "ethash",
"coin": "ETH",
"pool": "{pool_url}",
"wallet": "{wallet_address}",
"rig-id": "{rig_id}",
"cpu": true,
"threads": 2
}}
"""
with open("config.json", "w") as f:
f.write(config_json)
# Install XMRig
subprocess.run(["pip", "install", "xmrig"])
# Run XMRig
subprocess.run(["xmrig", "-c", "config.json"]) |