Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

命中率排名前10的path list bug #7

Open
grayguest opened this issue Jul 31, 2019 · 2 comments
Open

命中率排名前10的path list bug #7

grayguest opened this issue Jul 31, 2019 · 2 comments

Comments

@grayguest
Copy link

grayguest commented Jul 31, 2019

cms/task.py文件Line 118

 if str(f["hit"]).isdigit() and int(f["hit"]) > 0:
                        path_cache_hit.append((path, int(f["hit"])))  # TODO: 会有重复path吧?
@grayguest
Copy link
Author

另外,line 235附近bug,命中规则后更新mongodb,那么后续如果命中其他规则,会覆盖掉前面存储的cmsname吧?

                    for tmp in payload:
                        _id = tmp["_id"]
                        option = tmp["option"]
                        content = tmp["content"]
                        cmsname = tmp["name"]
                        tmp["url"] = self.domain
                        fingter = False

                        if option == "md5":
                            if content == getMD5(bytes):
                                fingter = True

                        elif option == "regx":
                            r = re.search(content, html)
                            if r:
                                fingter = True

                        elif option == "keyword":
                            if content in html:
                                fingter = True

                        if fingter:
                            self.result.append(tmp)
                            redisConn.delete(self.domain)
                            success(tmp,self.taskid)
                            print(tmp)

@grayguest
Copy link
Author

grayguest commented Jul 31, 2019

其中 redisConn.delete(self.domain)应该是阻止任务列表中有重复的domain再次执行,而不是阻止继续使用同一path的其他payload,line 298行左右

@celery_app.task
def singscan(url,ordict,taskid):
    value = redisConn.get(url)
    if value is None or value != "1":
        return False
    scan = WhatScan(url, ordict,taskid)
    l = scan.run()
    return l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant