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.
This repository contains a Cisco NX-API asyncio based client that uses the httpx as an underlying transport and lxml as the basis for handling XML.
Note: This client does not support the NETCONF interface.
WORK IN PROGESS
Thie following shows how to create a Device instance and run a list of commands.
By default the Device instance will use HTTPS transport. The Device instance supports the following settings:
host
- The device hostname or IP addressusername
- The login user-namepassword
- The login passwordproto
- (Optional) Choose either "https" or "http", defaults to "https"port
- (Optional) Chose the protocol port to override proto defaultThe result of command execution is a list of CommandResults (namedtuple).
The output
field will be:
from asyncnxapi import Device
username = 'dummy-user'
password = 'dummy-password'
async def run_test(host):
dev = Device(host=host, creds=(username, password))
res = await dev.exec(['show hostname', 'show version'], ofmt='json')
for cmd in res:
if not cmd.ok:
print(f"{cmd.command} failed")
continue
# do something with cmd.output as dict since ofmt was 'json'
Cisco DevNet NX-API Rerefence:
Cisco platform specific NX-API references:
N3K systems, requires 7.0(3)I2(2) or later: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus3000/sw/programmability/7_x/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide_7x/b_Cisco_Nexus_3000_Series_NX-OS_Programmability_Guide_7x_chapter_010010.html
N5K system, requires 7.3(0)N1(1) or later: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/programmability/guide/b_Cisco_Nexus_5K6K_Series_NX-OS_Programmability_Guide/nx_api.html#topic_D110A801F14F43F385A90DE14293BA46
FAQs
Cisco NX-API asyncio client
We found that aio-nxapi 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.