Layer debug info to show file size #1011
Merged
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.
Hello!
This adds an extra line to debug logs when the stacker shows the layers it has managed to stack.
It simply shows the file size of the file in the debug log. I've found that knowing the file size of the file has been very helpful when debugging issues where plugins aren't working as expected, or the stacker fails. For example when the stacker says it was only able to stack a FileLayer for a memory dump of a VM with 8GB, but the file is only 1GB in size it's obvious that either the sample is wrong or it is compressed in some way.
I was worried this might slow things down, particularly when dealing with very large files, but in my tests that didn't seem to be true. I think that
maximum_address
has already been set as it's needed by some of the scanners. However I'm very happy to be shown that I'm wrong about that!Thanks!