Saravanan666/pypi-org huggingface dataset:
Package: napalm-core
🔥 Napalm Package: napalm-baseThis is an automatically generated report on the detectors in this package.Some quick stats:3 collections19 detectorsoptimisations modules:IDDescriptionSeveritystorage-variable-boolUsing bool as a storage variable is more expensive than uint256 or other types that fill a whole 256 bit word.INFOcache-array-length-loopThe compiler will re-execute each instance of .length for each loop iteration. Caching the length will reduce the amount of sloads necessary to perform the operation.INFOinitialize-default-valueInitializing variables with their default value leads to unnecessary gas expenditureINFOindicators modules:IDDescriptionSeveritymath-in-unsafe-blockMathematical operators in unsafe blocks are not checked for under flows or overflows.INFOuse-of-privilege-to-protect-sensitive-functionsIt's necessary to implement proper controls on wallet security when  privileged functions are used to protect sensitive functions.INFOimport-safetransfer-solmateSolmate's SafeTransferLib doesn't perform the same checks SafeERC20 does, in particular it doesn't check if a contract exists leading to potential vulnerabilities.INFOblock-number-l2Solidity's block.number semantics are not consistent on L2s, leading to potential vulnerabilities.INFOpush-0-solc-versionYour solidity version uses PUSH0 which is not supported by all chains.INFOdetectors modules:IDDescriptionSeverityint-cast-block-timestampCasting block.timestamp can lead to reduced precision and unexpected behavior, consider not casting instead.WARNINGuse-of-unsafe-erc20-functionsThe ERC20 implementation does not automatically include checks that ensure the success of the operation. Using the OpenZeppelin's SafeERC20 library is recommended.INFOblock-timestamp-swapPassing block.timestamp as the deadline effectively removes the deadline functionality which prevents malicious validators from holding back transactions to execute them at a later time.WARNINGdos-push-array-loopPotential Denial of Service when users can push to an array that's irreducible and looped over.HIGHchainlink-circuit-breakerVulnerable to exploitation in case of a Chainlink circuit breaker event.HIGHunchecked-create-2Unchecked return value for CREATE2 call.MEDIUMunchecked-approveUnchecked token approveHIGHunchecked-equation-modifierPotential lack of input control due to missing requires checks.HIGHerc721-transfer-from-stucktransferFrom call on ERC721 can lead to stuck tokensHIGHerc721-mint-stuck_mint call on ERC721 can lead to stuck tokensHIGHerc20-approve-callPotential Denial of Service when tokens don't implement approve() consistently ( e.g. USDT ).HIGH
Package: napalm-digineo-procurve
Napalm ArubaNapalm driver for aruba procurve switches. Written to be used in combination with netbox.Tested devicesSwitch Model NameTested Firmware VersionAruba 2530 8G PoE+-SwitchYA.16.05.0008Motivation and AcknowledgementThere are alreadya fewpython packagesthat try to provide support for the procurve switches series tonapalm.  These packages come in different levels of quality and supported features though.The main motivation point for this package is to write a napalm driver for procurve switches that also work well together withnetbox.  Thus the goal of this package is to provide all functionality of a napalm driver that is used by netbox.Is it any good?Yes.
Package: napalm-dlink
napalm-dlinkRequirementsFor driver needs a preconfigured TFTP server because Dlink devices can download config only from TFTP/FTP server.
Default path: /tmpTested on device Dlink 1210-28Сompletion status:_send_commandis_aliveload_replace_candidateload_merge_candidatecompare_config - This device doesn't contain a builtin function for compare config.commit_configdiscard_configrollbackget_opticsget_lldp_neighborsget_lldp_neighbors_detailget_factsget_interfacesget_interfaces_ipget_interfaces_countersget_environmentget_arp_tablecliget_ntp_peers (D-Link doesn't support this option)get_ntp_serversget_ntp_statsget_mac_address_tableget_probes_config (D-Link doesn't support this option)get_snmp_informationget_userspingtracerouteget_config
Package: napalm-fsos-ssh
Napalm driver for FSOS using SSHWarningThis driver has been tested only on S3900 24T4S with version 1.7.3Installpip install napalm-fsos-sshDevDevcontainerA devcontainer is availableStandardInstallPoetryInstall and setup dependenciespoetry install
poetry shell
pre-commit installRun unit testpoetry run pytestRun linter & formatterpoetry run ruff format . 
poetry run ruff check .Switch configurationIn order to use the driver you need to enable ssh:ip ssh server enableYou also need to configure a username and password with ro permission to authenticate with ssh
You can change privilege level regarding driver capability you needsusername <your_username> password 0 <your_password>
username <your_username> privilege 15ContributingWe welcome and encourage contributions to this project! Please read theContributing guide. Also make sure to check theCode of Conductand adhere to its guidelinesSecuritySeeSECURITY.mdfile for details.LicenceThe code is under CeCILL license.You can find all details here:https://cecill.info/licences/Licence_CeCILL_V2.1-en.htmlCreditsCopyright © Ludovic Ortega, 2022Contributor(s):-Ortega Ludovic -ludovic.ortega@adminafk.fr
Package: napalm-ftos
napalm-ftosNAPALM driver for Dell EMC/Force10 FTOSImplemented APIscloseget_arp_tableget_bgp_neighbors_detailget_configget_environmentget_factsget_interfacesget_interfaces_countersget_interfaces_ipget_lldp_neighborsget_lldp_neighbors_detailget_mac_address_tableget_ntp_peersget_ntp_serversget_ntp_statsget_snmp_informationget_usersis_aliveopenpingtracerouteMissing APIs.clicommit_configcompare_configcompliance_reportconnection_testsdiscard_configget_bgp_configget_bgp_neighborsget_firewall_policiesget_ipv6_neighbors_tableget_network_instancesget_opticsget_probes_configget_probes_resultsget_route_toload_merge_candidateload_replace_candidateload_templatepost_connection_testspre_connection_testsrollback
Package: napalm-gaia
napalm-gaiaUnofficial CheckPoint GaiaOS driver-plugin for NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support) python library.Certain commands will require expert password.This driver is experimental, check the docs what is possible at the moment.Compatibilitydocumented functions were successfully tested against:R77.30 GaiaR80.10 GaiaR80.20 GaiaR80.30 Gaiauntested yet:R80.40not supported:R77.30 SPLATLimitations:vsx not supported(planned)installpip install napalm-gaiadocumentationhttps://napalm-gaia.readthedocs.io/en/latestcontactYou can reach us vianetworktocode#napalm-gaiasimple test#!/usr/bin/env python3
from napalm import get_network_driver    

