2019-05-08 13:47:52 +03:00
|
|
|
#!/usr/bin/env python
|
2010-12-07 17:06:54 +03:00
|
|
|
|
|
|
|
"""
|
2023-01-03 01:24:59 +03:00
|
|
|
Copyright (c) 2006-2023 sqlmap developers (https://sqlmap.org/)
|
2017-10-11 15:50:46 +03:00
|
|
|
See the file 'LICENSE' for copying permission
|
2010-12-07 17:06:54 +03:00
|
|
|
"""
|
|
|
|
|
|
|
|
from lib.core.data import kb
|
|
|
|
from lib.request.connect import Connect as Request
|
|
|
|
|
|
|
|
def getPageTemplate(payload, place):
|
2011-01-24 14:12:33 +03:00
|
|
|
retVal = (kb.originalPage, kb.errorIsNone)
|
2010-12-07 20:16:21 +03:00
|
|
|
|
2010-12-07 17:35:31 +03:00
|
|
|
if payload and place:
|
|
|
|
if (payload, place) not in kb.pageTemplates:
|
2017-06-05 17:28:19 +03:00
|
|
|
page, _, _ = Request.queryPage(payload, place, content=True, raise404=False)
|
2010-12-24 15:13:48 +03:00
|
|
|
kb.pageTemplates[(payload, place)] = (page, kb.lastParserStatus is None)
|
2010-12-07 20:16:21 +03:00
|
|
|
|
2010-12-07 17:35:31 +03:00
|
|
|
retVal = kb.pageTemplates[(payload, place)]
|
2010-12-07 20:16:21 +03:00
|
|
|
|
2010-12-07 17:06:54 +03:00
|
|
|
return retVal
|