sqlmapproject/sqlmap · error · SqlmapSyntaxException
invalid URL given for sitemap ('%s')
Error message
invalid URL given for sitemap ('%s') What it means
Error "invalid URL given for sitemap ('%s')" thrown in sqlmapproject/sqlmap.
Source
Thrown at lib/parse/sitemap.py:54
retVal = OrderedSet()
visited = set()
if url in visited or (urlFilter is not None and not urlFilter(url)):
return retVal
visited.add(url)
if len(visited) > MAX_SITEMAP_FETCHES or len(retVal) >= MAX_SITEMAP_URLS: # bound a hostile sitemap graph
if not abortedFlag: # warn once on the False->True transition
logger.warning("sitemap parsing stopped after reaching the fetch/URL limit. sqlmap will use partial list")
abortedFlag = True
return retVal
try:
content = Request.getPage(url=url, raise404=True)[0] if not abortedFlag else ""
except _http_client.InvalidURL:
errMsg = "invalid URL given for sitemap ('%s')" % url
raise SqlmapSyntaxException(errMsg)
if content:
content = re.sub(r"<!--.*?-->", "", content, flags=re.DOTALL) # Note: strip (possibly multi-line) XML comments so commented-out <loc> entries aren't harvested
for match in re.finditer(r"<\w*?loc[^>]*>\s*([^<]+)", content, re.I):
if abortedFlag or len(retVal) >= MAX_SITEMAP_URLS:
break
foundUrl = htmlUnescape(match.group(1).strip())
# Basic validation to avoid junk
if not foundUrl.startswith("http"):
continue
if foundUrl.endswith(".xml") and "sitemap" in foundUrl.lower():
if kb.followSitemapRecursion is None:
message = "sitemap recursion detected. Do you want to follow? [y/N] "
kb.followSitemapRecursion = readInput(message, default='N', boolean=True)View on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at lib/parse/sitemap.py:54 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/92d2519c574979fe.
Report an issue: GitHub.