MCPcopy Create free account
hub / github.com/SpecterOps/DeepPass2 / compile_pattern

Method compile_pattern

utils/nprules.py:15–22  ·  view source on GitHub ↗
(self, pattern)

Source from the content-addressed store, hash-verified

13 self.executor = ThreadPoolExecutor()
14
15 def compile_pattern(self, pattern):
16 with warnings.catch_warnings():
17 warnings.simplefilter("ignore", category=DeprecationWarning)
18 try:
19 return re.compile(pattern)
20 except re.error as e:
21 print(f"Regex compilation error for pattern: {pattern[:50]}... -> {e}")
22 return None
23
24 def load_patterns(self, jsonl_file):
25 """Load all regex patterns from a JSONL file."""

Callers 1

load_patternsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected