I understand, that Telnet from twisted.protocols.telnet is deprecated. However, I can't see how the newer Telnet from twisted.conch.telnet will replace it. I wrote a very simple piece of telnet authentication code, that goes like this:
from twisted.protocols.telnet import Telnet
class MyProtocol(Telnet):
def welcomeMessage(self):
return "Hi, Welcome to my telnet server"
def loginPrompt(self):
return "Who are you ?"
def checkUserAndPass (self,u,p):
# some stuff here
def telnet_Command(self, cmd):
self.transport.write("you typed " + cmd)
It works fine, but the newer Telnet class has none of these Standard methods. I checked out AuthenticatingTelnetProtocol, too, but most of it is not documented. Can anybody point me to an example, that does (more or less) the same as the code above or rewrite it ? Thanks in advance