Path: blob/master/plugins/dbms/hsqldb/enumeration.py
2992 views
#!/usr/bin/env python12"""3Copyright (c) 2006-2025 sqlmap developers (https://sqlmap.org)4See the file 'LICENSE' for copying permission5"""67from lib.core.common import unArrayizeValue8from lib.core.data import conf9from lib.core.data import kb10from lib.core.data import logger11from lib.core.data import queries12from lib.core.enums import DBMS13from lib.core.settings import HSQLDB_DEFAULT_SCHEMA14from lib.request import inject15from plugins.generic.enumeration import Enumeration as GenericEnumeration1617class Enumeration(GenericEnumeration):18def getBanner(self):19if not conf.getBanner:20return2122if kb.data.banner is None:23infoMsg = "fetching banner"24logger.info(infoMsg)2526query = queries[DBMS.HSQLDB].banner.query27kb.data.banner = unArrayizeValue(inject.getValue(query, safeCharEncode=True))2829return kb.data.banner3031def getPrivileges(self, *args, **kwargs):32warnMsg = "on HSQLDB it is not possible to enumerate the user privileges"33logger.warning(warnMsg)3435return {}3637def getHostname(self):38warnMsg = "on HSQLDB it is not possible to enumerate the hostname"39logger.warning(warnMsg)4041def getCurrentDb(self):42return HSQLDB_DEFAULT_SCHEMA4344def getStatements(self):45warnMsg = "on HSQLDB it is not possible to enumerate the SQL statements"46logger.warning(warnMsg)4748return []495051