Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python2.7 / dist-packages / twisted / tap / | server ip : 104.21.89.46 your ip : 172.69.59.68 H O M E |
Filename | /usr/lib/python2.7/dist-packages/twisted/tap/telnet.py |
Size | 871 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 18-Oct-2011 18:31 |
Last accessed | 07-Jul-2025 00:20 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Support module for making a telnet server with twistd.
"""
from twisted.manhole import telnet
from twisted.python import usage
from twisted.application import strports
class Options(usage.Options):
synopsis = "[options]"
longdesc = "Makes a telnet server to a Python shell."
optParameters = [
["username", "u", "admin","set the login username"],
["password", "w", "changeme","set the password"],
["port", "p", "4040", "port to listen on"],
]
compData = usage.Completions(
optActions={"username": usage.CompleteUsernames()}
)
def makeService(config):
t = telnet.ShellFactory()
t.username, t.password = config['username'], config['password']
s = strports.service(config['port'], t)
t.setService(s)
return s