suneo-bot.py 文件源码

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

项目:Shodita 作者: Quantika14 项目源码 文件源码
def get_target():
    global client, db
    cursor = db.Shodita.find({"bot":"Shizuka"})
    for document in cursor:
        if check_domain_mongodb(document["ip"], document["dominio"]):
            print colores.verde + "[INFO] Domain: " + document["dominio"] + " already scanned" + colores.normal
            pass
        else:
            url = "http://" + document["dominio"]
            headers = {'User-Agent' : 'Mozilla 5.10'}
            request = Request(url, None, headers)
            try:
                response = urlopen(request, timeout=10)
                if response.code == 200 or response.code == "OK":
                    html = response.read()
                    if detect_wp(html, document["dominio"]) == True:
                        insert_mongodb("WordPress", document["dominio"], document["ip"])
                        print colores.verde + "[+][INFO] " + document["dominio"] + " is WordPress" + colores.normal
                    if detect_joomla(html):
                        insert_mongodb("Joomla", document["dominio"], document["ip"])
                        print colores.verde + "[+][INFO] " + document["dominio"] + " is Joomla" + colores.normal
                    if detect_drupal(html):
                        insert_mongodb("Drupal", document["dominio"], document["ip"])
                        print colores.verde + "[+][INFO] " + document["dominio"] + " is Drupal" + colores.normal
            except URLError, e:
                continue
            except httplib.BadStatusLine:
                continue
            except:
                continue
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号