katana.units.raw.base64 — Decode Base64

Decode Base64 encoded text

This is done by the Python3 base64 module which has the b64decode function.

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

Bases: katana.unit.RegexUnit

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

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 “base64”.

PATTERN = regex.Regex(b'[a-zA-Z0-9+/]{4,}={0,2}', flags=regex.A | regex.S | regex.M | regex.V0)
PRIORITY = 25

Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty. This unit has a high priority. Base64 is quick and common and matches fairly unilaterally

evaluate(match)

Evaluate the target. Run base64.b64decode on 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.