Skip to content

Commit

Permalink
Update SoloMiner.py
Browse files Browse the repository at this point in the history
Add new function
  • Loading branch information
HugoXOX3 authored Apr 29, 2024
1 parent d8f756c commit 387b89a
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions SoloMiner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import binascii,hashlib,json,logging,random,socket,threading,time,traceback,requests
import binascii,hashlib,json,logging,random,socket,threading,time,traceback,requests,colorama
from datetime import datetime
from signal import SIGINT , signal
from colorama import Back , Fore , Style
Expand All @@ -9,22 +9,31 @@ def timer() :
tcx = datetime.now().time()
return tcx

print('Donate BTC to HCMLXOX:bc1qnk0ftxa4ep296phhnxl5lv9c2s5f8xakpcxmth')
address=str(input('Type In your bitcoin address:'))
#Address Log In
temp=str(input('Use Stored Address:(Y/N)'))
if temp=='N':
print('Donate BTC to HCMLXOX:bc1qnk0ftxa4ep296phhnxl5lv9c2s5f8xakpcxmth')
address=str(input('Type In your bitcoin address:'))
temp1=str(input('Save Address in Address.txt(Y/N)?'))
if temp1=='Y':
with open("address.txt", "w") as file:
file.write(address)
print('Address Saved')
else:
print('Opening Address.txt')
with open("address.txt", "r") as file:
address = file.read()

print(Back.BLUE , Fore.WHITE , 'BTC WALLET:' , Fore.BLACK , str(address) , Style.RESET_ALL)


def handler(signal_received , frame) :
# Handle any cleanup here
ctx.fShutdown = True
print(Fore.MAGENTA , '[' , timer() , ']' , Fore.YELLOW , 'Terminating Miner, Please Wait..')


def logg(msg) :
logging.info(msg)


def get_current_block_height() :
# returns the current network height
r = requests.get('https://blockchain.info/latestblock')
Expand All @@ -39,7 +48,6 @@ def check_for_shutdown(t) :
ctx.listfThreadRunning[n] = False
t.exit = True


class ExitedThread(threading.Thread) :
def __init__(self , arg , n) :
super(ExitedThread , self).__init__()
Expand Down Expand Up @@ -80,7 +88,6 @@ def try_exit(self) :
ctx.listfThreadRunning[self.n] = False
pass


def bitcoin_miner(t , restarted = False) :
if restarted :
logg('\n[*] Bitcoin Miner restarted')
Expand Down

0 comments on commit 387b89a

Please sign in to comment.