Giter VIP home page Giter VIP logo

Comments (5)

rpimonitrbtch avatar rpimonitrbtch commented on July 25, 2024 1

The viewstate that is failing is probably encrypted. Using a test website configured for AES with an explicit key, I got viewstate of "fJpcff0hiVevQIysiaIKgkx2dnueLNYQKHvN+8Da9mpyY/IsL6xhIen3niz0KDUiJ3ztn6ejt8rum6jZysGCJmRo8iZ45u1LT+3lhxGySYpLtQ4m0hP5/WHlMLyT0H2Lk2aCxcxFh6TVDf6+jXbMYXLEgDs=", which gave me the same error, but, once decrypted and skipping the first 32 bytes (randomness to use as a makeshift IV, I guess...), I have "/wEPDwUKMTY1NDU2MTA1Mg8WAh4EVEVTVAUFVkFMVUVkZK3h5yv0mrM9ifh43lDf449iCgYMOaWxxQ==", which processes fine. I had to chop off the last 20 bytes of the encrypted viewstate before decrypting as the signature is appended to the ciphertext.

Supporting encrypted viewstate shouldn't be difficult, as it's a basic CBC with standard crypto algorithms, but would require extra parameters to pass the decryption key and cipher. Since the signature has to be split off before decryption and thus also before parsing, the current process of parsing to the end of the statebag and whatever remains is the signature wouldn't work, so the signature format would need to be explicitly specified as well.

I ought to be able to cook up a pullrequest for this.

from viewstate.

rpimonitrbtch avatar rpimonitrbtch commented on July 25, 2024 1

Enums to define the decryption and validation modes would seem to be in order... Would it be ok to have them in viewstate.py, or should they be a separate file as was requested for the color table in PullRequest#12?

from viewstate.

yuvadm avatar yuvadm commented on July 25, 2024 1

@rpimonitrbtch thanks for taking the lead on this! It would be a much appreciated feature to have. Please go ahead with whatever you feel would be right for the codebase, then we can review and see if any changes are needed.

from viewstate.

yuvadm avatar yuvadm commented on July 25, 2024 1

@rpimonitrbtch Also please note I did some codebase cleanup today and released v0.5.2 so make sure you rebase your branch onto that.

from viewstate.

junmoxiao avatar junmoxiao commented on July 25, 2024

I also have the same problem, even I use the updated code @rpimonitrbtch @yuvadm

from viewstate.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.