
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
routeparser: A route command output text parser
It provides:
Installation:
Usage:
* example (where netstat_rn.txt
is full output from 'netstat -rn' on Linux)::
import routeparser
# read lines from a file
with open('netstat_rn.txt', 'r') as file_handle:
lines = file_handle.readlines()
# You can just get objects representing the routes if you wish:
routes = routeparser.Route.from_linux_netstat_lines(lines)
# These have attributes such as gateway, interface and network.
# Some example values as in-line comments:
routes[0].gateway # ipaddress.IPv4Address('192.168.1.1')
routes[0].interface # 'eth0'
routes[0].network # ipaddress.IPv4Network('10.10.0.0/16')
# Route objects support membership testing:
'10.10.10.1' in routes[0] # would return True, given the above example route
# You can get a RoutingTable object from the lines:
table = routeparser.RoutingTable.from_linux_netstat_lines(lines)
# which you can then use to check for specific route matches:
table.match('10.10.10.1') # would result in a matching Route object, if any
# It supports string or Address/Network objects from the ipaddress module:
import ipaddress
table.match(ipaddress.ip_network('10.10.10.0/24'))
# You can even get a list of all matching routes:
table.matches('10.10.10.10')
# Currently supported outputs and associated methods (for Route and RoutingTable)
# Windows:
# - 'route print': from_windows_route_print_lines
# Linux:
# - 'ip route': from_ip_route_lines
# - 'netstat -r[nv]': from_linux_netstat_lines
# - 'route [-n]': from_linux_route_lines
FAQs
A route command output text parser
We found that routeparser 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.