Skip to content

Commit

Permalink
telnet add handle_request for handle_username
Browse files Browse the repository at this point in the history
  • Loading branch information
celine.grun authored and christian-sahlmann committed May 10, 2024
1 parent fb37eba commit 40dda82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mb_netmgmt/telnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def handle_username(self):
t.send(self.username)
result = t.expect(t.get_password_prompt())
password_prompt = result[1].string.encode()
self.wfile.write(password_prompt)
except AttributeError:
password_prompt = b"Password: "
self.wfile.write(password_prompt)
self.handle_request({"command": self.username.decode()}, None)


def extract_username(byte_string):
Expand Down

0 comments on commit 40dda82

Please sign in to comment.