Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Interpreters

    Exscript 2.1

    Download button

    Downloads: 968  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.5/5)
    19 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Samuel Abels | More programs
    GPL / FREE
    March 11th, 2011, 18:56 GMT [view history]
    ROOT / Programming / Interpreters

     Read user reviews (0)  Refer to a friend  Subscribe

    Exscript description

    A scripting language for automating network connections over protocols such as Telnet or SSH.

    Exscript is a scripting language for automating network connections over protocols such as Telnet or SSH. Exscript is in some ways comparable to Expect, but has some unique features that make it a lot easier to use and understand for non-developers.

    Exscript is written in Python and we value componentized, clean code, so it will always be easy to modify and extend.

    Quick Introduction

    With Exscript you can quickly automate a conversation with a device over Telnet or SSH. For example, to execute the "ls" command on three different hosts, create a file with the following content:

    ls

    and then run it using

    ./exscript.py my_template host1 host2 host3

    Talking To Multiple Devices At The Same Time

    With Exscript you can automatically parallelize your connections, such that multiple sessions are opened at the same time. This can speed up the time in which a specific command is propagated within your network.

    For example, imagine you want to execute the clear ip bgp * soft in command on twenty different Cisco routers. Start by creating a text file with the following content:

    clear ip bgp * soft in

    Save this file as commands.exscript. Also, create a text file that contains the list of hostnames to which the command should be sent:

    host1
    host2
    ...
    host20

    Save this file as hosts.txt. To send this change to all routers at the same time, type the following command:

    ./exscript.py --hosts hosts.txt -c15 commands.exscript

    Note that the -c15 option causes Exscript to open a maximum of fifteen connections at the same time. Once the first host out of these 15 is completed, Exscript opens the connection to the next host, until the clear ip bgp * soft in command has been sent to all hosts.

    Advanced Command Templates

    Exscript templates support many more commands. For example, to automate a session with a Cisco router, the following template may be used:

    show version {extract /^(cisco)/ as vendor}
    {if vendor is "cisco"}
    show ip interface brief {extract /^(S+)s/ as interfaces}
    {loop interfaces as interface}
    show running interface $interface
    configure terminal
    interface $interface
    no shut
    end
    {end}
    copy running-config startup-config
    {end}

    For a full overview over the template language, look at this page.

    Error Handling

    Exscript comes with excellent error handling for free, without adding any extra code into the templates.

    Command Line Options

    You can pass parameters (or lists of parameters) into the templates and use them to drive what happens on the remote host. Exscript easily supports logging, authentication mechanisms such as TACACS and takes care of synchronizing the login procedure between multiple running connections.


    Product's homepage

    Requirements:

    · Python
    · Python-crypto
    · Python-pexpect
    · ssh

    What's New in This Release: [ read full changelog ]

    · The protocol API was vastly improved and handles prompt matching in a much more robust manner.
    · Support for interactive connections was added.
    · Exscript now includes Telnet and SSH servers.
    · Exscript.util.mail has support for sending mail with attachments.
    · Numerous new utilities for sysadmins and developers were added.
    · Most external dependencies have been removed: Exscript now only requires Paramiko and python-crypto. Support for SSH version 1 was removed.

      


    TAGS:

    scripting language | Expect clone | Linux interpreter | scripting | language | Expect

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM