__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
The parent class for all the SSH services. Currently implemented services
are ssh-userauth and ssh-connection.
Maintainer: Paul Swartz
"""
from typing import Dict
from twisted.logger import Logger
class SSHService:
# this is the ssh name for the service:
name: bytes = None # type:ignore[assignment]
protocolMessages: Dict[int, str] = {} # map #'s -> protocol names
transport = None # gets set later
_log = Logger()
def serviceStarted(self):
"""
called when the service is active on the transport.
"""
def serviceStopped(self):
"""
called when the service is stopped, either by the connection ending
or by another service being started
"""
def logPrefix(self):
return "SSHService {!r} on {}".format(
self.name, self.transport.transport.logPrefix()
)
def packetReceived(self, messageNum, packet):
"""
called when we receive a packet on the transport
"""
# print self.protocolMessages
if messageNum in self.protocolMessages:
messageType = self.protocolMessages[messageNum]
f = getattr(self, "ssh_%s" % messageType[4:], None)
if f is not None:
return f(packet)
self._log.info(
"couldn't handle {messageNum} {packet!r}",
messageNum=messageNum,
packet=packet,
)
self.transport.sendUnimplemented()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 182 B | 0644 |
|
| _kex.py | File | 8.37 KB | 0644 |
|
| address.py | File | 1.08 KB | 0644 |
|
| agent.py | File | 9.29 KB | 0644 |
|
| channel.py | File | 9.73 KB | 0644 |
|
| common.py | File | 1.91 KB | 0644 |
|
| connection.py | File | 24.96 KB | 0644 |
|
| factory.py | File | 4.13 KB | 0644 |
|
| filetransfer.py | File | 37.19 KB | 0644 |
|
| forwarding.py | File | 8.03 KB | 0644 |
|
| keys.py | File | 62.38 KB | 0644 |
|
| service.py | File | 1.52 KB | 0644 |
|
| session.py | File | 13.33 KB | 0644 |
|
| sexpy.py | File | 944 B | 0644 |
|
| transport.py | File | 80.03 KB | 0644 |
|
| userauth.py | File | 27.06 KB | 0644 |
|