Skip to content

Instantly share code, notes, and snippets.

@Retord Retord/gen.py
Last active Jan 5, 2016

Embed
What would you like to do?
Decred Address Generator
import subprocess
import os
import time
out = "out.txt" # The address, seed, private key output in out.txt
store = "store.txt" # the text file that will store all the generated address details
genex = "dcraddrgen.exe" # put the direct path link to the exe if its not in the same directory as the python code
req = "DsRick" # put your own name in place of 'Rick' (Make it less than 5 chars. should take lesser time
size = len(req)
got = False
f2 = open(store, "a")
start_time = time.time()
while (got == False):
subprocess.check_call([genex , out])
f1 = open(out, "r")
addr = f1.readline()[15:]
res = addr[:size]
print(res)
got = (res.lower() == req.lower())
print got
f1.close()
f1 = open(out, "r")
for line in f1.readlines():
f2.write(line)
f1.close()
if(got == False):
os.remove(out)
f2.close()
print("Total time taken -> %s seconds" % (time.time() - start_time))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.