CVEScan.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:Plugins 作者: cve-search 项目源码 文件源码
def handle_scan(self, scan, action, tags, notes, store=False):
    try:
      nmap     = self._parseNMap(scan)
      enhanced = self._enhance(nmap)
      if store: self._store_in_db(nmap, tags=tags, notes=notes)
      if   action == "json":
        returndata = json.dumps(enhanced, indent=2, default=json_util.default)
      elif action == "pdf":
        returndata = str(base64.b64encode(self._generatePDF(enhanced)), "utf-8")
      elif action == "webview":
        app = Flask(__name__, template_folder=os.path.join(callLocation, "templates"))
        with app.test_request_context("/"):
          returndata = render_template(self.html, scan=enhanced)
      return returndata
    except Exception as e:
      traceback.print_exc()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号