gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Operation request: Bencode

pavi2410 opened this issue · comments

Summary

https://en.m.wikipedia.org/wiki/Bencode

Example Input

Bencode Encoding Example:

Encoded Integer: i42e
Encoded String: 13:Hello, Bencode!
Encoded List: li1ei2ei3ee
Encoded Dictionary: d4:agei30e4:name5:Alicee

Example Output

Decoded Values:

Decoded Integer: 42
Decoded String: Hello, Bencode!
Decoded List: [1, 2, 3]
Decoded Dictionary: {'age': 30, 'name': 'Alice'}

Hi,
I noticed that there's an existing npm package named 'bencode' that provides the functionality we need for this feature request. It might be a good idea to leverage this package to save development time and ensure compatibility. @n1474335, What do you think about implementing this feature using the bencode npm package?