MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _parseWebScarabLog

Function _parseWebScarabLog

lib/core/common.py:5288–5315  ·  view source on GitHub ↗

Parses WebScarab logs (POST method not supported)

(content)

Source from the content-addressed store, hash-verified

5286 """
5287
5288 def _parseWebScarabLog(content):
5289 """
5290 Parses WebScarab logs (POST method not supported)
5291 """
5292
5293 if WEBSCARAB_SPLITTER not in content:
5294 return
5295
5296 reqResList = content.split(WEBSCARAB_SPLITTER)
5297
5298 for request in reqResList:
5299 url = extractRegexResult(r"URL: (?P<result>.+?)\n", request, re.I)
5300 method = extractRegexResult(r"METHOD: (?P<result>.+?)\n", request, re.I)
5301 cookie = extractRegexResult(r"COOKIE: (?P<result>.+?)\n", request, re.I)
5302
5303 if not method or not url:
5304 logger.debug("not a valid WebScarab log data")
5305 continue
5306
5307 if method.upper() == HTTPMETHOD.POST:
5308 warnMsg = "POST requests from WebScarab logs aren't supported "
5309 warnMsg += "as their body content is stored in separate files. "
5310 warnMsg += "Nevertheless you can use -r to load them individually."
5311 logger.warning(warnMsg)
5312 continue
5313
5314 if not (conf.scope and not re.search(conf.scope, url, re.I)):
5315 yield (url, method, None, cookie, tuple())
5316
5317 def _parseBurpLog(content):
5318 """

Callers 1

parseRequestFileFunction · 0.85

Calls 3

extractRegexResultFunction · 0.85
debugMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…