Skip to content

Cushychicken/easytel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easytel

A simplified interface for telnet sessions in Python. Usable as a command line interface or as an easily importable end user class.

In Python

from easytel import Easytel
ez = Easytel(HOST, LOGIN, PSWD, EXPECT) # takes host name, login ID, password, and prompt char as inputs
result = ez.talk([ 'date', 'ls -al'])   # takes list of strings as input
                                        # returns tuple of (command, command_output)

for r in result:
    print r[0] # This was the command run
    print r[1] # This was the output of the command. 

In Shell

# Will be prompted for a password if not entered in the shell
python easytel.py 192.168.1.1 home $ 

Inspired by and derived from Corey Goldberg's TelnetController.py script that you can find on his website.

About

Simplified interface for telnet sessions in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages