X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6648776f2acd426647fa3d1e8c95a5ab1432c434..9c624f67b3c3041d171abf75d954ba9fa0ae57a4:/client/scripts/remagic.lua?ds=sidebyside diff --git a/client/scripts/remagic.lua b/client/scripts/remagic.lua index 41a2cb83..80645899 100644 --- a/client/scripts/remagic.lua +++ b/client/scripts/remagic.lua @@ -59,6 +59,22 @@ local function cmdClassic() [4] = "hf 14a raw -c -a 5000", } end +local function cmdRestoreST() + local arr = {} + for i = 0, 15 do + local blk = 3 + (4*i) + arr[i] = "hf mf csetbl "..blk.." FFFFFFFFFFFFFF078000FFFFFFFFFFFF" + end + return arr +end +local function sendCmds( cmds ) + for i = 0, #cmds do + if cmds[i] then + print ( cmds[i] ) + core.console( cmds[i] ) + end + end +end --- -- The main entry point function main(args) @@ -76,16 +92,10 @@ function main(args) core.clearCommandBuffer() if isUltralight then - cmds = cmdUltralight() + sendCmds ( cmdUltralight() ) else - cmds = cmdClassic() - end - - for i = 0, #cmds do - if cmds[i] then - print ( cmds[i] ) - core.console( cmds[i] ) - end + sendCmds( cmdClassic() ) + sendCmds( cmdRestoreST() ) end end