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

Function headersParser

lib/parse/headers.py:15–37  ·  view source on GitHub ↗

This function calls a class that parses the input HTTP headers to fingerprint the back-end database management system operating system and the web application technology

(headers)

Source from the content-addressed store, hash-verified

13from lib.parse.handler import FingerprintHandler
14
15def headersParser(headers):
16 """
17 This function calls a class that parses the input HTTP headers to
18 fingerprint the back-end database management system operating system
19 and the web application technology
20 """
21
22 if not kb.headerPaths:
23 kb.headerPaths = {
24 "microsoftsharepointteamservices": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "sharepoint.xml"),
25 "server": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "server.xml"),
26 "servlet-engine": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "servlet-engine.xml"),
27 "set-cookie": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "set-cookie.xml"),
28 "x-aspnet-version": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "x-aspnet-version.xml"),
29 "x-powered-by": os.path.join(paths.SQLMAP_XML_BANNER_PATH, "x-powered-by.xml"),
30 }
31
32 for header in (_.lower() for _ in headers if _.lower() in kb.headerPaths):
33 value = headers[header]
34 xmlfile = kb.headerPaths[header]
35 handler = FingerprintHandler(value, kb.headersFp)
36 parseXmlFile(xmlfile, handler)
37 parseXmlFile(paths.GENERIC_XML, handler)

Callers 1

parseResponseFunction · 0.90

Calls 2

FingerprintHandlerClass · 0.90
parseXmlFileFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…