-for candidate in range(256):
- crc= 0x00
- for i in range(len(sys.argv) - 2):
- crc ^= int(sys.argv[i + 1],16)
- crc ^= candidate
- if (crc == target):
- print
- print 'Target (%02X) matched with final byte value: %02X' % (target,candidate)
- print
-
+lrc= 0x00
+for i in range(len(sys.argv) - 1):
+ lrc ^= int(sys.argv[i + 1],16)
+print
+print 'Target (%02X) requires final LRC XOR byte value: %02X' % (target,lrc)
+print