-
Notifications
You must be signed in to change notification settings - Fork 14
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 encrypted viewstate support. Issue #10 #14
base: master
Are you sure you want to change the base?
Conversation
@rpimonitrbtch thanks for the PR, not sure how I missed it up until now. Is it ready for review or do you have more work on it? |
I think it's ready for review
…On February 26, 2020 7:18:56 AM EST, Yuval Adam ***@***.***> wrote:
@rpimonitrbtch thanks for the PR, not sure how I missed it up until
now. Is it ready for review or do you have more work on it?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14 (comment)
|
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.
Thanks for the work done here @rpimonitrbtch, generally looks good! I have some comments and questions inline.
Also if you can run your patch via black
and pylint
and maybe even add some unit tests that would be awesome.
Thanks again for the contribution!
try: | ||
from Crypto.Cipher import AES, DES3, DES | ||
except ImportError: | ||
from Cryptodome.Cipher import AES, DES3, DES |
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.
@rpimonitrbtch can you please describe where these dependencies come from? Are they expected to be built-in to the users Python installation? Do we need to bring them in as dependencies in setup.py
?
if not self.is_valid(): | ||
raise ViewStateException("Cannot decode invalid viewstate, bad preamble") | ||
if self.decrypt: | ||
if self.mac_mode == MAC.HMACMD5: |
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.
Perhaps these elif
blocks can be shrunk down to a single dict
that holds all these values?
pp = pprint.PrettyPrinter(indent=4) | ||
pp.pprint(vs.decode()) | ||
|
||
def getOptions(args=sys.argv[1:]): |
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.
The use of argparse
here makes perfect sense, nice!
No description provided.