mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
fix: packaging issues
This commit is contained in:
parent
02fc115fe6
commit
ad8ce2b23b
6 changed files with 28 additions and 18 deletions
11
MANIFEST.in
11
MANIFEST.in
|
|
@ -1,19 +1,16 @@
|
|||
include LICENSE
|
||||
include README.rst
|
||||
include CHANGELOG.rst
|
||||
include MANIFEST.in
|
||||
include CONTRIBUTORS
|
||||
include burpui/VERSION
|
||||
include burpui/RELEASE
|
||||
include requirements.txt
|
||||
include test-requirements.txt
|
||||
include share/burpui/etc/burpui.sample.cfg
|
||||
include share/burpui/etc/buiagent.sample.cfg
|
||||
include contrib/debian/init.sh
|
||||
include contrib/debian/bui-celery.init
|
||||
include contrib/centos/init.sh
|
||||
include contrib/gunicorn.d/burp-ui
|
||||
include contrib/gunicorn/burpui_config.py
|
||||
include bower.json
|
||||
include .bowerrc
|
||||
include babel.cfg
|
||||
graft contrib
|
||||
graft burpui
|
||||
graft migrations
|
||||
global-exclude *.pyc
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ def create_app(conf=None, verbose=0, logfile=None, gunicorn=True,
|
|||
|
||||
logger.info('Using configuration: {}'.format(app.config['CFG']))
|
||||
|
||||
app.setup(app.config['CFG'], unittest)
|
||||
app.setup(app.config['CFG'], unittest, cli)
|
||||
|
||||
if debug:
|
||||
app.config.setdefault('TEMPLATES_AUTO_RELOAD', True)
|
||||
|
|
|
|||
|
|
@ -754,7 +754,9 @@ class Doc(BUIparser):
|
|||
u'server_script_post': __(u"Path to a script to run on the server"
|
||||
" before the client disconnects. The"
|
||||
" arguments to it are 'post', '(client"
|
||||
" command)', 'reserved3' to 'reserved5', and"
|
||||
" command)', '(client name), '(0 or 1 for"
|
||||
" success or failure)', '(timer script exit"
|
||||
" code)', and"
|
||||
" then arguments defined by"
|
||||
" server_script_post_arg. This command and"
|
||||
" related options can be overriddden by the"
|
||||
|
|
@ -778,7 +780,9 @@ class Doc(BUIparser):
|
|||
" each successfully authenticated connection"
|
||||
" but before any work is carried out. The"
|
||||
" arguments to it are 'pre', '(client"
|
||||
" command)', 'reserved3' to 'reserved5', and"
|
||||
" command)', '(client name)', '(0 or 1 for"
|
||||
" success or failure)', '(timer script exit"
|
||||
" code)', and"
|
||||
" then arguments defined by"
|
||||
" server_script_pre_arg. If the script"
|
||||
" returns non-zero, the task asked for by the"
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class BUIServer(Flask):
|
|||
def logger(self):
|
||||
return self.builogger
|
||||
|
||||
def setup(self, conf=None, unittest=False):
|
||||
def setup(self, conf=None, unittest=False, cli=False):
|
||||
"""The :func:`burpui.server.BUIServer.setup` functions is used to setup
|
||||
the whole server by parsing the configuration file and loading the
|
||||
different backends.
|
||||
|
|
@ -116,9 +116,12 @@ class BUIServer(Flask):
|
|||
:param conf: Path to a configuration file
|
||||
:type conf: str
|
||||
|
||||
:param unittest: Wether we are unittesting or not (used to avoid burp2
|
||||
:param unittest: Whether we are unittesting or not (used to avoid burp2
|
||||
strict requirements checks)
|
||||
:type unittest: bool
|
||||
|
||||
:param cli: Whether we are in cli mode or not
|
||||
:type cli: bool
|
||||
"""
|
||||
self.sslcontext = None
|
||||
if not conf:
|
||||
|
|
@ -175,7 +178,7 @@ class BUIServer(Flask):
|
|||
'auth',
|
||||
'string_lower_list'
|
||||
)
|
||||
if self.auth and 'none' not in self.auth:
|
||||
if self.auth and 'none' not in self.auth and not cli:
|
||||
try:
|
||||
self.uhandler = UserAuthHandler(self)
|
||||
except Exception as e:
|
||||
|
|
@ -195,7 +198,7 @@ class BUIServer(Flask):
|
|||
self.acl_engine = self.config['BUI_ACL'] = 'none'
|
||||
self.auth = self.config['BUI_AUTH'] = 'none'
|
||||
|
||||
if self.acl_engine and self.acl_engine.lower() != 'none':
|
||||
if self.acl_engine and self.acl_engine.lower() != 'none' and not cli:
|
||||
try:
|
||||
# Try to load submodules from our current environment
|
||||
# first
|
||||
|
|
@ -334,6 +337,10 @@ class BUIServer(Flask):
|
|||
self.logger.info('with Celery: {}'.format(self.config['WITH_CELERY']))
|
||||
self.logger.info('demo: {}'.format(self.config['BUI_DEMO']))
|
||||
|
||||
if cli:
|
||||
self.init = True
|
||||
return
|
||||
|
||||
if self.standalone:
|
||||
module = 'burpui.misc.backend.burp{0}'.format(self.vers)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ nose
|
|||
coverage
|
||||
mock
|
||||
mockredispy
|
||||
# extensions requirements
|
||||
Flask-Session
|
||||
Celery
|
||||
redis
|
||||
|
|
|
|||
|
|
@ -14,15 +14,18 @@ echo "test requirements"
|
|||
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install wheel
|
||||
|
||||
echo "building dist"
|
||||
[ "$(sed 's/\([[:digit:]]*\)\..*$/\1/' <<<$VERSION)" -eq 2 ] && $PYTHON setup.py sdist bdist_wheel
|
||||
$PYTHON setup.py bdist_egg
|
||||
|
||||
echo "publishing build"
|
||||
tgz=$(ls dist/burp-ui*.tar.gz | sed "s|dist/||")
|
||||
egg=$(ls dist/burp_ui*.egg | sed "s|dist/||")
|
||||
whl=$(ls dist/burp_ui*.whl | sed "s|dist/||")
|
||||
cd dist
|
||||
tgz=$(ls -1rt dist/burp-ui*.tar.gz | tail -1)
|
||||
egg=$(ls -1rt dist/burp_ui*.egg | tail -1)
|
||||
whl=$(ls -1rt dist/burp_ui*.whl | tail -1)
|
||||
cd ..
|
||||
cp -vf dist/burp-ui*.tar.gz /pub/ 2>/dev/null
|
||||
cp -vf dist/burp_ui*.egg /pub/ 2>/dev/null
|
||||
cp -vf dist/burp_ui*.whl /pub/ 2>/dev/null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue