Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
== Spockets ==
Spockets is a simple library for dealing with multiple sockets. You supply a socket, and one or more blocks to execute, and Spockets will make sure those blocks get executed when something comes in over the wire. It's just that simple.
There is one requirement for spockets and that is the ActionPool. This just allows spockets to use a thread pool for executing blocks so you don't end up having to wait on slow blocks. You can even provide your own pool for spockets to use, so all the action can stay in one local pool.
install (stable):
gem install spockets
install (unstable):
gem sources -a http://gems.github.com
gem install spox-spockets
or
git clone http://github.com/spox/spockets.git
cd spockets
gem build spockets.gemspec
gem install ./
It has RDocs. They are short, but will be helpful and you should really consider giving them a look. If you want to view them online, you can see them here:
http://dev.modspox.com/~sine/spockets
There is also a trac site. It has examples as well as a bug tracker. It's located at:
http://dev.modspox.com/trac/spockets
Examples are usually helpful, so here we go:
Code:
require 'socket'
require 'spockets'
spockets = Spockets::Spockets.new
se = TCPServer.new(3000)
loop do
s = se.accept
puts "Socket: #{s}"
spockets.add(s){|string| puts "#{s}: #{string}" }
end
sleep
Connecting:
> telnet 192.168.0.95 3000
Trying 192.168.0.95...
Connected to 192.168.0.95.
Escape character is '^]'.
goodbyeworld
^]
telnet> quit
Connection closed.
> telnet 192.168.0.95 3000
Trying 192.168.0.95...
Connected to 192.168.0.95.
Escape character is '^]'.
foobar
complete
^]
telnet> quit
Connection closed.
Output:
Socket: #<TCPSocket:0x98ec5ac>
Socket: #<TCPSocket:0x98ec37c>
#<TCPSocket:0x98ec37c>: foobar
#<TCPSocket:0x98ec5ac>: goodbyeworld
#<TCPSocket:0x98ec37c>: complete
FAQs
Unknown package
We found that spox-spockets 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.