sqlmap/lib/request/templates.py

23 lines
637 B
Python
Raw Normal View History

#!/usr/bin/env python
"""
2017-01-02 16:19:18 +03:00
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
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
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)
kb.pageTemplates[(payload, place)] = (page, kb.lastParserStatus is None)
2010-12-07 20:16:21 +03:00
retVal = kb.pageTemplates[(payload, place)]
2010-12-07 20:16:21 +03:00
return retVal
2010-12-18 12:51:34 +03:00