forked from BRO200BS/Bitcoin-Address-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mycheck.py
44 lines (40 loc) · 1.24 KB
/
mycheck.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
import AddressesGenerator
import time
print('start load file')
tic = time.perf_counter()
#filePath='c:\\tempbt\\balancesShort.csv'
filePath='c:\\tempbt\\balances-0-814085.csv'
file = open(filePath,'r')
existingAddresses={}
k=0
while True:
content=file.readline()
if not content:
break
values = content.split(';')
existAddress=values[0]
existingAddresses[existAddress]=1
k=k+1
if(k%10000==0):
print(f'{k:_}', end ='\r')
#print(existAddress)
#values = content.split(';')
file.close()
print()
toc = time.perf_counter()
print(f"finish load file. loaded: {str(len(existAddress))} in {toc - tic:0.4f} seconds")
for i in range(500000,1000000000):
adrSet=AddressesGenerator.generateSetAddresses(i)
for adr in adrSet.adrs:
if existingAddresses.get(adr) is not None:
print(f"!!!!!!!!!!!!!!Key '{adr}' exists.")
print(f"priv - '{adrSet.priv}' wif - '{adrSet.wif}'")
f = open(f"demofile{i}.txt", "a")
f.write(adr+'\n')
f.write(adrSet.wif+'\n')
f.close()
if i%10000==0:
#print(i)
toc = time.perf_counter()
print(f"progress: {i} in {toc - tic:0.4f} seconds", end ='\r')
tic = time.perf_counter()