Created
July 21, 2022 09:27
-
-
Save tlansec/d55fdc51c79b3d27d38ad7b16f53f7d7 to your computer and use it in GitHub Desktop.
Print out information about a files entropy
This file contains hidden or 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
// Add as an alias like: | |
// alias entropy=yara /path/to/entropy.yar $* | |
// Usage: | |
// entropy file.bin | |
import "console" | |
import "math" | |
rule entropy | |
{ | |
condition: | |
console.log(math.entropy(0, filesize)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment