KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/doc/m2crypto-0.16/demo/ssl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/m2crypto-0.16/demo/ssl/twistedsslserver.py
#!/usr/bin/python
"""
Demonstrates M2Crypto.SSL.TwistedProtocolWrapper

Copyright (c) 2005 Open Source Applications Foundation. All rights reserved.
"""

import sys
import M2Crypto.SSL as SSL
import M2Crypto.SSL.TwistedProtocolWrapper as wrapper
import twisted.internet.protocol as protocol
import twisted.internet.reactor as reactor
import twisted.python.log as log


class Echo(protocol.Protocol):
    def dataReceived(self, data):
        print 'received: "%s"' % data
        self.transport.write(data)

    def connectionMade(self):
        print 'connection made'


class ContextFactory:
    def getContext(self):
        ctx = SSL.Context()
        ctx.load_cert('server.pem')
        return ctx


if __name__ == '__main__':
    log.startLogging(sys.stdout)
    factory = protocol.Factory()
    factory.protocol = Echo
    wrapper.listenSSL(8000, factory, ContextFactory())
    reactor.run()

Anon7 - 2021