Python exception when running.json or clients.json call | improve support of burp 1.3.48
Hello,
I'm new user of burp backup and I'm very happy with burp-ui software. The interface is very light and simple. I have burp server v1.3.8. I have configure burp-ui on same server burpui.cfg in standalone = true.
When I launch the burp-ui python server, /home/burp/burp-ui# ./burp-ui.py -c burpui.cfg no problem it runs and I connect to interface without problems, but the interface is empty.
When I relaunch the burp-ui server in verbose and debug modes, I view 500 errors when the burp-ui call running.json and client.json (every 10 sec)
::ffff:77.XXX.XXX.XXX - - [14/Jan/2015 23:15:39] "GET /api/clients.json HTTP/1.1" 500 -
::ffff:77.XXX.XXX.XXX - - [14/Jan/2015 23:15:37] "GET /api/running.json HTTP/1.1" 500 -
When I see logs, I find exception:
::ffff:77.206.96.128 - - [14/Jan/2015 23:17:18] "GET /api/running.json HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 758, in decorated_view
return func(*args, **kwargs)
File "/home/burp/burp-ui/burpui/routes.py", line 221, in backup_running
j = bui.cli.is_one_backup_running(server)
File "/home/burp/burp-ui/burpui/misc/backend/burp1.py", line 537, in is_one_backup_running
cls = self.get_all_clients()
File "/home/burp/burp-ui/burpui/misc/backend/burp1.py", line 558, in get_all_clients
c['name'] = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
I habe edited the code to view line, in burp1.py linge 554, I print the result of line before the exception, The line is not empty
blabla.toto-fr.com r 2 21226/0/0/195796 14381/0/0/155606 0/0/0/0 0/0/0/0 0/0/0/0 5906/0/0/39250 939/0/0/940 0/0/0/0 0/0/0/0 21226/0/0/195796 21226 0 8351227976 257417145 1257556698 0 1421260021 /home/home_data.tar.gz
I think the regexp does not match my line :(
regex = re.compile('\s*(\S+)\s+\d\s+(\S)\s+(.+)')
I don't understand why the regexp does not work, because they are very "open".
Sorry for my english, I am French :/
Can you help my ?
Regards, Ben