Exemplo n.º 1
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                         'configs/test2.cfg')
     _, self.logfile = tempfile.mkstemp()
     bui = BUIinit(conf, 1, self.logfile, gunicorn=False, unittest=True)
     bui.config['DEBUG'] = False
     return bui
Exemplo n.º 2
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../configs/test6.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
Exemplo n.º 3
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                         'configs/test6.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
Exemplo n.º 4
0
def app():
    conf = os.path.join(PWD, 'configs/test_api_prefs.cfg')
    bui = BUIinit(conf, logfile='/dev/null', gunicorn=False, unittest=True)
    bui.config['TESTING'] = True
    bui.config['SECRET_KEY'] = 'nyan'
    bui.config['WTF_CSRF_ENABLED'] = False
    with bui.app_context():
        from burpui.ext.sql import db
        from burpui.models import lazy_loading
        lazy_loading()
        db.create_all()
        db.session.commit()
    yield bui
Exemplo n.º 5
0
def app():
    conf = os.path.join(PWD, "configs/test_api_prefs.cfg")
    bui = BUIinit(conf, logfile="/dev/null", gunicorn=False, unittest=True)
    bui.config["TESTING"] = True
    bui.config["SECRET_KEY"] = "nyan"
    bui.config["WTF_CSRF_ENABLED"] = False
    with bui.app_context():
        from burpui.ext.sql import db
        from burpui.models import lazy_loading

        lazy_loading()
        db.create_all()
        db.session.commit()
    yield bui
Exemplo n.º 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, logfile='/dev/null', gunicorn=False, unittest=True)
     bui.setup(conf, True)
     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
Exemplo n.º 7
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../configs/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
Exemplo n.º 8
0
 def create_app(self):
     with patch('socket.socket'):
         conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../configs/test4.cfg')
         bui = BUIinit(conf, logfile='/dev/null', gunicorn=False, unittest=True)
         bui.setup(conf, True)
         bui.config['TESTING'] = True
         bui.config['LIVESERVER_PORT'] = 5001
         bui.config['SECRET_KEY'] = 'toto'
         bui.config['WTF_CSRF_ENABLED'] = False
         bui.login_manager.init_app(bui)
         return bui
Exemplo n.º 9
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,
                   logfile='/dev/null',
                   gunicorn=False,
                   unittest=True)
     bui.setup(conf, True)
     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
Exemplo n.º 10
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                         'configs/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
Exemplo n.º 11
0
 def create_app(self):
     with patch('socket.socket'):
         conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                             'configs/test4.cfg')
         bui = BUIinit(conf,
                       logfile='/dev/null',
                       gunicorn=False,
                       unittest=True)
         bui.setup(conf, True)
         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
Exemplo n.º 12
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../configs/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
Exemplo n.º 13
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                         'configs/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
Exemplo n.º 14
0
 def create_app(self):
     conf = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../configs/test2.cfg')
     _, self.logfile = tempfile.mkstemp()
     bui = BUIinit(conf, 1, self.logfile, gunicorn=False, unittest=True)
     bui.config['DEBUG'] = False
     return bui