Created
May 22, 2022 10:43
-
-
Save flandolf/4a6763835b66d47d5f6baf5e172c4741 to your computer and use it in GitHub Desktop.
Better Version of *fakeminer* - requires pyfiglet and progressbar2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from colorama import * | |
from pyfiglet import Figlet | |
import time | |
import progressbar | |
import random | |
def shufflechar(string): | |
string = list(string) | |
random.shuffle(string) | |
return ''.join(string) | |
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
balance = random.randint(1, 100) | |
f = Figlet(font='slant') | |
print(Fore.RED + f.renderText('Wallet Miner')) | |
print(Fore.BLUE + "Connecting to the network..." + Fore.YELLOW) | |
for i in progressbar.progressbar(range(100)): | |
time.sleep(0.005) | |
print(Fore.GREEN + "Connected to the network!") | |
print(Fore.BLUE + "Loading wallet..." + Fore.YELLOW) | |
time.sleep(0.02) | |
print(Fore.GREEN + "Obtaining wallet balance..." + Fore.YELLOW) | |
for i in progressbar.progressbar(range(20)): | |
time.sleep(0.05) | |
print(Fore.YELLOW + "Wallet balance: " + Fore.RED + str(balance) + Fore.GREEN + " BTC") | |
print(Fore.BLUE + "Loading miner..." + Fore.YELLOW) | |
for i in progressbar.progressbar(range(20)): | |
time.sleep(0.05) | |
print(Fore.GREEN + "Miner loaded!") | |
hit = False | |
while (hit == False): | |
# 10% chance of hit being true | |
if (random.randint(1, 1000) <= 1): | |
hit = True | |
print(Fore.RED + "DUMPYMINER | " + Fore.BLUE + str(shufflechar(chars)) + Fore.RED + " | HIT") | |
else: | |
print(Fore.RED + "DUMPYMINER | " + Fore.BLUE + str(shufflechar(chars)) + Fore.RED + " | MISS") | |
time.sleep(0.005) | |
print(Fore.YELLOW + "New balance: " + Fore.RED + str(balance + random.randint(1,10)) + Fore.GREEN + " BTC") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment