Skip to content

Commit

Permalink
setup pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ziirish committed May 12, 2021
1 parent 43253d8 commit 4f0bf4c
Show file tree
Hide file tree
Showing 50 changed files with 140 additions and 131 deletions.
17 changes: 14 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ stages:
- build
- deploy

test:format:
stage: test
image: python:3.8
script:
- black --check .
tags:
- lint
except:
- tags
- rc
- demo

test:lint:3.6:
stage: test
image: python:3.6
Expand All @@ -45,7 +57,7 @@ test:lint:3.7:

test:lint:3.8:
stage: test
image: python:3.8-rc
image: python:3.8
script:
- pip install tox
- tox -e pep8
Expand Down Expand Up @@ -88,10 +100,9 @@ test:py:3.7:
reports:
junit: .reports/burpui.junit.xml

# This test is temporarily disabled because werkzeug doesn't run yet on 3.8
test:py:3.8:
stage: test
image: python:3.8-rc
image: python:3.8
script:
- pip install tox
- mkdir .reports
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Current
- **BREAKING**: the authentication backends section have been renamed with the ``:AUTH`` suffix
- **BREAKING**: the ``prefix`` option has been moved from the ``[Global]`` configuration section to the ``[Production]`` one
- Add: new `audit logging <https://git.ziirish.me/ziirish/burp-ui/issues/260>`_ system
- Add: new ``bui-monitor`` processes pool + ``async`` backend to parallelize some requests `#278 <https://git.ziirish.me/ziirish/burp-ui/issues/278>`_
- Add: new `listen` and `listen_status` options in burp-2.2.10 `#279 <https://git.ziirish.me/ziirish/burp-ui/issues/279>`_
- Add: new ``bui-monitor`` processes pool + ``async`` backend to parallelize some requests `#278 <https://git.ziirish.me/ziirish/burp-ui/issues/278>`_
- Add: new `listen` and `listen_status` options in burp-2.2.10 `#279 <https://git.ziirish.me/ziirish/burp-ui/issues/279>`_
- Add: new `order` keyword in ACL definitions in order to decide whether `rw` should be evaluated first or not `#305 <https://git.ziirish.me/ziirish/burp-ui/issues/305>`__
- Add: new `exclude` keyword in ACL definitions in order to exclude some clients from the rules `#305 <https://git.ziirish.me/ziirish/burp-ui/issues/305>`__
- Add: new *static templates* that allow you to create *onetime* (variables) templates `#280 <https://git.ziirish.me/ziirish/burp-ui/issues/280>`_
Expand Down
4 changes: 2 additions & 2 deletions burpui/static/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ width:100%;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
width:100%;
width:100%;
}

