-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Compressed plist support and better regex #5937
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
Compressed plist support and better regex #5937
Conversation
solardiz
left a 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.
I don't know if this is right or not, but you're the maintainer of this script. :-)
I just wish you'd use our commit message style, so prefix the title with subsystem (script) name, and wrap further lines at 75. But I don't insist.
run/fvde2john.py
Outdated
| CryptoUsers_dict = {} | ||
| for user_index in range(len(matches)): | ||
| CryptoUsers_dict[user_index] = matches[user_index] | ||
| # if present convert user type from string to hex | ||
| user_type = CryptoUsers_dict[user_index].get('UserType') | ||
| if user_type: | ||
| CryptoUsers_dict[user_index]['UserType'] = int(CryptoUsers_dict[user_index]['UserType'], 16) | ||
| if matches: | ||
| CryptoUsers_dict = {} | ||
| for user_index in range(len(matches)): | ||
| CryptoUsers_dict[user_index] = matches[user_index] | ||
| # if present convert user type from string to hex | ||
| user_type = CryptoUsers_dict[user_index].get('UserType') | ||
| if user_type: | ||
| CryptoUsers_dict[user_index]['UserType'] = int(CryptoUsers_dict[user_index]['UserType'], 16) | ||
|
|
||
| return CryptoUsers_dict | ||
| return CryptoUsers_dict |
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 return line is moved into the loop here, perhaps accidentally? Doesn't look right to me.
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.
Oh, good catch. Maybe it was meant to be moved under if matches, but not into the loop, @holly-o?
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.
@holly-o We're waiting for you to comment on this and perhaps revise the code. Thank you!
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.
Thank you for the comment, yes I will amend the code so the return is outside of the loop.
Added support for when encryption context is compressed. Also, broader regex for greater matching.
9ea7518 to
61af481
Compare
|
Thank you @holly-o and @magnumripper! Since the only issue pointed out by magnum has been fixed, I went ahead and merged this. |
Added support for when encryption context is compressed. Also, broader regex for greater matching.