def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\caddy.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\httpd.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\nginx.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\php-cgi.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\w3wp.exe"),
                            event.deep_get("ParentImage", default="").endswith(
                                "\\ws_tomcatservice.exe"
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("ParentImage", default="").endswith(
                                        "\\java.exe"
                                    ),
                                    event.deep_get("ParentImage", default="").endswith(
                                        "\\javaw.exe"
                                    ),
                                ]
                            ),
                            any(
                                [
                                    "-tomcat-" in event.deep_get("ParentImage", default=""),
                                    "\\tomcat" in event.deep_get("ParentImage", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("ParentImage", default="").endswith(
                                        "\\java.exe"
                                    ),
                                    event.deep_get("ParentImage", default="").endswith(
                                        "\\javaw.exe"
                                    ),
                                ]
                            ),
                            any(
                                [
                                    "CATALINA_HOME" in event.deep_get("CommandLine", default=""),
                                    "catalina.jar" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
            any(
                [
                    "perl --help" in event.deep_get("CommandLine", default=""),
                    "perl -h" in event.deep_get("CommandLine", default=""),
                    "python --help" in event.deep_get("CommandLine", default=""),
                    "python -h" in event.deep_get("CommandLine", default=""),
                    "python3 --help" in event.deep_get("CommandLine", default=""),
                    "python3 -h" in event.deep_get("CommandLine", default=""),
                    "wget --help" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
