Coder Social home page Coder Social logo

circle's Introduction

circle: statistics ascii circle for analysing byte entropy in files.

circle reads all bytes in a file, and counts and arranges them from 0x00 to 0xff. Them it calculates the Standard deviation (sigma) of the data, and arranges the 256 resulting buckets in a circle, in such a way that the distance from the centre is proportional to the byte value (with 0x00 at the center, and ...0xf0-0xff bytes the farthest from it). The char that represents each byte is proportional to the deviation from the mean, in fractions of the standard deviation.

circle can be installed (as bytes-circle) in Ubuntu and Debian using official repositories. Until testing becomes stable distribution, follow these instructions for adding the testing repositories to your linux, and then just install as usual:

$ apt-get install bytes-circle

Compilation:

$ gcc -lm statistics.c circle.c -o circle
or simply

$ make   

There're executable files for various OS available here.

A picture is worth a thousand words: let's circle a plain text file: the GPL v3 license:

Blue chars indicate bytes that are absent from the sample. Green represents variations above the mean, and red below it, with the size of the char directly proportional to the absolute magnitude of the deviation in fractions of sigma: from "," representing 1/4 of sigma to "@" representing 9/4 = 2.25 sigma or above. The complete list of chars is from 0 to 9:

{ '.', ',', '-', '~', '+', '*', 'o', 'O', '#', '@' };   

A case of use can be found here: http://wp.me/p2FmmK-96.

A random file looks like:

Options for non-colored consoles (in this case chars represent increments of 0.5 sigma and zero is char '*') and for using numbers instead of ASCII art are also available:

$ circle -h   

Show statistics about bytes contained in a file,   
as a circle graph of deviations from sigma.   

Use:   
$ circle [-o {0|1|2|3}] [-Bbnuh] [-z {0-255}] [<filename>] [<filename>] ...   
  
    -o {0 | 1=no color | 2=numbers | 3=uncoloured numbers}   
    -B : stop processing files on first error encountered   
    -b : no color   
    -n : numbers   
    -u : uncoloured numbers (-b -n)   
    -h : prints this help   
    -z {0-255} : prints a 2nd circle centered on this byte (0==127 !)   

Licensed as GPL v3 or higher.

circle's People

Contributors

circulosmeos avatar livibetter avatar

Watchers

Erdal Yildiz avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.