-
Notifications
You must be signed in to change notification settings - Fork 81
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
Calculate entropy #199
Calculate entropy #199
Conversation
nerd alert ! 🤓 |
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've been playing with plotext on this branch and I honestly love this ❤️ |
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 really love the modifications here 👍
e331e92
to
52c66af
Compare
52c66af
to
ecb5f91
Compare
Validate the specified value starting from 1. (0 makes no sense, because it would mean don't do anything).
We calculate entropy percenteges in 1mB chunks. We tested with different chunk sizes and the bigger the chunk size was the faster it could calculate 1mB seemed like a sweet spot, which isn't too small to be too slow, but granular enough to provide useful information about most binary files. There is a new CLI option: --entropy-depth, which determines how deep we should calculate entropy for these files. The 0 value can turn this feature completely off.
For entropy representation
A graphical plot is shown in ASCII when verbose mode is enabled. We are using plotext for the drawing.
Explained by QKaiser: This will provide more granularity for users looking into small files (e.g.encrypted config file), but keep a "constant" time regardless of the file being analyzed.
Iterators should have no side effects, because calling them would be very suprising (nothing would happen if the iterator is not exhausted).
ecb5f91
to
7b1c18e
Compare
Calculate entropy for all
UnknownChunk
s and draw an ASCII text plot on verbose mode.Fixes #70