decode the django session value in django 3.1

752 Views Asked by At

Not able to decode Django session values which are being stored in django_session table.

session_data='.eJxVizsOwjAQBe_iGkX-bOw1JRUNFQew1vauEgGJRHCFuDsBpYDmFfNmnipRewypLXxPY1V75Yy1fQ-IRmsDOgZUu18pU7nw9DFvNE7d99jY0p3XPbZ8mitfD5v4Vw-0DGtaKhYkAijRaTQZvBQNHCvXaGxw4kkc5AxggwThKlgE2HuTiYNG9XoD3Gw7Mg:1llsLN:oAVvWg9xxXEmdaxYHzbJ3Ltv0UQ-i-NOt_KaHgUilhA'

I tried all the possibilities with base64 like base64.b64decode and getting binascii.Error: Incorrect padding error.

base64.b64decode(session_data)

I cant use Django inbuilt function like below in the image because I am outside of Django service

enter image description here

I need to get the dict data with decoding. Please help.

0

There are 0 best solutions below