-
Notifications
You must be signed in to change notification settings - Fork 568
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
Pcode options + fixes #479
Merged
decalage2
merged 10 commits into
decalage2:master
from
christian-intra2net:pcode-options
Sep 21, 2020
Merged
Pcode options + fixes #479
decalage2
merged 10 commits into
decalage2:master
from
christian-intra2net:pcode-options
Sep 21, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Another py2/py3-error: returned data is str in py2, bytes in py3
When creating a sub-parser, should inherit all the options, not just a few. To avoid repeating this error, create method for sub-parser creation.
Reported by pylint
The pcode will be extracted irrespective of this arg in detect_vba_stomping(). Adjust help of argument accordingly.
Option show_pcode sofar only implemented for "normal" mode. For triage it does not make sense to do this, but in json it might be useful
Also move this test below the point where final output mode is determined.
This could also be solved by creating just one single option --pcode=[OFF|DETECT|SHOW] (possibly also with option 'SHOW-VBA-STOMPED' for only showing if vba-stomping was detected).
christian-intra2net
force-pushed
the
pcode-options
branch
from
October 14, 2019 09:11
fcf94c0
to
d8f80b9
Compare
Required a rebase after merging #365 |
decalage2
approved these changes
Sep 21, 2020
Thanks for merging |
@christian-intra2net welcome back! :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an option to disable pcode-extraction and renames the existing "pcode" option.
During coding I found a few minor errors that I fixed right away, these are the commits in the beginning. The ppt_parser-commit was cherry-picked from another PR (#450), I needed it for testing. Feel free to just pick&merge part of these.
Rationale behind the main change:
contrary to its help string, option "pcode" does not (any more) determine whether pcode is extracted and analyzed or not. That happens always. It only determines whether the pcode is shown to the user in the normal "detailed" output mode. I also implemented pcode-output in "json" output-mode and added a warning if pcode should be shown in triage mode. I renamed it "show_pcode".
To bring back the original meaning of the pcode-option, I added an option "disable-pcode". As an alternative to this solution (having "show_pcode" and "disable_pcode"), I could implement an option "pcode" that has choices "OFF" (do not extract), "ANALYZE" (extract and analyze) and "SHOW" (also add it to output). Let me know if you prefer that.