mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-21 06:45:24 -06:00
Merge remote-tracking branch 'origin/master' into manage-session
This commit is contained in:
commit
e5a5365a83
10 changed files with 157 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@ burpui/RELEASE
|
|||
devel.sh
|
||||
*.egg*
|
||||
.coverage
|
||||
.coveragerc
|
||||
dist
|
||||
_build
|
||||
.tags
|
||||
|
|
|
|||
22
burpui/static/extra/i18n/datatable-fr.json
Normal file
22
burpui/static/extra/i18n/datatable-fr.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"sProcessing": "Traitement en cours...",
|
||||
"sSearch": "Rechercher :",
|
||||
"sLengthMenu": "Afficher _MENU_ éléments",
|
||||
"sInfo": "Affichage de l'élément _START_ à _END_ sur _TOTAL_ éléments",
|
||||
"sInfoEmpty": "Affichage de l'élément 0 à 0 sur 0 élément",
|
||||
"sInfoFiltered": "(filtré de _MAX_ éléments au total)",
|
||||
"sInfoPostFix": "",
|
||||
"sLoadingRecords": "Chargement en cours...",
|
||||
"sZeroRecords": "Aucun élément à afficher",
|
||||
"sEmptyTable": "Aucune donnée disponible dans le tableau",
|
||||
"oPaginate": {
|
||||
"sFirst": "Premier",
|
||||
"sPrevious": "Précédent",
|
||||
"sNext": "Suivant",
|
||||
"sLast": "Dernier"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": activer pour trier la colonne par ordre croissant",
|
||||
"sSortDescending": ": activer pour trier la colonne par ordre décroissant"
|
||||
}
|
||||
}
|
||||
|
|
@ -27,8 +27,10 @@
|
|||
* ]
|
||||
* The JSON is then parsed into a table
|
||||
*/
|
||||
{% import 'macros.html' as macros %}
|
||||
|
||||
var _client_table = $('#table-client').dataTable( {
|
||||
{{ macros.translate_datatable() }}
|
||||
{% if session.pageLength -%}
|
||||
pageLength: {{ session.pageLength }},
|
||||
{% endif -%}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,10 @@ var __date = {
|
|||
* ]
|
||||
* The JSON is then parsed into a table
|
||||
*/
|
||||
{% import 'macros.html' as macros %}
|
||||
|
||||
var _clients_table = $('#table-clients').dataTable( {
|
||||
{{ macros.translate_datatable() }}
|
||||
{% if session.pageLength -%}
|
||||
pageLength: {{ session.pageLength }},
|
||||
{% endif -%}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@
|
|||
* _servers: function that retrieve up-to-date informations from the burp server
|
||||
* The JSON is then parsed into a table
|
||||
*/
|
||||
{% import 'macros.html' as macros %}
|
||||
var _servers_table = $('#table-servers').dataTable( {
|
||||
{{ macros.translate_datatable() }}
|
||||
responsive: true,
|
||||
ajax: {
|
||||
url: '{{ url_for("api.servers_stats") }}',
|
||||
|
|
|
|||
|
|
@ -437,16 +437,5 @@ app.controller('ConfigCtrl', ['$scope', '$http', '$scrollspy', function($scope,
|
|||
};
|
||||
}]);
|
||||
|
||||
// Add a smooth scrolling to anchor
|
||||
$(document).ready(function() {
|
||||
$('a[href^="#"]').click(function() {
|
||||
var target = $(this.hash);
|
||||
if (target.length == 0) target = $('a[name="' + this.hash.substr(1) + '"]');
|
||||
if (target.length == 0) target = $('html');
|
||||
$('html, body').animate({ scrollTop: target.offset().top }, 500);
|
||||
return false;
|
||||
});
|
||||
$(".dropdown-menu label, .dropdown-menu input, .dropdown-menu li").click(function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
{% import 'macros.html' as macros %}
|
||||
{{ macros.smooth_scrolling() }}
|
||||
|
|
|
|||
|
|
@ -97,3 +97,28 @@
|
|||
<button type="submit" class="{{ btn_class }}">{{ action_text }} </button>
|
||||
</form>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro smooth_scrolling() -%}
|
||||
// Add a smooth scrolling to anchor
|
||||
$(document).ready(function() {
|
||||
$('a[href^="#"]').click(function() {
|
||||
var target = $(this.hash);
|
||||
if (target.length == 0) target = $('a[name="' + this.hash.substr(1) + '"]');
|
||||
if (target.length == 0) target = $('html');
|
||||
$('html, body').animate({ scrollTop: target.offset().top }, 500);
|
||||
return false;
|
||||
});
|
||||
$(".dropdown-menu label, .dropdown-menu input, .dropdown-menu li").click(function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
{%- endmacro %}
|
||||
|
||||
{# Loads the datatable translation if needed #}
|
||||
{% macro translate_datatable() -%}
|
||||
{% if g.locale and g.locale != 'en' -%}
|
||||
language: {
|
||||
url: '{{ url_for("static", filename="extra/i18n/datatable-{}.json".format(g.locale)) }}'
|
||||
},
|
||||
{% endif -%}
|
||||
{%- endmacro %}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
Flask-Testing
|
||||
nose
|
||||
coverage
|
||||
# extensions requirements
|
||||
redis
|
||||
Flask-Session
|
||||
Celery
|
||||
redis
|
||||
Flask-SQLAlchemy
|
||||
Flask-Migrate
|
||||
|
|
|
|||
92
test/test7-4.cfg
Normal file
92
test/test7-4.cfg
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
# Burp-UI configuration file
|
||||
# @version@ - 0.3.0
|
||||
# @release@ - stable
|
||||
[Global]
|
||||
# On which port is the application listening
|
||||
port = 5001
|
||||
# On which address is the application listening
|
||||
# '::' is the default for all IPv6
|
||||
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 (currently only burp 1.x is implemented)
|
||||
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 = true
|
||||
# authentication plugin (mandatory)
|
||||
# list the misc/auth directory to see the available backends
|
||||
# to disable authentication you can set "auth: none"
|
||||
auth = basic
|
||||
# acl plugin
|
||||
# list misc/auth directory to see the available backends
|
||||
# default is no ACL
|
||||
acl = basic
|
||||
|
||||
[UI]
|
||||
# refresh interval of the pages in seconds
|
||||
refresh = 15
|
||||
|
||||
[Production]
|
||||
# storage backend for session and cache
|
||||
# may be either 'default' or 'redis'
|
||||
storage = redis
|
||||
# session database to use
|
||||
# may also be a backend url like: redis://localhost:6379/0
|
||||
# if set to 'redis', the backend url defaults to:
|
||||
# redis://<redis_host>:<redis_port>/0
|
||||
# where <redis_host> is the host part, and <redis_port> is the port part of
|
||||
# the below "redis" setting
|
||||
session = redis
|
||||
# cache database to use
|
||||
# may also be a backend url like: redis://localhost:6379/0
|
||||
# if set to 'redis', the backend url defaults to:
|
||||
# redis://<redis_host>:<redis_port>/1
|
||||
# where <redis_host> is the host part, and <redis_port> is the port part of
|
||||
# the below "redis" setting
|
||||
cache = redis
|
||||
# redis server to connect to
|
||||
redis = localhost:6379
|
||||
# whether to use celery or not
|
||||
# may also be a broker url like: redis://localhost:6379/0
|
||||
# if set to "true", the broker url defaults to:
|
||||
# redis://<redis_host>:<redis_port>/2
|
||||
# where <redis_host> is the host part, and <redis_port> is the port part of
|
||||
# the above "redis" setting
|
||||
celery = true
|
||||
# database url to store some persistent data
|
||||
# none or a connect string supported by SQLAlchemy:
|
||||
# http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
|
||||
# example: sqlite:////var/lib/burpui/store.db
|
||||
database = sqlite:////tmp/store.db
|
||||
|
||||
# burp1 backend specific options
|
||||
[Burp1]
|
||||
# burp status address (can only be '127.0.0.1' or '::1'
|
||||
#bhost = 127.0.0.1
|
||||
# burp status port
|
||||
bport = 9999
|
||||
# burp binary
|
||||
burpbin = /this file-should-not-exist
|
||||
# vss_strip binary
|
||||
stripbin = /this file-should-not-exist
|
||||
# temporary dir for the on the fly restoration
|
||||
#tmpdir = this-file-should-not-exist
|
||||
# burp client configuration file used for the restoration (Default: None)
|
||||
bconfcli = this-file-should-not-exist
|
||||
# burp server configuration file used for the setting page
|
||||
bconfsrv = this-file-should-not-exist
|
||||
|
||||
[BASIC]
|
||||
admin = admin
|
||||
user1 = password
|
||||
|
||||
[BASIC:ACL]
|
||||
admin = ["fail]
|
||||
user1 = '["client1", "client2"]'
|
||||
user2 = {"agent1": ["client3"]
|
||||
|
|
@ -353,8 +353,10 @@ class BurpuiTestInit(TestCase):
|
|||
def create_app(self):
|
||||
conf1 = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test7-1.cfg')
|
||||
conf2 = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test7-2.cfg')
|
||||
conf4 = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test7-4.cfg')
|
||||
BUIinit(conf1, False, None, False, unittest=True)
|
||||
BUIinit(conf2, False, None, False, unittest=True)
|
||||
BUIinit(conf4, False, None, False, unittest=True)
|
||||
bui = BUIinit(None, False, None, False, unittest=True)
|
||||
bui.config['TESTING'] = True
|
||||
bui.config['LIVESERVER_PORT'] = 5001
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue