Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 3.17.65.43
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
twisted /
conch /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
client
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
insults
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
openssh_compat
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
scripts
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
ssh
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
test
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
ui
[ DIR ]
drwxr-xr-x
2024-11-28 06:59
__init__.py
198
B
-rw-r--r--
2022-02-07 13:12
avatar.py
1.6
KB
-rw-r--r--
2022-02-07 13:12
checkers.py
18.97
KB
-rw-r--r--
2022-02-07 13:12
endpoints.py
29.26
KB
-rw-r--r--
2022-02-07 13:12
error.py
2.6
KB
-rw-r--r--
2022-02-07 13:12
interfaces.py
14.57
KB
-rw-r--r--
2022-02-07 13:12
ls.py
2.63
KB
-rw-r--r--
2022-02-07 13:12
manhole.py
11.57
KB
-rw-r--r--
2022-02-07 13:12
manhole_ssh.py
4.32
KB
-rw-r--r--
2022-02-07 13:12
manhole_tap.py
5.36
KB
-rw-r--r--
2022-02-07 13:12
mixin.py
1.34
KB
-rw-r--r--
2022-02-07 13:12
recvline.py
18.71
KB
-rw-r--r--
2022-02-07 13:12
stdio.py
2.71
KB
-rw-r--r--
2022-02-07 13:12
tap.py
3.12
KB
-rw-r--r--
2022-02-07 13:12
telnet.py
37.16
KB
-rw-r--r--
2022-02-07 13:12
ttymodes.py
2.14
KB
-rw-r--r--
2022-02-07 13:12
unix.py
16.16
KB
-rw-r--r--
2022-02-07 13:12
Save
Rename
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ TAP plugin for creating telnet- and ssh-accessible manhole servers. @author: Jp Calderone """ from zope.interface import implementer from twisted.application import service, strports from twisted.conch import manhole, manhole_ssh, telnet from twisted.conch.insults import insults from twisted.conch.ssh import keys from twisted.cred import checkers, portal from twisted.internet import protocol from twisted.python import filepath, usage class makeTelnetProtocol: def __init__(self, portal): self.portal = portal def __call__(self): auth = telnet.AuthenticatingTelnetProtocol args = (self.portal,) return telnet.TelnetTransport(auth, *args) class chainedProtocolFactory: def __init__(self, namespace): self.namespace = namespace def __call__(self): return insults.ServerProtocol(manhole.ColoredManhole, self.namespace) @implementer(portal.IRealm) class _StupidRealm: def __init__(self, proto, *a, **kw): self.protocolFactory = proto self.protocolArgs = a self.protocolKwArgs = kw def requestAvatar(self, avatarId, *interfaces): if telnet.ITelnetProtocol in interfaces: return ( telnet.ITelnetProtocol, self.protocolFactory(*self.protocolArgs, **self.protocolKwArgs), lambda: None, ) raise NotImplementedError() class Options(usage.Options): optParameters = [ [ "telnetPort", "t", None, ( "strports description of the address on which to listen for telnet " "connections" ), ], [ "sshPort", "s", None, ( "strports description of the address on which to listen for ssh " "connections" ), ], [ "passwd", "p", "/etc/passwd", "name of a passwd(5)-format username/password file", ], [ "sshKeyDir", None, "<USER DATA DIR>", "Directory where the autogenerated SSH key is kept.", ], ["sshKeyName", None, "server.key", "Filename of the autogenerated SSH key."], ["sshKeySize", None, 4096, "Size of the automatically generated SSH key."], ] def __init__(self): usage.Options.__init__(self) self["namespace"] = None def postOptions(self): if self["telnetPort"] is None and self["sshPort"] is None: raise usage.UsageError( "At least one of --telnetPort and --sshPort must be specified" ) def makeService(options): """ Create a manhole server service. @type options: L{dict} @param options: A mapping describing the configuration of the desired service. Recognized key/value pairs are:: "telnetPort": strports description of the address on which to listen for telnet connections. If None, no telnet service will be started. "sshPort": strports description of the address on which to listen for ssh connections. If None, no ssh service will be started. "namespace": dictionary containing desired initial locals for manhole connections. If None, an empty dictionary will be used. "passwd": Name of a passwd(5)-format username/password file. "sshKeyDir": The folder that the SSH server key will be kept in. "sshKeyName": The filename of the key. "sshKeySize": The size of the key, in bits. Default is 4096. @rtype: L{twisted.application.service.IService} @return: A manhole service. """ svc = service.MultiService() namespace = options["namespace"] if namespace is None: namespace = {} checker = checkers.FilePasswordDB(options["passwd"]) if options["telnetPort"]: telnetRealm = _StupidRealm( telnet.TelnetBootstrapProtocol, insults.ServerProtocol, manhole.ColoredManhole, namespace, ) telnetPortal = portal.Portal(telnetRealm, [checker]) telnetFactory = protocol.ServerFactory() telnetFactory.protocol = makeTelnetProtocol(telnetPortal) telnetService = strports.service(options["telnetPort"], telnetFactory) telnetService.setServiceParent(svc) if options["sshPort"]: sshRealm = manhole_ssh.TerminalRealm() sshRealm.chainedProtocolFactory = chainedProtocolFactory(namespace) sshPortal = portal.Portal(sshRealm, [checker]) sshFactory = manhole_ssh.ConchFactory(sshPortal) if options["sshKeyDir"] != "<USER DATA DIR>": keyDir = options["sshKeyDir"] else: from twisted.python._appdirs import getDataDirectory keyDir = getDataDirectory() keyLocation = filepath.FilePath(keyDir).child(options["sshKeyName"]) sshKey = keys._getPersistentRSAKey(keyLocation, int(options["sshKeySize"])) sshFactory.publicKeys[b"ssh-rsa"] = sshKey sshFactory.privateKeys[b"ssh-rsa"] = sshKey sshService = strports.service(options["sshPort"], sshFactory) sshService.setServiceParent(svc) return svc