On Thu, 25 Feb 2021, RW wrote:

On Wed, 24 Feb 2021 18:37:42 -0800 (PST)
John Hardin wrote:

On Wed, 24 Feb 2021, Alan wrote:

After a little more research, a better regex for an obfuscated BTC
address is

/[13][ \-]([a-km-zA-HJ-NP-Z0-9][ \-]){25,32}[a-km-zA-HJ-NP-Z0-9]/

It might be worth adding = and _ to the obfuscating delimiters.
YMMV.

I've updated __BITCOIN_ID with -, = and _ obfuscations, which I
haven't seen myself yet.

Thanks!


Possibly

 (?:[-_=\s][a-km-zA-HJ-NP-Z1-9]){25,34}|[a-km-zA-HJ-NP-Z1-9]{25,34})

should be

 (?:[-_=\s]*[a-km-zA-HJ-NP-Z1-9]){25,34}

It's shorter and more general.

I'd prefer:

 (?:[-_=\s]?[a-km-zA-HJ-NP-Z1-9]){25,34}

The reason I haven't is I have not seen a mixture yet - it's either all spaced or not at all.

I'll take a look at that tonight when I have some time.


The more loose you get with matching obfuscation the greater the chance of false positives. Consider, for example, the PGP key in my .sig (which has a zero, but I'd wager there are PGP key signatures that look like obfuscated bitcoin wallet addresses...)

Also, there's a limit to how complex the obfuscation can get before the recipient can't (or won't) follow the instructions.


--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org                         pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Where are my space habitats? Where is my flying car?
  It's 2010 and all I got from the SF books of my youth
  is the lousy dystopian government.                      -- perlhaqr
-----------------------------------------------------------------------
 271 days since the first private commercial manned orbital mission (SpaceX)

Reply via email to