Commit d19f6460 authored by Benjamin "Ziirish" SANS's avatar Benjamin "Ziirish" SANS

Merge branch 'release' into 'master'

Release

release v0.4.0

See merge request !46
parents 3c1b546a 62ac64aa
Pipeline #863 passed with stage
in 4 minutes and 14 seconds
......@@ -11,6 +11,17 @@ Changelog
- Add: new `docker image <https://git.ziirish.me/ziirish/burp-ui/merge_requests/40#note_1763>`_
- Add: manage `user sessions <https://git.ziirish.me/ziirish/burp-ui/merge_requests/6>`_
- Add: `French translation <https://git.ziirish.me/ziirish/burp-ui/merge_requests/4>`_
- Fix: issue `#151 <https://git.ziirish.me/ziirish/burp-ui/issues/151>`_
- Fix: issue `#154 <https://git.ziirish.me/ziirish/burp-ui/issues/154>`_
- Fix: issue `#158 <https://git.ziirish.me/ziirish/burp-ui/issues/158>`_
- Fix: issue `#163 <https://git.ziirish.me/ziirish/burp-ui/issues/163>`_
- Fix: issue `#164 <https://git.ziirish.me/ziirish/burp-ui/issues/164>`_
- Fix: issue `#166 <https://git.ziirish.me/ziirish/burp-ui/issues/166>`_
- Fix: issue `#169 <https://git.ziirish.me/ziirish/burp-ui/issues/169>`_
- Fix: issue `#171 <https://git.ziirish.me/ziirish/burp-ui/issues/171>`_
- Fix: issue `#172 <https://git.ziirish.me/ziirish/burp-ui/issues/172>`_
- Fix: issue `#173 <https://git.ziirish.me/ziirish/burp-ui/issues/173>`_
- Fix: issue `#174 <https://git.ziirish.me/ziirish/burp-ui/issues/174>`_
- Various bugfix
- `Full changelog <https://git.ziirish.me/ziirish/burp-ui/compare/v0.3.0...v0.4.0>`__
......
......@@ -286,16 +286,6 @@ def setup_burp(bconfcli, bconfsrv, client, host, redis, database, dry):
getattr(app.client, 'burpconfsrv')
dest_bconfcli = bconfcli
if not os.path.exists(bconfsrv):
click.echo(
click.style(
'Unable to locate burp-server configuration, aborting!',
fg='red'
),
err=True
)
sys.exit(1)
if not os.path.exists(bconfcli):
clitpl = """
mode = client
......@@ -367,7 +357,9 @@ exclude_comp=gz
pass
if dest_bconfcli != bconfcli:
# the file did not exist
os.unlink(dest_bconfcli)
before = []
diff = difflib.unified_diff(before, after, fromfile=bconfcli, tofile='{}.new'.format(bconfcli))
out = ''
......@@ -375,6 +367,16 @@ exclude_comp=gz
out += _color_diff(line)
click.echo_via_pager(out)
if not os.path.exists(bconfsrv):
click.echo(
click.style(
'Unable to locate burp-server configuration, aborting!',
fg='red'
),
err=True
)
sys.exit(1)
confsrv = Config()
data, path, _ = parser._readfile(bconfsrv, insecure=True)
parsed = parser._parse_lines(data, path, 'srv')
......@@ -409,6 +411,19 @@ exclude_comp=gz
confsrv['monitor_browse_cache'] = True
ca_client_dir = confsrv.get('ca_csr_dir')
if ca_client_dir and not os.path.exists(ca_client_dir):
try:
os.makedirs(ca_client_dir)
except IOError as exp:
click.echo(
click.style(
'Unable to create "{}" dir: {}'.format(ca_client_dir, exp),
fg='yellow'
),
err=True
)
if confsrv.dirty:
if dry:
(_, dstfile) = tempfile.mkstemp()
......
......@@ -180,8 +180,9 @@ class OSSLConf(object):
"""Read the file if possible"""
ret = []
try:
with codecs.open(self.conffile, 'r', 'utf-8', errors='ignore') as fil:
ret = [x.rstrip('\n') for x in fil.readlines()]
if self.conffile:
with codecs.open(self.conffile, 'r', 'utf-8', errors='ignore') as fil:
ret = [x.rstrip('\n') for x in fil.readlines()]
except IOError:
pass
return ret
......@@ -272,9 +273,11 @@ class OSSLConf(object):
"""Compute the md5sum of the configuration file to detect changes"""
hash_md5 = md5()
try:
with open(path, "rb") as bfile:
for chunk in iter(lambda: bfile.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()
if path:
with open(path, "rb") as bfile:
for chunk in iter(lambda: bfile.read(4096), b""):
hash_md5.update(chunk)
return hash_md5.hexdigest()
except IOError:
return None
pass
return None
......@@ -5,3 +5,6 @@ After=network.target
[Service]
ExecStart=/usr/local/bin/bui-agent
User=burpui
[Install]
WantedBy=multi-user.target
......@@ -5,3 +5,6 @@ After=network.target
[Service]
ExecStart=/usr/local/bin/bui-celery --beat -s /var/lib/burpui/celerybeat-schedule
User=burpui
[Install]
WantedBy=multi-user.target
......@@ -95,6 +95,8 @@ perl -i -pe "s#^.*\@DEMO\@.*\$#$REP#" /usr/local/lib/python2.7/dist-packages/bur
# setup database
su -l burpui -c "/usr/local/bin/bui-manage db upgrade"
# compile translations
su -l burpui -c "/usr/local/bin/bui-manage compile_translation"
# cleanup
rm -rf /var/lib/apt/lists/*
......@@ -73,18 +73,19 @@ class BuildStatic(Command):
log.info("getting revision number")
call('{} ./burpui -m manage compile_translation'.format(sys.executable).split())
rev = 'stable'
try:
branch = check_output('sed s@^.*/@@g .git/HEAD'.split()).rstrip()
ver = open(os.path.join('burpui', 'VERSION')).read().rstrip()
if branch and 'dev' in ver:
rev = branch
if os.path.exists('.git/HEAD'):
try:
with open('burpui/RELEASE', 'w') as f:
f.write(rev)
branch = check_output('sed s@^.*/@@g .git/HEAD'.split()).rstrip()
ver = open(os.path.join('burpui', 'VERSION')).read().rstrip()
if branch and 'dev' in ver:
rev = branch
try:
with open('burpui/RELEASE', 'w') as f:
f.write(rev)
except:
pass
except:
pass
except:
pass
# Not sure bower was a great idea...
keep = [
'burpui/static/vendor/bootswatch/slate/bootstrap.min.css',
......@@ -275,6 +276,6 @@ setup(
'install': CustomInstall,
'bdist_egg': BdistWithBuildStatic,
'egg_info': EggWithBuildStatic,
'test': PyTest,
# 'test': PyTest,
}
)
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