Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: regex for identifying encrypted text

by QM (Parson)
on May 16, 2018 at 10:18 UTC ( [id://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?

-QM
--
Quantum Mechanics: The dreams stuff is made of

  • Comment on Re: regex for identifying encrypted text

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found