(plugin, targets)
| 456 | return {'type':'service', 'plugin':plugin, 'result':result} |
| 457 | |
| 458 | async def generate_report(plugin, targets): |
| 459 | semaphore = autorecon.service_scan_semaphore |
| 460 | |
| 461 | if not config['force_services']: |
| 462 | semaphore = await get_semaphore(autorecon) |
| 463 | |
| 464 | async with semaphore: |
| 465 | try: |
| 466 | result = await plugin.run(targets) |
| 467 | except Exception as ex: |
| 468 | exc_type, exc_value, exc_tb = sys.exc_info() |
| 469 | error_text = ''.join(traceback.format_exception(exc_type, exc_value, exc_tb)[-2:]) |
| 470 | raise Exception(cprint('Error: Report plugin {bblue}' + plugin.name + ' {green}(' + plugin.slug + '){rst} produced an exception:\n\n' + error_text, color=Fore.RED, char='!', printmsg=False)) |
| 471 | |
| 472 | async def scan_target(target): |
| 473 | os.makedirs(os.path.abspath(config['output']), exist_ok=True) |
no test coverage detected