diff --git a/client/scripts/14araw.lua b/client/scripts/14araw.lua index dd6fc4421..bc238250f 100644 --- a/client/scripts/14araw.lua +++ b/client/scripts/14araw.lua @@ -76,7 +76,7 @@ function main(args) end local ignore_response = false - local appendcrc = false + local append_crc = false local stayconnected = false local payload = nil local doconnect = true @@ -87,7 +87,7 @@ function main(args) for o, a in getopt.getopt(args, 'orcpx:dt3') do if o == "o" then doconnect = false end if o == "r" then ignore_response = true end - if o == "c" then appendcrc = true end + if o == "c" then append_crc = true end if o == "p" then stayconnected = true end if o == "x" then payload = a end if o == "d" then DEBUG = true end @@ -108,7 +108,7 @@ function main(args) -- The actual raw payload, if any if payload then - res,err = sendRaw(payload,{ignore_response = ignore_response, topaz_mode = topaz_mode}) + res,err = sendRaw(payload,{ignore_response = ignore_response, topaz_mode = topaz_mode, append_crc = append_crc}) if err then return oops(err) end if not ignoreresponse then @@ -145,6 +145,9 @@ function sendRaw(rawdata, options) if options.topaz_mode then flags = flags + lib14a.ISO14A_COMMAND.ISO14A_TOPAZMODE end + if options.append_crc then + flags = flags + lib14a.ISO14A_COMMAND.ISO14A_APPEND_CRC + end local command = Command:new{cmd = cmds.CMD_READER_ISO_14443a, arg1 = flags, -- Send raw