app.config['NO_FEED'] = False app.config['PRIVATE_URLS'] = [ r'^/feeds', r'/clear', r'/sniffer', ] app.config['IFACES'] = {} for i in [i for i in ni.interfaces() if i.find('eth') != -1]: app.config['IFACES'][i] = ni.ifaddresses(i).get(2,[{'addr':'Not defined'}])[0]['addr'] # global avariables, used throughout malcom sniffer_sessions = {} analytics_engine = Analytics() feed_engine = FeedEngine(analytics_engine) @app.errorhandler(404) def page_not_found(error): return 'This page does not exist', 404 @app.after_request def after_request(response): origin = request.headers.get('Origin', '') # debug_output(origin, False) response.headers['Access-Control-Allow-Origin'] = origin response.headers['Access-Control-Allow-Credentials'] = 'true' return response @app.before_request def before_request():
environ['wsgi.url_scheme'] = environ.get('HTTP_X_SCHEME') return app(environ, start_response) app.config['DEBUG'] = True app.config['VERSION'] = "0.3" app.config['UPLOAD_FOLDER'] = "" app.config['LISTEN_INTERFACE'] = "0.0.0.0" app.config['LISTEN_PORT'] = 8080 # global avariables, used throughout malcom sniffer_sessions = {} analytics_engine = Analytics() feed_engine = FeedEngine(analytics_engine) @app.errorhandler(404) def page_not_found(error): return 'This page does not exist', 404 @app.after_request def after_request(response): origin = request.headers.get('Origin', '') # debug_output(origin, False) response.headers['Access-Control-Allow-Origin'] = origin response.headers['Access-Control-Allow-Credentials'] = 'true' return response @app.before_request def before_request():
environ['wsgi.url_scheme'] = environ.get('HTTP_X_SCHEME') return app(environ, start_response) app.config['DEBUG'] = True app.config['VERSION'] = "1.0 alpha" app.config['UPLOAD_FOLDER'] = "" app.config['LISTEN_INTERFACE'] = "0.0.0.0" app.config['LISTEN_PORT'] = 8080 app.config['MAX_THREADS'] = 4 # global avariables, used throughout malcom sniffer_sessions = {} analytics_engine = Analytics() feed_engine = FeedEngine(analytics_engine) @app.errorhandler(404) def page_not_found(error): return 'This page does not exist', 404 @app.after_request def after_request(response): origin = request.headers.get('Origin', '') # debug_output(origin, False) response.headers['Access-Control-Allow-Origin'] = origin response.headers['Access-Control-Allow-Credentials'] = 'true' return response