-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
seedsearchpro.py
697 lines (654 loc) · 26.5 KB
/
seedsearchpro.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
#!/usr/bin/env python3
import urllib.request
import requests
import json
from hdwallet import HDWallet
from hdwallet.utils import is_mnemonic
from hdwallet.symbols import BTC, ETH, LTC, ZEC, DASH
import blockcypher
import os
import argparse
import time
import docx
from PyPDF2 import PdfReader
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
# intro
print(color.YELLOW + "Welcome to seedsearch.py! Let\'s hunt for some BIP39 mnemonic seed\n" + color.END)
print(color.RED + 'DISCLAIMER: ' + color.END + 'This tool works with BIP39 seed')
print(' It is intended to make searches in a quick way, but it has not to be considered exhaustive\n')
parser = argparse.ArgumentParser(description='Mnemonic seed finder')
parser.add_argument('-d', metavar='directory', type=str, required=True, help='Directory to scan')
args = parser.parse_args()
directory = args.d
# Quits if directory does not exist
if not os.path.exists(directory):
quit(color.RED + 'Directory does not exist!' + color.END)
blockcypherAPI = None # if available, put your Blockcypher API here
def add_der(sym, lang, seedl, psph, bip, coin, num, is_hardened):
hdwallet: HDWallet = HDWallet(symbol=sym)
hdwallet.from_mnemonic(mnemonic=seedl, passphrase=psph, language=lang)
hdwallet.from_index(bip, hardened=True)
hdwallet.from_index(coin, hardened=True)
hdwallet.from_index(0, hardened=True)
hdwallet.from_index(0)
hdwallet.from_index(num, hardened=is_hardened)
if bip == 44:
return hdwallet.p2pkh_address()
if bip == 84:
return hdwallet.p2wpkh_address()
if bip == 49:
return hdwallet.p2wpkh_in_p2sh_address()
# uses custom derivation paths used by samourai wallet
def sam_der(lang, seedl, psph, mix, num, is_hardened):
hdwallet: HDWallet = HDWallet(symbol=BTC)
hdwallet.from_mnemonic(mnemonic=seedl, passphrase=psph, language=lang)
hdwallet.from_index(84, hardened=True)
hdwallet.from_index(0, hardened=True)
# sam premix= 2147483645' postmix= 2147483646'
hdwallet.from_index(mix, hardened=True)
hdwallet.from_index(0)
hdwallet.from_index(num, hardened=is_hardened)
return hdwallet.p2wpkh_address()
# check if online or apis will not be available
def is_connected(host='http://google.com'):
try:
urllib.request.urlopen(host)
return True
except:
return False
# Creates list with addresses derived in the specifued language
def btc_list_der(lang, how_many):
btc_list = []
# bitcoin bip44 not hardened addresses
index = 0
while index < how_many:
btc_list.append(add_der(BTC, lang, checking_str, '', 44, 0, index, False))
index += 1
# bitcoin bip44 hardened addresses
index = 0
while index < how_many:
btc_list.append(add_der(BTC, lang, checking_str, '', 44, 0, index, True))
index += 1
# bitcoin bip49 not hardened addresses
index = 0
while index < how_many:
btc_list.append(add_der(BTC, lang, checking_str, '', 49, 0, index, False))
index += 1
# bitcoin bip49 hardened addresses
index = 0
while index < how_many:
btc_list.append(add_der(BTC, lang, checking_str, '', 49, 0, index, True))
index += 1
# bitcoin bip84 not hardened addresses
index = 0
while index < how_many:
btc_list.append(add_der(BTC, lang, checking_str, '', 84, 0, index, False))
index += 1
# bitcoin bip84 hardened addresses
index = 0
while index < how_many:
btc_list.append(add_der(BTC, lang, checking_str, '', 84, 0, index, True))
index += 1
# sam premix= 2147483645' postmix= 2147483646'
index = 0
while index < how_many:
btc_list.append(sam_der(lang, checking_str, '', 2147483645, index, False))
index += 1
index = 0
while index < how_many:
btc_list.append(sam_der(lang, checking_str, '', 2147483646, index, False))
index += 1
return btc_list
def eth_list_der(lang, how_many):
eth_list = []
# ethereum bip44 not hardened addresses
index = 0
while index < how_many:
eth_list.append(add_der(ETH, lang, checking_str, '', 44, 0, index, False))
index += 1
# ethereum bip44 hardened addresses
index = 0
while index < how_many:
eth_list.append(add_der(ETH, lang, checking_str, '', 44, 0, index, True))
index += 1
return eth_list
def ltc_list_der(lang, how_many):
ltc_list = []
# litecoin bip44 not hardened addresses
index = 0
while index < how_many:
ltc_list.append(add_der(LTC, lang, checking_str, '', 44, 0, index, False))
index += 1
# litecoin bip44 hardened addresses
index = 0
while index < how_many:
ltc_list.append(add_der(LTC, lang, checking_str, '', 44, 0, index, True))
index += 1
# litecoin bip49 not hardened addresses
index = 0
while index < how_many:
ltc_list.append(add_der(LTC, lang, checking_str, '', 49, 0, index, False))
index += 1
# litecoin bip49 hardened addresses
index = 0
while index < how_many:
ltc_list.append(add_der(LTC, lang, checking_str, '', 49, 0, index, True))
index += 1
# litecoin bip84 not hardened addresses
index = 0
while index < how_many:
ltc_list.append(add_der(LTC, lang, checking_str, '', 84, 0, index, False))
index += 1
# litecoin bip84 hardened addresses
index = 0
while index < how_many:
ltc_list.append(add_der(LTC, lang, checking_str, '', 84, 0, index, True))
index += 1
return ltc_list
def dash_list_der(lang, how_many):
dash_list = []
# dash bip44 not hardened addresses
index = 0
while index < how_many:
dash_list.append(add_der(DASH, lang, checking_str, '', 44, 0, index, False))
index += 1
# dash bip44 hardened addresses
index = 0
while index < how_many:
dash_list.append(add_der(DASH, lang, checking_str, '', 44, 0, index, True))
index += 1
return dash_list
def zec_list_der(lang, how_many):
zec_list = []
# ethereum bip44 not hardened addresses
index = 0
while index < how_many:
zec_list.append(add_der(ZEC, lang, checking_str, '', 44, 0, index, False))
index += 1
# ethereum bip44 hardened addresses
index = 0
while index < how_many:
zec_list.append(add_der(ZEC, lang, checking_str, '', 44, 0, index, True))
index += 1
return zec_list
def getListOfFiles(dirName):
# create a list of file and sub directories
listOfFile = os.listdir(dirName)
allFiles = list()
# Iterate over all the entries
for entry in listOfFile:
# Create full path
fullPath = os.path.join(dirName, entry)
# If entry is a directory then get the list of files in this directory
if os.path.isdir(fullPath):
allFiles = allFiles + getListOfFiles(fullPath)
else:
allFiles.append(fullPath)
return allFiles
def check_lang(word):
f = open('Wordlists/b39en')
if word in f.read():
f.close()
return('english')
f = open('Wordlists/b39it')
if word in f.read():
f.close()
return('italian')
f = open('Wordlists/b39cz')
if word in f.read():
f.close()
return('czech')
f = open('Wordlists/b39es')
if word in f.read():
f.close()
return('spanish')
f = open('Wordlists/b39fr')
if word in f.read():
f.close()
return('french')
f = open('Wordlists/b39pr')
if word in f.read():
f.close()
return('portuguese')
f = open('Wordlists/b39cn')
if word in f.read():
f.close()
return('chinese_simplified')
f = open('Wordlists/b39cn2')
if word in f.read():
f.close()
return('chinese_traditional')
f = open('Wordlists/b39jp')
if word in f.read():
f.close()
return('japanese')
f = open('Wordlists/b39kr')
if word in f.read():
f.close()
return('korean')
f.close()
return ('none')
def check_word(word, language):
if (language == 'english'):
f = open('Wordlists/b39en')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'italian'):
f = open('Wordlists/b39it')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'czech'):
f = open('Wordlists/b39cz')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'spanish'):
f = open('Wordlists/b39es')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'french'):
f = open('Wordlists/b39fr')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'portuguese'):
f = open('Wordlists/b39pr')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'chinese_simplified'):
f = open('Wordlists/b39cn')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'chinese_traditional'):
f = open('Wordlists/b39cn2')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'japanese'):
f = open('Wordlists/b39jp')
if word in f.read():
f.close()
return True
else:
f.close()
return False
if (language == 'korean'):
f = open('Wordlists/b39kr')
if word in f.read():
f.close()
return True
else:
f.close()
return False
# Get text from docx files
def getText(filename):
doc = docx.Document(filename)
fullText = []
for para in doc.paragraphs:
fullText.append(para.text)
return '\n'.join(fullText)
# Get the list of all files in the fiven path
listOfFiles = getListOfFiles(directory)
# Changes working directory to avoid issues with file opening
# use full path to open wordlists or full path to open files
# os.chdir('folder/with/wordlist')
temp_seed = [] # list that stores the seed during execution
seed_out = []
seed2check = []
n_files = len(listOfFiles)
print(color.BLUE + f'There are {n_files} files to scan' + color.END)
i = 0
# iterate through all the files
while i < n_files:
# manage docx files
if '.docx' in listOfFiles[i]:
with open(directory + 'fgrtgdtegd', 'w') as f: # random filename to avoid conflicts
f.write(getText(listOfFiles[i]))
f.close()
f = open(directory + 'fgrtgdtegd', 'r')
f.seek(0)
# manage pdf files
elif '.pdf' in listOfFiles[i]:
reader = PdfReader(listOfFiles[i])
text = ""
for page in reader.pages:
text += page.extract_text() + "\n"
with open(directory + 'fgrtgdtegd', 'w') as f:
f.write(text)
f.close()
f = open(directory + 'fgrtgdtegd', 'r')
f.seek(0)
# managing other files like txt, csv, html, json, etc.
else:
# Try if file can't be handled
try:
with open(listOfFiles[i], 'r') as tc:
content = tc.read()
except UnicodeDecodeError:
print(color.YELLOW + '\nUnable to open ' + listOfFiles[i] + color.END)
i += 1
continue
f = open(listOfFiles[i], 'r')
language = ''
line = f.readline()
while line: # reads the lines
for word in line.split():
checking = True # used to check other wordlists if a word is not in the current wordlist
while checking:
if len(temp_seed) == 0:
# identify language
language = check_lang(word)
if language == 'none':
checking = False
else:
temp_seed.append(word)
checking = False
else:
if check_word(word, language):
temp_seed.append(word)
checking = False
else:
temp_seed = []
if (len(temp_seed) > 11) and (len(temp_seed) % 3 == 0):
temp_seed_str = ' '.join(temp_seed)
# adds only valid bip39 seeds to output
if is_mnemonic(temp_seed_str, language):
langprint = language.upper()
# adds language of the seed (uppercase and in brackets) to the output string
temp_seed_str += ' (' + langprint + ')'
seed_out.append(temp_seed_str)
seed2check.append(temp_seed_str)
temp_seed = []
elif len(temp_seed) > 24:
temp_seed = []
line = f.readline()
# Printing the output
pr = 0
if len(seed_out) > 0:
print(color.DARKCYAN + f'\n=== Seeds found in {listOfFiles[i]} ===' + color.END)
while pr < len(seed_out):
pr += 1
prpr = str(pr)
print(prpr + ' ' + seed_out[pr - 1])
seed_out = []
f.close()
i += 1
# delete temporary file
if os.path.isfile(directory + 'fgrtgdtegd'):
os.remove(directory + 'fgrtgdtegd')
# declaring empty lists
btc_list = []
eth_list = []
ltc_list = []
dash_list = []
zec_list = []
# SeedCheck integration
if (len(seed2check) > 0):
tour0 = 1
while tour0:
print(color.BLUE + '\nDo you also want to see the addresses that could be derived with the found seeds? (y/n)' + color.END)
ans = input()
if ans == 'y' or ans == 'Y' or ans == 'n' or ans == 'N':
tour0 = 0
else:
print(color.RED + 'Unaccepted answer! Only type y for yes or n for no' + color.END)
if ((ans == 'y') or (ans == 'Y')):
conn = is_connected()
if conn:
tour1 = 1
while tour1:
print(color.BLUE + 'Do you want to query public APIs to try to find out how the seeds were used? (y/n)' + color.END)
ans2 = input()
if ans2 == 'y' or ans2 == 'Y' or ans2 == 'n' or ans2 == 'N':
tour1 = 0
else:
print(color.RED + 'Unaccepted answer! Only type y for yes or n for no' + color.END)
if ((ans2 == 'y') or (ans2 == 'Y')):
online_check = True
else:
online_check = False
print(color.BLUE + 'seedsearch will work only offline' + color.END)
else:
print(color.RED + '\nNo internet connection, it will not be possible to check addresses online\n' + color.RED)
prog = 0
tour2 = 1
while tour2:
print(color.BLUE + 'How many addresses do you want seedsearch to derive for each derivation path (max = 10)?' + color.END)
how_many = input()
if how_many.isalpha():
print(color.RED + 'Only numbers allowed' + color.END)
else:
tour2 = 0
print(color.RED + 'API limits may not allow to check all the addresses' + color.END)
how_many = int(how_many)
if how_many > 10:
how_many = 10
print(color.RED + 'Limit exceeded!' + color.END)
print('SeedSearch is going to check 10 addresses for each type to avoid overloading APIs')
while prog < len(seed2check):
checking_str = seed2check[prog]
prog += 1
checking_l = checking_str.split(' ')
language = checking_l[-1]
# removing brackets from language
language = language.replace('(', '').replace(')', '').lower()
del checking_l[-1]
# obtaining the seed as a string without language
checking_str = ' '.join(checking_l)
print(color.DARKCYAN + f'\nAddresses derived with the seed:\n{checking_str}' + color.END)
# Deriving addresses from the current seed
btc_list = btc_list_der(language, how_many)
eth_list = eth_list_der(language, how_many)
ltc_list = ltc_list_der(language, how_many)
dash_list = dash_list_der(language, how_many)
zec_list = zec_list_der(language, how_many)
# Printing derived addresses
print(color.CYAN + '- Bitcoin addresses -' + color.END)
print('BIP44')
i = 0
while i < len(btc_list):
print(btc_list[i])
i += 1
if (i == (how_many * 2)):
print(' - BIP49 - ')
elif (i == (how_many * 4)):
print(' - BIP84 - ')
elif (i == (how_many * 6)):
print(' - SAMOURAI PREMIX ADDRESSES - ')
elif (i == (how_many * 7)):
print(' - SAMOURAI POSTMIX ADDRESSES - ')
print(color.CYAN + '\n- Ethereum addresses -' + color.END)
i = 0
while i < len(eth_list):
print(eth_list[i])
i += 1
print(color.CYAN + '\n- Litecoin addresses -' + color.END)
print(' - BIP44 - ')
i = 0
while i < len(ltc_list):
print(ltc_list[i])
i += 1
if (i == (how_many * 2)):
print(' - BIP49 - ')
elif (i == (how_many * 4)):
print(' - BIP84 - ')
print(color.CYAN + '\n- Dash addresses -' + color.END)
i = 0
while i < len(dash_list):
print(dash_list[i])
i += 1
print(color.CYAN + '\n- ZCash addresses -' + color.END)
i = 0
while i < len(zec_list):
print(zec_list[i])
i += 1
if online_check == False:
online_found = False
print(color.RED + 'Use blockexplorers or trusted nodes to check the addresses' + color.END)
elif online_check == True:
online_found = False
print(color.DARKCYAN + '\nChecking bip39 derived addresses online' + color.END)
#check BTC
i = 0
while i < len(btc_list):
link = 'https://blockchain.info/q/addressfirstseen/' + btc_list[i]
used = requests.get(link)
data = used.text # gives a string
if data != '0':
if i < how_many:
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with derivation path m/44\'/0\'/0\'/0 ---' + color.END)
i = how_many
elif i < (how_many * 2):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with derivation path m/44\'/0\'/0\'/0\' ---' + color.END)
i = how_many * 2
elif i < (how_many * 3):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with derivation path m/49\'/0\'/0\'/0 ---' + color.END)
i = how_many * 3
elif i < (how_many * 4):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with derivation path m/49\'/0\'/0\'/0\' ---' + color.END)
i = how_many * 4
elif i < (how_many * 5):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with derivation path m/84\'/0\'/0\'/0 ---' + color.END)
i = how_many * 5
elif i < (how_many * 6):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with derivation path m/84\'/0\'/0\'/0\' ---' + color.END)
i = how_many * 6
elif i < (how_many * 7):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with Samourai PreMix derivation path m/84\'/0\'/2147483645\'/0\' ---' + color.END)
i = how_many * 7
elif i < (how_many * 8):
print(color.GREEN + '--- The given seed was used to derive Bitcoin addresses with Samourai PostMix derivation path m/84\'/0\'2147483646\'/0\' ---' + color.END)
i = how_many * 8
online_found = True
else:
i += 1
# check ETH
i = 0
while i < len(eth_list):
link = 'https://api.blockcypher.com/v1/eth/main/addrs/' + eth_list[i]
# avoid blockcypher's limit of 3 calls per second
time.sleep(400/1000)
eth_resp = requests.get(link)
eth_resp = eth_resp.text
eth_resp_dict = json.loads(eth_resp)
if eth_resp_dict['n_tx'] != 0:
online_found = True
if i < how_many:
i = how_many
print(color.GREEN + '--- The given seed was used to derive Ethereum addresses with derivation path m/44\'/60\'/0\'/0 ---' + color.END)
elif i > how_many * 2:
print(color.GREEN + '--- The given seed was used to derive Ethereum addresses with derivation path m/44\'/60\'/0\'/0\' ---' + color.END)
break
else:
i += 1
# check LTC
i = 0
while i < len(ltc_list):
ltc_tx = blockcypher.get_total_num_transactions(ltc_list[i], coin_symbol='ltc', api_key=blockcypherAPI)
# avoid blockcypher's limit of 3 calls per second
if blockcypherAPI is None:
time.sleep(400/1000)
if ltc_tx != 0:
if i < how_many:
print(color.GREEN + '--- The given seed was used to derive Litecoin addresses with derivation path m/44\'/2\'/0\'/0 ---' + color.END)
i = how_many
elif i < (how_many * 2):
print(color.GREEN + '--- The given seed was used to derive Litecoin addresses with derivation path m/49\'/2\'/0\'/0 ---' + color.END)
i = (how_many * 2)
elif i < (how_many * 3):
print(color.GREEN + '--- The given seed was used to derive Litecoin addresses with derivation path m/84\'/2\'/0\'/0 ---' + color.END)
i = how_many * 3
elif i < (how_many * 4):
print(color.GREEN + '--- The given seed was used to derive Litecoin addresses with derivation path m/44\'/2\'/0\'/0\' ---' + color.END)
i = how_many * 4
elif i < (how_many * 5):
print(color.GREEN + '--- The given seed was used to derive Litecoin addresses with derivation path m/49\'/2\'/0\'/0\' ---' + color.END)
i = how_many * 5
elif i < (how_many * 6):
print(color.GREEN + '--- The given seed was used to derive Litecoin addresses with derivation path m/84\'/2\'/0\'/0\' ---' + color.END)
i = how_many * 6
online_found = True
# i = 18
else:
i += 1
# Check DASH
i = 0
while i < len(dash_list):
dash_tx = blockcypher.get_total_num_transactions(dash_list[i], coin_symbol='dash', api_key=blockcypherAPI)
# avoid blockcypher's limit of 3 calls per second
if blockcypherAPI is None:
time.sleep(400/1000)
if dash_tx != 0:
if i < how_many:
print(color.GREEN + '--- The given seed was used to derive Dash addresses with derivation path m/44\'/5\'/0\'/0 ---' + color.END)
i = how_many
elif i < (how_many * 2):
print(color.GREEN + '--- The given seed was used to derive Dash addresses with derivation path m/44\'/5\'/0\'/0 ---' + color.END)
i = how_many * 2
online_found = True
# i = 6
else:
i += 1
# Check ZEC
i = 0
while i < len(zec_list):
link = 'https://api.zcha.in/v2/mainnet/accounts/' + zec_list[i]
zec_resp = requests.get(link)
zec_resp = zec_resp.text
zec_resp_dict = json.loads(zec_resp)
if zec_resp_dict['firstSeen'] != 0:
online_found = True
if i < how_many:
i = how_many
print(color.GREEN + '--- The given seed was used to derive ZCash addresses with derivation path m/44\'/133\'/0\'/0 ---' + color.END)
elif i < (how_many * 2):
i = how_many * 2
print(color.GREEN + '--- The given seed was used to derive ZCash addresses with derivation path m/44\'/133\'/0\'/0\' ---' + color.END)
else:
i += 1
if (online_found == False and online_check == True):
print(color.RED + '\nBip39 derivation path not found\n' + color.END)
elif (online_found == True):
print(color.GREEN + '\nBip39 derivation path found!\n' + color.END)
else:
print(color.RED + 'SeedSearch is not going to derive addresses and check them online. BYE!' + color.END)
quit()