diff --git a/MANIFEST.in b/MANIFEST.in index 999282c2..c50ea559 100644 --- a/MANIFEST.in +++ b/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 diff --git a/burpui/app.py b/burpui/app.py index 4e9ea392..dad213ce 100644 --- a/burpui/app.py +++ b/burpui/app.py @@ -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) diff --git a/burpui/misc/parser/doc.py b/burpui/misc/parser/doc.py index f5cd887c..9db5767c 100644 --- a/burpui/misc/parser/doc.py +++ b/burpui/misc/parser/doc.py @@ -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" diff --git a/burpui/server.py b/burpui/server.py index f4b95c4a..c41abd16 100644 --- a/burpui/server.py +++ b/burpui/server.py @@ -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: diff --git a/test-requirements.txt b/test-requirements.txt index 126b7236..a1655bf9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,6 @@ nose coverage mock mockredispy -# extensions requirements Flask-Session Celery redis diff --git a/test/run_build.sh b/test/run_build.sh index 6d495b19..3be42dfc 100755 --- a/test/run_build.sh +++ b/test/run_build.sh @@ -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