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.
pyNetgear provides an easy to use Python API to control your Netgear router. It uses the SOAP-api on modern Netgear routers to communicate. It is built by reverse engineering the requests made by the NETGEAR Genie app.
pyNetgear works with Python 2 and 3.
If you are connected to the network of the Netgear router, a host is optional.
If you are connected via a wired connection to the Netgear router, a password is optional.
The username defaults to admin.
The port defaults to 5000.
The ssl defaults to false.
You can specify url and it will take precedence on host/port/ssl parameters.
This allows the use of HTTPS, https://orbilogin.com
for example.
It currently supports the following operations:
login
Logs in to the router. Will return True or False to indicate success.
get_attached_devices
Returns a list of named tuples describing the device signal, ip, name, mac, type, link_rate and allow_or_block.
get_attached_devices_2
Returns a list of named tuples describing the device signal, ip, name, mac, type, link_rate, allow_or_block, device_type, device_model, ssid and conn_ap_mac.
This call is slower and probably heavier on the router load.
get_traffic_meter
Return a dict containing the traffic meter information from the router (if enabled in the webinterface).
allow_block_device
Allows user to block/unblock devices from accessing router by specifying mac_addr and new device_status (Block/Allow)
Note: In order to use this function, Remote Management must be enabled in the router's admin settings.
You can install PyNetgear from PyPi using pip3 install pynetgear
(use pip
if you're still using Python 2).
To test run from the console:
$ python -m pynetgear [<pass>] [<host>] [<user>] [<port>] [<ssl>]
To use within your Python scripts:
from pynetgear import Netgear
netgear = Netgear(password=mypassword)
for i in netgear.get_attached_devices():
print i
It has been tested with the Netgear R6300 router and the Netgear WNDR4500 router. According to the NETGEAR Genie app description, the following routers should work:
FAQs
Access Netgear routers using their SOAP API
We found that pynetgear demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.