katana.units.crypto.atbash
— Atbash Cipher¶
Perform the classic Atbash cipher on the given target.
You can read more about the Atbash cipher here: https://en.wikipedia.org/wiki/Atbash
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.
The gist of the Atbash cipher is that it will perform a substitution cipher with the key being the typical English alphabet, just reversed. Basically, A-Z maps to Z-A.
-
class
katana.units.crypto.atbash.
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', 'atbash'] These are “tags” for a unit. Considering it is a Crypto unit, “crypto” is included, as well as the name of the unit, “atbash”.
-
PRIORITY
= 60 Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty. This unit has a somewhat lower priority due to how uncommon this is within CTFs.
-
RECURSE_SELF
= False This unit should not recurse into itself. That could spiral in to an infinite loop.
-
evaluate
(case: Any) → None This
evaluate
function performs the Atbash cipher on the target.Parameters: case – A case returned by enumerate
. For this unit, the enumerate function is not used.Returns: None. This function should not return any data.
-