
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
This is a simple library for reading and writing bencoded data.
Bencode is a simple data serialization format used by the popular BitTorrent P2P file sharing system.
It contains only four data types, namely:
Encoding objects is as simple as calling #bencode
on them:
"foo bar".bencode # => "7:foo bar"
42.bencode # => "i42e"
[1, 2, 3].bencode # => "li1ei2ei3ee"
{"foo" => 1, "bar" => -10}.bencode # => "d3:bari-10e3:fooi1ee"
Decoding a complete data stream is as easy as calling BEncode.load(data)
.
Decoding a data stream in chunks works as follows:
irb(main):007:0> stream = BEncode::Parser.new(StringIO.new "d3:foo3:bared3:baz3:quxe")
=> #<BEncode::Parser:0x007fbe6b008c88 @stream=#<StringIO:0x007fbe6b008cd8>>
irb(main):008:0> stream.parse!
=> {"foo"=>"bar"}
irb(main):009:0> stream.parse!
=> {"baz"=>"qux"}
Released under the MIT license.
FAQs
Unknown package
We found that bencode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.