Skip to main content

A small Python 3 library for decoding .NET viewstate. Can be used in various scraping scenarios.

https://travis-ci.org/yuvadm/viewstate.svg?branch=master

Usage

The Viewstate decoder accepts Base64 encoded .NET viewstate data and returns the decoded output in the form of plain Python objects.

There are two main ways to use this package. First, it can be used as an imported library with the following typical use case:

from viewstate import ViewState
vs = ViewState(base64EncodedViewState)
decoded_state = vs.decode()

It is also possible to feed the raw bytes directly:

vs = ViewState(raw=b'\xff\x01....')

Alternatively, the library can be used via command line by directly executing the module:

$ cat data.base64 | python -m viewstate

Which will pretty-print the decoded data structure.

Development

Unit test are run via pytest

References

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viewstate-0.2.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file viewstate-0.2.0.tar.gz.

File metadata

  • Download URL: viewstate-0.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for viewstate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c843eae538e4f3198cb1a5edac0f65b1fcea08a403ff8d6cdb0429c71a0aa1d4
MD5 e19c36d435e32167cec5539e7d237b0b
BLAKE2b-256 830ec53e046eae816844340623542b29aa385ba4fdc8887acd7cd790a64132fe

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.0

2 files

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

1 file

This release

0.2.0 This release

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page