X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b13fa4448f517b46e917c5145050f434d6df24d5..427cdbe2cd097b09ae6aee2bf707b68e056aaf45:/client/scripts/writeraw.lua diff --git a/client/scripts/writeraw.lua b/client/scripts/writeraw.lua index c53b6396..1dc8c0df 100644 --- a/client/scripts/writeraw.lua +++ b/client/scripts/writeraw.lua @@ -28,12 +28,18 @@ end print(string.len(rawdata)) local command = Command:new{cmd = cmds.CMD_READER_ISO_14443a, arg1 = 3, -- Connect (1) and don't disconnect (2) - arg2 = 0-- string.len(rawdata), - --data = rawdata + arg2 = 0 } local mf_auth = Command:new{cmd = cmds.CMD_READER_ISO_14443a, - arg1 = 6, -- Send raw - arg2 = string.len(rawdata), + arg1 = 10, -- Send raw + -- arg2 contains the length. + -- Remember; rawdata is an ascii string containing + -- ASCII characters. Thus; rawdata= "FF" are two bytes in length + -- but when converted to true hexvalues internally inside the Command + -- constructor, 0xFF is only one byte. So, the bytelength is the + -- length of the ASCII-string divided by two. Thanks jonor! + + arg2 = string.len(rawdata)/2, data = rawdata} local quit = Command:new{cmd = cmds.CMD_READER_ISO_14443a, arg1 = 0, -- Nothing