def rule(event):
    if all(
        [
            any(
                [
                    ".doc" in event.deep_get("CommandLine", default=""),
                    ".docx" in event.deep_get("CommandLine", default=""),
                    ".xls" in event.deep_get("CommandLine", default=""),
                    ".xlsx" in event.deep_get("CommandLine", default=""),
                    ".ppt" in event.deep_get("CommandLine", default=""),
                    ".pptx" in event.deep_get("CommandLine", default=""),
                    ".rtf" in event.deep_get("CommandLine", default=""),
                    ".pdf" in event.deep_get("CommandLine", default=""),
                    ".txt" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    all(
                        [
                            "dir " in event.deep_get("CommandLine", default=""),
                            " /b " in event.deep_get("CommandLine", default=""),
                            " /s " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("OriginalFileName", default="") == "FINDSTR.EXE",
                            any(
                                [
                                    " /e " in event.deep_get("CommandLine", default=""),
                                    " /si " in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
