make style

This commit is contained in:
Philippe Teuwen 2021-07-08 09:53:50 +02:00
commit 3c31ee793d
15 changed files with 101 additions and 185 deletions

View file

@ -226,7 +226,7 @@ def main():
child.sendline('hw version')
i = child.expect('pm3 --> ')
msg = escape_ansi(str(child.before))
if signature_msg in msg:
print("[+] RDV4 signature ", color('[OK]', fg='green'))
res += 1
@ -238,7 +238,7 @@ def main():
child.sendline('hw status')
i = child.expect('pm3 --> ')
msg = escape_ansi(str(child.before))
if sm_version in msg:
print("[+] Smart card firmware version ", color('[OK]', fg='green'))
res += 1

View file

@ -47,9 +47,9 @@ for x in apdu:
print(toHexString(x))
print('--')
lenpk = ser.read(1) #first byte is the buffer length
bufferlen = pd(lenpk)[0]
lenpk = ser.read(1) #first byte is the buffer length
bufferlen = pd(lenpk)[0]
buffer = pd(ser.read(bufferlen))
buffer = pd(ser.read(bufferlen))
print('Terminal command:'),
print(toHexString(buffer))

View file

@ -57,10 +57,10 @@ for x in apdu:
ser.write(x)
print(toHexString(x))
lenpk = ser.read(1) #first byte is the buffer length
bufferlen = pd(lenpk)[0]
lenpk = ser.read(1) #first byte is the buffer length
bufferlen = pd(lenpk)[0]
buffer = pd(ser.read(bufferlen))
buffer = pd(ser.read(bufferlen))
print('Card Response:'),
print(toHexString(buffer))
print('--')