import re


def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/curl"),
            any(
                [
                    any(
                        [
                            " --form" in event.deep_get("CommandLine", default=""),
                            " --upload-file " in event.deep_get("CommandLine", default=""),
                            " --data " in event.deep_get("CommandLine", default=""),
                            " --data-" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    re.match(r"\\s-[FTd]\\s", event.deep_get("CommandLine", default="")),
                ]
            ),
            not any(
                [
                    "://localhost" in event.deep_get("CommandLine", default=""),
                    "://127.0.0.1" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
