Created
January 8, 2018 22:32
-
-
Save ransford/09e0941489060381546f1106c215a5ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from twisted.internet.protocol import Protocol, Factory | |
from twisted.internet import reactor | |
class Scream(Protocol): | |
version = b'123' | |
def dataReceived(self, data): | |
self.transport.write(b'AAAAAAAA' + self.version) | |
if __name__ == '__main__': | |
f = Factory() | |
f.protocol = Scream | |
reactor.listenTCP(12346, f) | |
reactor.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run with