ms / app.py
COLTO50's picture
Update app.py
474b9ef verified
raw
history blame contribute delete
547 Bytes
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"])