From c66c6aea959048b5ff4a8ae6490c07b1fa684704 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 15 Nov 2023 14:09:28 -0700 Subject: [PATCH] Make should make printy. Also docs. --- Makefile | 1 + README.md | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 4d5ae2d..62cd707 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ TARGETS += hex TARGETS += entropy TARGETS += freq TARGETS += histogram +TARGETS += printy SCRIPTS += octets diff --git a/README.md b/README.md index 849b73b..1ed3eb5 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,19 @@ Displays the Shannon entropy of the input. 0.865857 +## printy: show density of printable octets + +Displays the number of printable octets +divided by the total number of octets. + + $ echo -n abcd | ./printy + 1.000000 + $ echo abcd | ./printy # Newline is not printable + 0.800000 + $ echo 00 41 | ./unhex | ./printy + 0.500000 + + ## pyesc: python escape input Escapes input octets for pasting into a python "print" statement.