commit 728c5974a758e656f1883ef3942ea27700fb24de Author: jwinterm Date: Sun Jun 14 14:07:20 2020 -0700 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..75cfd76 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +build/ +dist/ +backup.spec \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d07d0b4 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Wownero Spelunker + +This is a Tkinter Python GUI front end for XMRig. It can mine either Wownero or Monero. It is generally unoptimizedoptimized and designed to basically paste an address in and start mining. + +If you want to increase hashrate you can try increasing the number of threads. You can also try turning on hugepages, but it might just crash the program. Really not sure. + +Basically copy in your address, change number of threads if you want, and then press Start button. + diff --git a/SHA256SUMS b/SHA256SUMS new file mode 100644 index 0000000..506180c --- /dev/null +++ b/SHA256SUMS @@ -0,0 +1,5 @@ +11bd2c9f9e2397c9a16e0990e4ed2cf0679498fe0fd418a3dfdac60b5c160ee5 *WinRing0x64.sys +8b06fd7a49b6d65df059165e1cdeac28108bf5980c4036d74edd50a6d6547039 *config.json +9554e811347798d784bbe0ed5fa212e95dc8783a34cbc298454805f0988cb577 *start.cmd +6d8519a724c8e4f3fd21df6009cf793091aaacc6ce4eb24b7d8075e73a466183 *xmrig-notls.exe +37aecfc29b01a8dcee6ef4086b3570b774250353dd4f0c025665fd98a83043d4 *xmrig.exe diff --git a/WinRing0x64.sys b/WinRing0x64.sys new file mode 100644 index 0000000..197c255 Binary files /dev/null and b/WinRing0x64.sys differ diff --git a/config.json b/config.json new file mode 100644 index 0000000..9ef5736 --- /dev/null +++ b/config.json @@ -0,0 +1,92 @@ +{ + "api": { + "id": null, + "worker-id": null + }, + "http": { + "enabled": false, + "host": "127.0.0.1", + "port": 0, + "access-token": null, + "restricted": true + }, + "autosave": true, + "background": false, + "colors": true, + "randomx": { + "init": -1, + "mode": "auto", + "1gb-pages": false, + "rdmsr": true, + "wrmsr": true, + "numa": true + }, + "cpu": { + "enabled": true, + "huge-pages": true, + "hw-aes": null, + "priority": null, + "memory-pool": false, + "yield": true, + "max-threads-hint": 100, + "asm": true, + "argon2-impl": null, + "astrobwt-max-size": 550, + "cn/0": false, + "cn-lite/0": false + }, + "opencl": { + "enabled": false, + "cache": true, + "loader": null, + "platform": "AMD", + "adl": true, + "cn/0": false, + "cn-lite/0": false + }, + "cuda": { + "enabled": false, + "loader": null, + "nvml": true, + "cn/0": false, + "cn-lite/0": false + }, + "donate-level": 5, + "donate-over-proxy": 1, + "log-file": null, + "pools": [ + { + "algo": null, + "coin": null, + "url": "donate.v2.xmrig.com:3333", + "user": "YOUR_WALLET_ADDRESS", + "pass": "x", + "rig-id": null, + "nicehash": false, + "keepalive": false, + "enabled": true, + "tls": false, + "tls-fingerprint": null, + "daemon": false, + "socks5": null, + "self-select": null + } + ], + "print-time": 60, + "health-print-time": 60, + "retries": 5, + "retry-pause": 5, + "syslog": false, + "tls": { + "enabled": false, + "protocols": null, + "cert": null, + "cert_key": null, + "ciphers": null, + "ciphersuites": null, + "dhparam": null + }, + "user-agent": null, + "verbose": 0, + "watch": true +} diff --git a/main.py b/main.py new file mode 100644 index 0000000..725e9a7 --- /dev/null +++ b/main.py @@ -0,0 +1,220 @@ +from tkinter import * +from PIL import ImageTk, Image +import subprocess +import threading +import queue +import os +import re +from os import system +from re import sub +import sys + +os.environ["PYTHONUNBUFFERED"] = "1" + +def enqueue_output(p, q): + while True: + out = p.stdout.readline() + if out == '' and p.poll() is not None: + break + if out: + #print(out.strip(), flush=True) + q.put_nowait(out.strip()) + + +def resource_path(relative_path): + try: + base_path = sys._MEIPASS + except Exception: + base_path = os.path.abspath(".") + return os.path.join(base_path, relative_path) + +class Window(Frame): + + def __init__(self, master=None): + Frame.__init__(self, master) + self.master = master + self.started = False + self.p = None + self.q = queue.Queue() + self.threads = 2 + self.urltext = "" + self.addytext = "" + self.imgMinerDoge = ImageTk.PhotoImage(Image.open(resource_path("minerdoge.png"))) + self.imgStopped = ImageTk.PhotoImage(Image.open(resource_path("notstress.jpg"))) + self.imgStarted = ImageTk.PhotoImage(Image.open(resource_path("stress.jpg"))) + self.imgVeryStarted = ImageTk.PhotoImage(Image.open(resource_path("verystress.png"))) + self.hugepagesCheckbuttonVar = IntVar() + self.wowneroRadiobuttonVar = IntVar() + self.init_window() + + + def init_window(self): + self.master.title("Wownero Spelunker") + self.pack(fill=BOTH, expand=1) + + self.titleLabel = Label(self, text="Wownero Spelunker", font=("Comic Sans MS", 16)) + self.titleImage = Label(image=self.imgMinerDoge) + self.titleImage.image = self.imgMinerDoge + + self.urlLabel = Label(self, text="Pool URL:port") + self.urlEntry = Entry(self, textvariable=self.urltext, width=40) + self.urlEntry.insert(0, "wownero.herominers.com:10661") + + self.addyLabel = Label(self, text="Wallet addy") + self.addyEntry = Entry(self, textvariable=self.addytext, width=40) + + self.statusLabel = Label(self, text="Current status:\nNot mining") + + self.statusImage = Label(image=self.imgStopped) + self.statusImage.image = self.imgStopped + + self.hashrateLabel = Label(self, text="Hashrate: ") + + self.threadsLabel = Label(self, text="# of threads: ") + self.threadsEntry = Entry(self, textvariable=self.threads, width=5) + self.threadsEntry.insert(0, "2") + + self.hugepagesCheckbutton = Checkbutton(self, text="Use hugepages", variable=self.hugepagesCheckbuttonVar) + + self.wowneroRadiobutton = Radiobutton(self, text="Wownero", variable=self.wowneroRadiobuttonVar, value=1, command=self.wowneroUrl) + self.wowneroRadiobutton.select() + self.moneroRadiobutton = Radiobutton(self, text="Monero", variable=self.wowneroRadiobuttonVar, value=2, command=self.moneroUrl) + self.wowDonateRadiobutton = Radiobutton(self, text="Donate Wownero", variable=self.wowneroRadiobuttonVar, value=3, command=self.wowneroDonate) + self.moDonateRadiobutton = Radiobutton(self, text="Donate Monero", variable=self.wowneroRadiobuttonVar, value=4, command=self.moneroDonate) + + self.hashrateLabel = Label(self, text="Hashrate: 0 h/s") + self.hashrateLabel.after(2000, self.refresh_hashrate) + + self.startButton = Button(self, text="Start", background="green", command=self.startstop) + self.quitButton = Button(self, text="Quit", command=self.client_exit) + + self.outputLabelLabel = Label(self, text="Miner output:") + self.outputLabel = Label(self, text="") + + self.titleLabel.place(x=70, y=10) + self.titleImage.place(x=270, y=0) + self.urlLabel.place(x=30, y=55) + self.urlEntry.place(x=112, y=55) + self.addyLabel.place(x=30, y=75) + self.addyEntry.place(x=112, y=75) + self.statusLabel.place(x=50, y=100) + self.statusImage.place(x=140, y=100) + self.threadsLabel.place(x=50, y=180) + self.threadsEntry.place(x=125, y=180) + self.hugepagesCheckbutton.place(x=220, y=178) + self.wowneroRadiobutton.place(x=230, y=100) + self.moneroRadiobutton.place(x=230, y=120) + self.wowDonateRadiobutton.place(x=230, y=140) + self.moDonateRadiobutton.place(x=230, y=160) + self.hashrateLabel.place(x=50, y=220) + self.outputLabelLabel.place(x=50, y=250) + self.outputLabel.place(x=50, y=265) + self.startButton.place(x=100, y=310) + self.quitButton.place(x=250, y=310) + + def clearStuff(self): + self.urlEntry.delete(0, 'end') + self.addyEntry.delete(0, 'end') + def wowneroUrl(self): + self.urlEntry.delete(0, 'end') + self.urlEntry.insert(0, "wownero.herominers.com:10661") + def moneroUrl(self): + self.urlEntry.delete(0, 'end') + self.urlEntry.insert(0, "monero.herominers.com:10191") + def wowneroDonate(self): + self.clearStuff() + self.urlEntry.insert(0, "wownero.herominers.com:10661") + self.addyEntry.insert(0, "Wo3MWeKwtA918DU4c69hVSNgejdWFCRCuWjShRY66mJkU2Hv58eygJWDJS1MNa2Ge5M1WjUkGHuLqHkweDxwZZU42d16v94mP") + def moneroDonate(self): + self.clearStuff() + self.urlEntry.insert(0, "monero.herominers.com:10191") + self.addyEntry.insert(0, "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H") + + def startstop(self): + if not self.started: + try: + self.threads = int(self.threadsEntry.get()) + except: + self.threads = 2 + if self.threads > 16: + self.threads = 16 + self.threadsEntry.delete(0, 'end') + self.threadsEntry.insert(0, self.threads) + if self.hugepagesCheckbuttonVar.get(): + hugepages = "" + else: + hugepages = "--no-huge-pages" + print(self.threads) + if self.wowneroRadiobuttonVar.get() == 1 or self.wowneroRadiobuttonVar.get() == 3: + algo = "rx/wow" + else: + also = "rx/0" + self.p = subprocess.Popen([resource_path("xmrig.exe"), "-t", str(self.threads), + hugepages, "--donate-level=1", "-a", algo, "-o", str(self.urlEntry.get()), "-u", str(self.addyEntry.get())], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + #shell=True, + encoding='utf-8', + #creationflags=0x08000000, + errors='replace') + self.t = threading.Thread(target=enqueue_output, args=(self.p, self.q)) + self.t.daemon = True + self.t.start() + self.started = True + if self.threads < 3: + self.statusImage = Label(image=self.imgStarted) + self.statusImage.image = self.imgStarted + else: + self.statusImage = Label(image=self.imgVeryStarted) + self.statusImage.image = self.imgVeryStarted + self.statusImage.place(x=140, y=100) + self.statusLabel.config(text="Current status:\nMining") + self.startButton.config(text="Stop", background="red") + elif self.started: + system("taskkill /im xmrig.exe /f") + self.p.kill() + self.t.join() + self.started = False + self.statusImage = Label(image=self.imgStopped) + self.statusImage.image = self.imgStopped + self.statusImage.place(x=140, y=100) + self.statusLabel.config(text="Current status:\nNot mining") + self.hashrateLabel.config(text="Hashrate: 0 h/s") + self.startButton.config(text="Start", background="green") + + def refresh_hashrate(self): + if not self.started: + pass + elif self.started: + try: + line = self.q.get_nowait() + print(line) + if len(line) > 5: + self.outputLabel.config(text=line) + try: + if "speed" in line: + hashrate = re.findall(" \d+\.\d+ ", line)[0] + self.hashrateLabel.config(text="Hashrate: {0:.2f} h/s".format(float(hashrate))) + except: + pass + except: + pass + self.hashrateLabel.after(1000, self.refresh_hashrate) + + def client_exit(self): + try: + system("taskkill /im xmrig.exe /f") + self.p.kill() + self.t.join() + except: + pass + sys.exit(0) + + +root = Tk() +root.iconbitmap(default=resource_path('stress.ico')) +root.geometry("400x350") + +app = Window(root) +root.mainloop() + diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..6fee771 --- /dev/null +++ b/main.spec @@ -0,0 +1,33 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + + +a = Analysis(['main.py'], + pathex=['C:\\Users\\johnw\\src\\wowminergui'], + binaries=[], + datas=[('stress.jpg', '.'), ('verystress.png', '.'), ('notstress.jpg', '.'), ('stress.jpg', '.'), ('minerdoge.png', '.'), ('xmrig.exe', '.'), ('xmrig-notls.exe', '.'), ('WinRing0x64.sys', '.'), ('start.cmd', '.'), ('config.json', '.'), ('stress.ico', '.')], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True , icon='stress.ico') diff --git a/maxstress.png b/maxstress.png new file mode 100644 index 0000000..71c66c2 Binary files /dev/null and b/maxstress.png differ diff --git a/minerdoge.png b/minerdoge.png new file mode 100644 index 0000000..2144d5d Binary files /dev/null and b/minerdoge.png differ diff --git a/notstress.jpg b/notstress.jpg new file mode 100644 index 0000000..4cd21d4 Binary files /dev/null and b/notstress.jpg differ diff --git a/start.cmd b/start.cmd new file mode 100644 index 0000000..55411ba --- /dev/null +++ b/start.cmd @@ -0,0 +1,3 @@ +@echo off +xmrig.exe +pause diff --git a/stress.ico b/stress.ico new file mode 100644 index 0000000..4470563 Binary files /dev/null and b/stress.ico differ diff --git a/stress.jpg b/stress.jpg new file mode 100644 index 0000000..59e1541 Binary files /dev/null and b/stress.jpg differ diff --git a/verystress.png b/verystress.png new file mode 100644 index 0000000..fdcd808 Binary files /dev/null and b/verystress.png differ diff --git a/xmrig-notls.exe b/xmrig-notls.exe new file mode 100644 index 0000000..00dc0b4 Binary files /dev/null and b/xmrig-notls.exe differ diff --git a/xmrig.exe b/xmrig.exe new file mode 100644 index 0000000..d9b82f8 Binary files /dev/null and b/xmrig.exe differ