X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/bd5d0f07e9330f18088f626bc1d18857aeaeaa8e..3ac59c7fed24cc69e2c9f626e5e4392769779e13:/client/scripts/tnp3dump.lua diff --git a/client/scripts/tnp3dump.lua b/client/scripts/tnp3dump.lua index 520161b9..dedd3df1 100644 --- a/client/scripts/tnp3dump.lua +++ b/client/scripts/tnp3dump.lua @@ -249,23 +249,27 @@ local function main(args) end end + + local uid = block0:sub(1,8) + local itemtype = block1:sub(1,4) + local cardid = block1:sub(9,24) + local traptype = block1:sub(25,28) + -- Write dump to files if not DEBUG then - local foo = dumplib.SaveAsBinary(bindata, outputTemplate..'.bin') + local foo = dumplib.SaveAsBinary(bindata, outputTemplate..'_uid_'..uid..'.bin') print(("Wrote a BIN dump to the file %s"):format(foo)) - local bar = dumplib.SaveAsText(emldata, outputTemplate..'.eml') + local bar = dumplib.SaveAsText(emldata, outputTemplate..'_uid_'..uid..'.eml') print(("Wrote a EML dump to the file %s"):format(bar)) end - local uid = block0:sub(1,8) - local itemtype = block1:sub(1,4) - local cardid = block1:sub(9,24) - -- Show info print( string.rep('--',20) ) - print( (' ITEM TYPE : 0x%s - %s'):format(itemtype, toyNames[itemtype]) ) - print( (' UID : 0x%s'):format(uid) ) - print( (' CARDID : 0x%s'):format(cardid ) ) + print( (' ITEM TYPE : 0x%s - %s'):format(itemtype, toyNames[itemtype]) ) + print( (' Alter ego / traptype : 0x%s'):format(traptype) ) + print( (' UID : 0x%s'):format(uid) ) + print( (' CARDID : 0x%s'):format(cardid ) ) + print( string.rep('--',20) ) end