Created
October 6, 2015 21:37
-
-
Save toufik-airane/459df58f6ccee7bf40e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from twisted.internet import protocol, reactor | |
from twisted.manhole.telnet import Shell, ShellFactory | |
from twisted.protocols.telnet import Telnet | |
class HoneyProtocol(Shell): | |
def __init__(self): | |
None | |
def welcomeMessage(self): | |
return ('\r\nNetGear v4.1\r\n') | |
def doCommand(self, cmd): | |
print cmd | |
self.write ('\r\nNetGear v4.1\r\n') | |
return | |
class HoneyFactory(ShellFactory): | |
def __init__(self): | |
self.username = "admin" | |
self.password = "foo" | |
self.protocol=HoneyProtocol | |
if __name__ == "__main__": | |
reactor.listenTCP(1234, HoneyFactory()) | |
reactor.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment