Giter Site home page Giter Site logo

adamspera / scriptswitch Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 64 KB

Network configuration tool for Cisco IOS over SSH and Telnet in CLI.

Home Page: https://adamspera.dev/scriptswitch

License: GNU General Public License v2.0

Python 92.39% Batchfile 7.61%
automation networking python scripting switching

scriptswitch's Introduction

Script Switch

Switching up ways to script.

Introduction

ScriptSwitch is a project developed by Adam Spera at Arcadia University, computer science department as an original independent study capstone. ScriptSwitch is a CLI script injection software for Cisco switches.

  • Connect into Cisco switches securely using SSH
  • Select from a variety of template scripts
  • Craft custom scripts in the CLI for deployment
  • Configure port interfaces with template scirpts
  • Ease of use through any Anaconda PowerShell terminal
  • Save output with formatting to an external file

Utilizing the functionality of NetMiko and ConnectHandler over SSH, ScriptSwitch provides the user a simple and easy platform for script injection and creation. Users are given flexibility to create their own scripts form scratch or use a template script.

Usage

Running the program

  • To start the program, run the LaunchProgram.bat file

Establishing a SSH connection

  1. When prompted, enter the target switch's IP address (no subnet)

  2. When prompted, enter the intended user's SSH username

  3. When prompted, enter the intended user's SSH password

  4. Select one of the choices:

    • Create a new script
    • Use a template script
    • Configure an interface

New Script Mode

  1. When prompted, input the code to be deployed to the switch
  2. The program will display the switch output after the response
  3. When confirmation is received, select one of the following options:
    • Send another script
    • Exit the program

Template Script Mode

  1. When prompted, select any of the presented template scripts to deploy it
  2. The program will display the switch output after the response
  3. When confirmation is received, select one of the following options:
    • Send another script
    • Exit the program

Configure Interface Mode

  1. When prompted, select an interface from the list of front facing ports
  2. Select a script template you want to send (this will use the secret key for enable and configure terminal)
    • Some of the templates will request further information like ip addresses or subnets
  3. When confirmation is received, select one of the following options:
    • Send another script!
    • Exit the program.

Output File

The results are automatically saved to a file in the root directory named Output.txt

Installation

Easy Install (Recommended)

If you already have Git, Pip, and Python installed you can use the EasyInstall.bat file!

~ Download the EasyInstall.bat file at https://adamspera.dev/scriptswitch ~

Recommended: Unzip the folder to the desktop, and run it from there.

The program folder will be saved to the user desktop or at the same directory the bat file is ran from. If the folder does not appear, run the file again.

Manual Installation

Git and Cloning

  1. Clone ScriptSwitch to your desired directory and folder.
  2. Clone NTC-Templates inside the scriptswitch directory folder.

Git Bash Variables

  1. Open a Git Bash terminal in the scirptswitch directory and enter the following line of code:
export NET_TEXTFSM="C:\……\scriptswitch\ntc-templates\ntc_templates\templates”
  1. Test that the command was successful by entering the following code: echo $NET_TEXTFSM

Downloading Libraries

  1. Open teh command line and enter the following in the scriptswitch folder:
pip install netmiko
pip install ntc_templates
pip install inquirer

Contributions

Thank you to everybody who helped create the ScriptSwitch project possible!

Special mention and thanks to the following people:

  • Guidance and Mentoring: Vitaly Ford
  • Testing Equipment: Bobby Connell

Made by: Adam T Spera

scriptswitch's People

Contributors

adamspera avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.