sqlmap/lib/request/templates.py

27 lines
707 B
Python
Raw Normal View History

#!/usr/bin/env python
"""
$Id$
Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
See the file 'doc/COPYING' for copying permission
"""
2010-12-18 12:51:34 +03:00
import lib.core.common
from lib.core.data import kb
from lib.request.connect import Connect as Request
def getPageTemplate(payload, place):
retVal = kb.originalPage, kb.errorIsNone
2010-12-07 20:16:21 +03:00
if payload and place:
if (payload, place) not in kb.pageTemplates:
page, _ = Request.queryPage(payload, place, content=True)
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
lib.core.common.getPageTemplate = getPageTemplate