Compressed plist support and better regex#5937
Compressed plist support and better regex#5937solardiz merged 1 commit intoopenwall:bleeding-jumbofrom
Conversation
solardiz
left a comment
There was a problem hiding this comment.
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.
The return line is moved into the loop here, perhaps accidentally? Doesn't look right to me.
There was a problem hiding this comment.
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.
@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.
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.