Show Posts
|
Pages: [1]
|
so, send the private key who solved ? which tools useing to crack keyhunt or BitCrack
|
|
|
@MagicByt3 your topic https://bitcointalk.org/index.php?topic=5440240.0@irsada your topic https://bitcointalk.org/index.php?topic=5439273.0my question is if successful block mine using btc_mine_python_code ,how to coinbase send my reward ### simple python code coinbase send my reward explain me particular line coinbase send my reward if you don t understand my question simple,i am asking for i need coinbase send my reward in python codeany one explain simple math coinbase generator my reward
|
|
|
pip install error/home/user/Downloads# pip install hashlibLooking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting hashlib Using cached hashlib-20081119.zip (42 kB) error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Preparing metadata (setup.py) ... error error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.
/home/user/Downloads# pip install binasciiLooking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ ERROR: Could not find a version that satisfies the requirement binascii (from versions: none) ERROR: No matching distribution found for binascii
|
|
|
Hello Bitcoiners I want to share a python based solo bitcoin miner which uses ckpool. You can use other pools as well if you want. It is basically like a lottery which has extremly low chances to win but it can be used as a proof of concept. Maybe it has already been shared somewhere and I do not remember its true origin so cannot give proper reference. You can make changes as you want. This code can help users understand true basics of mining bitcoins. Installing DependenciesYou must have python. Try with old versions first. Install dependencies with pip install hashlib pip install binascii
If any dependency is missing you can use pip install DependencyName. Code# -*- coding: utf-8 -*-
import socket import json import hashlib import binascii from pprint import pprint import random
address = 'YourBitcoinAddress' nonce = hex(random.randint(0,2**32-1))[2:].zfill(8) host = 'solo.ckpool.org' port = 3333 #host = 'pool.mainnet.bitcoin-global.io' #port = 9223
def main(): print("address:{} nonce:{}".format(address,nonce)) print("host:{} port:{}".format(host,port)) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((host,port)) #server connection sock.sendall(b'{"id": 1, "method": "mining.subscribe", "params": []}\n') lines = sock.recv(1024).decode().split('\n') response = json.loads(lines[0]) sub_details,extranonce1,extranonce2_size = response['result'] #authorize workers sock.sendall(b'{"params": ["'+address.encode()+b'", "password"], "id": 2, "method": "mining.authorize"}\n') #we read until 'mining.notify' is reached response = b'' while response.count(b'\n') < 4 and not(b'mining.notify' in response): response += sock.recv(1024) #get rid of empty lines responses = [json.loads(res) for res in response.decode().split('\n') if len(res.strip())>0 and 'mining.notify' in res] pprint(responses) job_id,prevhash,coinb1,coinb2,merkle_branch,version,nbits,ntime,clean_jobs \ = responses[0]['params'] target = (nbits[2:]+'00'*(int(nbits[:2],16) - 3)).zfill(64) print('nbits:{} target:{}\n'.format(nbits,target)) # extranonce2 = '00'*extranonce2_size extranonce2 = hex(random.randint(0,2**32-1))[2:].zfill(2*extranonce2_size) # create random coinbase = coinb1 + extranonce1 + extranonce2 + coinb2 coinbase_hash_bin = hashlib.sha256(hashlib.sha256(binascii.unhexlify(coinbase)).digest()).digest() print('coinbase:\n{}\n\ncoinbase hash:{}\n'.format(coinbase,binascii.hexlify(coinbase_hash_bin))) merkle_root = coinbase_hash_bin for h in merkle_branch: merkle_root = hashlib.sha256(hashlib.sha256(merkle_root + binascii.unhexlify(h)).digest()).digest() merkle_root = binascii.hexlify(merkle_root).decode() #little endian merkle_root = ''.join([merkle_root[i]+merkle_root[i+1] for i in range(0,len(merkle_root),2)][::-1]) print('merkle_root:{}\n'.format(merkle_root)) def noncework(): nonce = hex(random.randint(0,2**32-1))[2:].zfill(8) #hex(int(nonce,16)+1)[2:] blockheader = version + prevhash + merkle_root + nbits + ntime + nonce +\ '000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000' # print('blockheader:\n{}\n'.format(blockheader)) hash = hashlib.sha256(hashlib.sha256(binascii.unhexlify(blockheader)).digest()).digest() hash = binascii.hexlify(hash).decode() # print('hash: {}'.format(hash)) if(hash[:5] == '00000'): print('hash: {}'.format(hash)) if hash < target : # if(hash[:10] == '0000000000'): print('success!!') print('hash: {}'.format(hash)) payload = bytes('{"params": ["'+address+'", "'+job_id+'", "'+extranonce2 \ +'", "'+ntime+'", "'+nonce+'"], "id": 1, "method": "mining.submit"}\n', 'utf-8') sock.sendall(payload) print(sock.recv(1024)) input("Press Enter to continue...") # else: # print('failed mine, hash is greater than target') for k in range(10000000): noncework() print("Finished 10M Search. Regaining Information.") sock.close() main()
main()
Edit CodeYou can edit code. Set your Bitcoin address to receive your mining rewards. Set pool host and port. Save code in a .py file. One of popular solo pool is solo.ckpool.org which has low fee of like 2%. You get 98% of your mining reward. Run CodeYou can run code by opening command prompt in same folder of file and run command Missing Dependencies and errorsAs decribed above you can use pip install command to install any missing dependency. You can google errors and still if you did not find solution maybe your python version is not compatible. Try changing python version. Future WorkIf you improve this code then share here so others can benefit as well and I will update this code as well. Honor List for Code ImproversTributeI want to pay tribute to original author of this code. I am not original author. how to mine testnet any GPU speed, python mining
|
|
|
run this code python2 # -*- coding: utf-8 -*- # run python2 # Elliptic curve point operations (Python 2.7)
def OnCurve(x,y): # Check if the point is on the curve A = (y*y)%P B = (x*x*x)%P C = False if A == (B + 7): C = True return C
def legendre_symbol(a,p): ls = pow(a, (p - 1) / 2, p) return -1 if ls == p - 1 else ls
def modsqrt(a,p): # Square root A modulo P if legendre_symbol(a, p) != 1: return 0 elif a == 0: return 0 elif p == 2: return p elif p % 4 == 3: return pow(a, (p + 1) / 4, p) s = p - 1 e = 0 while s % 2 == 0: s /= 2 e += 1 n = 2 while legendre_symbol(n, p) != -1: n += 1 x = pow(a, (s + 1) / 2, p) b = pow(a, s, p) g = pow(n, s, p) r = e while True: t = b m = 0 for m in xrange(r): if t == 1: break t = pow(t, 2, p) if m == 0: return x gs = pow(g, 2 ** (r - m - 1), p) g = (gs * gs) % p x = (x * gs) % p b = (b * g) % p r = m
def modinv(a,n): # Extended Euclidean Algorithm in elliptic curves lm, hm = 1,0 low, high = a%n,n while low > 1: ratio = high/low nm = hm - lm * ratio new = high - low * ratio hm = lm high = low lm = nm low = new return lm % n
def ECadd(xp,yp,xq,yq): # EC point addition m = ((yq-yp) * modinv(xq-xp,P))%P xr = (m*m-xp-xq)%P yr = (m*(xp-xr)-yp)%P return (xr,yr)
def ECdouble(xp,yp): # EC point doubling LamNumer = 3*xp*xp+Acurve LamDenom = 2*yp Lam = (LamNumer * modinv(LamDenom,P)) % P xr = (Lam*Lam-2*xp) % P yr = (Lam*(xp-xr)-yp) % P return (xr,yr)
def ECmul(xs,ys,Scalar): # EC point multiplication if Scalar == 0 or Scalar >= N: raise Exception("Invalid Scalar/Private Key") ScalarBin = str(bin(Scalar))[2:] Qx,Qy=xs,ys for i in range (1,len(ScalarBin)): Qx,Qy = ECdouble(Qx,Qy) if ScalarBin[i] == "1": Qx,Qy = ECadd(Qx,Qy,xs,ys) return (Qx,Qy)
def ECsub(xp,yp,xq,yq): # EC point subtraction X = (((yp+yq)*modinv(xq-xp,P))**2-xp-xq)%P A = (xp + X + xq)%P B = modsqrt(A,P) B1 = P - B Y = yq - (xq - X) * B X = X % P Y = Y % P if not OnCurve(X,Y): Y = yq - (xq - X) * B1 Y = Y % P return X,Y
def ECdiv(Qx,Qy,Scalar): # EC point division A = (N-1)/Scalar Px,Py = ECmul(Qx,Qy,A) Py = P-Py return Px,Py
P = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1 N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 Acurve = 0
ukx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 # or your enter publickey x,y uky = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
#you need add ,sub ,div fadd = ECadd(ukx,uky,ukx,uky) # 1 + 1 =2 print ('fadd',hex(fadd[0]),hex(fadd[1]))
fsub = ECsub(fadd[0],fadd[1],Gx,Gy) # 2 -1 = 1 print ('fsub',hex(fsub[0]),hex(fsub[1]))
fdub = ECdouble(ukx,uky) # 1 * 2 = 2 print ('fdub',hex(fdub[0]),hex(fdub[1]))
fdiv = ECdiv(fdub[0],fdub[1],2) # 2 / 2 = 1 print ('fdiv',hex(fdiv[0]),hex(fdiv[1]))
output is: X is incorrect Y output is correct ('fadd', '0xc8333020c4688a754bf3ad462f1e9f1fac80649a463ae4d4c1afd48d20fccffL', ' 0xb7c52588d95c3b9aa25b0403f1eef75702e84bb7597aabe663b82f6f04ef2777L') ('fsub', '0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798L', ' 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8L') ('fdub', '0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5L', ' 0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52aL') ('fdiv', '0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798L', ' 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8L') my output X value incorrect print why? what is mistake this code Y value is correct print update please need correct output: fadd 1 + 1 = 2 fsub 2 - 1 = 1 fdub 1 * 2 = 2 fdiv 2 / 2 = 1
|
|
|
let me give it a try: still open to correction class point_addition: def __init__ (self,x,y,a,b): #y**2 = x***3+a*x+b #x and y co-ordinate needed for calculation self.a=a self.b=b self.x=x self.y=y if -y**2 != x***3+ a*x + b: return ('({}{}) has negative co-ordinate').format(x,y) elif y**2 != x***3+ a*x + b: return ('({}{}) has positive co-ordinate').format(x,y) p1 = x (0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63)
p2 = y (0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63) print(x,y)
still a baby coder I wish to get correction how to run what is input,explain please message me reply thinkeasy123@protonmail.com
|
|
|
who decides btc,eth,doge, etc...... price who is control
|
|
|
0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 now if you start mapping points, you will get .... 025699b93fc6e1bd29e09a328d657a607b4155b61a6b5fcbedd7c12df7c67df8f5 03c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413 0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c6302c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413 035699b93fc6e1bd29e09a328d657a607b4155b61a6b5fcbedd7c12df7c67df8f5 .... like this points will shrink back toward their min or max value with filling of 02 or 03 until 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 .... 0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63 0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63.... 0379be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 and only known way to know which point is on which side is "non" hahaha. chill and happy brute force while calling your luck. my idea is random publickey x,y to guess for range like this ... 3ffffffffffffffffff : 7ffffffffffffffffff, 5ffffffffffffffffff:6ffffffffffffffffff, 1fffffffffffff:3ffffffffffffffffffffffffff etc.... i know this publickey privatekey range,any one find this publickey range px: 1a1fd15fce078234aa292fc024178056bf006433c9b4bd208f59eb4c9efec95b py: a18af1fe46980989d3ff75bf9601121151ef46e2cfab8999408319ce8f3be725 any python code for 200% guess range for random public keys... any update contribute .. share thinkeasy123@protonmail.comEdit:this is rich wallet 031277e88390c528ef8efac312d77d0566f756ed54046b8ba557a15b088b86e20b guess the range x: 1277e88390c528ef8efac312d77d0566f756ed54046b8ba557a15b088b86e20b y: ea6d50425d69b880c1c2b7b18d93a78b793d80a3b852476d35685a74f9211e4d
|
|
|
this is normal math sqrt√(x)^2, test value: 4^2 = 16, next root return 4 -8^2= 64,next root return 8
how to bitcoin Publickey x and y use to sqrt example: √(x,y)^2 how to calculate sqrt for bitcoin publickey teach me please
example1:x,y px: e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13 py: 51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922 #privatekey 4 px: 421f5fc9a21065445c96fdb91c0c1e2f2431741c72713b4b99ddcb316f31e9fc py: 2b90f16d11dabdb616f6db7e225d1e14743034b37b223115db20717ad1cd6781 #privatekey 4^2 = 16 ans px: e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13 py: 51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922 #privatekey √16 = 4
example2: px: 2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01 py: a3b25758beac66b6d6c2f7d5ecd2ec4b3d1dec2945a489e84a25d3479342132b # -8 px: ed3bace23c5e17652e174c835fb72bf53ee306b3406a26890221b4cef7500f88 py: e57a6f571288ccffdcda5e8a7a1f87bf97bd17be084895d0fce17ad5e335286e # -8^ = 64 ans px: 2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01 py: 5c4da8a741539949293d082a132d13b4c2e213d6ba5b7617b5da2cb76cbde904 # √64 = 8
how does work explain. do u understad my problem ,i speak little english
|
|
|
this is normal math sqrt√(x)^2, test value: 4^2 = 16, next root return 4 -8^2= 64,next root return 8
how to bitcoin Publickey x and y use to sqrt example: √(x,y)^2 how to calculate sqrt for bitcoin publickey teach me please
example1:x,y px: e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13 py: 51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922 #privatekey 4 px: 421f5fc9a21065445c96fdb91c0c1e2f2431741c72713b4b99ddcb316f31e9fc py: 2b90f16d11dabdb616f6db7e225d1e14743034b37b223115db20717ad1cd6781 #privatekey 4^2 = 16 ans px: e493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13 py: 51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922 #privatekey √16 = 4
example2: px: 2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01 py: a3b25758beac66b6d6c2f7d5ecd2ec4b3d1dec2945a489e84a25d3479342132b # -8 px: ed3bace23c5e17652e174c835fb72bf53ee306b3406a26890221b4cef7500f88 py: e57a6f571288ccffdcda5e8a7a1f87bf97bd17be084895d0fce17ad5e335286e # -8^ = 64 ans px: 2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01 py: 5c4da8a741539949293d082a132d13b4c2e213d6ba5b7617b5da2cb76cbde904 # √64 = 8
how does work explain. do u understad my problem ,i speak little english
|
|
|
|