Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: regex for identifying encrypted text

by QM (Parson)
on May 16, 2018 at 10:18 UTC ( #1214627=note: print w/replies, xml ) Need Help??

in reply to regex for identifying encrypted text

I can think of 2 options:

1) Write a regex that recognizes the full encryption multiline blob. This will require modifying how lines are defined, etc.

2) That's pretty much it, unless you want to have the odd false positive, and decide that any string longer than 30 chars without whitespace or certain punctuation is actually part of a key. And also, not catch certain fumble finger changes where some such string was accidentally introduced in a comment or other free-form, non-parsed section. (I'm assuming that such a change in code would fail to parse, and would be caught fairly quickly.)

Do you have a list of valid characters in private keys and such?

Quantum Mechanics: The dreams stuff is made of

  • Comment on Re: regex for identifying encrypted text

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214627]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2021-02-26 17:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found