Skip to content

bdecode variant without erroring on long string? #5

@itdaniher

Description

@itdaniher

Doing some hacking on @boramalper's magnetico.

It relies on data present at the end of a bencoded bytestring. In order to use bencoder.pyx I had to patch out https://github.com/whtsky/bencoder.pyx/blob/master/bencoder.pyx#L96 and return both r and l.

See https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/bencode.py#L53 for the function for which I needed to add a replacement.

Would this project accept a PR adding a bdecode2 returning both r and l, and not erroring on excess data?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions