Skip to content

Commit

Permalink
Merge pull request #366 from splunk/recognize
Browse files Browse the repository at this point in the history
Recognize
  • Loading branch information
pyth0n1c authored Feb 6, 2025
2 parents a7c0883 + 40e07bf commit a0fea9c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions contentctl/contentctl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pathlib
import random
import sys
import traceback
import warnings
from dataclasses import dataclass

import tyro

Expand Down Expand Up @@ -155,6 +157,35 @@ def test_common_func(config: test_common):
"""


def get_random_compliment():
compliments = [
"Your detection rules are like a zero-day shield! πŸ›‘οΈ",
"You catch threats like it's child's play! 🎯",
"Your correlation rules are pure genius! 🧠",
"Threat actors fear your detection engineering! βš”οΈ",
"You're the SOC's secret weapon! 🦾",
"Your false positive rate is impressively low! πŸ“Š",
"Malware trembles at your detection logic! 🦠",
"You're the threat hunter extraordinaire! πŸ”",
"Your MITRE mappings are a work of art! 🎨",
"APTs have nightmares about your detections! πŸ‘»",
"Your content testing is bulletproof! 🎯",
"You're the detection engineering MVP! πŸ†",
]
return random.choice(compliments)


def recognize_func():
print(get_random_compliment())


@dataclass
class RecognizeCommand:
"""Dummy subcommand for 'recognize' with no parameters."""

pass


def main():
print(CONTENTCTL_5_WARNING)
try:
Expand Down Expand Up @@ -210,6 +241,7 @@ def main():
"test_servers": test_servers.model_construct(**t.__dict__),
"release_notes": release_notes.model_construct(**config_obj),
"deploy_acs": deploy_acs.model_construct(**t.__dict__),
"recognize": RecognizeCommand(),
}
)

Expand Down Expand Up @@ -240,6 +272,8 @@ def main():
deploy_acs_func(updated_config)
elif type(config) is test or type(config) is test_servers:
test_common_func(config)
elif type(config) is RecognizeCommand:
recognize_func()
else:
raise Exception(f"Unknown command line type '{type(config).__name__}'")
except FileNotFoundError as e:
Expand Down

0 comments on commit a0fea9c

Please sign in to comment.