katana.units.stego.whitespace — Check spaces/tabs for binary

Extract hidden data with Whitespace steganography.

This unit will extract hidden data file treating spaces as a binary 0, tabs as a binary 1, and vice versa.

The unit inherits from katana.unit.FileUnit to ensure the target is a file.

class katana.units.stego.whitespace.Unit(*args, **kwargs)

Bases: katana.unit.FileUnit

GROUPS = ['stego', 'whitespace']

These are “tags” for a unit. Considering it is a Stego unit, “stego” is included, and the name of the unit itself, “whitespace”.

PRIORITY = 75

Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty. This unit has a moderate priority.

evaluate(case)

Evaluate the target. Convert anything that could potentially be whitespace steganography and pass it to Katana.

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.
katana.units.stego.whitespace.decode_from_whitespace(binary_sequence: str) → str

This is a convenience function to decode a binary sequence.

Parameters:binary_sequence – A string of 1’s and 0’s.
Returns:The converted data