0

I have a python script that retrieves cookies from a url with a login and secure ssl, it has some cookie values with _rest': {'HttpOnly': True} and my script won't return these cookies.

Is there any way I can get them? Currently my script looks like:

s = requests.Session()
url = "http://example.net/login"
r = s.post(url, auth=HTTPBasicAuth(USERNAME, PASSWD), verify=verify_ssl) 
for cookie in r.cookies: 
    print(cookie)

please help me get those delicious HttpOnly cookies

1 Answer 1

1

Found the issue - post did not contain the cookie in question cookie only available with get

r = s.get(url, auth=HTTPBasicAuth(USERNAME, PASSWD), verify=verify_ssl)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.