import re


def rule(event):
    if any(
        [
            re.match(
                r"^.*Compress-Archive -Path.*-DestinationPath $env:TEMP.*$",
                event.deep_get("ScriptBlockText", default=""),
            ),
            re.match(
                r"^.*Compress-Archive -Path.*-DestinationPath.*\\AppData\\Local\\Temp\\.*$",
                event.deep_get("ScriptBlockText", default=""),
            ),
            re.match(
                r"^.*Compress-Archive -Path.*-DestinationPath.*:\\Windows\\Temp\\.*$",
                event.deep_get("ScriptBlockText", default=""),
            ),
        ]
    ):
        return True
    return False
