PowerShell module for enciphering and deciphering Caesar, Vigenere, and Substitution ciphers. The module will also brute force Caesar and Vigenere ciphers.
- Clone the repo
- Import the module
Import-Module C:\Path\To\Cloned\Location\PoshCiphers\PoshCiphers\PoshCiphers.psd1
Invoke-PCCaesarEncipher -Plaintext "Example" -Rotation 13
Plaintext Ciphertext Rotation
--------- ---------- --------
Example Rknzcyr 13
Invoke-PCSubEncipher -Plaintext "Example"
PlainText Ciphertext Substitution
--------- ---------- ------------
Example Ixtvksi TYNFIRMBHEGSVULKWQJDPACXO
Invoke-PCVigenereEncipher -Plaintext "Example" -Key "password"
Plaintext Ciphertext Key
--------- ---------- ---
Example Txselzv password
Invoke-PCCaesarDecipher -Ciphertext "Rknzcyr" -Rotation 13
Plaintext Ciphertext Rotation
--------- ---------- --------
Example Rknzcyr 13
Invoke-PCSubDecipher -Ciphertext "Ixtvksi" -Substitution "TYNFIRMBHEGSVULKWQJDPACXO"
PlainText Ciphertext Substitution
--------- ---------- ------------
Example Ixtvksi TYNFIRMBHEGSVULKWQJDPACXO
Invoke-PCVigenereDecipher -Ciphertext "Txselzv" -Key "password"
Plaintext Ciphertext Key
--------- ---------- ---
Example Txselzv password
The longer the ciphertext the more likely it is to return an accurate result like below. The lower the entropy the more likely the match is correct.
Invoke-PCBruteForceCaesar -Ciphertext "Drsc sc kx ohkwzvo drkd cryevn lo vyxq oxyeqr"
Plaintext Ciphertext Rotation Entropy
--------- ---------- -------- ------
This is an example that should be long enough Drsc sc kx ohkwzvo drkd cryevn lo vyxq oxyeqr 10 109.798786942039
When the ciphertext is too short it might be benefitial to return multiple results.
Invoke-PCBruteForceCaesar -Ciphertext "Ohkwzvo" -Return 6
Plaintext Ciphertext Rotation Entropy
--------- ---------- -------- ------
Atwilha Ohkwzvo 14 19.8330281092882
Lehtwsl Ohkwzvo 3 20.1951620075682
Hadpsoh Ohkwzvo 7 20.5561918374628
Tmpbeat Ohkwzvo 21 21.2523902999804
Wpsehdw Ohkwzvo 18 22.2203513815375
Example Ohkwzvo 10 24.0221984573182
As with Caesar the longer the ciphertext the more likely it is to return and accurate results. Additionally, the maximum key length also plays into the more accuracy of results.
Invoke-PCBruteForceVigenere -Ciphertext 'Zls tnsogs wuv sebborj pwvy fkxkvkr lvsvjss ebu nevtwekwy ebu lsx xvv mvkeh sapq st dgrqmbu nevtwekwy mg skxzif'
PlainText Ciphertext Key Entropy
--------- ---------- --- -------
The choice for mankind lies between Zls tnsogs wuv sebborj pwvy fkxkvkr GEORGE 184.669755696769
freedom and happiness and for the great lvsvjss ebu nevtwekwy ebu lsx xvv mvkeh
bulk of mankind happiness is better sapq st dgrqmbu nevtwekwy mg skxzif
When lowering the max key length it can eliminate inaccurate results that occur when the key length tested is significantly longer than the actual key and it also increases the speed of the brute force.
Invoke-PCBruteForceVigenere -Ciphertext 'Zls tnsogs wuv sebborj pwvy fkxkvkr lvsvjss ebu nevtwekwy ebu lsx xvv mvkeh sapq st dgrqmbu nevtwekwy mg skxzif' -MaxKeyLength 10
PlainText Ciphertext Key Entropy
--------- ---------- --- -------
The choice for mankind lies between Zls tnsogs wuv sebborj pwvy fkxkvkr GEORGE 184.669755696769
freedom and happiness and for the great lvsvjss ebu nevtwekwy ebu lsx xvv mvkeh
bulk of mankind happiness is better sapq st dgrqmbu nevtwekwy mg skxzif
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.