MCPcopy Create free account
hub / github.com/AutoRecon/AutoRecon / match_port

Method match_port

autorecon/plugins.py:167–181  ·  view source on GitHub ↗
(self, protocol, port, negative_match=False)

Source from the content-addressed store, hash-verified

165
166 @final
167 def match_port(self, protocol, port, negative_match=False):
168 protocol = protocol.lower()
169 if protocol not in ['tcp', 'udp']:
170 print('Invalid protocol.')
171 sys.exit(1)
172 else:
173 if not isinstance(port, list):
174 port = [port]
175
176 port = list(map(int, port))
177
178 if negative_match:
179 self.ignore_ports[protocol] = list(set(self.ignore_ports[protocol] + port))
180 else:
181 self.ports[protocol] = list(set(self.ports[protocol] + port))
182
183 @final
184 def match_service_name(self, name, negative_match=False):

Callers 7

configureMethod · 0.80
configureMethod · 0.80
configureMethod · 0.80
configureMethod · 0.80
configureMethod · 0.80
configureMethod · 0.80
configureMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected