mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-10 15:23:41 -07:00
- Made user_agent lib optional for Kali
This commit is contained in:
parent
5100458e70
commit
b46b4dce97
3 changed files with 11 additions and 6 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 303d059c4c2a1ecc19824bd755129152b6ad7fc1
|
||||
Subproject commit a52a7c00d3af834ac78e224abec84543f584cbf5
|
|
@ -19,7 +19,11 @@
|
|||
import logging, re, string, random, zlib, gzip, StringIO, sys
|
||||
import plugins
|
||||
|
||||
from user_agents import parse
|
||||
try:
|
||||
from user_agents import parse
|
||||
except:
|
||||
pass
|
||||
|
||||
from twisted.web.http import HTTPClient
|
||||
from URLMonitor import URLMonitor
|
||||
from libs.sergioproxy.ProxyPlugins import ProxyPlugins
|
||||
|
@ -74,8 +78,8 @@ class ServerConnection(HTTPClient):
|
|||
|
||||
def sendRequest(self):
|
||||
if self.command == 'GET':
|
||||
user_agent = parse(self.headers['user-agent'])
|
||||
try:
|
||||
user_agent = parse(self.headers['user-agent'])
|
||||
self.clientInfo = "%s [type:%s-%s os:%s] " % (self.client.getClientIP(), user_agent.browser.family, user_agent.browser.version[0], user_agent.os.family)
|
||||
except:
|
||||
self.clientInfo = "%s " % self.client.getClientIP()
|
||||
|
|
5
mitmf.py
5
mitmf.py
|
@ -6,13 +6,14 @@ from twisted.internet import reactor
|
|||
from libs.sslstrip.CookieCleaner import CookieCleaner
|
||||
from libs.sergioproxy.ProxyPlugins import ProxyPlugins
|
||||
|
||||
import sys, logging, traceback, string, os
|
||||
import sys
|
||||
import logging
|
||||
import argparse
|
||||
|
||||
try:
|
||||
import user_agents
|
||||
except:
|
||||
sys.exit("[-] user_agents library not installed!")
|
||||
pass
|
||||
|
||||
try:
|
||||
from configobj import ConfigObj
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue