Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Deserialize ViewState

I am writing a program to decode edit and re-encode ViewState in python. I have successfully been able to find view state and decode the base64 encoded string, but became stuck trying to deserialize it. Is there a way to deserialize view state using python without using a windows-only python library? I wand my program to be able to run it on any computer with python installed.

like image 489
735Tesla Avatar asked Mar 12 '26 08:03

735Tesla


1 Answers

I've recently released a library that does .NET viewstate decoding, feel free to try it out https://github.com/yuvadm/viewstate/

Sample usage:

>>> from viewstate import ViewState
>>> base64_encoded_viewstate = '/wEPBQVhYmNkZQ9nAgE='
>>> vs = ViewState(base64_encoded_viewstate)
>>> vs.decode()
('abcde', (True, 1))
like image 178
Yuval Adam Avatar answered Mar 13 '26 20:03

Yuval Adam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!