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
评论列表
文章目录