Coder Social home page Coder Social logo

[BUG] ? StatusRequestV2Extension about utls HOT 7 CLOSED

VeNoMouS avatar VeNoMouS commented on July 19, 2024 1
[BUG] ? StatusRequestV2Extension

from utls.

Comments (7)

VeNoMouS avatar VeNoMouS commented on July 19, 2024 2

@gaukas PR sent #247

from utls.

gaukas avatar gaukas commented on July 19, 2024

Good catch. I agree that this is a bug. Would you love to submit a pull request addressing this issue?

We did not implement enough testcases to cover all the extensions, and I basically reversed the Read() function for the Write(). So testcases would benefit this project as well.

from utls.

VeNoMouS avatar VeNoMouS commented on July 19, 2024

Yea that's not a problem, unsure why ReadUint16LengthPrefixed reads the last element tho,,, as there should be one more read left... 07, 2, 04, 00, 00

I'll look into that (unless it treating it as \0)

from utls.

gaukas avatar gaukas commented on July 19, 2024

why ReadUint16LengthPrefixed reads the last element

Can you be more specific on that? Like, which bytes are you referring to as the last element?

from utls.

VeNoMouS avatar VeNoMouS commented on July 19, 2024

why ReadUint16LengthPrefixed reads the last element

Can you be more specific on that? Like, which bytes are you referring to as the last element?

with the last ignored.ReadUint16LengthPrefixed(&ignored) there should still be 0, 0 left in that array to read, but its empty, cryptobyte appears to do something with it... i'll run some tests

[2 0 4 0 0 0 0] <-- 8 
[0 4 0 0 0 0] <-- 16
[0 0 0 0] <-- 16
[] <--- missing

from utls.

gaukas avatar gaukas commented on July 19, 2024

When you call ignored.ReadUint16LengthPrefixed(&ignored) when ignored == [0 0 0 0] you are reading (consuming) next two bytes from ignored as length (which is 0), then put ignored[0:length] == [] into &ignored. Basically that's where you lose the following bytes by overwriting ignored == [0 0] with [].

from utls.

VeNoMouS avatar VeNoMouS commented on July 19, 2024

ah right , my bad

from utls.

Related Issues (20)

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.