MCPcopy Index your code
hub / github.com/AutoRecon/AutoRecon / add_pattern

Method add_pattern

autorecon/plugins.py:91–99  ·  view source on GitHub ↗
(self, pattern, description=None)

Source from the content-addressed store, hash-verified

89
90 @final
91 def add_pattern(self, pattern, description=None):
92 try:
93 compiled = re.compile(pattern)
94 if description:
95 self.patterns.append(Pattern(compiled, description=description))
96 else:
97 self.patterns.append(Pattern(compiled))
98 except re.error:
99 fail('Error: The pattern "' + pattern + '" in the plugin "' + self.name + '" is invalid regex.')
100
101 @final
102 def info(self, msg, verbosity=0):

Callers 3

configureMethod · 0.80
configureMethod · 0.80
configureMethod · 0.80

Calls 2

failFunction · 0.90
PatternClass · 0.85

Tested by

no test coverage detected