From 1d9083fa6fee8d07a81f646f7a470104a66c14da Mon Sep 17 00:00:00 2001 From: Mike Heier Date: Sun, 25 Aug 2024 20:28:50 -0400 Subject: [PATCH] update vanity_npub to only look at the end if -e is passed --- vanity_npub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vanity_npub.py b/vanity_npub.py index 54d7730..b2510d1 100644 --- a/vanity_npub.py +++ b/vanity_npub.py @@ -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)