Decoder

class HystrixBox.Decoders.Decoder

Bases: object

A class used to represent a Decoder

static decode(text)

Decode the text by the cipher

If there are multiple ways to decode the text, return all of them

Parameters:text (str) – The cipher-text
Returns:List of the plain-texts (or plain-text) after decode
Return type:list
Raises:NotImplementedError – If the decode function not set in the decoder
classmethod safe_decode(text)

Validate the format of the text and decode it

First check if the text is in the format of the cipher, if so decode it. If the text is not in the format, return empty list

Parameters:text (str) – The cipher-text
Returns:List of the plain-texts (or plain-text) after decode
Return type:list
static validate(text)

Validate string format for this cipher.

Parameters:text (str) – The cipher-text
Returns:Either the text is in the cipher format or not
Return type:bool
Raises:NotImplementedError – If the validate function not set in the decoder

Ascii Decoder

class HystrixBox.Decoders.ASCIIDecoder

Bases: HystrixBox.Decoders.Decoder.Decoder

A class used to represent a ASCII decoder

Example:84 104 105 115 32 105 115 32 97 110 32 101 120 97 109 112 108 101 33 -> This is an example!

Base64 Decoder

class HystrixBox.Decoders.Base64Decoder

Bases: HystrixBox.Decoders.Decoder.Decoder

A class used to represent a Base64 decoder

Example:VGhpcyBpcyBhbiBleGFtcGxlIQ== -> This is an example!

Caesar Decoder

class HystrixBox.Decoders.CaesarDecoder

Bases: HystrixBox.Decoders.Decoder.Decoder

A class used to represent a Caesar decoder

Note

brute-force all options (shifts) and return list of all possible options starting from 1-shift to 25-shift

Example:Rfgq gq yl cvyknjc! -> [Sghr hr zm dwzlokd!, This is an example!, Uijt jt bo fybnqmf!] and go on

Hash Decoder

class HystrixBox.Decoders.HashDecoder

Bases: HystrixBox.Decoders.Decoder.Decoder

A class used to represent a Hash decoder

Note

correctly support only md5 hash using www.nitrxgen.net API

Example:a85a7dae016693c9351110c357e4b609 -> This is an example!

Reverse Decoder

class HystrixBox.Decoders.ReverseDecoder

Bases: HystrixBox.Decoders.Decoder.Decoder

A class used to represent a Reverse decoder

Example:!elpmaxe na si siht -> This is an example!

T9 Decoder

class HystrixBox.Decoders.T9Decoder

Bases: HystrixBox.Decoders.Decoder.Decoder

A class used to represent a T9 decoder, and old phone keypad (numbers to text)

Example:!8 44 444 7777 0 444 7777 0 2 66 0 33 99 2 6 7 555 33 -> This is an example!