Commit e27e5fe3 authored by Ziirish's avatar Ziirish

update demo

parent 22c231d7
Pipeline #1576 passed with stages
in 6 minutes and 4 seconds
......@@ -21,3 +21,4 @@ Pipfile*
pkgs/burp-ui-sql/burpui_sql/VERSION
pkgs/burp-ui-extra/burpui_extra/VERSION
pkgs/burp-ui-agent/burpui_agent
pkgs/burp-ui-monitor/burpui_monitor
......@@ -78,10 +78,10 @@ build:docker:latest:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:latest -f docker/Dockerfile .
- (cd docker/demo/docker-pg && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/pgsql:10 .)
- (cd docker/components/docker-burp && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.0.54 .)
- (cd docker/components/docker-burp && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.2.18 .)
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:latest
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/pgsql:10
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.0.54
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.2.18
tags:
- registry
only:
......@@ -93,10 +93,10 @@ build:docker:release:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_TAG -f docker/Dockerfile .
- (cd docker/demo/docker-pg && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/pgsql:10 .)
- (cd docker/components/docker-burp && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.0.54 .)
- (cd docker/components/docker-burp && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.2.18 .)
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_TAG
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/pgsql:10
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.0.54
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.2.18
only:
- tags
tags:
......@@ -108,10 +108,10 @@ build:docker:stable:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:stable -f docker/Dockerfile .
- (cd docker/demo/docker-pg && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/pgsql:10 .)
- (cd docker/components/docker-burp && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.0.54 .)
- (cd docker/components/docker-burp && docker build --pull -t $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.2.18 .)
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:stable
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/pgsql:10
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.0.54
- docker push $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/burp:2.2.18
only:
- stable@ziirish/burp-ui
tags:
......@@ -134,7 +134,7 @@ deploy:demo:
script:
- find docker/demo/ -name "install" -o -name "init" | xargs sed -i "s/@build@/$CI_COMMIT_SHA/"
- cd docker/demo/ && find . -maxdepth 1 -type d -a ! -name dist -exec cp -r ../../dist "{}/" \; -exec cp -r ../../meta "{}/" \; && cd ../..
- find docker/demo/ -name "Dockerfile" | xargs sed -i "s,^.*@ARTIFACTS@.*$,COPY dist/*.tar.gz /tmp/burpui.dev.tar.gz,;s,^.*@BUIAGENT_ARTIFACTS@.*$,COPY meta/burp-ui-agent*.tar.gz /tmp/burp-ui-agent.dev.tar.gz,"
- find docker/demo/ -name "Dockerfile" | xargs sed -i "s,^.*@ARTIFACTS@.*$,COPY dist/*.tar.gz /tmp/burpui.dev.tar.gz,;s,^.*@BUIAGENT_ARTIFACTS@.*$,COPY meta/burp-ui-agent*.tar.gz /tmp/burp-ui-agent.dev.tar.gz,;s,^.*@BUIMONITOR_ARTIFACTS@.*$,COPY meta/burp-ui-monitor*.tar.gz /tmp/burp-ui-monitor.dev.tar.gz,"
- test -d /srv/demo/docker && rm -rf /srv/demo/docker
- cp -r docker/demo/ /srv/demo/docker
- cd /srv/demo/docker/
......
......@@ -119,9 +119,6 @@ def agent(options=None):
import trio
from burpui.engines.agent import BUIAgent as Agent
from burpui.utils import lookup_file
from burpui._compat import patch_json
patch_json()
if not options:
options, _ = parse_args(mode=False, name='bui-agent')
......@@ -141,9 +138,6 @@ def monitor(options=None):
import trio
from burpui.engines.monitor import MonitorPool
from burpui.utils import lookup_file
from burpui._compat import patch_json
patch_json()
if not options:
options, _ = parse_args(mode=False, name='bui-agent')
......
......@@ -67,10 +67,6 @@ def create_app(conf=None, verbose=0, logfile=None, **kwargs):
celery_worker = kwargs.get('celery_worker', False)
websocket_server = kwargs.get('websocket_server', False)
if not unittest: # pragma: no cover
from ._compat import patch_json
patch_json()
# We initialize the core
app = BurpUI()
......
FROM debian:jessie
FROM debian:buster
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor logrotate locales wget curl uthash-dev g++ make libssl-dev librsync-dev python2.7-dev git python-virtualenv python-pip cron libffi-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor logrotate locales wget curl uthash-dev g++ make libssl-dev librsync-dev python3-dev git python3-virtualenv python3-pip cron libffi-dev \
&& update-locale LANG=C.UTF-8 LC_MESSAGES=POSIX \
&& locale-gen en_US.UTF-8 \
&& dpkg-reconfigure -f noninteractive locales \
......
......@@ -4,7 +4,7 @@ set -e
SETUP_DIR="/app/setup"
CONFIG_DIR="${SETUP_DIR}/config"
BURP="https://git.ziirish.me/ziirish/burp.git"
BURP="https://github.com/grke/burp.git"
BURP_VERSION="1.4.40"
BURPUI="/tmp/burp-ui-agent.dev.tar.gz"
......@@ -16,22 +16,11 @@ git checkout tags/$BURP_VERSION
make -j4
make install
apt-get remove -y python-cffi
apt-get update
apt-get install -y libssl-dev
cd
# Install burp-ui
# FIXME: pip 10 is kind of broken
#pip install --upgrade pip
pip install --upgrade setuptools
pip install gevent
pip install --upgrade $BURPUI
pip install ujson
# seems required for an unknown reason
pip install ipaddress
pip install enum34
# Create burp-ui User
useradd -m -s /bin/bash -d /var/lib/burpui -c 'Burp-UI daemon user' -u 5337 burpui
......@@ -107,7 +96,7 @@ EOF
cat ${CONFIG_DIR}/burp/burp.conf >/tmp/burp.conf
chown burpui: /tmp/burp.conf
sed -i "s/^max_status_children.*$/max_status_children = 10000/" /etc/burp/burp-server.conf
sed -i "s/^max_status_children.*$/max_status_children = 15/" /etc/burp/burp-server.conf
echo "restore_client = agent" >>/etc/burp/burp-server.conf
cp ${CONFIG_DIR}/burp-ui/buiagent.cfg /etc/burp/buiagent.cfg
......
FROM debian:stretch
FROM debian:buster
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor logrotate locales wget curl uthash-dev g++ make libssl-dev librsync-dev python2.7-dev git python-virtualenv python-pip cron libffi-dev autoconf automake libtool libz-dev libyajl-dev gnupg \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor logrotate locales wget curl uthash-dev g++ make libssl-dev librsync-dev python3-dev git python3-virtualenv python3-pip cron libffi-dev autoconf automake libtool libz-dev libyajl-dev gnupg \
&& update-locale LANG=C.UTF-8 LC_MESSAGES=POSIX \
&& locale-gen en_US.UTF-8 \
&& dpkg-reconfigure -f noninteractive locales \
......@@ -12,6 +12,7 @@ RUN apt-get update \
ADD assets/setup/ /app/setup/
ADD assets/config/ /app/setup/config/
# @BUIAGENT_ARTIFACTS@
# @BUIMONITOR_ARTIFACTS@
ADD assets/init /app/init
RUN chmod 755 /app/init
......
......@@ -10,13 +10,54 @@ ssl = false
sslcert = /etc/burp/ssl_cert-server.pem
# ssl key
sslkey = /etc/burp/ssl_cert-server.key
# burp server version (currently only burp 1.x is implemented)
version = 2
# burp backend to load either 'burp1', 'burp2' or 'parallel'.
# You can also use whatever custom backend you like if it is located in the
# 'plugins' directory and if it implements the right interface.
backend = parallel
# agent password
password = azerty
[Security]
## This section contains some security options. Make sure you understand the
## security implications before changing these.
# list of 'root' paths allowed when sourcing files in the configuration.
# Set this to 'none' if you don't want any restrictions, keeping in mind this
# can lead to accessing sensible files. Defaults to '/etc/burp'.
# Note: you can have several paths separated by comas.
# Example: /etc/burp,/etc/burp.d
includes = /tmp/burp
# if files already included in config do not respect the above restriction, we
# prune them
enforce = true
# enable certificates revocation
revoke = true
[Experimental]
## This section contains some experimental features that have not been deeply
## tested yet
# enable zip64 feature. Python doc says:
# « ZIP64 extensions are disabled by default because the default zip and unzip
# commands on Unix (the InfoZIP utilities) don’t support these extensions. »
zip64 = true
[Burp]
tmpdir = /tmp/bui/
timeout = 30
bconfcli = /tmp/burp.conf
stripbin = /usr/bin/vss_strip
# parallel backend specific options
[Parallel]
# address of the monitor pool
host = 127.0.0.1
# port of the monitor pool
port = 11111
# how many time to wait for the monitor pool to answer (in seconds)
timeout = 15
# monitor pool password
password = password123456
# enable SSL
ssl = false
# number of operations to process concurrently
# the value should not exceed the pool size you set in the bui-monitor.cfg file
concurrency = 2
# Burp-UI monitor configuration file
[Global]
# On which port is the application listening
port = 11111
# On which address is the application listening
# '::1' is the default for local IPv6
# set it to '127.0.0.1' if you want to listen on local IPv4 address
bind = 127.0.0.1
# Pool size: number of 'burp -a m' process to load
pool = 5
# enable SSL
ssl = false
# ssl cert
sslcert = /var/lib/burp/ssl/server/ssl_cert-server.pem
# ssl key
sslkey = /var/lib/burp/ssl/server/ssl_cert-server.key
# monitor password
password = password123456
# burp backend specific options
[Burp]
# burp binary
burpbin = /usr/sbin/burp
# burp client configuration file used for the restoration
bconfcli = /tmp/burp.conf
# how many time to wait for the monitor to answer (in seconds)
timeout = 30
tmpdir = /tmp/bui/
stripbin = /usr/bin/vss_strip
[Experimental]
## This section contains some experimental features that have not been deeply
## tested yet
# enable zip64 feature. Python doc says:
# « ZIP64 extensions are disabled by default because the default zip and unzip
# commands on Unix (the InfoZIP utilities) don’t support these extensions. »
zip64 = true
......@@ -15,6 +15,9 @@ appStart () {
echo "Starting burp..."
supervisorctl start burp >/dev/null
echo "Starting bui-monitor..."
supervisorctl start buimonitor >/dev/null
echo "Starting bui-agent..."
supervisorctl start buiagent >/dev/null
......@@ -25,7 +28,9 @@ appStart () {
appStop() {
echo ""
echo "Stopping bui-agent..."
supervisorctl stop bui-agent >/dev/null
supervisorctl stop buiagent >/dev/null
echo "Stopping bui-monitor..."
supervisorctl stop buimonitor >/dev/null
echo "Stopping burp..."
supervisorctl stop burp >/dev/null
echo "Stopping crond..."
......
......@@ -5,23 +5,19 @@ set -e
SETUP_DIR="/app/setup"
CONFIG_DIR="${SETUP_DIR}/config"
BURPUI="/tmp/burp-ui-agent.dev.tar.gz"
BURPUIMON="/tmp/burp-ui-monitor.dev.tar.gz"
echo "deb http://ziirish.info/repos/debian/stretch zi-stable main" >/etc/apt/sources.list.d/ziirish.list
echo "deb http://ziirish.info/repos/debian/buster zi-stable main" >/etc/apt/sources.list.d/ziirish.list
wget https://ziirish.info/repos/debian.gpg -O- | apt-key add -
apt-get remove -y python-cffi
apt-get update
apt-get install -y burp-server burp-client libssl-dev
apt-get install -y burp-server burp-client
cd
# Install burp-ui
# FIXME: pip 10 is kind of broken
#pip install --upgrade pip
pip install --upgrade setuptools
pip install gevent
pip install --upgrade $BURPUI
pip install ujson
pip install --upgrade $BURPUIMON
# Create burp-ui User
useradd -m -s /bin/bash -d /var/lib/burpui -c 'Burp-UI daemon user' -u 5337 burpui
......@@ -81,6 +77,19 @@ stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
EOF
# configure supervisord to start bui-monitor
cat > /etc/supervisor/conf.d/buimonitor.conf <<EOF
[program:buimonitor]
priority=20
directory=/tmp
command=/usr/local/bin/bui-monitor -v
user=burpui
autostart=false
autorestart=true
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
EOF
# configure supervisord to start burp
cat > /etc/supervisor/conf.d/burp.conf <<EOF
[program:burp]
......@@ -99,11 +108,12 @@ chown burpui: /tmp/burp.conf
cat ${CONFIG_DIR}/burp/CA.cnf >/etc/burp/CA.cnf
sed -i "s/^max_status_children.*$/max_status_children = 10000/" /etc/burp/burp-server.conf
sed -i "s/^max_status_children.*$/max_status_children = 15/" /etc/burp/burp-server.conf
echo "restore_client = agent" >>/etc/burp/burp-server.conf
echo "monitor_browse_cache = 1" >>/etc/burp/burp-server.conf
cp ${CONFIG_DIR}/burp-ui/buiagent.cfg /etc/burp/buiagent.cfg
cp ${CONFIG_DIR}/burp-ui/buimonitor.cfg /etc/burp/buimonitor.cfg
rm -rf /etc/burp/clientconfdir
cp -r ${CONFIG_DIR}/burp/clientconfdir/ /etc/burp/
......
......@@ -2,24 +2,16 @@
# @version@ - 0.3.0.dev
# @release@ - devel
[Global]
# On which port is the application listening
port = 5000
# On which address is the application listening
# '::' is the default for all IPv6
# set it to '0.0.0.0' if you want to listen on all IPv4 addresses
bind = ::
# enable SSL
ssl = false
# ssl cert
sslcert = /etc/burp/ssl_cert-server.pem
# ssl key
sslkey = /etc/burp/ssl_cert-server.key
# burp server version 1 or 2
version = 1
# Handle multiple bui-servers or not
# If set to 'false', you will need to declare at least one 'Agent' section (see
# bellow)
standalone = false
# burp backend to load either one of 'burp1', 'burp2', 'parallel' or 'multi'.
# If you choose 'multi', you will have to declare at lease one 'Agent' section.
# If you choose 'parallel', you need to configure the [Parallel] section.
# If you choose either 'burp1' or 'burp2', you need to configure the [Burp]
# section.
# The [Burp] section is also used with the 'parallel' backend for the restoration
# process.
# You can also use whatever custom backend you like if it is located in the
# 'plugins' directory and if it implements the right interface.
backend = multi
# authentication plugin (mandatory)
# list the misc/auth directory to see the available backends
# to disable authentication you can set "auth: none"
......@@ -123,7 +115,7 @@ appsecret = @RANDOM@
# enable zip64 feature. Python doc says:
# « ZIP64 extensions are disabled by default because the default zip and unzip
# commands on Unix (the InfoZIP utilities) don’t support these extensions. »
zip64 = false
zip64 = true
# disable server initiated restoration if `bconfcli` file contains
# `server_can_restore = 0`
noserverrestore = true
......
......@@ -122,10 +122,8 @@ Each option is commented, but here is a more detailed documentation:
As with `Burp-UI`_, you need the ``[Burp]`` section to specify `Burp`_ client
options. There are fewer options because we only launch client processes.
.. warning:: Please note there seem to be an issue Burp side when you request
concurrently too much status monitor processes. I'll tend to say
the pool size should not exeed the number of CPU cores available
on your machine.
.. warning:: Please note there was a bug in burp versions prior 2.2.12 that is
easily triggered by this new asynchronous workload.
Benchmark
---------
......
include README
include share/burpui/etc/buimonitor.sample.cfg
global-exclude *.pyc
global-exclude __pycache__
graft burpui_monitor
Burp-UI Meta package for monitor requirements
# -*- coding: utf8 -*-
"""
Burp-UI is a web-ui for burp backup written in python with Flask and
jQuery/Bootstrap
.. module:: burpui_monitor
:platform: Unix
:synopsis: Burp-UI monitor module.
.. moduleauthor:: Ziirish <hi+burpui@ziirish.me>
"""
__title__ = 'burp-ui-monitor'
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Burp-UI is a web-ui for burp backup written in python with Flask and
jQuery/Bootstrap
.. module:: burpui.__main__
:platform: Unix
:synopsis: Burp-UI main module.
.. moduleauthor:: Ziirish <hi+burpui@ziirish.me>
"""
import os
import sys
import logging
from argparse import ArgumentParser
ROOT = os.path.dirname(os.path.realpath(__file__))
# Try to load modules from our current env first
sys.path.insert(0, os.path.join(ROOT, '..'))
from burpui_monitor.tools.logging import logger
logger.init_logger(config=dict(level=logging.CRITICAL))
def parse_args(name=None):
mname = name
if not name:
mname = 'bui-monitor'
parser = ArgumentParser(prog=mname)
parser.add_argument('-v', '--verbose', dest='log', help='increase output verbosity (e.g., -vv is more verbose than -v)', action='count')
parser.add_argument('-V', '--version', dest='version', help='print version and exit', action='store_true')
parser.add_argument('-c', '--config', dest='config', help='burp-ui configuration file', metavar='<CONFIG>')
parser.add_argument('-l', '--logfile', dest='logfile', help='output logs in defined file', metavar='<FILE>')
options = parser.parse_args()
if options.version:
from burpui_monitor import __title__
from burpui_monitor.desc import __version__, __release__
ver = '{}: v{}'.format(mname or __title__, __version__)
if options.log:
ver = '{} ({})'.format(ver, __release__)
print(ver)
sys.exit(0)
return options
def main():
"""
Main function
"""
options = parse_args()
monitor(options)
def monitor(options=None):
import trio
from burpui_monitor.engines.monitor import MonitorPool
from burpui_monitor.utils import lookup_file
if not options:
options = parse_args(name='bui-monitor')
conf = ['buimonitor.cfg', 'buimonitor.sample.cfg']
if options.config:
conf = lookup_file(options.config, guess=False)
else:
conf = lookup_file(conf)
check_config(conf)
monitor = MonitorPool(conf, options.log, options.logfile)
trio.run(monitor.run)
def check_config(conf):
if not conf:
raise IOError('No configuration file found')
if not os.path.isfile(conf):
raise IOError('File does not exist: \'{0}\''.format(conf))
if __name__ == '__main__':
main()
../../../burpui/_compat.py
\ No newline at end of file
../../../burpui/_json.py
\ No newline at end of file
../../../burpui/config.py
\ No newline at end of file
../../../burpui/datastructures.py
\ No newline at end of file
../../../burpui/decorators.py
\ No newline at end of file
../../../burpui/desc.py
\ No newline at end of file
../../../../burpui/engines/monitor.py
\ No newline at end of file
../../../burpui/exceptions.py
\ No newline at end of file
../../../../burpui/misc/backend
\ No newline at end of file
../../../../burpui/misc/parser
\ No newline at end of file
../../../burpui/security.py
\ No newline at end of file
../../../../burpui/tools/logging.py
\ No newline at end of file
../../../burpui/utils.py
\ No newline at end of file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
import shutil
import subprocess
from setuptools import setup, find_packages
# only used to build the package
ROOT = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..')
if 'sdist' in sys.argv or 'bdist' in sys.argv:
if not os.path.exists('burpui_monitor'):
os.makedirs('burpui_monitor', mode=0o0755)
if os.path.exists(os.path.join(ROOT, 'burpui', 'VERSION')):
shutil.copyfile(os.path.join(ROOT, 'burpui', 'VERSION'), 'burpui_monitor/VERSION')
rev = 'stable'
ci = os.getenv('CI')
commit = os.getenv('CI_COMMIT_SHA')
if not ci and os.path.exists(os.path.join(ROOT, '.git/HEAD')):
try:
branch = subprocess.check_output('sed s@^.*/@@g {}/.git/HEAD'.format(ROOT).split()).rstrip()
ver = open(os.path.join('burpui_monitor', 'VERSION')).read().rstrip()
if branch and 'dev' in ver:
rev = branch
try:
with open('burpui_monitor/RELEASE', 'wb') as f:
f.write(rev)
except:
pass
except:
pass
elif ci:
try:
ver = open(os.path.join('burpui_monitor', 'VERSION')).read().rstrip()
if 'dev' in ver:
rev = commit
try:
with open('burpui_monitor/RELEASE', 'wb') as f:
f.write(rev)
except:
pass
except:
pass
find = subprocess.Popen(r'find burpui_monitor-decoy -type l', shell=True, stdout=subprocess.PIPE)
(out, _) = find.communicate()
for decoy in out.splitlines():
real = os.path.normpath(os.path.join(os.path.dirname(decoy), os.readlink(decoy))).decode('utf-8')
# print '{} -> {}'.format(decoy, real)
target = os.path.join('burpui_monitor', re.sub(r'.*/burpui/', '', real))
dirname = os.path.dirname(target)
if not os.path.isdir(dirname):
# print 'mkdir {}'.format(dirname)
os.makedirs(dirname, mode=0o0755)
# print 'cp -r {} {}'.format(real, target)
if os.path.isdir(real):
if os.path.exists(target):
shutil.rmtree(target)
shutil.copytree(real, target)
else:
shutil.copy(real, target)
files = subprocess.Popen(r'find burpui_monitor-decoy -type f', shell=True, stdout=subprocess.PIPE)
(out, _) = files.communicate()
for src in out.splitlines():
src = src.decode('utf-8')
dst = src.replace('burpui_monitor-decoy', 'burpui_monitor')
dirname = os.path.dirname(dst)
if not os.path.isdir(dirname):
# print 'mkdir {}'.format(dirname)
os.makedirs(dirname, mode=0o0755)
shutil.copy(src, dst)
readme = """
Burp-UI Meta package for monitor requirements
"""
from burpui_monitor import __title__
from burpui_monitor.desc import __author__, __author_email__, __description__, \
__url__, __version__, __license__
name = __title__
author = __author__
author_email = __author_email__
description = __description__
url = __url__
version = __version__
license = __license__
datadir = os.path.join('share', 'burpui')
confdir = os.path.join(datadir, 'etc')
setup(
name=name,
packages=find_packages(exclude=['burpui_monitor-decoy', 'burpui_monitor-decoy.*']),
version=version,
description=description,
long_description=readme,
license=license,
author=author,
author_email=author_email,
url=url,
include_package_data=True,
keywords='burp web ui backup monitoring',
entry_points={
'console_scripts': [
'bui-monitor=burpui_monitor.__main__:monitor',
],
},
data_files=[
(confdir, [os.path.join(confdir, 'buimonitor.sample.cfg')]),
],
install_requires=[
'trio==0.11.0',
'arrow==0.13.1',
'tzlocal==1.5.1',
'pyOpenSSL>=19.0.0',
'configobj==5.0.6',
],
classifiers=[
'Intended Audience :: System Administrators',
'Natural Language :: English',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Topic :: System :: Archiving :: Backup',
'Topic :: System :: Monitoring',
]
)
../../share
\ No newline at end of file
......@@ -304,7 +304,6 @@ setup(
install_requires=requires,
extras_require={
'ldap_authentication': ['ldap3'],
'extra': ['ujson'],
'gunicorn': ['gevent', 'gunicorn'],
'gunicorn-extra': ['redis', 'Flask-Session==0.3.1'],
'ci': test_requires,
......
......@@ -10,10 +10,6 @@
# You can also use whatever custom backend you like if it is located in the
# 'plugins' directory and if it implements the right interface.
backend = burp2
# handle multiple bui-servers or not
# If set to 'false', you will need to declare at least one 'Agent' section (see
# bellow)
single = true
# authentication plugin (mandatory)
# list the misc/auth directory to see the available backends
# to disable authentication you can set "auth = none"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment