-
You need python3, pip3, and exscript. If on Windows view "Using WSL 2 on Windows"
- pip3 - https://www.makeuseof.com/tag/install-pip-for-python/
- sudo apt install python3-pip
- sudo pip3 install -r requirements.txt
- If pip install doesn't work for Exscript
- git clone https://github.com/knipknap/exscript.git
- pip3 install -r requirements.txt .
- If pip install doesn't work for Exscript
- pip3 - https://www.makeuseof.com/tag/install-pip-for-python/
-
Change 'hosts/hosts_file' to include the hosts to connect to
- One host per line, no other formatting required
-
To run the file
- python3 cisco_cmd.py or ./cisco_cmd.py (Syntax below)
-
Results are printed to console and appened to results.txt
- Can send results to different file (Syntax below)
" " or ' ' are REQUIRED when using spaces
-o is NOT required
./cisco_cmd.py -h, --help
./cisco_cmd.py -b, --list-builtin
./cisco_cmd.py -c
<built-in_command>
, --cmd<built-in_command>
./cisco_cmd.py -d
<custom_command>
, --custom<custom_command>
./cisco_cmd.py -c
<built-in_command>
-o<option>
, ./cisco_cmd.py --cmd<built-in_command>
--option<option>
These modules are located in the "modules" directory. To see contents of file/module - cat
<module_name>
./cisco_cmd.py -m
<module_name>
, --module<module_name>
./cisco_cmd.py -l, --list-modules
./cisco_cmd.py -c shmac -o abcd
./cisco_cmd.py -c shmactable
./cisco_cmd.py -c shintstatus -o '| in Gi1/0/1'
./cisco_cmd.py -c shint -o Gi1/0/1
./cisco_cmd.py -c shint -o 'Gi1/0/1 | in CRC'
./cisco_cmd.py -c shrun
./cisco_cmd.py -c shrun -o '| begin secret'
./cisco_cmd.py -d 'show vtp status | in trunk'
./cisco_cmd.py -d 'show run | begin trunk'
./cisco_cmd.py -m
<name_of_module>
./cisco_cmd.py -m shmactableint
./cisco_cmd.py -m health
Add templates for better interactions - https://exscript.readthedocs.io/en/latest/cli_tutorial.html#the-exscript-template-language
Add modules & built-in tasks
Printing results to another file on the fly
reboot get system performance cfg -s fap-get-status cw_diag uptime cw_diag sys-performance iwconfig diag_debug_crashlog read cw_diag -c wtp-cfg cw_diag -c radio-cfg cw_diag -c vap-cfg cw_diag kernel-panic dmesg rcfg klog