mirror of
https://github.com/huashengdun/webssh.git
synced 2026-08-19 20:26:35 +00:00
Refactoring
This commit is contained in:
+3
-2
@@ -65,9 +65,10 @@ class Server(paramiko.ServerInterface):
|
||||
self.key_verified = False
|
||||
|
||||
def get_cmd2enc(self, encodings):
|
||||
while len(encodings) < len(self.commands):
|
||||
n = len(self.commands)
|
||||
while len(encodings) < n:
|
||||
encodings.append(random.choice(self.encodings))
|
||||
return dict(zip(self.commands, encodings[0:2]))
|
||||
return dict(zip(self.commands, encodings[0:n]))
|
||||
|
||||
def check_channel_request(self, kind, chanid):
|
||||
if kind == 'session':
|
||||
|
||||
Reference in New Issue
Block a user