Hello,
@arulbero or others
I use below python script generator against pub keys. each core is using a random starting point for given keyspace.
From your experience, can be improved to be more faster?
Thanks!
#import random
import secrets
from bit import *
from bit.format import bytes_to_wif
from binascii import hexlify
import multiprocessing
from multiprocessing import Pool
print("Loading...")
with open("pub.txt","r") as m:
add = m.read().split()
add= set(add)
#ran = secrets.randbits(253)
#ran = secrets.randbelow(115792089237316195423570985008687907852837564279074904382605163141518161494337)
#ran = random.randrange(1,115792089237316195423570985008687907852837564279074904382605163141518161494337)
ran = secrets.randbelow(115792089237316195423570985008687907852837564279074904382605163141518161494337)
r = 0
cores=2
def seek(r):
while True:
global ran
key1 = Key.from_int(ran)
wif = bytes_to_wif(key1.to_bytes(), compressed=False)
key2 = Key(wif)
pub1 = hexlify(key1.public_key).decode()
pub2 = hexlify(key2.public_key).decode()
myhex = "%064x" % ran
if pub1 in add:
print ("found!!!",ran, pub1)
s1 = str(ran)
s2 = pub1
f=open(u"win.txt","a")
f.write(s1)
f.write(":"+s2)
f.close()
break
if pub2 in add:
print ("found!!!",ran, pub2)
s1 = str(ran)
s2 = pub2
f=open(u"win.txt","a")
f.write(s1)
f.write(":"+s2)
f.close()
break
else:
print ("pubnr...", myhex, pub1)
ran = ran + 1
if __name__ == '__main__':
jobs = []
for r in range(cores):
p = multiprocessing.Process(target=seek, args=(r,))
jobs.append(p)
p.start()