- self.put(data[0], data[1], self.out_ann, [3, ['Mode: %02X' % data[2]]])
- elif self.opcode == OPCODE_DERIVE_KEY:
- self.put(data[0], data[1], self.out_ann, [3, ['Random: %s' % data[2]]])
- elif self.opcode == OPCODE_GEN_DIG:
- self.put(data[0], data[1], self.out_ann, [3, ['Zone: %s' % ZONES[data[2]]]])
- elif self.opcode == OPCODE_LOCK:
- self.put(data[0], data[1], self.out_ann, [3, ['Zone: {}, Summary: {}'.format(
- 'DATA/OTP' if data[2] else 'CONFIG',
- 'Ignored' if data[2] & 0x80 else 'Used')]])
- elif self.opcode == OPCODE_PAUSE:
- self.put(data[0], data[1], self.out_ann, [3, ['Selector: %02X' % data[2]]])
- elif self.opcode == OPCODE_READ:
- self.put(data[0], data[1], self.out_ann, [3, ['Zone: {}, Length: {}'.format(ZONES[data[2] & 0x03],
- '32 bytes' if data[2] & 0x90 else '4 bytes')]])
- elif self.opcode == OPCODE_WRITE:
- self.put(data[0], data[1], self.out_ann, [3, ['Zone: {}, Encrypted: {}, Length: {}'.format(ZONES[data[2] & 0x03],
- 'Yes' if data[2] & 0x40 else 'No', '32 bytes' if data[2] & 0x90 else '4 bytes')]])
+ self.putx(s, [3, ['Mode: %02X' % s[2]]])
+ elif op == OPCODE_DERIVE_KEY:
+ self.putx(s, [3, ['Random: %s' % s[2]]])
+ elif op == OPCODE_GEN_DIG:
+ self.putx(s, [3, ['Zone: %s' % ZONES[s[2]]]])
+ elif op == OPCODE_LOCK:
+ self.putx(s, [3, ['Zone: {}, Summary: {}'.format(
+ 'DATA/OTP' if s[2] else 'CONFIG',
+ 'Ignored' if s[2] & 0x80 else 'Used')]])
+ elif op == OPCODE_PAUSE:
+ self.putx(s, [3, ['Selector: %02X' % s[2]]])
+ elif op == OPCODE_READ:
+ self.putx(s, [3, ['Zone: {}, Length: {}'.format(ZONES[s[2] & 0x03],
+ '32 bytes' if s[2] & 0x90 else '4 bytes')]])
+ elif op == OPCODE_WRITE:
+ self.putx(s, [3, ['Zone: {}, Encrypted: {}, Length: {}'.format(ZONES[s[2] & 0x03],
+ 'Yes' if s[2] & 0x40 else 'No', '32 bytes' if s[2] & 0x90 else '4 bytes')]])