All Projects → yuvadm → Viewstate

yuvadm / Viewstate

Licence: mit
ASP.NET View State Decoder

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Viewstate

Seleniumcrawler
An example using Selenium webdrivers for python and Scrapy framework to create a web scraper to crawl an ASP site
Stars: ✭ 117 (+51.95%)
Mutual labels:  scraping, asp-net
Shell Backdoor List
🎯 PHP / ASP - Shell Backdoor List 🎯
Stars: ✭ 288 (+274.03%)
Mutual labels:  asp-net, web-security
Lookyloo
Lookyloo is a web interface that allows users to capture a website page and then display a tree of domains that call each other.
Stars: ✭ 381 (+394.81%)
Mutual labels:  scraping, web-security
Prestashop Cve 2018 19126
PrestaShop (1.6.x <= 1.6.1.23 or 1.7.x <= 1.7.4.4) Back Office Remote Code Execution (CVE-2018-19126)
Stars: ✭ 37 (-51.95%)
Mutual labels:  web-security
Pge Outages
Tracking PG&E outages
Stars: ✭ 43 (-44.16%)
Mutual labels:  scraping
Awesome Python Primer
自学入门 Python 优质中文资源索引,包含 书籍 / 文档 / 视频,适用于 爬虫 / Web / 数据分析 / 机器学习 方向
Stars: ✭ 57 (-25.97%)
Mutual labels:  scraping
Mobile Security Framework Mobsf
Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
Stars: ✭ 10,212 (+13162.34%)
Mutual labels:  web-security
Pypatent
Search for and retrieve US Patent and Trademark Office Patent Data
Stars: ✭ 31 (-59.74%)
Mutual labels:  scraping
Torrengo
Torrengo is a CLI (command line) program written in Go which concurrently searches torrents from various sources.
Stars: ✭ 67 (-12.99%)
Mutual labels:  scraping
Opentelemetry Dotnet
The OpenTelemetry .NET Client
Stars: ✭ 1,037 (+1246.75%)
Mutual labels:  asp-net
Waf A Mole
A guided mutation-based fuzzer for ML-based Web Application Firewalls
Stars: ✭ 51 (-33.77%)
Mutual labels:  web-security
Django Dynamic Scraper
Creating Scrapy scrapers via the Django admin interface
Stars: ✭ 1,024 (+1229.87%)
Mutual labels:  scraping
Mechaml
OCaml functional web scraping library
Stars: ✭ 60 (-22.08%)
Mutual labels:  scraping
Configs
Public, free to use, repository with diggers configs for scraping / extracting data from various e-commerce websites and online stores
Stars: ✭ 37 (-51.95%)
Mutual labels:  scraping
Api Store
Contains all the public APIs listed in Phantombuster's API store. Pull requests welcome!
Stars: ✭ 69 (-10.39%)
Mutual labels:  scraping
Notifo
Multi channel notification service for collaboration tools, e-commerce, news service and more.
Stars: ✭ 32 (-58.44%)
Mutual labels:  asp-net
Dtcms
动力启航网站管理系统(简称DTcms),是目前国内ASP.NET开源界少见的优秀开源管理系统,基于 ASP.NET(C#)+ MSSQL(ACCESS) 的技术开发,全部100%免费开放源代码。
Stars: ✭ 63 (-18.18%)
Mutual labels:  asp-net
Mtnt
Code for the collection and analysis of the MTNT dataset
Stars: ✭ 48 (-37.66%)
Mutual labels:  scraping
Nemiro.oauth.dll
Nemiro.OAuth is a class library for authorization via OAuth protocol in .NET Framework
Stars: ✭ 45 (-41.56%)
Mutual labels:  asp-net
Project Tauro
A Router WiFi key recovery/cracking tool with a twist.
Stars: ✭ 52 (-32.47%)
Mutual labels:  web-security

ASP.NET View State Decoder

A small Python 3.5+ library for decoding ASP.NET viewstate.

Viewstate is a method used in the ASP.NET framework to persist changes to a web form across postbacks. It is usually saved on a hidden form field:

.. code-block:: html

Decoding the view state can be useful in penetration testing on ASP.NET applications, as well as revealing more information that can be used to efficiently scrape web pages.

.. image:: https://github.com/yuvadm/viewstate/workflows/Build/badge.svg :target: https://github.com/yuvadm/viewstate/actions

.. image:: https://img.shields.io/pypi/v/viewstate :target: https://pypi.org/project/viewstate/

Install

.. code-block:: shell

$ pip install viewstate

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:

.. code-block:: python

from viewstate import ViewState base64_encoded_viewstate = '/wEPBQVhYmNkZQ9nAgE=' vs = ViewState(base64_encoded_viewstate) vs.decode() ('abcde', (True, 1))

It is also possible to feed the raw bytes directly:

.. code-block:: python

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

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

.. code-block:: shell

$ cat data.base64 | python -m viewstate

Which will pretty-print the decoded data structure.

The command line usage can also accept raw bytes with the -r flag:

.. code-block:: shell

$ cat data.base64 | base64 -d | python -m viewstate -r

Viewstate HMAC signatures are also supported. In case there are any remaining bytes after parsing, they are assumed to be HMAC signatures, with the types estimated according to signature length.

.. code-block:: python

vs = ViewState(signed_view_state) vs.decode() vs.mac 'hmac_sha256' vs.signature b'....'

Development

Development packages can be installed with pipenv. Unit tests and code formatting tasks can be run with the builtin scripts:

.. code-block:: shell

$ pipenv sync -d $ pipenv run test $ pipenv run format

For PyPI releases, follow the build, check and upload scripts.

.. code-block:: shell

$ pipenv run build $ pipenv run check $ pipenv run upload

Note that for uploading a new package version, a valid PyPI auth token should be defined in ~/.pypirc.

References

Since there is no publically available specification of how .NET viewstate is encoded, reverse engineering was based on prior work:

Any official documents would be gladly accepted to help improve the parsing logic.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].