Skip to content

Commit a0fea9c

Browse files
authored
Merge pull request #366 from splunk/recognize
Recognize
2 parents a7c0883 + 40e07bf commit a0fea9c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

contentctl/contentctl.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import pathlib
2+
import random
23
import sys
34
import traceback
45
import warnings
6+
from dataclasses import dataclass
57

68
import tyro
79

@@ -155,6 +157,35 @@ def test_common_func(config: test_common):
155157
"""
156158

157159

160+
def get_random_compliment():
161+
compliments = [
162+
"Your detection rules are like a zero-day shield! 🛡️",
163+
"You catch threats like it's child's play! 🎯",
164+
"Your correlation rules are pure genius! 🧠",
165+
"Threat actors fear your detection engineering! ⚔️",
166+
"You're the SOC's secret weapon! 🦾",
167+
"Your false positive rate is impressively low! 📊",
168+
"Malware trembles at your detection logic! 🦠",
169+
"You're the threat hunter extraordinaire! 🔍",
170+
"Your MITRE mappings are a work of art! 🎨",
171+
"APTs have nightmares about your detections! 👻",
172+
"Your content testing is bulletproof! 🎯",
173+
"You're the detection engineering MVP! 🏆",
174+
]
175+
return random.choice(compliments)
176+
177+
178+
def recognize_func():
179+
print(get_random_compliment())
180+
181+
182+
@dataclass
183+
class RecognizeCommand:
184+
"""Dummy subcommand for 'recognize' with no parameters."""
185+
186+
pass
187+
188+
158189
def main():
159190
print(CONTENTCTL_5_WARNING)
160191
try:
@@ -210,6 +241,7 @@ def main():
210241
"test_servers": test_servers.model_construct(**t.__dict__),
211242
"release_notes": release_notes.model_construct(**config_obj),
212243
"deploy_acs": deploy_acs.model_construct(**t.__dict__),
244+
"recognize": RecognizeCommand(),
213245
}
214246
)
215247

@@ -240,6 +272,8 @@ def main():
240272
deploy_acs_func(updated_config)
241273
elif type(config) is test or type(config) is test_servers:
242274
test_common_func(config)
275+
elif type(config) is RecognizeCommand:
276+
recognize_func()
243277
else:
244278
raise Exception(f"Unknown command line type '{type(config).__name__}'")
245279
except FileNotFoundError as e:

0 commit comments

Comments
 (0)