
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Like the title says, a bittorrent library implemented in pure ruby. Currently the library works, but is still alpha.
This library has been tested with ruby1.9.1. The required gems are listed in the gemspec.
Running the curses client requires rbcurse-core (0.0.14).
How to use the library is best illustrated with an example. The sample program below touches on all the major ideas.
require 'quartz_torrent'
include QuartzTorrent
# Direct logging to stdout at info level
LogManager.setup do
setLogfile "stdout"
setDefaultLevel :info
end
# When CTRL-C is pressed, shut down
running = true
Signal.trap('SIGINT') do
puts "Got SIGINT. Shutting down."
running = false
end
# Create MagnetURI from first argument
magnet = MagnetURI.new(ARGV[0])
# Create a PeerClient that downloads to the current directory.
# This is the main API, and implements the Bittorrent peer protocol.
peerclient = PeerClient.new(".")
peerclient.port = 5555
peerclient.addTorrentByMagnetURI magnet
# Start the peerclient in another thread.
peerclient.start
while running do
peerclient.torrentData.each do |infohash, torrent|
name = torrent.recommendedName
pct = 0
if torrent.info
pct = (torrent.completedBytes.to_f / torrent.info.dataLength.to_f * 100.0).round(2)
end
puts "#{name}: #{pct}%"
end
sleep 2
end
peerclient.stop
Logging is configured using QuartzTorrent::LogManager. Logs can be sent to stdout, stderr, or file. Individual loggers can be set to different levels.
The QuartzTorrent::PeerClient class is the main interface for downloading and uploading torrents. The PeerClient constructor takes the path to the directory into which torrents should be downloaded. Torrents may be added to the PeerClient as Magnet links, or .torrent file contents before or after the PeerClient is stared. When started, the PeerClient runs asynchronously in a separate thread. Information regarding the running torrents is retrieved with the PeerClient::torrentData method.
More elaborate examples can be found in bin/quartztorrent_download
and bin/quartztorrent_download_curses
.
Run the tests as:
rake test
You can run a specific test using, i.e.:
rake test TEST=tests/test_reactor.rb
And a specific test case in a test using:
ruby1.9.1 -Ilib tests/test_reactor.rb -n test_client
FAQs
Unknown package
We found that quartz_torrent 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.