added yahoo to search engine support

This commit is contained in:
byt3bl33d3r 2014-12-15 20:12:21 +01:00
parent 58bd73bb28
commit b118106d9d

View file

@ -83,6 +83,7 @@ class ServerConnection(HTTPClient):
error = str(e) error = str(e)
logging.warning("%s Error parsing google search query %s" % (self.client.getClientIP(), error)) logging.warning("%s Error parsing google search query %s" % (self.client.getClientIP(), error))
#Capture bing searches
if ('bing' in self.headers['host']): if ('bing' in self.headers['host']):
if ('Suggestions' in self.uri): if ('Suggestions' in self.uri):
try: try:
@ -95,6 +96,19 @@ class ServerConnection(HTTPClient):
error = str(e) error = str(e)
logging.warning("%s Error parsing bing search query %s" % (self.client.getClientIP(), error)) logging.warning("%s Error parsing bing search query %s" % (self.client.getClientIP(), error))
#Capture yahoo searches
if ('search.yahoo' in self.headers['host']):
if ('nresults' in self.uri):
try:
for param in self.uri.split('&'):
if param.split('=')[0] == 'command':
query = str(param.split('=')[1])
if query:
logging.info("%s is querying %s for %s" % (self.client.getClientIP(), self.headers['host'], query))
except Exception, e:
error = str(e)
logging.warning("%s Error parsing yahoo search query %s" % (self.client.getClientIP(), error))
#check for creds passed in GET requests.. It's surprising to see how many people still do this (please stahp) #check for creds passed in GET requests.. It's surprising to see how many people still do this (please stahp)
for user in self.http_userfields: for user in self.http_userfields:
username = re.findall("("+ user +")=([^&|;]*)", self.uri, re.IGNORECASE) username = re.findall("("+ user +")=([^&|;]*)", self.uri, re.IGNORECASE)