From 646454d4264ae27769cb20f31f31eb7cb0b9a908 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 1 Sep 2020 17:25:53 -0400 Subject: ..Aaaand a few more Python3 string bugs in cryptech_upload --- projects/hsm/cryptech_upload | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'projects') diff --git a/projects/hsm/cryptech_upload b/projects/hsm/cryptech_upload index 42e20ee..b40427d 100755 --- a/projects/hsm/cryptech_upload +++ b/projects/hsm/cryptech_upload @@ -169,7 +169,7 @@ class ManagementPortAbstract(object): prompt = self.read() #if prompt.endswith("This is the bootloader speaking..."): # prompt = self.read() - if prompt.endswith("Username: "): + if prompt.endswith(b"Username: "): self.write(self.args.username.encode("ascii") + b"\r") prompt = self.read() if prompt.endswith(b"Password: "): @@ -180,7 +180,7 @@ class ManagementPortAbstract(object): if not prompt.endswith((b"> ", b"# ")): print("Device does not seem to be ready for a file transfer (got {!r})".format(prompt)) return prompt - self.write(cmd.encode("ascii") + b"\r") + self.write(cmd + b"\r") response = self.read() return response -- cgit v1.2.3