katana.units.crypto.caesar255
— Caesar Cipher with ASCII 255¶
- Perform a Caesar cipher, with the key mapping in the range of all 255 ASCII
- characters, on the target.
You can read more about the Caesar cipher here: https://en.wikipedia.org/wiki/Caesar_cipher
This unit inherits from the
katana.unit.NotEnglishAndPrintableUnit
class, as we can expect
the data to still be printable characters (letters, numbers and punctuation)
but not readable English. It also inherits from the
katana.units.crypto.CryptoUnit
class to ensure it is not a viable
URL or potentially useful file.
-
class
katana.units.crypto.caesar255.
Unit
(manager: katana.manager.Manager, target: katana.target.Target) Bases:
katana.unit.NotEnglishAndPrintableUnit
,katana.units.crypto.CryptoUnit
-
BLOCKED_GROUPS
= ['crypto'] This unit does not recurse into other Crypto units because that might spiral into a disaster.
-
GROUPS
= ['crypto', 'caesar255'] These are “tags” for a unit. Considering it is a Crypto unit, “crypto” is included, as well as the name of the unit, “caesar255”.
-
PRIORITY
= 50 Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty.
-
RECURSE_SELF
= False This unit should not recurse into itself. That could spiral in to an infinite loop.
-
enumerate
() → Generator[Any, None, None] Yield unit cases. The end-user can either supply a
shift
value as an argument, or it will bruteforce all the possible shift values within in the ASCII range (i.e. try the numbers 1-255).Returns: Generator of target cases, in this case an integer for the shift value (provided, or range 1-255).
-
evaluate
(shift: int) → None Perform the caesar cipher on the target.
Parameters: case – A case returned by enumerate
, in this case, the shift value to use for the Caesar Cipher operation.Returns: None. This function should not return any data.
-