INNER CODE UNIT · Python

path

magicsword-io/LOLRMM · bin/generate_detections.py:27

        path = path[1:-1]
    if any(char in path for char in '"|') or re.search(r"\.exe\s", path, re.I):
        return None
    name = ntpath.basename(path)
    if (
        not name
        or name.startswith("*")
        or not name.lower().endswith(".exe")
        or any(char in name for char in "<>:")
        or any(ord(char) < 32 for char in name)
    ):
        return None
    return name


def sorted_case_insensitive_unique(values):
    """Pick the same spelling regardless of discovery or record order."""
    unique = {}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…