update vanity_npub to only look at the end if -e is passed

This commit is contained in:
Mike Heier 2024-08-25 20:28:50 -04:00
parent 7d0507403e
commit 1d9083fa6f

View File

@ -53,13 +53,13 @@ class BruteForceThread(Thread):
# First check the bonus targets
for target in self.bonus_targets:
if npub[:len(target)] == target or (self.include_end and npub[-1*len(target):] == target):
if ( (not self.include_end and npub[:len(target)] == target)) or (self.include_end and npub[-1*len(target):] == target):
# Found one of our bonus targets!
print(f"BONUS TARGET: {target}:\n\t{pk.public_key.bech32()}\n\t{pk.bech32()}", flush=True)
# Now check our main targets
for target in self.targets:
if npub[:len(target)] == target or (self.include_end and npub[-1*len(target):] == target):
if ( (not self.include_end and npub[:len(target)] == target)) or (self.include_end and npub[-1*len(target):] == target):
# Found our match!
print(f"\n{int(self.threadsafe_counter.cur_count):,} | {(time.time() - start):0.1f}s | {target} | npub1{npub}")
print(f"""\n\t{"*"*76}\n\tPrivate key: {pk.bech32()}\n\t{"*"*76}\n""", flush=True)