diff --git a/Makefile b/Makefile index cf33555..4820486 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ TARGETS += unhex TARGETS += pcat TARGETS += slice TARGETS += hex +TARGETS += entropy SCRIPTS += octets diff --git a/README.md b/README.md index 7c7db9b..6be24bb 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,20 @@ In other words: you can feed `hex` output into `unhex` with no manipulations. 41 +### entropy: compute shannon entropy + +Displays the Shannon entropy of the input. + + ~/src/fluffy $ echo -n a | ./entropy + 0.000000 + ~/src/fluffy $ echo -n aaaaaaaaa | ./entropy + 0.000000 + ~/src/fluffy $ echo -n aaaaaaaaab | ./entropy + 0.468996 + ~/src/fluffy $ echo -n aaaaaaaaabc | ./entropy + 0.865857 + + ### pyesc: python escape input Escapes input octets for pasting into a python "print" statement.