Last active
January 5, 2016 19:30
-
-
Save Retord/4cffeae3516e2c99fa0d to your computer and use it in GitHub Desktop.
Decred Address Generator
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
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