-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmnemonics.py
66 lines (55 loc) · 1.94 KB
/
mnemonics.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
from bip_utils import (
Bip39SeedGenerator,
Bip44,
Bip44Coins,
Bip39MnemonicGenerator,
Bip39WordsNum,
AtomAddrEncoder,
)
import multiprocessing
import base64
def main():
num_processes = 16
pool = multiprocessing.Pool(processes=num_processes)
for i in range(num_processes):
new_process = multiprocessing.Process(target=search, args=())
new_process.start()
# search()
def search():
while True:
mnemonic = Bip39MnemonicGenerator().FromWordsNumber(Bip39WordsNum.WORDS_NUM_24)
seed_bytes = Bip39SeedGenerator(mnemonic).Generate()
bip44_def_ctx = Bip44.FromSeed(
seed_bytes, Bip44Coins.COSMOS
).DeriveDefaultPath()
addr = AtomAddrEncoder.EncodeKey(
bip44_def_ctx.PublicKey().RawCompressed().ToBytes(), hrp="fetch"
)
if (
addr.startswith("fetch1234567")
or addr.startswith("fetch1sweep")
or addr.startswith("fetch1c0sm0s")
or addr.startswith("fetch1c0smjs")
or addr.startswith("fetch1c0smpy")
or addr.startswith("fetch1d0rad0")
or addr.startswith("fetch1f0rmax")
or addr.startswith("fetch1faucet")
or addr.startswith("fetch1ledger")
or addr.startswith("fetch1sentry")
or addr.startswith("fetch1tested")
or addr.startswith("fetch1tester")
or addr.startswith("fetch1wallet")
or addr.startswith("fetch1fetch")
or addr.startswith("fetch1snaps")
or addr.startswith("fetch1authz")
# or addr.startswith("fetch1t")
):
key = base64.b64encode(bip44_def_ctx.PrivateKey().Raw().ToBytes()).decode(
"utf-8"
)
f = open("keys.txt", "a")
f.write(f'{addr} = PrivateKey("{key}") # {mnemonic}\n')
f.close()
print(f"{addr}")
if __name__ == "__main__":
main()