Refactoring

This commit is contained in:
Sheng
2019-10-09 11:40:07 +08:00
parent 049baad909
commit fc30ead69e
4 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ class Server(paramiko.ServerInterface):
self.key_verified = False
def get_cmd2enc(self, encodings):
while len(encodings) < 2:
while len(encodings) < len(self.commands):
encodings.append(random.choice(self.encodings))
return dict(zip(self.commands, encodings[0:2]))