aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2020-09-01 17:25:53 -0400
committerRob Austein <sra@hactrn.net>2020-09-01 17:25:53 -0400
commit646454d4264ae27769cb20f31f31eb7cb0b9a908 (patch)
treeac9030c2b71482f5696b6740b8d59000ade3e233 /projects
parent4050df583c3221e55e7ada23c211cfc38fae7d89 (diff)
..Aaaand a few more Python3 string bugs in cryptech_upload
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/hsm/cryptech_upload4
1 files changed, 2 insertions, 2 deletions
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