def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="")
                    in ["wscript.exe", "cscript.exe"],
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\wscript.exe"),
                            event.deep_get("Image", default="").endswith("\\cscript.exe"),
                        ]
                    ),
                ]
            ),
            any(
                [
                    ".js" in event.deep_get("CommandLine", default=""),
                    ".jse" in event.deep_get("CommandLine", default=""),
                    ".vba" in event.deep_get("CommandLine", default=""),
                    ".vbe" in event.deep_get("CommandLine", default=""),
                    ".vbs" in event.deep_get("CommandLine", default=""),
                    ".wsf" in event.deep_get("CommandLine", default=""),
                    ".wsh" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
