Created
June 11, 2022 02:03
-
-
Save sasha-id/4c44ddecd15a061b5c0bc1b859fe8e97 to your computer and use it in GitHub Desktop.
Decode django (version 4) session outside django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core import signing | |
from django.conf import settings | |
from django.utils.module_loading import import_string | |
session_data = 'xxxxxxx' | |
settings.configure(SECRET_KEY = 'XXXX') | |
signing.loads( | |
session_data, | |
salt="django.contrib.sessions.SessionStore", | |
serializer=import_string('django.contrib.sessions.serializers.JSONSerializer') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment