mysqlsqlmap

Retrieving comments from MySQL tables with sqlmap


I added a table comment in MySQL (northwind database) as follows

ALTER TABLE northwind.fornitori COMMENT = 'tabella fornitori';

and I can retrieve the table comment with the following query

SELECT TABLE_COMMENT FROM information_schema.TABLES WHERE TABLE_NAME = 'fornitori';

that shows the correct result.

Now, I want to retrieve the table comment with sqlmap, and then I executed

python sqlmap.py -d "mysql://root:pwd@localhost:3306/northwind" -D northwind -T fornitori --comments

but the output is

[11:23:54] [INFO] connection to mysql server localhost:3306 established
[11:23:54] [INFO] testing MySQL
[11:23:54] [INFO] confirming MySQL
[11:23:54] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL >= 5.0.0
[11:23:54] [INFO] connection to mysql server localhost:3306 closed

Here, I cannot see any table comment. Is this a bug or is there something I am missing/doing wrong?


Solution

  • This problem has been solved in version 1.2.5. Furthermore, --comments should be used with other options like --schema, as

    python sqlmap.py -d "mysql://root:mypassword@localhost:3306/northwind" -D  northwind -T fornitori --schema --comments