-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add regex and tests for PEM formatted private key #179
Conversation
pywhat/Data/regex.json
Outdated
"Name": "PEM-formatted Private Key", | ||
"Regex": "^(-----BEGIN( ANY| RSA| DSA| ENCRYPTED| EC| OPENSSH)? PRIVATE KEY-----\\n?[a-zA-Z0-9\\/\\.\\n\\:\\+\\=]+-----END( ANY| RSA| DSA| ENCRYPTED| EC| OPENSSH)? PRIVATE KEY-----)$", | ||
"plural_name": false, | ||
"Description": "Textual encoding of Public-Key Cryptography Standards (PKCS) described in RFC7468. Some of these PEM headers are defined in OpenSSL in https://github.com/openssl/openssl/blob/master/include/openssl/pem.h", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amadejpapez Do you think we need this description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. If a user wants to get this additional info they can easily search for it. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i change it or what should i do? sorry first time contributing, don't know how to proceed 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! We think it is not needed, so you can remove it yes. Replace it with null
:)
56fde4b
to
b8420f2
Compare
pywhat/Data/regex.json
Outdated
"Rarity": 1, | ||
"URL": null, | ||
"Tags": [ | ||
"Credentials" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the tag "Bug Bounty" here too please?
The regex will match private key generated by ssh-keygen and those defined by OpenSSL header file. The regex, however, doesn't validate if the string within BEGIN and END label is "correct" Base64 encoded. As it can be validated be direct checking with the public key Resolves: bee-san#174
c51f38f
to
6ae7cfe
Compare
The regex will match private key generated by ssh-keygen and those
defined by OpenSSL header file. The regex, however, doesn't validate if
the string within BEGIN and END label is "correct" Base64 encoded. As it
can be validated be direct checking with the public key
Resolves: #174