mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
tools scripts: fix mix of spaces & tabs
This commit is contained in:
parent
e559a4a5af
commit
bcb33ca5ef
7 changed files with 214 additions and 214 deletions
|
@ -24,29 +24,29 @@ import sys
|
|||
import os
|
||||
|
||||
if(len(sys.argv) < 3):
|
||||
print
|
||||
print '\t'+sys.argv[0] + ' - Generate final byte for XOR LRC'
|
||||
print
|
||||
print 'Usage: ' + sys.argv[0] + ' <ID Byte1> <ID Byte2> ... <LRC>'
|
||||
print
|
||||
print '\tSpecifying the bytes of a UID with a known LRC will find the last byte value'
|
||||
print '\tneeded to generate that LRC with a rolling XOR. All bytes should be specified in HEX.'
|
||||
print
|
||||
print 'Example:'
|
||||
print
|
||||
print '\txorcheck.py 04 00 80 64 ba'
|
||||
print
|
||||
print 'Should produce the output:'
|
||||
print
|
||||
print '\tTarget (BA) requires final LRC XOR byte value: 5A'
|
||||
print
|
||||
os._exit(True)
|
||||
print
|
||||
print '\t'+sys.argv[0] + ' - Generate final byte for XOR LRC'
|
||||
print
|
||||
print 'Usage: ' + sys.argv[0] + ' <ID Byte1> <ID Byte2> ... <LRC>'
|
||||
print
|
||||
print '\tSpecifying the bytes of a UID with a known LRC will find the last byte value'
|
||||
print '\tneeded to generate that LRC with a rolling XOR. All bytes should be specified in HEX.'
|
||||
print
|
||||
print 'Example:'
|
||||
print
|
||||
print '\txorcheck.py 04 00 80 64 ba'
|
||||
print
|
||||
print 'Should produce the output:'
|
||||
print
|
||||
print '\tTarget (BA) requires final LRC XOR byte value: 5A'
|
||||
print
|
||||
os._exit(True)
|
||||
|
||||
target= int(sys.argv[len(sys.argv) - 1],16)
|
||||
|
||||
lrc= 0x00
|
||||
for i in range(len(sys.argv) - 1):
|
||||
lrc ^= int(sys.argv[i + 1],16)
|
||||
lrc ^= int(sys.argv[i + 1],16)
|
||||
print
|
||||
print 'Target (%02X) requires final LRC XOR byte value: %02X' % (target,lrc)
|
||||
print
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue