Code Monkey home page Code Monkey logo

securecrt-tools's Introduction

Jamie's github stats

  • ๐Ÿ”ญ Iโ€™m currently working on Network Automation projects for customers - generally a mix of Ansible and Python
  • ๐ŸŒฑ Iโ€™m currently learning HTML/CSS/Javascript/VueJS & Vuetify for building front ends for small custom automation tools

securecrt-tools's People

Contributors

airmanic avatar geekynickuk avatar jamiecaesar avatar methridge avatar murder avatar tylersiemers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

securecrt-tools's Issues

IntStatsOverTime.py not cllecting the information of the NVE interface

We need to apply a different parsing for a NVE interace, this is the output:

# sh interface nve 1
nve1 is up
admin state is up,  Hardware: NVE
  Description: Used by NFM for VXLAN termination
  MTU 9216 bytes
  Encapsulation VXLAN
  Auto-mdix is turned off
  RX
    ucast: 12852422 pkts, 1734994994 bytes - mcast: 450448321 pkts, 120826354783 bytes
  TX
    ucast: 251073233 pkts, 288626926854 bytes - mcast: 0 pkts, 0 bytes

In the current status the output for that interface is coming back empty.
I'm going to work in that one.

Support for Cisco IOS XR devices

Hey, great addition to SecureCRT, makes a lot of things very easy to gather. I haven't had time myself and just played around with the code a little bit, but do you already have plans to add support for Cisco IOS XR software?

Dual Jumphost

Our environment requires double linux jumphost before we can reach the Cisco devices. Is there anything we can adjust in the script to successfully connect behind double jumphosts?

NextHopSummary doesn't recognize sub-ints

If a router interface has multiple sub-interfaces (router on a stick install, dot1q), all the IPs get assigned to the physical interface in the script output. The script does not break out by sub-interface like it should.

scripts fail on import

This might be a nubb error, but no matter which script I attempt to run in SecureCRT, I get an error that points to a module import. I didn't see any instructions on installing packages with PIP, and I assume that's why the scripts are failing?

Attribute Error

Hello,
I am fairly new to scripting. I wanted to test your scripts on Secure CRT. But I am getting folloiwng error.

Error 'SecureCRT.Application' obkect has no attribute 'ScriptFullName' Line 10
script_dir, script_name = os.path.split(crt.ScriptFullName)

s_switchport_mapping.py wrong output

Hello friend. Sorry for bother you again, but there is a BUG (wrong output) with s_switchport_mapping.py script when using VRF. The issue is the following:

I have 1 VRF with 2 different VLAN's (and subnets). When running s_switchport_mapping.py script it's showing wrong subnet in the output, for example:

CSV result from s_arp_to_csv.py (everyting is correct):

ADDRESS AGE MAC INTERFACE TYPE
10.29.118.5 13 74c9.9a1f.1345 Vlan3105 ARPA
10.29.118.6 3 74c9.9a1f.120d Vlan3105 ARPA
10.29.119.5 8 74c9.9a1f.1345 Vlan3106 ARPA
10.29.119.6 8 74c9.9a1f.120d Vlan3106 ARPA

CSV result from s_switchport_mapping.py (wrong IP for VLAN 3105):

Interface Status MAC MAC Vendor DNS Name IP Address VLAN Description
TenGigabitEthernet8/3 connected 74c9.9a1f.1345 Ericsson AB 10.29.119.5 3106 SERVER
TenGigabitEthernet8/3 connected 74c9.9a1f.1345 Ericsson AB 10.29.119.5 3105 SERVER
TenGigabitEthernet8/3 connected a4a1.c2eb.4bb6 Ericsson AB 10.29.119.44 3106 SERVER
TenGigabitEthernet8/3 connected a4a1.c2eb.4bb6 Ericsson AB 10.29.119.44 3105 SERVER

The correct subnet for VLAN 3105 is 10.29.118.X

Best regards.

Script error - Attribute Error

Hi!

Thank you for such amazing and handy scripts. I recently had to reinstall securecrt and your scripts, and now I can't seem to run them without getting this error...

image

The debug is not much help to me either....

<SCRIPT_INIT> Starting Logging. Running Python version: 2.7.9 (default, May 26 2016, 11:15:27) [MSC v.1800 64 bit (AMD64)]
11/20/2018 12:13:56 - <SCRIPT_INIT> Starting creation of CRTScript object
11/20/2018 12:13:56 - <SESSION_INIT> Starting creation of CRTSession object
11/20/2018 12:13:56 - <IS_CONNECTED> Checking Connected Status. Got: 1 (True)
11/20/2018 12:13:56 - <SESSION_INIT> Session already connected.
11/20/2018 12:13:56 - <IS_CONNECTED> Checking Connected Status. Got: 1 (True)

I'm running SecureCRT 8.0.4. Any help would be appreciated!

multi device script could not login to aireos devices

i modified a multi device script to run a single device script for WLC running AireOS. The single device script works. However calling it in a multidevice script, the script could not successfully login. It seem the AireOS ignore the ssh -l flag it received and prompts again user: where the script hangs until the ssh session timedout.

AP Serial Numbers

Can you include the AP serial numbers (from show ap inventory all) in the output of s_AireOS_collect_ap_detail.py?

Modifications to WriteOutput function

Greetings:
I've been working on another script that is used in the decommissioning process. It clears AAA and creates a local username / password. The idea is to have a single log file rather than one per command.
Based on this I had a couple of questions about the WriteOutput function.

  1. Would changing file open mode from 'wb' to 'ab' so we can append data to a single file cause any major issues in other scripts?
  2. Prompt changes. As the prompt changes when in config mode, is there an easy way to account for this in the function? Or do we need to pass in all possible prompt variations as a variable to the function? Maybe with a default list?

--ME

Error running s_switchport_mapping.py

UnicodeEncodeError
Error: ascii
File: \s_switchport_mapping.py
Line: 159
utilities.list_of_lists_to_csv(output, output_filename)

The script was able to run properly on another device. For some reason I am getting the error when running it in a C9410R
The error pops after terminal length and width is executed after pointing to the arp csv file
There is an output port-map csv file but it is incomplete

Help with Ubuntu and SecureCRT8.5

Hello.

I'm new using scripts with SecureCRT, so I want to run the script "Document_Device.py", but it's getting me the following Error: Type must be a string at line 62. I have already copy and rename the script "script_settings_default.py" to "script_settings.py" and change line 29 with the following: settings['savepath'] = '/home/newuser/Documents/SecureCRT-master', all the other required scripts are in that folder.

Thanks in advanced for any help.

Best Regards.

Running Scripts from Command Line

Hi fantastic work. The scripts both yours and mine work fine when launching the session within securecrt and then running them. If I launch Securecrt from the command line and pass the script as an argument to run, the session launches fine but then I get "Unknown or Unsupported device OS" Do you have any idea why I would get this? It happens on all scripts.

Thank you

CDP to CSV Feature Request

Hi Jamie,

Firstly, I'd like to thank you for the excellent work on the SCRT scripts for Cisco devices which I use quite frequently.

I've tried to update the cdp to csv template script to allow to include the hostname of the device the script was run on as the first column in the CSV file it creates but I have been unsuccessful.

At line 1 I added: Value Filldown HOST (.*)
And after the Start line, I added ^${HOST}#show\scdp\sneighbors\sdetail.

It appears the hostname is not captured when the command is run and so I am totally lost on how to include it.

Are you able to help with this tweak?

When I merge all the CDP.CSV outputs per site into a single CSV, I am unable to easily identify each entry to the hostname it was generated on. To merge all into one file I simply perform a dos command copy *.csv Merged-CDP-All.csv.

I look forward to your help on this.

Thanks
Raj

Script Settings Custimization

I've been looking into a way to not overwrite my customized settings with each update and wanted to start a discussion here.

The current import of script_settings.py works, but is there a better option. Maybe using ConfigParser, or a JSON or YAML config, etc. etc.

If we stick with the current import option. I'd suggest we move the default settings to say script_settings_default.py and use the following code to import.

# Import Settings from Settings File or Default settings
try:
    from script_settings import settings
except IOError:
    from script_settings_default import settings

This way, if I want to change the settings, I create a script_settings.py with all settings and it wouldn't get over written the next time I update.

Thoughts?

Feature Request

First of all thank you very much for these set of scripts. Very useful and portable. Good work sir!

Would it be possible to add a feature to the existing switchport mapping script wherein to include the result of cdp neighbor and map it to the port/ip address in the switchport mapping table?

Or a new switchport mapping script that would ask the inputs for both the arp table and cdp neighbor.

Help with s_arp_to_csv

Hello.

First of all, I want to thank you for sharing this incredible jewel. I has help me a lot with my daily job. I'm trying to run the script called s_arp_to_csv.py and is getting me the following error when using VRF:

Error: 'CRTScript' object has no attribute 'hostname'
Line: 70

With the global or default table, is working as expect.

Thank you again.

Best regards.

Tab confusion with multi-device scripts

The script seems to get confused if you change tabs while a multi-device script is running. While this works fine for single device scripts (and tabs can run different single-device scripts in parallel), if you move away from the active tab on a multi-device script, the next time that it tries to connect to a device it will attempt in the wrong tab and the script will hang and need to be cancelled.

Additional Feature Request in switchport mapping script

As a network engineer I find the collection of scripts very useful. Kudos!

However, in the switchport mapping script it will useful for me as a network engineer if there are also columns for speed, duplex, and type (the ones found in the show interface status command). It seem those were dropped by the script. It will be nice to have those back please :-}

Another add-on if cdp neighbor table can also be added to the switchport mapping script.

Thank you for these amazing scripts.

Use WaitForString() timeout in scripts

There is a timeout value that can be passed into WaitForString(). It also has a return code that will indicate if the timeout was reached. Modify scripts to use this so if something hangs, or if the script isn't seeing the expected text that the script won't hang forever (or until manually cancelled).

multi-command capture

It would be very useful to also have a script that reads a user-defined text file for a list of commands that it can execute in a current connected device. Both in exec, global, interface modes and others.

How to update manuf file

How to update the manuf file? I tried manually replacing the manuf file with contents from wireshark database but the scripts are throwing error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.