mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
33 lines
940 B
Python
33 lines
940 B
Python
#!/usr/bin/env python
|
|
|
|
"""
|
|
Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
|
|
See the file 'doc/COPYING' for copying permission
|
|
"""
|
|
|
|
from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
|
from lib.core.data import conf
|
|
from lib.core.data import kb
|
|
from lib.core.data import logger
|
|
from lib.core.data import queries
|
|
from lib.core.common import Backend
|
|
from lib.core.common import unArrayizeValue
|
|
from lib.request import inject
|
|
|
|
class Enumeration(GenericEnumeration):
|
|
def __init__(self):
|
|
GenericEnumeration.__init__(self)
|
|
|
|
def getBanner(self):
|
|
if not conf.getBanner:
|
|
return
|
|
|
|
if kb.data.banner is None:
|
|
infoMsg = "fetching banner"
|
|
logger.info(infoMsg)
|
|
|
|
query = queries[Backend.getIdentifiedDbms()].banner.query
|
|
kb.data.banner = unArrayizeValue(inject.getValue(query, safeCharEncode=True))
|
|
|
|
return kb.data.banner
|