katana.units.raw.unhexlify — Convert hex to ASCII

Decode data represented as hexadecimal values.

This unit will return the data represented in both little-endian notation and in big-endian notation.

class katana.units.raw.unhexlify.Unit(manager: katana.manager.Manager, target: katana.target.Target)

Bases: katana.unit.RegexUnit

GROUPS = ['raw', 'decode', 'unhexlify']

These are “tags” for a unit. Considering it is a Raw unit, “raw” is included, as well as the tag “decode”, and the unit name itself, “unhexlify”.

PATTERN = regex.Regex(b'[0-9a-fA-F]+( ([0-9a-fA-F]+))*', flags=regex.A | regex.V0)

The pattern to match for hexadecimal data.

PRIORITY = 50

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

evaluate(match)

Evaluate the target. Convert the hexadecimal data found within the target and recurse on any new found information.

Parameters:match – A match returned by the RegexUnit.
Returns:None. This function should not return any data.