A cookie is a small piece of data that the server sends in a Set-Cookie header as a part of the response in HTTP (or HTTPS). The client stores cookies locally and includes them in any future requests that are sent to the server. Thus, servers use cookies to track a client, its history etc.

For example, servers can store a login token, which will automatically log the client in, even if the client leaves the site and then accesses it later. They can also be used for storing the client’s user preferences or personal information, and so on.

I wrote a python script get_cookies_info.py

note: you need install urllib3 package:

pip install urllib3

 

Usage:

-u              url address, e.g. http://www.github.com (http is must)

 

 

Example:

python get_cookies_info.py -u http://www.facebook.com

 

http://www.facebook.com   cookies length:  2

name:    fr

value:   0HszsTWqw9WDVntBz..BikwIu.aD.AAA.0.0.BikwIu.AWXo3mH5M58

domain:  .facebook.com

path:    /

expire:  2022-08-27 08:18:37

secure:  True

 

 

name:    sb

value:   LgKTYibLCeNiTXHYZ2ZwdZ6A

domain:  .facebook.com

path:    /

expire:  2024-05-28 08:18:38

secure:  True

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *