Package gds ::
Package pub ::
Package burp ::
Module parsers
|
|
Module parsers
GDS Burp Suite Log Parser
* Burp and Burp Suite are trademarks of PortSwigger Ltd. Copyright
2008 PortSwigger Ltd. All rights reserved. See http://portswigger.net for
license terms.
Copyright (c) 2009-2010 Marcin Wielgoszewski
<marcinw@gdssecurity.com> Gotham Digital Science
This file is part of GDS Burp API.
GDS Burp API is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
GDS Burp API is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with GDS Burp API. If not, see
<http://www.gnu.org/licenses/>
int
|
forward_buffer(buffer,
pos,
n,
token)
Advance buffer from current position by n bytes while buffer is not
equal to token. |
|
|
list
|
parse(burp_log)
Parses a Burp Suite log file. |
|
|
|
CRLF = ' \r\n '
|
|
DELIMITER = ' ================================================= ...
|
|
CRLF_DELIMITER = ' \r\n======================================== ...
|
|
HEADER = re.compile(r'( \d{1,2} :\d{2} :\d{2} ( AM| PM) ) [ \t] + ( \S+ ) ...
|
|
LOGGER = logging.getLogger(__name__)
|
|
__package__ = ' gds.pub.burp '
|
Imports:
Burp,
datetime,
logging,
re
forward_buffer(buffer,
pos,
n,
token)
|
|
Advance buffer from current position by n bytes while buffer is not
equal to token.
- Parameters:
buffer - String
pos - Integer of current position in buffer.
n - Length of token string.
token - Token to advance current buffer position to.
- Returns: int
- Position of buffer at token.
|
Parses a Burp Suite log file. Returns a list of Burp objects in the
order in which they were written.
- Parameters:
burp_log - A filename or string of a Burp Suite log.
- Returns: list
- list of gds.burp.Burp objects.
|
DELIMITER
- Value:
''' ======================================================\r
'''
|
|
CRLF_DELIMITER
- Value:
''' \r
======================================================\r
'''
|
|
HEADER
- Value:
re.compile(r'( \d{1,2} :\d{2} :\d{2} ( AM| PM) ) [ \t] + ( \S+ ) ( [ \t] + \[( \d{1,3}
\.\d{1,3} \.\d{1,3} \.\d{1,3} | unknown host) \]) ? ')
|
|