1 local getopt
= require('getopt')
2 local ansicolors
= require('ansicolors')
3 local utils
= require('utils')
5 copyright
= 'Copyright (c) 2019 IceSQL AB. All rights reserved.'
6 author
= 'Christian Herrmann'
9 This script initialize a Proxmark3 RDV4.0 with
10 - uploading dictionary files to flashmem
11 - configuring the LF T55X7 device settings
17 script run init_rdv4 -h
25 -- A debug printout-function
26 local function dbg(args
)
27 if not DEBUG
then return end
28 if type(args
) == 'table' then
39 -- This is only meant to be used when errors occur
40 local function oops(err
)
42 core
.clearCommandBuffer()
52 print(ansicolors
.cyan
..'Usage'..ansicolors
.reset
)
54 print(ansicolors
.cyan
..'Arguments'..ansicolors
.reset
)
56 print(ansicolors
.cyan
..'Example usage'..ansicolors
.reset
)
60 -- The main entry point
62 local dash
= string.rep('--', 20)
68 -- Read the parameters
69 for o
, a
in getopt
.getopt(args
, 'h') do
70 if o
== 'h' then return help() end
73 print('Prepping your Proxmark3 RDV4')
75 -- Upload dictionaries
76 print('Uploading dictionaries to RDV4 flashmemory')
78 core
.console('mem load -f mfc_default_keys --mfc')
79 core
.console('mem load -f t55xx_default_pwds --t55xx')
80 core
.console('mem load -f iclass_default_keys --iclass')
83 -- T55x7 Device configuration
84 print('Configure T55XX device side to match RDV4')
86 core
.console('lf t55xx deviceconfig --r0 -a 29 -b 17 -c 15 -d 47 -e 15 -p')
88 core
.console('lf t55xx deviceconfig --r1 -a 29 -b 17 -c 18 -d 50 -e 15 -p')
90 core
.console('lf t55xx deviceconfig --r2 -a 29 -b 17 -c 18 -d 40 -e 15 -p')
92 core
.console('lf t55xx deviceconfig --r3 -a 29 -b 17 -c 15 -d 31 -e 15 -f 47 -g 63 -p')
97 core
.console('hw status')