2020-06-29 23:17:38 -06:00
|
|
|
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
2021-03-03 22:12:11 -09:00
|
|
|
# or more contributor license agreements. Licensed under the Elastic License
|
|
|
|
|
# 2.0; you may not use this file except in compliance with the Elastic License
|
|
|
|
|
# 2.0.
|
2020-06-29 23:17:38 -06:00
|
|
|
|
|
|
|
|
"""Shell for detection-rules."""
|
2025-07-01 15:20:55 +02:00
|
|
|
|
2024-05-23 17:36:51 -04:00
|
|
|
from pathlib import Path
|
2021-03-24 10:24:32 -06:00
|
|
|
|
2020-06-29 23:58:20 -06:00
|
|
|
import click
|
2021-03-24 10:24:32 -06:00
|
|
|
|
2025-07-01 15:20:55 +02:00
|
|
|
from .main import root
|
2020-06-29 23:17:38 -06:00
|
|
|
|
2024-05-23 17:36:51 -04:00
|
|
|
CURR_DIR = Path(__file__).resolve().parent
|
|
|
|
|
CLI_DIR = CURR_DIR.parent
|
|
|
|
|
ROOT_DIR = CLI_DIR.parent
|
2020-06-29 23:17:38 -06:00
|
|
|
|
|
|
|
|
BANNER = r"""
|
|
|
|
|
█▀▀▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄ █▀▀▄ ▄ ▄ ▄ ▄▄▄ ▄▄▄
|
|
|
|
|
█ █ █▄▄ █ █▄▄ █ █ █ █ █ █▀▄ █ █▄▄▀ █ █ █ █▄▄ █▄▄
|
|
|
|
|
█▄▄▀ █▄▄ █ █▄▄ █▄▄ █ ▄█▄ █▄█ █ ▀▄█ █ ▀▄ █▄▄█ █▄▄ █▄▄ ▄▄█
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
2025-07-01 15:20:55 +02:00
|
|
|
def main() -> None:
|
2020-06-29 23:17:38 -06:00
|
|
|
"""CLI entry point."""
|
2020-06-29 23:58:20 -06:00
|
|
|
click.echo(BANNER)
|
2020-06-29 23:17:38 -06:00
|
|
|
root(prog_name="detection_rules")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main()
|