the generation of NrAr is used in the regression tests. I readded the old way and if you call the hitag2_gen_nRaR.py with five params, you get the nice commands instead
This commit is contained in:
1 parent
1e6915fcd7
commit
d3d701f538
3 files changed
+12
No files matched your search
@@ -109,7 +109,17 @@ def hitag2(state, length=48):
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
if len(sys.argv) == 4:
|
||||
key = int(sys.argv[1], 16)
|
||||
uid = int(sys.argv[2], 16)
|
||||
n = int(sys.argv[3])
|
||||
for i in range(n):
|
||||
nonce = random.randrange(2**32)
|
||||
state = hitag2_init(key, uid, nonce)
|
||||
print('%08X %08X' % (nonce, hitag2(state, 32) ^ 0xffffffff))
|
||||
|
||||
elif len(sys.argv) == 5:
|
||||
key = int(sys.argv[1], 16)
|
||||
uid = int(sys.argv[2], 16)
|
||||
n = int(sys.argv[3])
|
||||
|
||||
@@ -256,6 +256,7 @@ while true; do
|
||||
if ! CheckFileExist "MFP dictionary exists" "$DICPATH/mfp_default_keys.dic"; then break; fi
|
||||
if ! CheckFileExist "MFULC dictionary exists" "$DICPATH/mfulc_default_keys.dic"; then break; fi
|
||||
if ! CheckFileExist "T55XX dictionary exists" "$DICPATH/t55xx_default_pwds.dic"; then break; fi
|
||||
if ! CheckFileExist "HITAG2 dictionary exists" "$DICPATH/ht2_default.dic"; then break; fi
|
||||
|
||||
echo -e "\n${C_BLUE}Testing tools:${C_NC}"
|
||||
if ! CheckExecute "xorcheck test" "tools/xorcheck.py 04 00 80 64 ba" "final LRC XOR byte value: 5A"; then break; fi
|
||||
|
||||
Reference in new issue
Block a user