Skip to content
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

feat: add support for --module-data option in scan command #183

Merged
merged 11 commits into from
Sep 5, 2024

Conversation

chudicek
Copy link
Contributor

@chudicek chudicek commented Aug 30, 2024

The pre-existing code did not support the additional input (the -x flag input) necessary for some modules. Hence a modification of the relevant part of the code was made to enable passing a more complex struct to the #[module_main] function (as opposed to just a single _: &[u8] input argument).

The implementation itself should be in line with what was discussed with @TommYDeeee

Copy link

google-cla bot commented Aug 30, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

lib/src/scanner/mod.rs Outdated Show resolved Hide resolved
lib/src/modules/mod.rs Outdated Show resolved Hide resolved
cli/src/commands/scan.rs Outdated Show resolved Hide resolved
lib/build.rs Outdated Show resolved Hide resolved
lib/src/modules/mod.rs Show resolved Hide resolved
lib/src/modules/mod.rs Outdated Show resolved Hide resolved
py/src/lib.rs Outdated Show resolved Hide resolved
lib/src/scanner/mod.rs Outdated Show resolved Hide resolved
lib/src/scanner/mod.rs Outdated Show resolved Hide resolved
lib/src/scanner/mod.rs Outdated Show resolved Hide resolved
lib/src/scanner/mod.rs Outdated Show resolved Hide resolved
lib/src/scanner/mod.rs Outdated Show resolved Hide resolved
@@ -22,6 +22,7 @@ enum SupportedModules {
Elf,
Pe,
Dotnet,
Eml,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Eml is an internal module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, should not be there

@plusvic plusvic enabled auto-merge (squash) September 5, 2024 13:46
@plusvic plusvic merged commit 57ebf6e into VirusTotal:main Sep 5, 2024
16 checks passed
@plusvic plusvic changed the title feat: support for more complex argument in module main fn feat: add support for --module-data option in scan command Sep 5, 2024
plusvic added a commit that referenced this pull request Sep 5, 2024
Adds support for the `--module-data` option. This required some changes in the API, particularly the introduction of two new methods to `Scanner`.

---------

Co-authored-by: Victor M. Alvarez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants