sfwebui.py 文件源码

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

项目:llk 作者: Tycx2ry 项目源码 文件源码
def stopscan(self, id):
        global globalScanStatus

        if globalScanStatus.getStatus(id) is None:
            return self.error("That scan is not actually running. A data consistency " + \
                              "error for this scan probably exists. <a href='/scandelete?id=" + \
                              id + "&confirm=1'>Click here to delete it.</a>")

        if globalScanStatus.getStatus(id) == "ABORTED":
            return self.error("The scan is already aborted.")

        if not globalScanStatus.getStatus(id) == "RUNNING":
            return self.error("The running scan is currently in the state '" + \
                              globalScanStatus.getStatus(id) + "', please try again later or restart " + \
                              " SpiderFoot.")

        globalScanStatus.setStatus(id, "ABORT-REQUESTED")
        templ = Template(filename='dyn/scanlist.tmpl', lookup=self.lookup)
        return templ.render(pageid='SCANLIST', stoppedscan=True, docroot=self.docroot, errors=list())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号