sqlmapproject / sqlmap

Automatic SQL injection and database takeover tool
http://sqlmap.org
Other
32.72k stars 5.74k forks source link

Unable to get a SQLite db output because of multiple targets mode #5773

Closed vijayee closed 3 months ago

vijayee commented 3 months ago

Describe the bug I'm unable to get a sqlite db output from sqlmap due to it always being in multiple targets mode which appears to require csv output. There is a line of code that always is triggered regardless of the number of targets specified in the command. This is line 1783 in option.py where conf.stdinPipe is always set evaluating it to true.

    if any((conf.googleDork, conf.logFile, conf.bulkFile, conf.forms, conf.crawlDepth, conf.stdinPipe)):
        conf.multipleTargets = True

To Reproduce python3 sqlmap.py --drop-set-cookie --threads=2 --level=5 --risk=3 --technique=U -p "username,password" -u "http://localhost:3000/?username=absolom&password=chinchillareque" -method POST --dump-format=SQLITE

Expected behavior I would expect the end result to be output to a db file rather than a csv file

Running environment:

Target details:

stamparm commented 3 months ago

I guess that you guessed that for some reason sqlmap thinks that your STDIN is being redirected through PIPE to sqlmap. Especially in Linux/Ubuntu, it is hard to imagine that that could be happening out of the blue (i.e. without any reasonable explanation)

Anyhow, you can try to "override" such behavior with (hidden switch) --ignore-stdin.

vijayee commented 3 months ago

This worked quite well. Thanks for your help @stamparm