| 1 | from autorecon.plugins import ServiceScan |
| 2 | |
| 3 | class 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') |
nothing calls this directly
no outgoing calls
no test coverage detected