def _run_scan(arguments, scan_target, allow_file=False):
tmp_path = arguments.tmp_path
if tmp_path is None:
tmp_path = os.path.join(tempfile.gettempdir(), tempfile.gettempprefix() + smoke_zephyr.utilities.random_string_alphanumeric(8))
fetch.smart_fetch(scan_target, tmp_path, allow_file=allow_file)
scanner = runner.SubprocessRunner(
tmp_path,
shutil.which('python')
)
print('[*] scanning: ' + tmp_path)
scanner.run()
scanner.wait()
if not arguments.save_path:
shutil.rmtree(tmp_path)
return scanner
评论列表
文章目录