Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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?

-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
Node Status?
node history
Node Type: note [id://1214627]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-12-16 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (71 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!