driver = get_network_driver('gaiaos')   
optional_args = {'secret': 'expert-password'}
device = driver('1.1.1.1', 'username', 'password', optional_args=optional_args)
device.open()    
vals = device.get_users()    
print(vals)
vals = device.get_config('retrieve='all')
print(vals)
vals = device.get_config('retrieve='ntp')
print(vals)
vals = device.send_clish_cmd('show asset all')
print(vals)
vals = device.send_expert_cmd('uname -a')
print(vals)    
device.close()
Package: napalm-h3c-comware
napalm-h3c-cw7-sshEnglish|中文This repository is published inhttps://github.com/napalm-automation-community/napalm-h3c-cw7-sshNAPALMNAPALM(Network Automation and Programmability Abstraction Layer with Multivendor support) is a Python library that implements a set of functions to interact with different router vendor devices using a unified API.NAPALM supports several methods to connect to the devices, to manipulate configurations or to retrieve data.napalm-h3c-cw7-sshNAPALM driver for H3C Comware V7 network devices, over ssh.Supported devicesS5100、S5500、S6800、S12500 Series Data Center Switches.Some methods may work on Routers.Looking forward to your testing and feedback :).Supported functions:white_check_mark: is_alive():white_check_mark: get_facts():white_check_mark: get_interfaces():white_check_mark: get_interfaces_ip():white_check_mark: get_interfaces_counters():x:needs to be rewritten:white_check_mark: get_lldp_neighbors():white_check_mark: get_lldp_neighbors_detail():white_check_mark: get_environment():white_check_mark: cli():white_check_mark: get_arp_table():white_check_mark: get_mac_address_move_table():white_check_mark: get_mac_address_table():white_check_mark: get_vlans():white_check_mark: get_config():white_check_mark: get_irf_config():white_check_mark: is_irf()Getting StartedInstallpipinstallnapalm-h3c-comwareUpgradingpipinstallnapalm-h3c-comware-UUseYou can use this driver like this:fromnapalmimportget_network_driverdriver=get_network_driver("h3c_comware")driver=driver("192.168.56.20","netdevops","NetDevops@01",)driver.open()ret=driver.is_alive()print(ret)If you want to custom some connection parameter, example: the port connected to the device, you should useoptional_args, it is exactly the same asnetmiko.BaseConnection.__init__:fromnapalmimportget_network_driverdriver=get_network_driver("h3c_comware")conn_args={"port":2222}driver=driver("192.168.56.21","netdevops","NetDevops@01",optional_args=conn_args)driver.open()ret=driver.is_alive()print(ret)Sometimes you want to execute raw command via netmiko, you can usesend_command, it is exactly the same asnetmiko.send_command:fromnapalmimportget_network_driverdriver=get_network_driver("h3c_comware")driver=driver("192.168.56.20","netdevops","NetDevops@01",)driver.open()# you can use any options that supported by netmiko.send_commandret=driver.send_command("display clock",use_textfsm=True)print(ret)
Package: napalm-huawei-vrp
NAPALM Huawei VRPIt's a NAPALM Community Driver for Huawei VRP5/VRP8 Enterprise/Service Provider Routers and Switches.This repository is referenceNAPALM-CEand Cisco IOS code, thanks for thdDaniel's contribution中文版Supported Huawei Network DevicesNE Series:40E, 8000AR Series:2200ATN 900 Series:910B, 910C and 910DS Switch Series:S5700, S6700This driver is not limited to these models and series, these are just devices where the driver have been tested.InstructionsThe driver is under development and iteration.Get infoAPIDescriptionget_facts()Return general device informationget_config()Read configget_arp_table()Get device ARP tableget_mac_address_table()Get mac table of connected devicesget_interfaces()Get interface informationget_interfaces_ip()Get interface IP informationget_interfaces_counters()Get interface countersget_lldp_neighbors()Fetch LLDP neighbor informationConfigAPIDescriptioncli()Send any cli commandsload_merge_candidate()Load configcompare_config()A string showing the difference between the running configuration and the candidate configurationdiscard_config()Discards the configuration loaded into the candidatecommit_config()Commits the changes requested by the method load_replace_candidate or load_merge_candidateOther toolsAPIDescriptionis_active()get devices active statusping()Ping remote ipPlans to developget_bgp_configget_bgp_neighborsget_bgp_neighbors_detailget_environmentget_ipv6_neighbors_tableget_lldp_neighbors_detailget_network_instancesget_ntp_peersget_ntp_serversget_ntp_statsget_opticsget_route_toget_snmp_informationget_usersget_vlansHow to InstallYou can install napalm-huawei-vrp with pip:pip install napalm-huawei-vrpThat will install napalm and huawei_vrp driver currently available.How to upgradeYou can upgrade napalm-huawei-vrp with pip once the new version released:pip install --upgrade napalm-huawei-vrpcheck the package version.pip list | grep napalm-huawei-vrpQuick startfromnapalmimportget_network_driverdriver=get_network_driver('huawei_vrp')device=driver(hostname='192.168.76.10',username='admin',password='this_is_not_a_secure_password')device.open()# Send Any CLI commandsend_command=device.cli(['dis version'])#  Return general device informationget_facts=device.get_facts()print(get_facts)# other APIdevice.get_config()device.get_arp_table()device.get_mac_address_table()device.get_interfaces()device.get_interfaces_ip()device.get_interfaces_counters()device.get_lldp_neighbors()ContactSlackSlack is probably the easiest way to get help with NAPALM. You can find us in the channel napalm on thenetwork.toCode()team.NewsYouTube VideosNAPALM Network Automation Python: Working with Huawei VRPby Michael AlvarezNAPALM Network Automation Python: Collect Data from Multiple Vendors. Cisco and Huaweiby Michael AlvarezNAPALM Network Automation Python: Making Configurations in a Multivendor Network. Cisco and Huaweiby Michael Alvarez
Package: napalm-inspector
NAPALM-InspectorThe NAPALM Inspector is a web application aimed to help with troubleshooting the getters in NAPALM. If you have found a bug in one of the getters you can use this tool as an easy way to help the developers figure out what's going on.Once the application is up and running visithttp://127.0.0.1:5000and choose the platform and getter you want to test. You will be asked to provide the information your network devices, i.e. when the application will ask you for the output from a command likeshow versionthen you just paste the output into the form and move on from there.Installationpipinstallnapalm-inspectorexportFLASK_APP=napalm_inspector
flaskrunRunning from Dockergitclonehttps://github.com/napalm-automation/napalm-inspectorcdnapalm-inspector
makedocker
makestartPress Control+C to end the application when done.Once you are done you can remove the containermakestop
Package: napalm-ios-alternative-drv
alternative unofficial napalm ios driverDue the purpose of NAPALM the included IOS Drivers are designed to require Privilege Exec Mode(aka Privilege Level 15)
to ensure the full feature-set is always available.If this privilege level is not available the driver will not work.This limits its use for certain purposes where priv exec is not required. (like using the getters() or sending show commands)This driver is a fork of the original driver, it changes the behavior of the driver and implements privilege level checking.
It will allow to connect without privilege level 15 and instead raise permission-errors whenever a function is called and the required privilege level is not available.It will neither change function arguments or return values nor implement new functions.installpip install napalm-ios-alternative-drvusagewithout secret:#!/usr/bin/env python3
from napalm import get_network_driver
driver = get_network_driver('ios_ad')      
device = driver('1.1.1.1', 'username', 'password')
device.open()    
vals = device.get_facts()   
print(vals)    
device.close()with secret:#!/usr/bin/env python3
from napalm import get_network_driver
optional_args = { 'secret': '<enable_secret>'}
driver = get_network_driver('ios_ad')      
device = driver('1.1.1.1', 'username', 'password', optional_args=optional_args)
device.open()    
vals = device.get_facts()   
print(vals)    
device.close()Authors:The largest part of the codebase is sync'd from and belongs to theNAPALM Project.Privilege Patches are done by me.Original Authors(NAPALM Project)David Barroso (dbarrosop@dravetech.com)Elisa Jasinska (elisa@bigwaveit.org)Many others, check thenapalm contributorspage for details.Privilege Patchesreminguremingu@techturn.de
Package: napalm-logs
Python library to parse syslog messages from network devices and produce JSON serializable Python objects, in a vendor agnostic shape. The output objects are structured following the OpenConfig or IETF YANG models.For example, the following syslog message from a Juniper device:Mar 30 12:45:19 re0.edge01.bjm01 rpd[15852]: BGP_PREFIX_THRESH_EXCEEDED 1.2.3.4 (External AS 15169): Configured maximum prefix-limit threshold(160) exceeded for inet-unicast nlri: 181 (instance master)Will produce the following object:{"yang_message":{"bgp":{"neighbors":{"neighbor":{"192.168.140.254":{"state":{"peer_as":"65001"},"afi_safis":{"afi_safi":{"inet4":{"state":{"prefixes":{"received":141}},"ipv4_unicast":{"prefix_limit":{"state":{"max_prefixes":140}}}}}}}}}}},"message_details":{"processId":"2902","severity":5,"facility":18,"hostPrefix":null,"pri":"149","processName":"rpd","host":"vmx01","tag":"BGP_PREFIX_THRESH_EXCEEDED","time":"14:03:12","date":"Jun 21","message":"192.168.140.254 (External AS 65001): Configured maximum prefix-limit threshold(140) exceeded for inet4-unicast nlri: 141 (instance master)"},"timestamp":1498050192,"facility":18,"ip":"127.0.0.1","host":"vmx01","yang_model":"openconfig-bgp","error":"BGP_PREFIX_THRESH_EXCEEDED","os":"junos","severity":5}}The library is comes with a command line program which acts as a daemon, running in background and listening to syslog messages continuously, then publishing them over secured channels, where multiple clients can subscribe.It is flexible to listen to the syslog messages via UDP or TCP, but also from brokers such as Apache Kafka. Similarly, the output objects can be published via various channels such as ZeroMQ, Kafka, or remote server logging. It is also pluggable enough to extend these capabilities and listen or publish to other services, depending on the needs.The messages are published over a secured channel, encrypted and signed. Although the security can be disabled, this is highly discouraged.DocumentationPlease checkthe official documentationfor more detailed information.Installnapalm-logs is available on PyPi and can easily be installed using the following command:pipinstallnapalm-logs
Package: napalm-netgear
napalm_netgearNAPALM module for netgear switchesUses netmiko netgear prosafe driver. Tested with M4300 and M4250.Implemented APIsopencloseget_configload_merge_candidatecommit_configget_interfaces_ippartially implemented:get_mac_address_tableget_interfacesget_interfaces_countersget_factsload_replace_candidate
Package: napalm-opengear
napalm-opengearNAPALM driver for Opengear LinuxYour Jinja2 might look like:config.system.name {{ inventory_hostname }}This is turned intosudo config -s config.system.name=...Anything without a value (just a key likeconfig.delayed) will be deleted viaconfig -d $key.We usecpto store a state between "running" and "startup". Diffs are created by movingconfig.xmlaround and seeing what changed.Do not editconfig.xmloutside of NAPALM or you will be missing changes.Editing the XML or diffing the XML is not supported, this may limit the amount of configuration we can provide in a 2-dimensional "set" like structure.Implemented APIscloseget_arp_tableget_configis_aliveopenget_factsget_interfacesget_interfaces_ipcommit_configcompare_configdiscard_configrollbackload_merge_candidateget_userscliMissing APIs.compliance_reportconnection_testsget_bgp_configget_bgp_neighborsget_firewall_policiesget_ipv6_neighbors_tableget_network_instancesget_opticsget_probes_configget_probes_resultsget_route_toload_replace_candidateload_templatepost_connection_testspre_connection_testspingtracerouteget_bgp_neighbors_detailget_environmentget_interfaces_countersget_lldp_neighborsget_lldp_neighbors_detailget_mac_address_tableget_ntp_peersget_ntp_serversget_ntp_statsget_snmp_information[...]How to releasegit tag v0.3.2 <commit hash>
git push --tagsActions should take care of the rest and cut a release and push it to pypi
Package: napalm-panos
NAPALM PANOSThis is community version ofNAPALMfor the Palo Alto firewall operating system. For standard tutorials and overview of NAPALM, please review their documentation.Configuration SupportThis table identifies the currently available configuration methods supported:GetterSupportedConfig Replace✅Commit Confirm❌Config Merge✅Compare Config✅Atomic Changes✅Rollback✅Commit Confirm is not supported by the vendor at the time of this writing.Configuration Lock is also supported, but theoptional_argsconfig_lockkey set toTrue. You can see in this example.from napalm import get_network_driver

panos_device = device"
panos_user = "admin"
panos_password = "pass123"
driver = get_network_driver("panos")
optional_args = {"config_lock": True}

with driver(panos_device, panos_user, panos_password, optional_args=optional_args) as device:
    device.load_replace_candidate(filename="2022-01-01-intended-config.xml")
    device.commit_config()As shown in the example above, the use of NAPALM's context manager is supported and recommended to use.The locks are acquired and released using XML API. Locks for config and commit lock are obtained and released separately from each other. Both locks are
released automatically by the device when a commit is made on the device.For troubleshooting:The code crashed in a way that the lock could not be removed?Remove the lock manually (CLI, API, Web UI). The lock can only be removed by the administrator who set it, or by a superuser.The lock disappeared in the middle of program execution?Did someone do a commit on the device? The locks are removed automatically when the administrator who set the locks performs a commit operation on the device.Supported GettersThis table identifies the currently available getters and the support for each:GetterSupportedget_arp_table✅get_bgp_config❌get_bgp_neighbors❌get_bgp_neighbors_detail❌get_config✅get_environment❌get_facts✅get_firewall_policies❌get_interfaces✅get_interfaces_counters❌get_interfaces_ip✅get_ipv6_neighbors_table❌get_lldp_neighbors✅get_lldp_neighbors_detail❌get_mac_address_table❌get_network_instances❌get_ntp_peers❌get_ntp_servers❌get_ntp_stats❌get_optics❌get_probes_config❌get_probes_results❌get_route_to✅get_snmp_information❌get_users❌get_vlans❌is_alive✅ping❌traceroute❌
Package: napalm-ros
CaveatsAs napalm-ros uses API, several caveats exist.No safe mode (not exposed via API). There is no commit, rollback.API is not versioned so things may break when routeros is upgraded.Missing features.This driver does not implement any configuration management. Config management on mikrotik is different than on cisco, juniper etc. which provideconfig replace. You provide a plain text config file and replace running config with that. MikroTik does not have this. Some menu paths (eg. /ip
address) do not have any order in which entries appear. Only one unique ip address can exist within a VRF. In some paths (eg. /ip firewall filter)
order matter.Implemented gettersget_arp_tableget_interfaces_countersget_environmentget_factsget_interfacesget_interfaces_ipget_ntp_serversget_snmp_informationget_usersget_ipv6_neighbors_tableis_alivepingget_lldp_neighborsget_lldp_neighbors_detailget_network_instancesget_mac_address_tableget_bgp_neighborsget_bgp_neighbors_detailget_config