Skip to content

Error "Not an executable object" while using direct connection to PostgreSQL #5576

@ktecv2000

Description

@ktecv2000

Describe the bug

I'm using -d flag for direct connection for PostgreSQL

sqlmap -d 'postgres://username:password@IP:5432/DB' -vvvvv

and get the output below

[INFO] connection to PostgreSQL server 'xxxxx' established
[INFO] testing PostgreSQL
[PAYLOAD] SELECT (CASE WHEN (CONVERT_TO('yEcP', QUOTE_IDENT(NULL)) IS NULL) THEN '1' ELSE '0' END)
[TRAFFIC IN] Not an executable object: "SELECT (CASE WHEN (CONVERT_TO('yEcP', QUOTE_IDENT(NULL)) IS NULL) THEN '1' ELSE '0' END)"
[WARNING] the back-end DBMS is not PostgreSQL

I traced the code and found it died here

  • lib/utils/timeout.py
thread = InterruptableThread()
thread.start()
thread.join(duration)

...

        def run(self):
            try:
                self.result = func(*(args or ()), **(kwargs or {}))
                self.timeout_state = TIMEOUT_STATE.NORMAL
            except Exception as ex:
                logger.log(CUSTOM_LOGGING.TRAFFIC_IN, ex)
                self.result = default
                self.timeout_state = TIMEOUT_STATE.EXCEPTION

To Reproduce

Expected behavior

Screenshots

Running environment:
Running on SQLmap 1.7.11.2#dev
Testing for PostgresSQL 9.1 , 9.5 , 9.11

Target details:

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions