|
1 | 1 | import pathlib
|
| 2 | +import random |
2 | 3 | import sys
|
3 | 4 | import traceback
|
4 | 5 | import warnings
|
| 6 | +from dataclasses import dataclass |
5 | 7 |
|
6 | 8 | import tyro
|
7 | 9 |
|
@@ -155,6 +157,35 @@ def test_common_func(config: test_common):
|
155 | 157 | """
|
156 | 158 |
|
157 | 159 |
|
| 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 | + |
158 | 189 | def main():
|
159 | 190 | print(CONTENTCTL_5_WARNING)
|
160 | 191 | try:
|
@@ -210,6 +241,7 @@ def main():
|
210 | 241 | "test_servers": test_servers.model_construct(**t.__dict__),
|
211 | 242 | "release_notes": release_notes.model_construct(**config_obj),
|
212 | 243 | "deploy_acs": deploy_acs.model_construct(**t.__dict__),
|
| 244 | + "recognize": RecognizeCommand(), |
213 | 245 | }
|
214 | 246 | )
|
215 | 247 |
|
@@ -240,6 +272,8 @@ def main():
|
240 | 272 | deploy_acs_func(updated_config)
|
241 | 273 | elif type(config) is test or type(config) is test_servers:
|
242 | 274 | test_common_func(config)
|
| 275 | + elif type(config) is RecognizeCommand: |
| 276 | + recognize_func() |
243 | 277 | else:
|
244 | 278 | raise Exception(f"Unknown command line type '{type(config).__name__}'")
|
245 | 279 | except FileNotFoundError as e:
|
|
0 commit comments