Files
sigma-rules/detection_rules/__main__.py
T

35 lines
1.1 KiB
Python
Raw Normal View History

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
# coding=utf-8
"""Shell for detection-rules."""
import os
2021-03-24 10:24:32 -06:00
import sys
2020-06-29 23:58:20 -06:00
import click
2021-03-24 10:24:32 -06:00
assert (3, 8) <= sys.version_info < (4, 0), "Only Python 3.8+ supported"
from .main import root # noqa: E402
2020-06-29 23:17:38 -06:00
CURR_DIR = os.path.dirname(os.path.abspath(__file__))
CLI_DIR = os.path.dirname(CURR_DIR)
ROOT_DIR = os.path.dirname(CLI_DIR)
BANNER = r"""
█▀▀▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄ █▀▀▄ ▄ ▄ ▄ ▄▄▄ ▄▄▄
█ █ █▄▄ █ █▄▄ █ █ █ █ █ █▀▄ █ █▄▄▀ █ █ █ █▄▄ █▄▄
█▄▄▀ █▄▄ █ █▄▄ █▄▄ █ ▄█▄ █▄█ █ ▀▄█ █ ▀▄ █▄▄█ █▄▄ █▄▄ ▄▄█
"""
def main():
"""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()