GithubHelp home page GithubHelp logo

1ndy / frequency_analyzer Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3.16 MB

Analyzes text to determine the most frequently occuring charcters and sort them

License: BSD 3-Clause "New" or "Revised" License

C 94.30% Shell 5.70%

frequency_analyzer's Introduction

Frequency Analyzer

This program exists to determine how often each letter in the English alphabet occurs. It is capable of analyzing custom data sets supplied as file names in the arguments to the program. Usage is as follows:

usage: ./frequencyanalyzer <file1> [file2 [file3]...]

The program will read every character from each file and maintain a count of the ones that are English letters, without discriminating between upper and lower case characters. Once finished, it will produce a result in tabular format displaying the letter, the number of occurrences, and the percentage of the text that is that character.

This result is also saved in a file named frequencydata, and will have the following form:

etaonihsrdlumcwfygpbvkjxqz

This file is created so that the frequencycrack program can operate.

Frequency-based Cracker

This portion of the project is functional, but ineffective because of the nature of frequency analysis. It works by analyzing and sorting an enciphered text file, mapping its most popular characters to the reference set generated with frequencyanalyzer, and replacing each one. The results are sporadic at best and this code should not be relied on for any serious cipher breaking. At this stage, it is merely a reference implementation illustrating how frequency analysis works. It could be improved in the following ways

  • analyze not only characters, but digraphs and trigraphs.
  • use a spell checking library like the one provided by aspell to correct small errors
  • report on how effective the analysis was using statistical means

The usage for this program is as follows:

usage: ./frequencycrack datafile textfile

Where datafile is the file that frequencyanalyze created and textfile is the enciphered text to crack.

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.