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.
The very basic ruby gem to scan your LAN for devices
Based on nmap.
require 'lan_scanner'
# examples with explicit default parameters
devices = LanScanner.scan_devices network: '192.168.178.0/24'
# => [LanScanner::Device, LanScanner::Device, ...]
devices.each do |d|
puts "=================================================="
puts "Found device on #{d.remote_address}"
puts
puts "Hostname: #{d.host_name}"
puts
# =================================================="
# Found device on 192.168.178.20
#
# Hostname: Windows-PC
#
end
require 'lan_scanner'
devices = LanScanner.scan_device_states %w[192.168.178.1 192.168.178.22 192.168.178.44], expensive: true
# => [LanScanner::Device, LanScanner::Device, ...]
devices.each do |d|
puts "#{d.remote_address} -> #{d.host_name} (#{d.state})"
end
# 192.168.178.1 -> server.domain (up)
# 192.168.178.22 -> mycomputer.domain (up)
# 192.168.178.44 -> (down)
This gem is based on nmap. So you need to install nmap before and ensure it is available via command line (added to PATH environment variable).
To check if you have installed nmap correctly, run the following command on a terminal
nmap --version
and you should get some version information. After, you are ready to install the ruby gem.
Add this line to your application's Gemfile:
gem 'lan_scanner'
And then execute:
$ bundle install
Or install it yourself by:
$ gem install lan_scanner
Check out the doc at RubyDoc https://www.rubydoc.info/gems/lan_scanner
Bug reports and pull requests are welcome on GitHub at https://github.com/magynhard/lan_scanner. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
FAQs
Unknown package
We found that lan_scanner demonstrated a healthy version release cadence and project activity because the last version was released less than 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.