Path: blob/master/plugins/dbms/postgresql/__init__.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.enums import DBMS8from lib.core.settings import PGSQL_SYSTEM_DBS9from lib.core.unescaper import unescaper10from plugins.dbms.postgresql.enumeration import Enumeration11from plugins.dbms.postgresql.filesystem import Filesystem12from plugins.dbms.postgresql.fingerprint import Fingerprint13from plugins.dbms.postgresql.syntax import Syntax14from plugins.dbms.postgresql.takeover import Takeover15from plugins.generic.misc import Miscellaneous1617class PostgreSQLMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Takeover):18"""19This class defines PostgreSQL methods20"""2122def __init__(self):23self.excludeDbsList = PGSQL_SYSTEM_DBS24self.sysUdfs = {25# UDF name: UDF parameters' input data-type and return data-type26"sys_exec": {"input": ["text"], "return": "int4"},27"sys_eval": {"input": ["text"], "return": "text"},28"sys_bineval": {"input": ["text"], "return": "int4"},29"sys_fileread": {"input": ["text"], "return": "text"}30}3132for cls in self.__class__.__bases__:33cls.__init__(self)3435unescaper[DBMS.PGSQL] = Syntax.escape363738