-
Notifications
You must be signed in to change notification settings - Fork 44
/
Miz_Tools.py
2487 lines (2384 loc) · 132 KB
/
Miz_Tools.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import binascii
import codecs
import csv
import ecdsa
import hashlib
import itertools
import random
import sys
import time
from time import sleep
from typing import Optional
from urllib.request import urlopen
import base58
import bip32utils
import requests
from bit import *
from bit.format import bytes_to_wif
from bloomfilter import BloomFilter
from hdwallet import BIP44HDWallet
from hdwallet.cryptocurrencies import EthereumMainnet
from hdwallet.derivations import BIP44Derivation
from hdwallet.utils import generate_mnemonic
from mnemonic import Mnemonic
from rich import print
from rich.console import Console
from rich.panel import Panel
from tqdm import tqdm
import secp256k1 as ice # download from https://github.com/iceland2k14/secp256k1
APIKEY = "?apiKey=freekey" # replace freekey with your API KEY
console = Console()
console.clear()
# =============================================================================
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
j=0
pbar=tqdm(initial=j)
Mizogg = '''[red]
╔═╗╔═╗
║║╚╝║║
║╔╗╔╗║╔╗╔═══╗╔══╗╔══╗╔══╗
║║║║║║╠╣╠══║║║╔╗║║╔╗║║╔╗║
║║║║║║║║║║══╣║╚╝║║╚╝║║╚╝║
╚╝╚╝╚╝╚╝╚═══╝╚══╝╚═╗║╚═╗║
╔═╝║╔═╝║
╚══╝╚══╝
___ ___
(o o) (o o)
( V ) MIZOGG ( V )
--m-m------------m-m--
[/red]'''
# =============================================================================
def get_balance(caddr):
response = requests.get("https://blockstream.info/api/address/" + str(caddr))
balance = float(response.json()['chain_stats']['funded_txo_sum'])
totalSent = float(response.json()['chain_stats']['spent_txo_sum'])
txs = response.json()['chain_stats']['funded_txo_count']
print('BTC Address : ', caddr)
print('[red][*][/red] [yellow] >>[/yellow] Total Received: [green] [' + str(balance) + '][/green] totalSent:[green][' + str(totalSent) + '][/green] txs :[green][' + str(txs) + '][/green]')
return balance
def get_balance1(uaddr):
response = requests.get("https://blockstream.info/api/address/" + str(uaddr))
balance1 = float(response.json()['chain_stats']['funded_txo_sum'])
totalSent = float(response.json()['chain_stats']['spent_txo_sum'])
txs = response.json()['chain_stats']['funded_txo_count']
print('BTC Address : ', uaddr)
print('[red][*][/red] [yellow] >>[/yellow] Total Received: [green] [' + str(balance1) + '][/green] totalSent:[green][' + str(totalSent) + '][/green] txs :[green][' + str(txs) + '][/green]')
return balance1
def get_balance2(p2sh):
response = requests.get("https://blockstream.info/api/address/" + str(p2sh))
balance2 = float(response.json()['chain_stats']['funded_txo_sum'])
totalSent = float(response.json()['chain_stats']['spent_txo_sum'])
txs = response.json()['chain_stats']['funded_txo_count']
print('BTC Address : ', p2sh)
print('[red][*][/red] [yellow] >>[/yellow] Total Received: [green] [' + str(balance2) + '][/green] totalSent:[green][' + str(totalSent) + '][/green] txs :[green][' + str(txs) + '][/green]')
return balance2
def get_balance3(bech32):
response = requests.get("https://blockstream.info/api/address/" + str(bech32))
balance3 = float(response.json()['chain_stats']['funded_txo_sum'])
totalSent = float(response.json()['chain_stats']['spent_txo_sum'])
txs = response.json()['chain_stats']['funded_txo_count']
print('BTC Address : ', bech32)
print('[red][*][/red] [yellow] >>[/yellow] Total Received: [green] [' + str(balance3) + '][/green] totalSent:[green][' + str(totalSent) + '][/green] txs :[green][' + str(txs) + '][/green]')
return balance3
def get_balance4(ethaddr):
blocs = requests.get("https://api.ethplorer.io/getAddressInfo/" + ethaddr + APIKEY)
ress = blocs.json()
balance4 = float(blocs.json()['ETH']['balance'])
txs = dict(ress)["countTxs"]
print('ETH Address : ', ethaddr)
print('[red][*][/red] [yellow] >>[/yellow] Balance: [green] [' + str(balance4) + '][/green] Transactions: [green][' + str(txs) + '][/green]')
return balance4
# =============================================================================
print('[yellow] Please with Database Loading.....[/yellow]')
with open('eth.bf', "rb") as fp:
bloom_filter1 = BloomFilter.load(fp)
with open('btc.bf', "rb") as fp:
bloom_filter = BloomFilter.load(fp)
btc_count = len(bloom_filter)
eth_count = len(bloom_filter1)
addr_count = len(bloom_filter)+len(bloom_filter1)
print('[yellow] Total Bitcoin and ETH Addresses Loaded >> [ [/yellow]', addr_count, '[yellow]][/yellow]')
# =============================================================================
def iter_all_front(count):
if count == 0:
yield ""
else:
for HEXIN in "0123456789abcdef":
if count == HEXIN:
continue
else:
for scan in iter_all_front(count-1):
yield HEXIN + scan
def iter_all_back(count):
if count == 0:
yield ""
else:
for HEXIN in "0123456789abcdef":
if count == HEXIN:
continue
else:
for scan in iter_all_back(count-1):
yield scan + HEXIN
def save_data_plain():
with open("winner.txt", "a", encoding="utf-8") as f:
f.write(f"""\nPrivateKey (hex) : {HEX}
PrivateKey (dec) : {dec} : {length}Bits
PrivateKey (wif) Compressed : {wifc}
PrivateKey (wif) UnCompressed : {wifu}
Bitcoin Address Compressed = {caddr}
Bitcoin Address UnCompressed = {uaddr}
Bitcoin Address p2sh = {p2sh}
Bitcoin Address Bc1 bech32 = {bech32}
ETH Address = {ethaddr}""")
def print_data_plain():
print(f"""\nPrivateKey (hex) : {HEX}
PrivateKey (dec) : {dec} : {length}Bits
PrivateKey (wif) Compressed : {wifc}
PrivateKey (wif) UnCompressed : {wifu}
Bitcoin Address Compressed = {caddr}
Bitcoin Address UnCompressed = {uaddr}
Bitcoin Address p2sh = {p2sh}
Bitcoin Address Bc1 bech32 = {bech32}
ETH Address = {ethaddr}""")
def Print_result_Npower():
print(f"""\nPrivateKey (hex) : {HEX}
PrivateKey (dec) : {DEC} : {length}Bits
Bitcoin Address Compressed = {caddr}
Bitcoin Address UnCompressed = {uaddr}
Bitcoin Address p2sh = {p2sh}
Bitcoin Address Bc1 bech32 = {bech32}
PrivateKey (hex) : {HEX1}
PrivateKey (dec) : {DEC1} : {length1}Bits
Bitcoin Address Compressed = {caddr1}
Bitcoin Address UnCompressed = {uaddr1}
Bitcoin Address p2sh = {p2sh1}
Bitcoin Address Bc1 bech32 = {bech321}""")
def SAVE_result_Npower():
with open("found.txt", "a", encoding="utf-8") as f:
f.write(f"""\nPrivateKey (hex) : {HEX}
PrivateKey (dec) : {DEC} : {length}Bits
Bitcoin Address Compressed = {caddr}
Bitcoin Address UnCompressed = {uaddr}
Bitcoin Address p2sh = {p2sh}
Bitcoin Address Bc1 bech32 = {bech32}
PrivateKey (hex) : {HEX1}
PrivateKey (dec) : {DEC1} : {length1}Bits
Bitcoin Address Compressed = {caddr1}
Bitcoin Address UnCompressed = {uaddr1}
Bitcoin Address p2sh = {p2sh1}
Bitcoin Address Bc1 bech32 = {bech321}""")
# =============================================================================
def data_info():
blocs=requests.get("https://blockchain.info/rawaddr/"+caddr)
ress = blocs.json()
hash160 = dict(ress)["hash160"]
address = dict(ress)["address"]
n_tx = dict(ress)["n_tx"]
total_received = dict(ress)["total_received"]
total_sent = dict(ress)["total_sent"]
final_balance = dict(ress)["final_balance"]
txs = dict(ress)["txs"]
data.append({
'hash160': hash160,
'address': address,
'n_tx': n_tx,
'total_received': total_received,
'total_sent': total_sent,
'final_balance': final_balance,
'txs': txs,
})
# =============================================================================
def get_doge(daddr):
Dogecoin = requests.get("https://dogechain.info/api/v1/address/balance/"+ daddr)
resedoge = Dogecoin.json()
BalanceDoge = dict(resedoge)['balance']
return BalanceDoge
# =============================================================================
class BrainWallet:
@staticmethod
def generate_address_from_passphrase(passphrase):
private_key = str(hashlib.sha256(
passphrase.encode('utf-8')).hexdigest())
address = BrainWallet.generate_address_from_private_key(private_key)
return private_key, address
@staticmethod
def generate_address_from_private_key(private_key):
public_key = BrainWallet.__private_to_public(private_key)
address = BrainWallet.__public_to_address(public_key)
return address
@staticmethod
def __private_to_public(private_key):
private_key_bytes = codecs.decode(private_key, 'hex')
# Get ECDSA public key
key = ecdsa.SigningKey.from_string(
private_key_bytes, curve=ecdsa.SECP256k1).verifying_key
key_bytes = key.to_string()
key_hex = codecs.encode(key_bytes, 'hex')
# Add bitcoin byte
bitcoin_byte = b'04'
public_key = bitcoin_byte + key_hex
return public_key
@staticmethod
def __public_to_address(public_key):
public_key_bytes = codecs.decode(public_key, 'hex')
# Run SHA256 for the public key
sha256_bpk = hashlib.sha256(public_key_bytes)
sha256_bpk_digest = sha256_bpk.digest()
# Run ripemd160 for the SHA256
ripemd160_bpk = hashlib.new('ripemd160')
ripemd160_bpk.update(sha256_bpk_digest)
ripemd160_bpk_digest = ripemd160_bpk.digest()
ripemd160_bpk_hex = codecs.encode(ripemd160_bpk_digest, 'hex')
# Add network byte
network_byte = b'00'
network_bitcoin_public_key = network_byte + ripemd160_bpk_hex
network_bitcoin_public_key_bytes = codecs.decode(
network_bitcoin_public_key, 'hex')
# Double SHA256 to get checksum
sha256_nbpk = hashlib.sha256(network_bitcoin_public_key_bytes)
sha256_nbpk_digest = sha256_nbpk.digest()
sha256_2_nbpk = hashlib.sha256(sha256_nbpk_digest)
sha256_2_nbpk_digest = sha256_2_nbpk.digest()
sha256_2_hex = codecs.encode(sha256_2_nbpk_digest, 'hex')
checksum = sha256_2_hex[:8]
# Concatenate public key and checksum to get the address
address_hex = (network_bitcoin_public_key + checksum).decode('utf-8')
wallet = BrainWallet.base58(address_hex)
return wallet
@staticmethod
def base58(address_hex):
alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
b58_string = ''
# Get the number of leading zeros and convert hex to decimal
leading_zeros = len(address_hex) - len(address_hex.lstrip('0'))
# Convert hex to decimal
address_int = int(address_hex, 16)
# Append digits to the start of string
while address_int > 0:
digit = address_int % 58
digit_char = alphabet[digit]
b58_string = digit_char + b58_string
address_int //= 58
# Add '1' for each 2 leading zeros
ones = leading_zeros // 2
for one in range(ones):
b58_string = '1' + b58_string
return b58_string
# =============================================================================
def data_wallet():
for child in range(0,20):
bip32_root_key_obj = bip32utils.BIP32Key.fromEntropy(seed)
bip32_child_key_obj = bip32_root_key_obj.ChildKey(
44 + bip32utils.BIP32_HARDEN
).ChildKey(
0 + bip32utils.BIP32_HARDEN
).ChildKey(
0 + bip32utils.BIP32_HARDEN
).ChildKey(0).ChildKey(child)
data.append({
'bip32_root_key': bip32_root_key_obj.ExtendedKey(),
'bip32_extended_private_key': bip32_child_key_obj.ExtendedKey(),
'path': f"m/44'/0'/0'/0/{child}",
'address': bip32_child_key_obj.Address(),
'publickey': binascii.hexlify(bip32_child_key_obj.PublicKey()).decode(),
'privatekey': bip32_child_key_obj.WalletImportFormat(),
})
# =============================================================================
def data_eth():
for address_index in range(divs):
bip44_derivation: BIP44Derivation = BIP44Derivation(
cryptocurrency=EthereumMainnet, account=0, change=False, address=address_index
)
bip44_hdwallet.from_path(path=bip44_derivation)
data.append({
'path': bip44_hdwallet.path(),
'address': bip44_hdwallet.address(),
'privatekey': bip44_hdwallet.private_key(),
'privatedec': int(bip44_hdwallet.private_key(), 16),
})
bip44_hdwallet.clean_derivation()
# =============================================================================
def get_rs(sig):
rlen = int(sig[2:4], 16)
r = sig[4:4+rlen*2]
# slen = int(sig[6+rlen*2:8+rlen*2], 16)
s = sig[8+rlen*2:]
return r, s
def split_sig_pieces(script):
sigLen = int(script[2:4], 16)
sig = script[2+2:2+sigLen*2]
r, s = get_rs(sig[4:])
pubLen = int(script[4+sigLen*2:4+sigLen*2+2], 16)
pub = script[4+sigLen*2+2:]
assert(len(pub) == pubLen*2)
return r, s, pub
# Returns list of this list [first, sig, pub, rest] for each input
def parseTx(txn):
if len(txn) <130:
print('[WARNING] rawtx most likely incorrect. Please check..')
sys.exit(1)
inp_list = []
ver = txn[:8]
if txn[8:12] == '0001':
print('UnSupported Tx Input. Presence of Witness Data')
sys.exit(1)
inp_nu = int(txn[8:10], 16)
first = txn[0:10]
cur = 10
for m in range(inp_nu):
prv_out = txn[cur:cur+64]
var0 = txn[cur+64:cur+64+8]
cur = cur+64+8
scriptLen = int(txn[cur:cur+2], 16)
script = txn[cur:2+cur+2*scriptLen] #8b included
r, s, pub = split_sig_pieces(script)
seq = txn[2+cur+2*scriptLen:10+cur+2*scriptLen]
inp_list.append([prv_out, var0, r, s, pub, seq])
cur = 10+cur+2*scriptLen
rest = txn[cur:]
return [first, inp_list, rest]
def get_rawtx_from_blockchain(txid):
try:
htmlfile = urlopen("https://blockchain.info/rawtx/%s?format=hex" % txid, timeout = 20)
except:
print('Unable to connect internet to fetch RawTx. Exiting..')
sys.exit(1)
else: res = htmlfile.read().decode('utf-8')
return res
def getSignableTxn(parsed):
res = []
first, inp_list, rest = parsed
tot = len(inp_list)
time.sleep(10)
for one in range(tot):
e = first
for i in range(tot):
e += inp_list[i][0] # prev_txid
e += inp_list[i][1] # var0
if one == i:
e += '1976a914' + HASH160(inp_list[one][4]) + '88ac'
else:
e += '00'
e += inp_list[i][5] # seq
e += rest + "01000000"
z = hashlib.sha256(hashlib.sha256(bytes.fromhex(e)).digest()).hexdigest()
res.append([inp_list[one][2], inp_list[one][3], z, inp_list[one][4], e])
return res
#==============================================================================
def HASH160(pubk_hex):
return hashlib.new('ripemd160', hashlib.sha256(bytes.fromhex(pubk_hex)).digest() ).hexdigest()
# =============================================================================
def SEQ_wallet():
for i in range(0,rangediv):
percent = div * i
ran= start+percent
seed = str(ran)
HEX = "%064x" % ran
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
caddr = ice.privatekey_to_address(0, True, int(seed)) #Compressed
uaddr = ice.privatekey_to_address(0, False, int(seed)) #Uncompressed
p2sh = ice.privatekey_to_address(1, True, int(seed)) #p2sh
bech32 = ice.privatekey_to_address(2, True, int(seed)) #bech32
data.append({
'seed': seed,
'HEX': HEX,
'wifc': wifc,
'wifu': wifu,
'caddr': caddr,
'uaddr': uaddr,
'p2sh': p2sh,
'bech32': bech32,
'percent': f"Hex scan Percent {i}%",
})
# =============================================================================
def divsion_wallet():
for i in range(0,rangediv):
percent = div * i
ran= start+percent
seed = str(ran)
HEX = "%064x" % ran
divsion.append({
'seed': seed,
'HEX': HEX,
'percent': f"{i}%",
})
# =============================================================================
def iter_all(count):
if count == 0:
yield start
else:
for a in alphabet:
if count == a:
continue
else:
for scan in iter_all(count-1):
yield scan + a
# =============================================================================
def hash160pub(hex_str):
sha = hashlib.sha256()
rip = hashlib.new('ripemd160')
sha.update(hex_str)
rip.update( sha.digest() )
print ( "key_hash = \t" + rip.hexdigest() )
return rip.hexdigest()
# =============================================================================
def delay_print(s):
for c in s:
sys.stdout.write(c)
sys.stdout.flush()
time.sleep(0.001)
# =============================================================================
INPUTNEEDED = '''[yellow]
,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ' | <- |
|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
| ->| | Q | W | E | R | T | Y | U | I | O | P | ] | ^ | |
|-----',--',--',--',--',--',--',--',--',--',--',--',--'| |
| Caps | A | S | D | F | G | H | J | K | L | \ | [ | * | |
|----,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'---'----|
| | < | Z | X | C | V | B | N | M | , | . | - | |
|----'-,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
| ctrl |🪟| alt | |altgr | | ctrl |
'------' '-----'--------------------------'------' '------'
[/yellow]'''
INPUTNEEDEDDEC = '''[yellow]
,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|esc| [red]1[/red] | [red]2[/red] | [red]3[/red] | [red]4[/red] | [red]5[/red] | [red]6[/red] | [red]7[/red] | [red]8[/red] | [red]9[/red] | [red]0[/red] | + | ' | <- |
|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
| ->| | Q | W | E | R | T | Y | U | I | O | P | ] | ^ | |
|-----',--',--',--',--',--',--',--',--',--',--',--',--'| |
| Caps | A | S | D | F | G | H | J | K | L | \ | [ | * | |
|----,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'---'----|
| | < | Z | X | C | V | B | N | M | , | . | - | |
|----'-,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
| ctrl |🪟| alt | |altgr | | ctrl |
'------' '-----'--------------------------'------' '------'
[/yellow]'''
INPUTNEEDEDHEX = '''[yellow]
,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
|esc| [red]1[/red] | [red]2[/red] | [red]3[/red] | [red]4[/red] | [red]5[/red] | [red]6[/red] | [red]7[/red] | [red]8[/red] | [red]9[/red] | [red]0[/red] | + | ' | <- |
|---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
| ->| | Q | W | [red]E[/red] | R | T | Y | U | I | O | P | ] | ^ | |
|-----',--',--',--',--',--',--',--',--',--',--',--',--'| |
| Caps | [red]A[/red] | S | [red]D[/red] | [red]F[/red] | G | H | J | K | L | \ | [ | * | |
|----,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'---'----|
| | < | Z | X | [red]C[/red] | V | [red]B[/red] | N | M | , | . | - | |
|----'-,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
| ctrl |🪟| alt | |altgr | | ctrl |
'------' '-----'--------------------------'------' '------'
[/yellow]'''
# =============================================================================
prompt='''[yellow]
****************************** Main Menu Mizogg's Tools ***********************************
*[/yellow] [green]Single Check Tools Bitcoin DOGE ETH[/green] [yellow]*
*[/yellow] Option 1.Bitcoin Address with Balance Check [yellow][OnLine][/yellow] = 1 [yellow]*
*[/yellow] Option 2.Bitcoin Address to HASH160 Addresses starting 1,3,bc1 [yellow][OnLine][/yellow] = 2 [yellow]*
*[/yellow][red] Option 3.HASH160 to Bitcoin Address (Not Working) = 3 [/red] [yellow]*
*[/yellow] Option 4.Brain Wallet Bitcoin with Balance Check [yellow][OnLine][/yellow] = 4 [yellow]*
*[/yellow] Option 5.Hexadecimal to Decimal (HEX 2 DEC) [red][OffLine][/red] = 5 [yellow]*
*[/yellow] Option 6.Decimal to Hexadecimal (DEC 2 HEX) [red][OffLine][/red] = 6 [yellow]*
*[/yellow] Option 7.Hexadecimal to Address with Balance Check [yellow][OnLine][/yellow] = 7 [yellow]*
*[/yellow] Option 8.Decimal to Address with Balance Check [yellow][OnLine][/yellow] = 8 [yellow]*
*[/yellow] Option 9.Mnemonic Words to Bitcoin Address with Balance Check [yellow][OnLine][/yellow] = 9 [yellow]*
*[/yellow] Option 10.WIF to Bitcoin Address with Balance Check [yellow][OnLine][/yellow] = 10 [yellow]*
*[/yellow] Option 11.Retrieve ECDSA signature R,S,Z rawtx or txid tool [yellow][OnLine][/yellow] = 11 [yellow]*
*[/yellow] Option 12.Range Divsion IN HEX or DEC tool [red][OffLine][/red] = 12 [yellow]*
*[/yellow] [green]Generators & Multi Check Tools[/green] [yellow]*
*[/yellow] Option 13.Bitcoin Addresses from file with Balance Check [yellow][OnLine][/yellow] = 13 [yellow]*
*[/yellow] Option 14.Bitcoin Addresses from file to HASH160 file 1,3,bc1 [red][OffLine][/red] = 14 [yellow]*
*[/yellow] Option 15.Brain Wallet list from file with Balance Check [yellow][OnLine][/yellow] = 15 [yellow]*
*[/yellow] Option 16.Mnemonic Words Generator Random Choice [red][OffLine][/red] = 16 [yellow]*
*[/yellow] Option 17.Bitcoin random scan randomly in Range [red][OffLine][/red] = 17 [yellow]*
*[/yellow] Option 18.Bitcoin Sequence scan sequentially in Range division[red][OffLine][/red] = 18 [yellow]*
*[/yellow] Option 19.Bitcoin random Inverse K position [red][OffLine][/red] = 19 [yellow]*
*[/yellow] Option 20.Bitcoin sequence Inverse K position [red][OffLine][/red] = 20 [yellow]*
*[/yellow] Option 21.Bitcoin WIF Recovery or WIF Checker 5 K L [red][OffLine][/red] = 21 [yellow]*
*[/yellow] Option 22.MAGIC HEX Recovery or HEX Checker BTC ETH [red][OffLine][/red] = 22 [yellow]*
*[/yellow] Option 23.Bitcoin Addresses from file to Public Key [yellow][OnLine][/yellow] = 23 [yellow]*
*[/yellow] Option 24.Public Key from file to Bitcoin Addresses [red][OffLine][/red] = 24 [yellow]*
*[/yellow] [green]ETH Generators & Multi Check Tools[/green] [yellow]*
*[/yellow] Option 25.ETH Address with Balance Check&Tokens [yellow][OnLine][/yellow] = 25 [yellow]*
*[/yellow] Option 26.Mnemonic Words to dec and hex [yellow][OnLine][/yellow] = 26 [yellow]*
*[/yellow] Option 27.Mnemonic Words Generator Random Choice [red][OffLine][/red] = 27 [yellow]*
*[/yellow] Option 28.Mnemonic Words Generator Random Choice [yellow][OnLine][/yellow] = 28 [yellow]*
*[/yellow] [green]Extras Miscellaneous Tools[/green] [yellow]*
*[/yellow] Option 29.Doge Coin sequential Scan Balance Check [yellow][OnLine][/yellow] = 29 [yellow]*
*[/yellow] Option 30.Doge Coin Random Scan Balance Check [yellow][OnLine][/yellow] = 30 [yellow]*
*[/yellow] Option 31.NPOWER Bitcoin Hunting with HEX [red][OffLine][/red] = 31 [yellow]*
* *
**************** Main Menu Mizogg's All Tools Colour Version made in Python ***************[/yellow]'''
while True:
data = []
mylist = []
count=0
skip = 0
ammount = 0.00000000
total= 0
iteration = 0
start_time = time.time()
print(prompt)
delay_print('Enter 1-31 : ')
start=int(input('TYPE HERE = '))
if start == 1:
print(INPUTNEEDED)
print ('[green]Address Balance Check Tool[/green]')
caddr = str(input('Enter Your Bitcoin Address Here : '))
get_balance(caddr)
data_info()
for data_w in data:
hash160 = data_w['hash160']
address = data_w['address']
n_tx = data_w['n_tx']
total_received = data_w['total_received']
total_sent = data_w['total_sent']
final_balance = data_w['final_balance']
print('================== Block Chain ==================')
print('Bitcoin address = ', address)
print('hash160 = ', hash160)
print('Number of tx = ', n_tx)
print('Total Received = ', total_received)
print('Total Sent = ', total_sent)
print('Final Balance = ', final_balance)
print('================== Block Chain ==================')
time.sleep(3.0)
elif start == 2:
print(INPUTNEEDED)
print ('[green]Address to HASH160 Tool[/green]')
addr = str(input('Enter Your Bitcoin Address Here : '))
if addr.startswith('1'):
address_hash160 = (ice.address_to_h160(addr))
if addr.startswith('3'):
address_hash160 = (ice.address_to_h160(addr))
if addr.startswith('bc1') and len(addr.split('\t')[0])< 50 :
address_hash160 = (ice.bech32_address_decode(addr,coin_type=0))
print ('\nBitcoin Address = ', addr, '\nTo HASH160 = ', address_hash160)
time.sleep(3.0)
elif start == 3:
print ('[red]HASH160 to Bitcoin Address Tool[/red]')
hash160 =(str(input('Enter Your HASH160 Here : ')))
print ('[red]Coming Soon not Working[/red]')
elif start == 4:
print(INPUTNEEDED)
print ('[green]Brain Wallet Bitcoin Address Tool[/green]')
passphrase = (input('Type Your Passphrase HERE : '))
wallet = BrainWallet()
private_key, caddr = wallet.generate_address_from_passphrase(passphrase)
print('\nPassphrase = ',passphrase)
print('Private Key = ',private_key)
get_balance(caddr)
data_info()
for data_w in data:
hash160 = data_w['hash160']
address = data_w['address']
n_tx = data_w['n_tx']
total_received = data_w['total_received']
total_sent = data_w['total_sent']
final_balance = data_w['final_balance']
print('================== Block Chain ==================')
print('Bitcoin address = ', address)
print('hash160 = ', hash160)
print('Number of tx = ', n_tx)
print('Total Received = ', total_received)
print('Total Sent = ', total_sent)
print('Final Balance = ', final_balance)
print('================== Block Chain ==================')
time.sleep(3.0)
elif start == 5:
print(INPUTNEEDEDHEX)
print('[green]Hexadecimal to Decimal Tool[/green]')
HEX = str(input('Enter Your Hexadecimal HEX Here : '))
dec = int(HEX, 16)
length = len(bin(dec))
length -=2
print('\nHexadecimal = ',HEX, '\nTo Decimal = ', dec, ' bits ', length)
time.sleep(3.0)
elif start == 6:
print(INPUTNEEDEDDEC)
print('[green]Decimal to Hexadecimal Tool[/green]')
dec = int(input('Enter Your Decimal DEC Here : '))
HEX = "%064x" % dec
length = len(bin(dec))
length -=2
print('\nDecimal = ', dec, ' bits ', length, '\nTo Hexadecimal = ', HEX)
time.sleep(3.0)
elif start == 7:
prompthex= '''
[yellow]**************************** Hexadecimal to Address Tool **********************
* *
*[/yellow] 1-Single Hexadecimal to Address. Balance check [Internet required] [yellow]*
*[/yellow] 2-List Multi Hexadecimal to Address. Balance check [Internet required] [yellow]*
*[/yellow] (Option 2 Requires hex.txt file list of Hexadecimal [yellow]*
* *
**************************** Hexadecimal to Address Tool **********************[/yellow]'''
print(prompthex)
delay_print('Enter 1-2 : ')
starthex=int(input('TYPE HERE = '))
if starthex == 1:
print(INPUTNEEDEDHEX)
print('[green]Hexadecimal to Address Tool[/green]')
HEX=str(input("Hexadecimal HEX -> "))
dec = int(HEX, 16)
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
caddr = ice.privatekey_to_address(0, True, dec) #Compressed
uaddr = ice.privatekey_to_address(0, False, dec) #Uncompressed
p2sh = ice.privatekey_to_address(1, True, dec) #p2sh
bech32 = ice.privatekey_to_address(2, True, dec) #bech32
dogeaddr = ice.privatekey_to_coinaddress(ice.COIN_DOGE, 0, True, dec) #DOGE
dogeuaddr = ice.privatekey_to_coinaddress(ice.COIN_DOGE, 0, False, dec) #DOGE
ethaddr = ice.privatekey_to_ETH_address(dec)
query = {caddr}|{uaddr}|{p2sh}|{bech32}
request = requests.get("https://blockchain.info/multiaddr?active=" + ','.join(query), timeout=10)
try:
request = request.json()
print('[yellow] HEX Entered >> [ [/yellow]', HEX, '[yellow]][/yellow]')
print('[yellow] DEC Returned >> [ [/yellow]', dec, '[yellow]][/yellow]')
print('[yellow] WIF Compressed >> [ [/yellow]', wifc, '[yellow]][/yellow]')
print('[yellow] WIF Uncompressed >> [ [/yellow]', wifu, '[yellow]][/yellow]')
get_balance(caddr)
get_balance1(uaddr)
get_balance2(p2sh)
get_balance3(bech32)
get_balance4(ethaddr)
for row in request["addresses"]:
print(row)
print('Dogecoin Address Compressed = ', dogeaddr, ' Balance = ', get_doge(dogeaddr))
print('Dogecoin Address UnCompressed = ', dogeuaddr, ' Balance = ', get_doge(dogeuaddr))
time.sleep(3.0)
except:
pass
if starthex == 2:
with open("hex.txt", "r") as file:
line_count = 0
for line in file:
line != "\n"
line_count += 1
with open('hex.txt', newline='', encoding='utf-8') as f:
for line in f:
mylist.append(line.strip())
for i in range(0,len(mylist)):
myhex = mylist[i]
HEX = myhex.split()[0]
dec = int(HEX, 16)
length = len(bin(dec))
length -=2
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
caddr = ice.privatekey_to_address(0, True, dec) #Compressed
uaddr = ice.privatekey_to_address(0, False, dec) #Uncompressed
p2sh = ice.privatekey_to_address(1, True, dec) #p2sh
bech32 = ice.privatekey_to_address(2, True, dec) #bech32
dogeaddr = ice.privatekey_to_coinaddress(ice.COIN_DOGE, 0, True, dec) #DOGE
dogeuaddr = ice.privatekey_to_coinaddress(ice.COIN_DOGE, 0, False, dec) #DOGE
ethaddr = ice.privatekey_to_ETH_address(dec)
balance = get_balance(caddr)
balance1 = get_balance1(uaddr)
balance2 = get_balance2(p2sh)
balance3 = get_balance3(bech32)
balance4 = get_balance4(ethaddr)
count+=1
total+=7
print('Total HEX addresses Loaded:', line_count)
if int(balance) > 0 or int(balance1) > 0 or int(balance2) > 0 or int(balance3) > 0 or float(balance4) > ammount or float (get_doge(dogeaddr)) > ammount or float (get_doge(dogeuaddr)) > ammount:
print('[yellow] HEX Entered >> [ [/yellow]', HEX, '[yellow]][/yellow]')
print('[yellow] DEC Returned >> [ [/yellow]', dec, '[yellow]][/yellow]')
print('[yellow] WIF Compressed >> [ [/yellow]', wifc, '[yellow]][/yellow]')
print('[yellow] WIF Uncompressed >> [ [/yellow]', wifu, '[yellow]][/yellow]')
print('Dogecoin Address Compressed = ', dogeaddr, ' Balance = ', get_doge(dogeaddr))
print('Dogecoin Address UnCompressed = ', dogeuaddr, ' Balance = ', get_doge(dogeuaddr))
f=open('winner.txt','a')
f.write(f" HEX Entered >> \n{HEX}\n DEC Returned >> \n{dec} bits {length}\n\n WIF Compressed >> \n{wifc}\n\n WIF Uncompressed >> \n{wifu}\n\n Bitcoin Address = {caddr} Total Received {balance} BTC \n\n Bitcoin Address = {uaddr} Total Received {balance1} BTC \n\n Bitcoin Address = {p2sh} Total Received {balance2} BTC \n\n Bitcoin Address = {bech32} Total Received {balance3} BTC \n\n Ethereum Address = {ethaddr} Balance {balance4} \n\n Dogecoin Address Compressed = {dogeaddr} \n\n Balance {get_doge(dogeaddr)} \n\n Dogecoin Address UnCompressed = {dogeuaddr} \n\n Balance {get_doge(dogeuaddr)}")
else:
print('Scan Number : ', count, ' : Total Wallets Checked : ', total)
print('Dogecoin Address Compressed = ', dogeaddr, ' Balance = ', get_doge(dogeaddr))
print('Dogecoin Address UnCompressed = ', dogeuaddr, ' Balance = ', get_doge(dogeuaddr))
time.sleep(1.5)
elif start == 8:
print(INPUTNEEDEDDEC)
print('[green]Decimal to Address Tool[/green]')
delay_print('Decimal Dec (Max 115792089237316195423570985008687907852837564279074904382605163141518161494336 ) -> ')
dec=int(input('TYPE HERE = '))
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
caddr = ice.privatekey_to_address(0, True, dec) #Compressed
uaddr = ice.privatekey_to_address(0, False, dec) #Uncompressed
p2sh = ice.privatekey_to_address(1, True, dec) #p2sh
bech32 = ice.privatekey_to_address(2, True, dec) #bech32
dogeaddr = ice.privatekey_to_coinaddress(ice.COIN_DOGE, 0, True, dec) #DOGE
dogeuaddr = ice.privatekey_to_coinaddress(ice.COIN_DOGE, 0, False, dec) #DOGE
ethaddr = ice.privatekey_to_ETH_address(dec)
query = {caddr}|{uaddr}|{p2sh}|{bech32}
request = requests.get("https://blockchain.info/multiaddr?active=" + ','.join(query), timeout=10)
try:
request = request.json()
print('[yellow] DEC Entered >> [ [/yellow]', dec, '[yellow]][/yellow]')
print('[yellow] HEX Returned >> [ [/yellow]', HEX, '[yellow]][/yellow]')
print('[yellow] WIF Compressed >> [ [/yellow]', wifc, '[yellow]][/yellow]')
print('[yellow] WIF Uncompressed >> [ [/yellow]', wifu, '[yellow]][/yellow]')
get_balance(caddr)
get_balance1(uaddr)
get_balance2(p2sh)
get_balance3(bech32)
get_balance4(ethaddr)
for row in request["addresses"]:
print(row)
print('Dogecoin Address Compressed = ', dogeaddr, ' Balance = ', get_doge(dogeaddr))
print('Dogecoin Address UnCompressed = ', dogeuaddr, ' Balance = ', get_doge(dogeuaddr))
time.sleep(3.0)
except:
pass
elif start == 9:
promptword= '''
************************* Mnemonic Words 12/15/18/21/24 tool *************************
* *
* 1-OWN Words to Bitcoin with Balance Check [Internet required] *
* 2-Generated Words to Bitcoin with Balance Check [Internet required] *
* Type 1-2 to Start *
* *
************************* Mnemonic Words 12/15/18/21/24 tool *************************
'''
print(promptword)
delay_print('Enter 1-2 : ')
startwords=int(input('TYPE HERE = '))
if startwords == 1:
print('[green]Mnemonic 12/15/18/21/24 Words to Bitcoin Address Tool[/green]')
wordlist = str(input('Enter Your Mnemonic Words = '))
Lang = int(input(' Choose language 1.english, 2.french, 3.italian, 4.spanish, 5.chinese_simplified, 6.chinese_traditional, 7.japanese or 8.korean '))
if Lang == 1:
Lang1 = "english"
elif Lang == 2:
Lang1 = "french"
elif Lang == 3:
Lang1 = "italian"
elif Lang == 4:
Lang1 = "spanish"
elif Lang == 5:
Lang1 = "chinese_simplified"
elif Lang == 6:
Lang1 = "chinese_traditional"
elif Lang == 7:
Lang1 = "japanese"
elif Lang == 8:
Lang1 = "korean"
else:
print("WRONG NUMBER!!! Starting with english")
Lang1 = "english"
mnemo = Mnemonic(Lang1)
mnemonic_words = wordlist
if startwords == 2:
print('[green]Mnemonic 12/15/18/21/24 Words to Bitcoin Address Tool[/green]')
R = int(input('Enter Ammount Mnemonic Words 12/15/18/21/24 : '))
if R == 12:
s1 = 128
elif R == 15:
s1 = 160
elif R == 18:
s1 = 192
elif R == 21:
s1 = 224
elif R == 24:
s1 = 256
else:
print("WRONG NUMBER!!! Starting with 24 Words")
s1 = 256
Lang = int(input(' Choose language 1.english, 2.french, 3.italian, 4.spanish, 5.chinese_simplified, 6.chinese_traditional, 7.japanese or 8.korean '))
if Lang == 1:
Lang1 = "english"
elif Lang == 2:
Lang1 = "french"
elif Lang == 3:
Lang1 = "italian"
elif Lang == 4:
Lang1 = "spanish"
elif Lang == 5:
Lang1 = "chinese_simplified"
elif Lang == 6:
Lang1 = "chinese_traditional"
elif Lang == 7:
Lang1 = "japanese"
elif Lang == 8:
Lang1 = "korean"
else:
print("WRONG NUMBER!!! Starting with english")
Lang1 = "english"
mnemo = Mnemonic(Lang1)
mnemonic_words = mnemo.generate(strength=s1)
seed = mnemo.to_seed(mnemonic_words, passphrase="")
data_wallet()
for target_wallet in data:
print('\nmnemonic_words : ', mnemonic_words, '\nDerivation Path : ', target_wallet['path'], '\nBitcoin Address : ', target_wallet['address'], ' Balance = ', get_balance(target_wallet['address']), ' BTC', '\nPrivatekey WIF : ', target_wallet['privatekey'])
time.sleep(3.0)
elif start == 10:
promptWif= '''
************* WIF Tool *****************
* *
* 1- LIST OF WIF file needed *
* 2- Single WIF input *
* *
**************[+] WIF Tool .....********
'''
print(promptWif)
time.sleep(0.5)
delay_print('Enter 1-2 : ')
wiftool=int(input('TYPE HERE = '))
s = 0
w = 0
count = 0
total = 0
def print_main():
console.print(f'''[green]Dec => [/green] {dec}
[green]HEX => [/green] {HEX}
[yellow] Add:[/yellow][green1] {uaddr}[/green1][red1] WIFU:[/red1][white]{wifu}[/white]
[yellow] Add:[/yellow][green1] {caddr}[/green1][red1] WIFC:[/red1][white]{wifc}[/white]
[yellow] Add:[/yellow][green1] {p2sh}[/green1][red1]
[yellow] Add:[/yellow][green1] {bech32}[/green1][red1]''')
if wiftool ==1:
mylist= []
data=[]
with open('wif.txt', newline='', encoding='utf-8') as f:
for line in f:
mylist.append(line.strip())
for x in range(0,len(mylist)):
WIF = mylist[x]
count+=1
total+=5
if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K') or WIF.startswith('K') or WIF.startswith('L'):
if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K'):
first_encode = base58.b58decode(WIF)
private_key_full = binascii.hexlify(first_encode)
private_key = private_key_full[2:-8]
private_key_hex = private_key.decode("utf-8")
dec = int(private_key_hex,16)
elif WIF.startswith('K') or WIF.startswith('L'):
first_encode = base58.b58decode(WIF)
private_key_full = binascii.hexlify(first_encode)
private_key = private_key_full[2:-8]
private_key_hex = private_key.decode("utf-8")
dec = int(private_key_hex[0:64],16)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
p2sh = ice.privatekey_to_address(1, True, dec) #p2sh
bech32 = ice.privatekey_to_address(2, True, dec) #bech32
balance = get_balance(caddr)
balance1 = get_balance1(uaddr)
balance2 = get_balance2(p2sh)
balance3 = get_balance3(bech32)
if int(balance) > 0 or int(balance1) > 0 or int(balance2) > 0 or int(balance3) > 0:
f=open('WIFsave.txt','a')
f.write(f" WIF >> \n{WIF}\n WIF Compressed >> {wifc} \n Bitcoin Address = {caddr} Total Received {balance} \n WIF Uncompressed >> {wifu} \n Bitcoin Address = {uaddr} Total Received {balance1} \n Bitcoin Address = {p2sh} Total Received {balance2} \n Bitcoin Address = {bech32} Total Received {balance3}")
f.close()
else :
print_main()
if wiftool ==2:
print(INPUTNEEDED)
print('[green]WIF to Bitcoin Address Tool[/green]')
WIF = str(input('Enter Your Wallet Import Format WIF = '))
count+=1
total+=5
if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K') or WIF.startswith('K') or WIF.startswith('L'):
if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K'):
first_encode = base58.b58decode(WIF)
private_key_full = binascii.hexlify(first_encode)
private_key = private_key_full[2:-8]
private_key_hex = private_key.decode("utf-8")
dec = int(private_key_hex,16)
elif WIF.startswith('K') or WIF.startswith('L'):
first_encode = base58.b58decode(WIF)
private_key_full = binascii.hexlify(first_encode)
private_key = private_key_full[2:-8]
private_key_hex = private_key.decode("utf-8")
dec = int(private_key_hex[0:64],16)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
p2sh = ice.privatekey_to_address(1, True, dec) #p2sh
bech32 = ice.privatekey_to_address(2, True, dec) #bech32
balance = get_balance(caddr)
balance1 = get_balance1(uaddr)
balance2 = get_balance2(p2sh)
balance3 = get_balance3(bech32)
if int(balance) > 0 or int(balance1) > 0 or int(balance2) > 0 or int(balance3) > 0:
f=open('WIFsave.txt','a')
f.write(f" WIF >> \n{WIF}\n WIF Compressed >> {wifc} \n Bitcoin Address = {caddr} Total Received {balance} \n WIF Uncompressed >> {wifu} \n Bitcoin Address = {uaddr} Total Received {balance1} \n Bitcoin Address = {p2sh} Total Received {balance2} \n Bitcoin Address = {bech32} Total Received {balance3}")
f.close()
else :
print_main()
elif start == 11:
promptrsz= '''[yellow]
************************* Retrieve ECDSA signature R,S,Z rawtx or txid tool *************************
* *
*[/yellow] 1-txid blockchain API R,S,Z calculation starts. [yellow][OnLine] *
*[/yellow] 2-rawtx R,S,Z,Pubkey for each of the inputs present in the rawtx data. [red][OffLine][/red] [yellow]*
*[/yellow] 3-Adresses SoChain Transations checked blockchain API R,S,Z [yellow][OnLine] *
*[/yellow] 4-txid blockchain API R,S,Z from transaction List MORE INFORMATION [yellow][OnLine] [yellow]*
* *
************************* Retrieve ECDSA signature R,S,Z rawtx or txid tool *************************
'''
print(promptrsz)
startrsz=int(input('Type 1-4 to Start '))
if startrsz == 1:
txid = input(str('Type your txid here = ')) #'82e5e1689ee396c8416b94c86aed9f4fe793a0fa2fa729df4a8312a287bc2d5e'
rawtx = ''
if rawtx == '':
rawtx = get_rawtx_from_blockchain(txid)
print('\nStarting Program...')
m = parseTx(rawtx)
e = getSignableTxn(m)
for i in range(len(e)):
print('='*70,f'\n[Input Index #: {i}]\n R: {e[i][0]}\n S: {e[i][1]}\n Z: {e[i][2]}\nPubKey: {e[i][3]}')
f=open('file.txt','a')
f.write(f'{e[i][0]},{e[i][1]},{e[i][2]}\n')
elif startrsz == 2:
rawtx = input(str('Type your rawtx here = ')) #'01000000028370ef64eb83519fd14f9d74826059b4ce00eae33b5473629486076c5b3bf215000000008c4930460221009bf436ce1f12979ff47b4671f16b06a71e74269005c19178384e9d267e50bbe9022100c7eabd8cf796a78d8a7032f99105cdcb1ae75cd8b518ed4efe14247fb00c9622014104e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6cffffffffb0385cd9a933545628469aa1b7c151b85cc4a087760a300e855af079eacd25c5000000008b48304502210094b12a2dd0f59b3b4b84e6db0eb4ba4460696a4f3abf5cc6e241bbdb08163b45022007eaf632f320b5d9d58f1e8d186ccebabea93bad4a6a282a3c472393fe756bfb014104e3896e6cabfa05a332368443877d826efc7ace23019bd5c2bc7497f3711f009e873b1fcc03222f118a6ff696efa9ec9bb3678447aae159491c75468dcc245a6cffffffff01404b4c00000000001976a91402d8103ac969fe0b92ba04ca8007e729684031b088ac00000000'
print('\nStarting Program...')
m = parseTx(rawtx)
e = getSignableTxn(m)
for i in range(len(e)):
print('='*70,f'\n[Input Index #: {i}]\n R: {e[i][0]}\n S: {e[i][1]}\n Z: {e[i][2]}\nPubKey: {e[i][3]}')
f=open('file.txt','a')
f.write(f'{e[i][0]},{e[i][1]},{e[i][2]}\n')
elif startrsz == 3: