Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cookies are not loading correctly #5483

@kobyan

Description

@kobyan

I'm trying to put cookies into sqlmap from curl.
Saving cookies in curl is done with the curl "<url>" -X POST --data "<login_post_data>" -v -c <path>\temp.txt
Cookies are stored in the Netscape HTTP Cookie File format.

# Netscape HTTP Cookie File
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

#httpOnly_<host> FALSE / FALSE 2637668540 <cookie_name_1> <cookie_value_1>
#HttpOnly_<host> FALSE / FALSE 2637668540 <cookie_name_2> <cookie_value_2>

When I try to use them via the --load-cookies="<path>\temp.txt", they just don't get picked up.

[CRITICAL] there was a problem loading cookies file ('no valid cookies found')

When I try to use them via the --live-cookies="<path>\temp.txt", they are not picked up correctly

POST <url> HTTP/1.1
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/532.0 (KHTML, like
Gecko) Chrome/4.0.207.0 Safari/532.0
Referer: <ref_url>
Host: <host>
         # Netscape HTTP Cookie File
         # http://curl.haxx.se/docs/http-cookies.html
         # This file was generated by libcurl! Edit at your own risk.

         #httpOnly_<host> FALSE / FALSE 2637668540 <cookie_name_1> <cookie_value_1>
         #HttpOnly_<host> FALSE / FALSE 2637668540 <cookie_name_2> <cookie_value_2>
Accept: */*
Accept-Encoding: gzip,deflate
Content-Type: application/x-www-form-urlencoded; charset=utf-8
content-length: 368
Connection: close

<post_data>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions