<commit_before>##! Extract exe, pdf, jar and cab files.

global ext_map: table[string] of string = {
    ["application/x-dosexec"] = "exe",
    ["application/pdf"] = "pdf",
    ["application/zip"] = "zip",
    ["application/jar"] = "jar",
    ["application/vnd.ms-cab-compressed"] = "cab",
    ["text/plain"] = "txt",
    ["image/gif"] = "gif",
    ["image/jpeg"] = "jpg",
    ["image/png"] = "png",
    ["text/html"] = "html",
    ["application/vnd.ms-fontobject"] = "ms_font",
    ["application/x-shockwave-flash"] = "swf"
} &default ="unknown";

event file_new(f: fa_file)
    {<commit_msg>bug fix: bro file extraction, add: bro owasp beginnings<commit_after>##! Extract exe, pdf, jar and cab files.

global ext_map: table[string] of string = {
    ["application/x-dosexec"] = "exe",
    ["application/pdf"] = "pdf",
    ["application/zip"] = "zip",
    ["application/jar"] = "jar",
    ["application/vnd.ms-cab-compressed"] = "cab",
    ["text/plain"] = "txt",
    ["image/gif"] = "gif",
    ["image/jpeg"] = "jpg",
    ["image/png"] = "png",
    ["text/html"] = "html",
    ["application/vnd.ms-fontobject"] = "ms_font",
    ["application/x-shockwave-flash"] = "swf"
} &default ="unknown";

event file_new(f: fa_file)
    {
    if (!f?$mime_type) return;
{'fraction_non_alphanumeric': 0.22795869737887212, 'fraction_numerical': 0.0, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7482371', 'n_tokens_mistral': 482, 'n_tokens_neox': 462, 'n_words': 95}