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

Class OneSixtyOne

autorecon/default-plugins/onesixtyone.py:3–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1from autorecon.plugins import ServiceScan
2
3class OneSixtyOne(ServiceScan):
4
5 def __init__(self):
6 super().__init__()
7 self.name = "OneSixtyOne"
8 self.tags = ['default', 'safe', 'snmp']
9
10 def configure(self):
11 self.match_service_name('^snmp')
12 self.match_port('udp', 161)
13 self.run_once(True)
14 self.add_option('community-strings', default='/usr/share/seclists/Discovery/SNMP/common-snmp-community-strings-onesixtyone.txt', help='The file containing a list of community strings to try. Default: %(default)s')
15
16 async def run(self, service):
17 if service.target.ipversion == 'IPv4':
18 await service.execute('onesixtyone -c ' + self.get_option('community-strings') + ' -dd {address} 2>&1', outfile='{protocol}_{port}_snmp_onesixtyone.txt')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected