def __init__(self): TCPApplication.__init__(self) _ConsumerMixin.__init__(self) self.app = Site( static.File(os.path.abspath("./stegano/sitetest"))).buildProtocol( "test") #Serve the given folder self.app.transport = self #Because we define self as transport we have to implement function normally called by twisted for a transport class
def __init__(self): TCPApplication.__init__(self) _ConsumerMixin.__init__(self) self.app = Site(static.File(os.path.abspath("./stegano/sitetest"))).buildProtocol( "test" ) # Serve the given folder self.app.transport = ( self ) # Because we define self as transport we have to implement function normally called by twisted for a transport class
def __init__(self): TCPApplication.__init__(self) _ConsumerMixin.__init__(self) #t = factory.OpenSSHFactory() t = MyFactory() #Use my factory instead of the original one t.portal = portal.Portal(unix.UnixSSHRealm()) #Instanciate all the needed stuff to create to protocol t.portal.registerChecker(checkers.UNIXPasswordDatabase()) t.portal.registerChecker(checkers.SSHPublicKeyDatabase()) if checkers.pamauth: t.portal.registerChecker(chk.PluggableAuthenticationModulesChecker()) t.dataRoot = '/etc/ssh' t.moduliRoot = '/etc/ssh' t.startFactory() self.app = t.buildProtocol("lala") self.app.transport = self
def __init__(self): TCPApplication.__init__(self) _ConsumerMixin.__init__(self) #t = factory.OpenSSHFactory() t = MyFactory() #Use my factory instead of the original one t.portal = portal.Portal(unix.UnixSSHRealm( )) #Instanciate all the needed stuff to create to protocol t.portal.registerChecker(checkers.UNIXPasswordDatabase()) t.portal.registerChecker(checkers.SSHPublicKeyDatabase()) if checkers.pamauth: t.portal.registerChecker( chk.PluggableAuthenticationModulesChecker()) t.dataRoot = '/etc/ssh' t.moduliRoot = '/etc/ssh' t.startFactory() self.app = t.buildProtocol("lala") self.app.transport = self
def __init__(self, tcpapp, path): _ConsumerMixin.__init__(self) self.app = Site(static.File( os.path.abspath(path))).buildProtocol("test") self.app.transport = self #Because we define self as transport we have to implement function normally called by twisted for a transport class self.tcpapp = tcpapp #tcpapp contain the TCPApplication !
def __init__(self,tcpapp, path): _ConsumerMixin.__init__(self) self.app = Site(static.File(os.path.abspath(path))).buildProtocol("test") self.app.transport = self #Because we define self as transport we have to implement function normally called by twisted for a transport class self.tcpapp = tcpapp #tcpapp contain the TCPApplication !