Skip to main content

cli scraping tools for network devices

Project description

Commander

Commander is a powerful command-line interface (CLI) scraping tool designed for managing and interacting with multiple network devices simultaneously.

Features

  • :zap:Blazingly Fast: Commander is optimized for speed, allowing you to execute commands swiftly across your network devices.
  • :thread:Multi-threaded: Leverage the efficiency of multi-threading to process commands concurrently, ensuring quick and efficient communication with all devices.
  • :lock:Secure by Design: Prioritizing security, Every connection is made from your local machine. in addition, Commander stores sensitive connection information, such as passwords and IPs locally on your computer, in Keepass, a renowned open-source password manager.

Problem Statement

Networks, especially in large-scale environments, often face challenges in maintaining standardization. The complexity grows, making it challenging for networking and IT teams to enforce uniform configurations across devices. Without proper tools, networks may become scattered and prone to inconsistencies, or administrators may spend hours manually configuring each device.

While tools like Ansible, Puppet, and Chef are excellent for maintaining standardization, they come with a steep learning curve, additional infrastructure management, and setup complexities.

Commander aims to provide a simpler alternative, allowing users to swiftly execute commands across multiple devices without the overhead of a complex infrastructure.

Installation

Install Commander with a simple pip command:

pip install NetworkCommander

compile from source

if you want to compile from source you can do that with poetry.

first you have to make sure poetry is installed

poetry --version

after you did that you can start the build.

poetry install
poetry build

a folder named dist will apper with the .tar.gz and .whl files.

pip install ./dist/path/to/.whl

after that you can fully use commander

Usage

Version Check

Check the version of Commander:

commander version

Initialization

Before using Commander, ensure it's initialized. Run the following command to generate the keepass database and provide the password for it:

commander init

Device Management

List Devices

List all devices under your command, optionally filtered by tags:

commander device list --tag <tag_name>

Add Device

Add a new device to the database, specifying the device's password:

commander device add "router1(cisco_ios) -> root@1.1.1.1"

Alternatively, you can provide a file containing device strings:

commander device add --devices_file path/to/devices_file

If you don't enter any device or a device file the program defaultly will read from devices from stdin.

commander device add

r1(cisco_ios) -> root@localhost:5000
^Z

Remove Device

Remove one or more devices from the database:

commander device remove <device_name_1> <device_name_2> ...

Tag Management

Add Tag

Add a tag to devices for better segmentation:

commander device tag add <tag_name> <device_name_1> <device_name_2> ...

Remove Tag

Remove a tag from devices:

commander device tag remove <tag_name> <device_name_1> <device_name_2> ...

List Tags

List all tags applied to devices:

commander device tag list

Device Connectivity

Ping Devices

this command will try to connect to every device in your database, it will not deploy any commands to the device.

optionally filter by tags.

commander device ping --tag <tag_name>

Command Deployment

in order to deploy a command to the devices in your database need to use the deploy command

commander device deploy "<command_1>" "<command_2>" 

in case you want to deploy the commands to some devices but not all you can use tags.

commander device deploy --tag "router" "<command_1>" "<command_2>" 

if there are any spasific devices you need to deploy to you can use the --device option also

commander device deploy --tag "router" --device "device not tagged with router" "<command_1>" "<command_2>" 

By default, the "deploy" command will deploy with the most basic permission level possible.

In order to escalate the permisions you need to specify the --permision_level flag

commander device deploy  --permision_level "configure_terminal" "<command_1>" "<command_2>" 

Output Folder (Optional)

Save command output to a specified folder:

commander device deploy --output_folder <path/to/output_folder> "<command>"

Conclusion

Commander provides a streamlined solution for scraping network devices, offering speed and simplicity without the complexities of traditional configuration management tools. Empower your networking and IT teams to enforce standardization across your network effortlessly.

Have a great experience with Commander!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

networkcommander-0.4.7.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

networkcommander-0.4.7-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file networkcommander-0.4.7.tar.gz.

File metadata

  • Download URL: networkcommander-0.4.7.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.3 Windows/10

File hashes

Hashes for networkcommander-0.4.7.tar.gz
Algorithm Hash digest
SHA256 53bfb87aa2a67a6751d45cad47c337f8029310597182aeb2360dabab2e468e58
MD5 5035b78c7360891462f6c819ac545ee4
BLAKE2b-256 d9922d5813421c0cc827ac17aeb5598386a30d48938c2df646fc3fe7e82e68e2

See more details on using hashes here.

File details

Details for the file networkcommander-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: networkcommander-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.3 Windows/10

File hashes

Hashes for networkcommander-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b0d3dc0bec87e71c09683644ab048bb4a6e2c9ceb5ba2895910af770780a83d5
MD5 2c986c08dcd434078584d362cb3ad714
BLAKE2b-256 ba52771b62002ac8d91b605b8e2ae9e9003880aa366ce5724c935294aa09600f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page