Example #1
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../share/burpui/etc/burpui.sample.cfg')
     bui = BUIinit(conf, False, '/dev/null', gunicorn=False, unittest=True)
     bui.config['TESTING'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['WTF_CSRF_ENABLED'] = False
     bui.client.port = 9999
     return bui
Example #2
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test6.cfg')
     bui = BUIinit(conf, False, None, False, unittest=True)
     bui.config['TESTING'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['WTF_CSRF_ENABLED'] = False
     bui.cli.port = 9999
     return bui
Example #3
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test6.cfg')
     bui = BUIinit(conf, False, None, False, unittest=True)
     bui.config['TESTING'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['WTF_CSRF_ENABLED'] = False
     bui.cli.port = 9999
     return bui
Example #4
0
 def create_app(self):
     kwargs = {'verbose': 0, 'logfile': '/dev/null', 'gunicorn': False, 'unittest': True}
     root = os.path.dirname(os.path.realpath(__file__))
     conf1 = os.path.join(root, 'test7-1.cfg')
     conf2 = os.path.join(root, 'test7-2.cfg')
     conf4 = os.path.join(root, 'test7-4.cfg')
     conf5 = os.path.join(root, 'test7-5.cfg')
     BUIinit(conf1, **kwargs)
     BUIinit(conf2, **kwargs)
     BUIinit(conf4, **kwargs)
     BUIinit(conf5, **kwargs)
     bui = BUIinit(None, **kwargs)
     bui.config['TESTING'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['WTF_CSRF_ENABLED'] = False
     bui.client.port = 9999
     return bui
Example #5
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../share/burpui/etc/burpui.sample.cfg')
     bui = BUIinit(debug=12, gunicorn=False, unittest=True)
     bui.setup(conf)
     bui.config['DEBUG'] = False
     bui.config['TESTING'] = True
     bui.config['LOGIN_DISABLED'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['CFG'] = conf
     bui.login_manager.init_app(bui)
     return bui
Example #6
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../share/burpui/etc/burpui.sample.cfg')
     bui = BUIinit(debug=12, gunicorn=False, unittest=True)
     bui.setup(conf)
     bui.config['DEBUG'] = False
     bui.config['TESTING'] = True
     bui.config['LOGIN_DISABLED'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['CFG'] = conf
     bui.login_manager.init_app(bui)
     return bui
Example #7
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test4.cfg')
     bui = BUIinit(conf, gunicorn=False, unittest=True)
     bui.setup(conf)
     bui.config['TESTING'] = True
     bui.config['LOGIN_DISABLED'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['SECRET_KEY'] = 'toto'
     bui.login_manager.init_app(bui)
     return bui
Example #8
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test4.cfg')
     bui = BUIinit(conf, gunicorn=False, unittest=True)
     bui.setup(conf)
     bui.config['TESTING'] = True
     bui.config['LOGIN_DISABLED'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['SECRET_KEY'] = 'toto'
     bui.login_manager.init_app(bui)
     return bui
Example #9
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test2.cfg')
     bui = BUIinit(logfile='/dev/null', gunicorn=False, unittest=True)
     bui.setup(conf, True)
     bui.config['TESTING'] = True
     bui.config['LOGIN_DISABLED'] = True
     bui.config['CFG'] = conf
     bui.config['SECRET_KEY'] = 'nyan'
     bui.login_manager.init_app(bui)
     self.bui = bui
     return bui
Example #10
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test2.cfg')
     bui = BUIinit(gunicorn=False, unittest=True)
     bui.setup(conf)
     bui.config['TESTING'] = True
     bui.config['LOGIN_DISABLED'] = True
     bui.config['CFG'] = conf
     bui.login_manager.init_app(bui)
     self.bui = bui
     return bui
Example #11
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test8.cfg')
     bui = BUIinit(conf, False, '/dev/null', gunicorn=False, unittest=True)
     bui.config['TESTING'] = True
     bui.config['LIVESERVER_PORT'] = 5001
     bui.config['WTF_CSRF_ENABLED'] = False
     bui.config['LOGIN_DISABLED'] = False
     bui.client.port = 9999
     with bui.app_context():
         from burpui.app import create_db
         from burpui.ext.sql import db
         from burpui.models import Session, Task
         bui.config['WITH_SQL'] = True
         create_db(bui, True)
         db.create_all()
         db.session.commit()
     return bui
Example #12
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test2.cfg')
     _, self.logfile = tempfile.mkstemp()
     bui = BUIinit(conf, 1, self.logfile, gunicorn=False, unittest=True)
     bui.config['DEBUG'] = False
     return bui
Example #13
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test2.cfg')
     _, self.logfile = tempfile.mkstemp()
     bui = BUIinit(conf, 1, self.logfile, gunicorn=False, unittest=True)
     bui.config['DEBUG'] = False
     return bui