Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Create Telnet class that will facilitate connecting, authenticating and display the results of commands

Create Telnet class that will facilitate connecting, authenticating and display the results of commands

Computer Science

Create Telnet class that will facilitate connecting, authenticating and display the results of commands.
Create ONE python class. Each task represents a method of the class.
The class name is MyTelnet
Task 1: The Constructor

1) Takes three arguments
a) host
b) username
c) password
2) Sets 3 private properties with same name as 3 arguments
3) Also creates a private instance variable named session that will save a Telnet session. The value of
session inside the constructor is None.


Task 2: The Destructor
1) Closes the Telnet session (session)


Task 3: A Method Named connect()
1) This method takes no arguments.
2) The method initializes the Telnet session by connecting to host private property)
3) The method then passes the username and password private properties to authenticate.


Task 4: A Method Named send_command()
4) This method takes two arguments.
a) The command to execute (required)
b) The time to wait (optional, with a default value greater than 1 second)
5) The method executes the command and returns the result in plain text (not bytes)

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE