Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
POD5
on 05/06/2021, 09:18:49 UTC


Quote
import random
from decimal import *
from bit import *

while True:

    aa = 1
    while aa <= 1:
        a = str("1.")
        c1 = str (random.choice("1"))
        c2 = str (random.choice("0"))
        c3 = str (random.choice("1"))
        c4 = str (random.choice("0"))
        c5 = str (random.choice("1"))
        c6 = str (random.choice("0"))
        c7 = str (random.choice("1"))
        c8 = str (random.choice("1"))
        
        c9 = str (random.choice("01"))
        c10 = str (random.choice("01"))
        c11 = str (random.choice("01"))
        c12 = str (random.choice("01"))
        c13 = str (random.choice("01"))
        c14 = str (random.choice("01"))
        c15 = str (random.choice("01"))
        c16 = str (random.choice("01"))
        c17 = str (random.choice("01"))
        c18 = str (random.choice("01"))
        c19 = str (random.choice("01"))
        c20 = str (random.choice("01"))
        c21 = str (random.choice("01"))
        c22 = str (random.choice("01"))
        c23 = str (random.choice("01"))
        c24 = str (random.choice("01"))
        c25 = str (random.choice("01"))
        c26 = str (random.choice("01"))
        c27 = str (random.choice("01"))
        
        c28 = str (random.choice("1"))
        c29 = str (random.choice("01"))
        c30 = str (random.choice("01"))
        c31 = str (random.choice("01"))
        c32 = str (random.choice("01"))
        c33 = str (random.choice("01"))
        c34 = str (random.choice("01"))
        c35 = str (random.choice("01"))
        c36 = str (random.choice("01"))
        c37 = str (random.choice("01"))
        c38 = str (random.choice("01"))
        c39 = str (random.choice("01"))
        c40 = str (random.choice("01"))
        c41 = str (random.choice("01"))
        c42 = str (random.choice("01"))
        c43 = str (random.choice("01"))
        c44 = str (random.choice("01"))
        c45 = str (random.choice("01"))
        c46 = str (random.choice("01"))
        c47 = str (random.choice("01"))
        c48 = str (random.choice("01"))
        c49 = str (random.choice("01"))
        c50 = str (random.choice("01"))
        c51 = str (random.choice("01"))
        c52 = str (random.choice("01"))
        c53 = str (random.choice("01"))
        c54 = str (random.choice("01"))
        c55 = str (random.choice("01"))
        c56 = str (random.choice("01"))
        c57 = str (random.choice("01"))
        c58 = str (random.choice("01"))
        c59 = str (random.choice("01"))
        c60 = str (random.choice("01"))
        c61 = str (random.choice("01"))
        c62 = str (random.choice("01"))
        c63 = str (random.choice("01"))
        c64 = str (random.choice("01"))
        
        c65 = str (random.choice("01"))
        c66 = str (random.choice("01"))
        c67 = str (random.choice("01"))
        bina = (c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+c11+c12+c13+c14+c15+c16+c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+c32+c33
                     +c34+c35+c36+c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+c48+c49+c50+c51+c52+c53+c54+c55+c56+c57+c58+c59+c60+c61+c62+c63+c64+c65+c66+c67)
        combi = int(c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+c11+c12+c13+c14+c15+c16+c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+c32+c33
                     +c34+c35+c36+c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+c48+c49+c50+c51+c52+c53+c54+c55+c56+c57+c58+c59+c60+c61+c62+c63+c64+c65+c66+c67,2)
        combi2 = str(combi)
        b = Decimal(a+combi2)
        rrrr = int(144115188075855872 - ((((((((((b * 128) * 128) * 128) * 128)* 128)  * 128) * 128) * 128)  - 142989288169013248) * 128))
        key = Key.from_int(rrrr)
        addr = key.address
        if addr == "15c9mPGLku1HuW9LRtBf4jcHVpBUt8txKz":
            print ("found!!!",rrrr,addr)
            s1 = str(rrrr)
            s2 = addr
            f=open(u"C:/a.txt","a")
            f.write(s1)
            f.write(s2)      
            f.close()
            pass
        else:
            print (bina,b,rrrr,addr)
            
        aa = aa +1                    
    pass

When looking for a higher range, say Puzzle160, how do I calculate this?