Beautiful Soup
tedboy.github.io › flask › generated › werkzeug.parse_cookie.html
werkzeug.parse_cookie — Flask API
Parse a cookie. Either from a string or WSGI environ · Per default encoding errors are ignored. If you want a different behavior you can set errors to 'replace' or 'strict'. In strict mode a HTTPUnicodeError is raised
GitHub
github.com › eric1234 › werkzeug-cookie-prefix-poc › blob › master › README.md
werkzeug-cookie-prefix-poc/README.md at master · eric1234/werkzeug-cookie-prefix-poc
I decided to see what other platforms had this same or similar issue. Although Flask does not do URL decoding as with the Ruby platform it does unquote both the cookie name and value.
Author eric1234
GitHub
github.com › noraj › flask-session-cookie-manager
GitHub - noraj/flask-session-cookie-manager: :cookie: Flask Session Cookie Decoder/Encoder · GitHub
$ python{2,3} flask_session_cookie_manager{2,3}.py decode -c 'eyJudW1iZXIiOnsiIGIiOiJNekkyTkRFd01ETXhOVEExIn0sInVzZXJuYW1lIjp7IiBiIjoiWVdSdGFXND0ifX0.DE2iRA.ig5KSlnmsDH4uhDpmsFRPupB5Vw' -s '.{y]tR&sp&77RdO~u3@XAh#TalD@Oh~yOF_51H(QV};K|ghT^d' {u'username': 'admin', u'number': '326410031505'}
Starred by 774 users
Forked by 93 users
Languages Python 88.9% | Shell 11.1%
GitHub
github.com › pallets › werkzeug › blob › main › src › werkzeug › http.py
werkzeug/src/werkzeug/http.py at main · pallets/werkzeug
June 16, 2020 - cookie = cookie.encode("latin1").decode() · return _sansio_http.parse_cookie(cookie=cookie, cls=cls) ·
Author pallets
GitHub
github.com › pallets › werkzeug › security › advisories › GHSA-px8h-6qxv-m22q
cookie prefixed with `=` can shadow unprefixed cookie · Advisory · pallets/werkzeug · GitHub
Browsers may allow "nameless" cookies that look like =value instead of key=value. A vulnerable browser may allow a compromised application on an adjacent subdomain to exploit this to set a cookie like =__Host-test=bad for another subdomain. Werkzeug <= 2.2.2 will parse the cookie =__Host-test=bad as __Host-test=bad.
GitHub
github.com › eric1234 › werkzeug-cookie-prefix-poc
GitHub - eric1234/werkzeug-cookie-prefix-poc: POC for minor werkzeug cookie prefix security issue
POC for minor werkzeug cookie prefix security issue - eric1234/werkzeug-cookie-prefix-poc
Author eric1234
GitHub
github.com › pallets › werkzeug › commit › 84eabcaa81f60d47939ac2d43f01d01eeab598a4
Fixed a possible security problem in werkzeug.contrib.securecookie · pallets/werkzeug@84eabca
June 24, 2008 - # sercurely unpickle our cookie. 194 · 192 · try: 195 · 193 · client_hash = base64_hash.decode('base64') 196 · 194 · except Exception: 197 · 195 · items = client_hash = None · 198 · - if items is not None and client_hash == hash.digest(): 196 · + if items is not None and client_hash == mac.digest(): 199 ·
Author pallets
Beautiful Soup
tedboy.github.io › flask › generated › werkzeug.dump_cookie.html
werkzeug.dump_cookie — Flask API
werkzeug.dump_cookie · View page source · werkzeug.dump_cookie(key, value='', max_age=None, expires=None, path='/', domain=None, secure=False, httponly=False, charset='utf-8', sync_expires=True)[source]¶ · Creates a new Set-Cookie header without the Set-Cookie prefix The parameters are the same as in the cookie Morsel object in the Python standard library but it accepts unicode data, too.
GitHub
github.com › pallets › werkzeug › issues › 1060
test client adds quotes around cookie value · Issue #1060 · pallets/werkzeug
January 18, 2017 - I would expect the same value that I set with set_cookie to be returned when using the cookie.value property. But perhaps I am missing something here? I have added a test case that demonstrates the issue. import unittest from unittest import TestCase from werkzeug.test import Client from werkzeug.testapp import test_app from werkzeug.wrappers import BaseResponse class WerkzeugCookieTest(TestCase): def get_cookie_from_client(self, cookie_name, client): for cookie in client.cookie_jar: if cookie.name == cookie_name: return cookie return None def test_cookie(self): c = Client(test_app, BaseRespon
Author pallets
GitHub
github.com › miguelgrinberg › Flask-SocketIO › issues › 1982
Test cookie handling API changed in Werkzeug 2.3 · Issue #1982 · miguelgrinberg/Flask-SocketIO
April 29, 2023 - [#1060](https://github.com/pallets/werkzeug/issues/1060), [#1680](https://github.com/pallets/werkzeug/issues/1680) - The cookie_jar attribute is deprecated. http.cookiejar is no longer used for storage. - Domain and path matching is used when sending cookies in requests. The domain and path parameters default to localhost and /. - Added a get_cookie method to inspect cookies. - Cookies have decoded_key and decoded_value attributes to match what the app sees rather than the encoded values a client would see.
Author miguelgrinberg
GitHub
github.com › pallets › werkzeug › blob › main › CHANGES.rst
werkzeug/CHANGES.rst at main · pallets/werkzeug
April 28, 2022 - Cookies have decoded_key and decoded_value attributes to match what the app sees rather than the encoded values a client would see.
Author pallets
GitHub
github.com › psmet › BIGip-cookie-decoder › blob › master › BIGIP_decode_cookie.py
BIGip-cookie-decoder/BIGIP_decode_cookie.py at master · psmet/BIGip-cookie-decoder
print "\n[*] Cookie to decode: %s\n" % cookie · · (cookie_name, cookie_value) = cookie.split('=') · pool = re.search('^BIGipServer([.\w\.]*)', cookie_name) · (host, port, end) = cookie_value.split('.') · (a, b, c, d) = [ord(i) for i in struct.pack("<I", int(host))] ·
Author psmet
Beautiful Soup
tedboy.github.io › flask › generated › generated › werkzeug.Response.set_cookie.html
werkzeug.Response.set_cookie — Flask API
Sets a cookie. The parameters are the same as in the cookie Morsel object in the Python standard library but it accepts unicode data, too
HackTricks
book.hacktricks.xyz › home › network services pentesting › pentesting web › flask
Flask - HackTricks
1 week ago - Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos. Probably if you are playing a CTF a Flask application will be related to SSTI. ... Command line tool to fetch, decode, brute-force and craft session cookies of a Flask application by guessing secret keys.
GitHub
github.com › pallets › werkzeug › issues › 1495
Cookies with certain keys are ignored · Issue #1495 · pallets/werkzeug
March 29, 2019 - I have a cookie called version=xxx in Headers, but it ignored by flask, using request.cookies.get('version') can't get the cookie. I check the code then found these: # _internal.py _cookie_params = { b"expires", b"path", b"comment", b"ma...
Author pallets
GitHub
gist.github.com › chriselgee › b9f1861dd9b99a8c1ed30066b25ff80b
Decoding Flask Cookies with Python and Cyber Chef · GitHub
Decoding Flask Cookies with Python and Cyber Chef. GitHub Gist: instantly share code, notes, and snippets.
GitHub
github.com › adelespinasse › werkzeug
GitHub - adelespinasse/werkzeug: A flexible WSGI implementation and toolkit
Werkzeug started as simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility modules. It includes a powerful debugger, full-featured request and response objects, HTTP utilities to handle entity tags, cache control headers, HTTP dates, cookie handling, file uploads, a powerful URL routing system and a bunch of community-contributed addon modules.
Author adelespinasse