.tt-suggestion {
Expand Down Expand Up @@ -219,7 +219,7 @@ svg text {
color: #697075;
}

@keyframes blink {
@keyframes blink {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
Expand Down
2 changes: 1 addition & 1 deletion burpui/static/extra/i18n/datatable-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"sSortAscending": ": Activar para ordenar la columna de manera ascendente",
"sSortDescending": ": Activar para ordenar la columna de manera descendente"
}
}
}
2 changes: 1 addition & 1 deletion burpui/static/extra/i18n/datatable-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"sSortAscending": ": attiva per ordinare la colonna in ordine crescente",
"sSortDescending": ": attiva per ordinare la colonna in ordine decrescente"
}
}
}
2 changes: 1 addition & 1 deletion burpui/templates/js/admin/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ var _sessions_table = $('#table-sessions').DataTable( {
return '<span data-toggle="tooltip" title="'+data+'">'+moment(data, moment.ISO_8601).tz(TIMEZONE).subtract(3, 'seconds').fromNow()+'</span>';
}
},
{
{
data: 'ua',
render: function( data, type, row ) {
if (type === 'filter' || type === 'sort') {
Expand Down
4 changes: 2 additions & 2 deletions burpui/templates/js/client-browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $( document ).ready(function() {
path: '{{ url_for("api.client_tree", name=cname, backup=nbackup, server=server) }}',
},
},
source: function() {
source: function() {
{% if edit and edit.found -%}
url = '{{ url_for("api.client_tree", name=cname, backup=nbackup, server=server, root=edit.roots, recursive=True, selected=True) }}';
{% else -%}
Expand Down Expand Up @@ -230,7 +230,7 @@ $( document ).ready(function() {

$("#form-restore").on('submit', function(e) {
var $preparingFileModal = $("#restore-modal");

$preparingFileModal.modal('toggle');

{% if config.WITH_CELERY -%}
Expand Down
2 changes: 1 addition & 1 deletion burpui/templates/js/client-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var _client = function() {
var html = table.node().outerHTML;
if (d.footer !== undefined)
html += "<div class='footer'>" + d.footer + "</div>";
return html;
return html;
});

_chart_stats.bars.forceY([0]);
Expand Down
2 changes: 1 addition & 1 deletion burpui/templates/js/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ var _sessions_table = $('#table-sessions').DataTable( {
return '<span data-toggle="tooltip" title="'+data+'">'+moment(data, moment.ISO_8601).tz(TIMEZONE).subtract(3, 'seconds').fromNow()+'</span>';
}
},
{
{
data: 'ua',
render: function( data, type, row ) {
if (type === 'filter' || type === 'sort') {
Expand Down
6 changes: 3 additions & 3 deletions burpui/templates/servers.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
{% include "notifications.html" %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
{% include "small_topbar.html" %}
<ul class="breadcrumb" style="margin-bottom: 5px;">
<li class="active">{{ _('Home') }}</li>
</ul>
<ul class="breadcrumb" style="margin-bottom: 5px;">
<li class="active">{{ _('Home') }}</li>
</ul>
<br />
<h1 class="page-header">{{ _('Servers') }}</h1>

Expand Down
1 change: 0 additions & 1 deletion burpui/translations/es/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2782,4 +2782,3 @@ msgstr ""
#~ " <em>moderator</em> o con <em> demo "
#~ "</em> / <em> demo </em>. \n"
#~ " "

1 change: 0 additions & 1 deletion burpui/translations/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2428,4 +2428,3 @@ msgstr "Mise à jour"

#~ msgid "Backends list"
#~ msgstr "Liste des Backends"

1 change: 0 additions & 1 deletion burpui/translations/it/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -2709,4 +2709,3 @@ msgstr ""
#~ " / <em>moderator</em> sia come "
#~ "<em>demo</em> / <em>demo</em>.\n"
#~ " "

6 changes: 3 additions & 3 deletions docker/components/docker-burp/assets/config/burp-server.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is an example config file for the burp server.
mode = server

mode = server

# The default addresses to listen on depend upon compile time options.
# They may be overridden here.
# The port and address options have been removed in 2.2.10
Expand Down
1 change: 0 additions & 1 deletion docker/demo/docker-burp1/assets/config/burp/CA.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ basicConstraints = CA:FALSE

[ policy_anything ]
commonName = supplied

3 changes: 1 addition & 2 deletions docker/demo/docker-burp1/assets/config/burp/burp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ssl_cert = /tmp/burp/ssl_cert-client.pem
ssl_key = /tmp/burp/ssl_cert-client.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# SSL key password
ssl_key_password = password
Expand Down Expand Up @@ -105,4 +105,3 @@ exclude_comp=bz2
exclude_comp=gz

#encryption_password = My^$pAsswIrD%@

4 changes: 2 additions & 2 deletions docker/demo/docker-burp1/assets/patch/burp-libssl1.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ index 4d48597c..63cb6ebf 100644
@@ -279,18 +279,22 @@ EVP_CIPHER_CTX *enc_setup(int encrypt, const char *encryption_password)
// compilation warnings on Macs.
unsigned char enc_iv[]={'[', 'l', 'k', 'd', '.', '$', 'G', 0xa3, '\0'};

- if(!(ctx=(EVP_CIPHER_CTX *)malloc(sizeof(EVP_CIPHER_CTX))))
+ if(!(ctx=(EVP_CIPHER_CTX *)EVP_CIPHER_CTX_new()))
{
Expand Down Expand Up @@ -50,5 +50,5 @@ index 4d48597c..63cb6ebf 100644
+ EVP_CIPHER_CTX_free(enc_ctx);
+ enc_ctx=NULL;
}

if(!ret)
1 change: 0 additions & 1 deletion docker/demo/docker-burp2/assets/config/burp/CA.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ basicConstraints = CA:FALSE

[ policy_anything ]
commonName = supplied

3 changes: 1 addition & 2 deletions docker/demo/docker-burp2/assets/config/burp/burp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ssl_cert = /tmp/burp2/ssl_cert-client.pem
ssl_key = /tmp/burp2/ssl_cert-client.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# Client SSL compression. Default is zlib5. Set to zlib0 to turn it off.
#ssl_compression = zlib5
Expand Down Expand Up @@ -122,4 +122,3 @@ exclude_comp=gz
# When enabled, this causes problems in the phase1 scan (such as an 'include'
# being missing) to be treated as fatal errors. The default is 0.
#scan_problem_raises_error=1

2 changes: 1 addition & 1 deletion docker/demo/docker-burpui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM registry.ziirish.me/ziirish/burp-ui:demo

ADD assets/config/ /app/setup/config/
ADD assets/init /app/init
ADD assets/init /app/init

RUN chmod 755 /app/init

Expand Down
6 changes: 3 additions & 3 deletions docker/demo/docker-burpui/assets/config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pid /tmp/nginx.pid;
daemon off;

events {
worker_connections 1024;
worker_connections 1024;
use epoll;
}

Expand All @@ -14,7 +14,7 @@ http {

access_log off;
error_log off;

sendfile on;
keepalive_timeout 15;
keepalive_disable msie6;
Expand All @@ -25,7 +25,7 @@ http {

client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy 1 2;

gzip on;
gzip_comp_level 5;
gzip_min_length 512;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
upstream socketio_nodes {
ip_hash;

2 changes: 1 addition & 1 deletion docker/demo/docker-cli1/assets/config/burp/demo1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ssl_cert = /etc/burp/ssl_cert-demo1.pem
ssl_key = /etc/burp/ssl_cert-demo1.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# SSL key password
ssl_key_password = password
Expand Down
2 changes: 1 addition & 1 deletion docker/demo/docker-cli1/assets/config/burp/demo2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ssl_cert = /etc/burp/ssl_cert-demo2.pem
ssl_key = /etc/burp/ssl_cert-demo2.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# SSL key password
ssl_key_password = password
Expand Down
2 changes: 1 addition & 1 deletion docker/demo/docker-cli2/assets/config/burp/demo3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ssl_cert = /etc/burp/ssl_cert-demo3.pem
ssl_key = /etc/burp/ssl_cert-demo3.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# Client SSL compression. Default is zlib5. Set to zlib0 to turn it off.
#ssl_compression = zlib5
Expand Down
2 changes: 1 addition & 1 deletion docker/demo/docker-cli2/assets/config/burp/demo4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ssl_cert = /etc/burp/ssl_cert-demo4.pem
ssl_key = /etc/burp/ssl_cert-demo4.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# Client SSL compression. Default is zlib5. Set to zlib0 to turn it off.
#ssl_compression = zlib5
Expand Down
1 change: 0 additions & 1 deletion docker/docker-alpine/assets/config/burp/burp-server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,3 @@ restore_client = agent
# Whether or not the server process should cache the tree when a monitor client
# is browsing a backup. Advantage: speed. Disadvantage: more memory is used.
monitor_browse_cache = 1

3 changes: 1 addition & 2 deletions docker/docker-alpine/assets/config/burp/burp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ssl_cert = /etc/burp/ssl_cert-client.pem
ssl_key = /etc/burp/ssl_cert-client.key

# Client SSL ciphers
#ssl_ciphers =
#ssl_ciphers =

# Client SSL compression. Default is zlib5. Set to zlib0 to turn it off.
#ssl_compression = zlib5
Expand Down Expand Up @@ -122,4 +122,3 @@ exclude_comp=gz
# When enabled, this causes problems in the phase1 scan (such as an 'include'
# being missing) to be treated as fatal errors. The default is 0.
#scan_problem_raises_error=1

6 changes: 3 additions & 3 deletions docker/docker-alpine/assets/config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pid /tmp/nginx.pid;
daemon off;

events {
worker_connections 1024;
worker_connections 1024;
use epoll;
}

Expand All @@ -14,7 +14,7 @@ http {

access_log off;
error_log off;

sendfile on;
keepalive_timeout 15;
keepalive_disable msie6;
Expand All @@ -25,7 +25,7 @@ http {

client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy 1 2;

gzip on;
gzip_comp_level 5;
gzip_min_length 512;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
upstream socketio_nodes {
ip_hash;

Loading

0 comments on commit 4f0bf4c

Please sign in to comment.