Skip to content

Commit

Permalink
Using a Set to store offline addresses (#60)
Browse files Browse the repository at this point in the history
Co-authored-by: gitpushoriginmaster <gitpushoriginmaster@users.noreply.github.com>
  • Loading branch information
gitpushoriginmaster and gitpushoriginmaster committed May 26, 2023
1 parent b96e164 commit 8a79e60
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Btcbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ def __init__(self):
self.seq = False
self.privateKey = None
self.start_r = 0
load_data = open("address.txt", "r").readlines()
load_data = [x.rstrip() for x in load_data]
loaded_addresses = open("address.txt", "r").readlines()
loaded_addresses = [x.rstrip() for x in loaded_addresses]
# Remove invalid wallet addresses
load_data = [x for x in load_data if x.find('wallet') == -1 and len(x) > 0]
load_data = dict(zip(load_data, load_data))
self.load_data = load_data
loaded_addresses = [x for x in loaded_addresses if x.find('wallet') == -1 and len(x) > 0]
self.loaded_addresses = set(loaded_addresses)

def speed(self):
while True:
Expand All @@ -43,7 +42,7 @@ def speed(self):
def random_brute(self, n):
self.cur_n=n
key = Key()
if key.address in self.load_data.keys():
if key.address in self.loaded_addresses:
print("Wow matching address found!!")
print("Public Adress: "+key.address)
print("Private Key: "+key.to_wif())
Expand All @@ -57,7 +56,7 @@ def random_brute(self, n):
def sequential_brute(self, n):
self.cur_n=n
key = Key().from_int(n)
if key.address in self.load_data.keys():
if key.address in self.loaded_addresses:
print("Wow matching address found!!")
print("Public Adress: "+key.address)
print("Private Key: "+key.to_wif())
Expand Down

0 comments on commit 8a79e60

Please sign in to comment.