Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot parse multiple requests from BURP-like log file with -l option #5740

Closed
isakau1 opened this issue Jun 28, 2024 · 5 comments
Closed

cannot parse multiple requests from BURP-like log file with -l option #5740

isakau1 opened this issue Jun 28, 2024 · 5 comments
Assignees
Labels
Milestone

Comments

@isakau1
Copy link

isakau1 commented Jun 28, 2024

Hi guys, can't make it read multiple requests from BURP-like log file with -l option. Does it support this? I tried variants of request separators (double empty lines, dashes, asterisks, equal signs) without luck - it always says "not a valid WebScarab log data... sqlmap parsed 1 (parameter unique) requests from the targets list ready to be tested", and takes only first request.

Maybe i'm using wrong separators? Please could you explain and maybe update documentation on this?

My command: sqlmap -l burp.txt

My txt file example:

======================================================
12:05:23 AM  https://domain.com:443  [domain.com]
======================================================
GET /url1/?id=1 HTTP/1.1
Host: https://domain.com

======================================================
12:05:22 AM  https://domain.com:443  [domain.com]
======================================================
POST /url2/ HTTP/1.1
Host: https://domain.com

id=1&param=a

...
image
@isakau1
Copy link
Author

isakau1 commented Jun 28, 2024

Or maybe there is way for -m option to work with POST requests? - in the documentation there is only format for GET requests...

@stamparm
Copy link
Member

that doesn't look like neither webscarab nor burp log file.

example webscarab file:

image

example burp log file:

image

stamparm added a commit that referenced this issue Jun 28, 2024
@stamparm
Copy link
Member

after a second look, i've realized that you've used an old version of Burp log file. it should be parseable by sqlmap out of the box.

i believe that you haven't put the ====================================================== at the end of the provided file. anyhow, with the latest revision, that can be skipped.

with the latest revision:

$ cat list.req 
======================================================
12:05:23 AM  https://domain.com:443  [domain.com]
======================================================
GET /url1/?id=1 HTTP/1.1
Host: https://domain.com

======================================================
12:05:22 AM  https://domain.com:443  [domain.com]
======================================================
POST /url2/ HTTP/1.1
Host: https://domain.com

id=1&param=a

$ python3.11 sqlmap.py -l list.req -v 3
        ___
       __H__
 ___ ___[(]_____ ___ ___  {1.8.6.15#dev}
|_ -| . [.]     | .'| . |
|___|_  [)]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 23:12:31 /2024-06-28/

[23:12:31] [DEBUG] cleaning up configuration parameters
[23:12:31] [DEBUG] parsing targets list from 'list.req'
[23:12:31] [INFO] sqlmap parsed 2 (parameter unique) requests from the targets list ready to be tested
[23:12:31] [DEBUG] setting the HTTP timeout
[23:12:31] [DEBUG] setting the HTTP User-Agent header
[23:12:31] [DEBUG] creating HTTP requests opener object
[23:12:32] [INFO] found a total of 2 targets
[23:12:32] [DEBUG] initializing the knowledge base
[1/2] URL:
GET https://domain.com:443/url1/?id=1
do you want to test this URL? [Y/n/q]
> n

[23:12:33] [DEBUG] initializing the knowledge base
[2/2] URL:
GET https://domain.com:443/url2/
POST data: id=1&param=a
do you want to test this URL? [Y/n/q]
> n


[*] ending @ 23:12:33 /2024-06-28/

@stamparm stamparm self-assigned this Jun 28, 2024
@stamparm stamparm added this to the 1.9 milestone Jun 28, 2024
@stamparm
Copy link
Member

p.s. that not a valid WebScarab log data was a dummy DEBUG message. cleared it too with the latest revision

pull bot pushed a commit to googlesky/sqlmap that referenced this issue Jun 30, 2024
@isakau1
Copy link
Author

isakau1 commented Jul 1, 2024

works like a charm now, many thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants