fixed scrolling issue in screenshotter.js, removed some useless output in mitmflib

This commit is contained in:
byt3bl33d3r 2015-06-20 16:03:06 +02:00
commit f125b86aa0
8 changed files with 23 additions and 30 deletions

View file

@ -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]]

View file

@ -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,

View file

@ -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)

View file

@ -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)

View file

@ -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()

View file

@ -45,7 +45,6 @@ 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:

View file

@ -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)))

View file

@ -45,7 +45,6 @@ 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