| 1 | from autorecon.plugins import ServiceScan |
| 2 | |
| 3 | class Curl(ServiceScan): |
| 4 | |
| 5 | def __init__(self): |
| 6 | super().__init__() |
| 7 | self.name = "Curl" |
| 8 | self.tags = ['default', 'safe', 'http'] |
| 9 | |
| 10 | def configure(self): |
| 11 | self.add_option("path", default="/", help="The path on the web server to curl. Default: %(default)s") |
| 12 | self.match_service_name('^http') |
| 13 | self.match_service_name('^nacn_http$', negative_match=True) |
| 14 | self.add_pattern('(?i)powered[ -]by[^\n]+') |
| 15 | |
| 16 | async def run(self, service): |
| 17 | if service.protocol == 'tcp': |
| 18 | await service.execute('curl -sSik {http_scheme}://{addressv6}:{port}' + self.get_option('path'), outfile='{protocol}_{port}_{http_scheme}_curl.html') |
nothing calls this directly
no outgoing calls
no test coverage detected