]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/scripts/tnp3sim.lua
FIX: thanks @tony, for pointing out a "end" statement inside tnp3sim.lua
[proxmark3-svn] / client / scripts / tnp3sim.lua
index 4e10eb75382ac8b4e05f54b2648fb2eb58dd409f..4325ea3fbfbed09e13525d3ed3ac2f0a97de7892 100644 (file)
@@ -30,17 +30,6 @@ local TIMEOUT = 2000 -- Shouldn't take longer than 2 seconds
 local DEBUG = false -- the debug flag
 local RANDOM = '20436F707972696768742028432920323031302041637469766973696F6E2E20416C6C205269676874732052657365727665642E20'
 
-local band = bit32.band
-local bor = bit32.bor
-local lshift = bit32.lshift
-local rshift = bit32.rshift
-local byte = string.byte
-local char = string.char
-local sub = string.sub
-local format = string.format
-
-
-
 local band = bit32.band
 local bor = bit32.bor
 local lshift = bit32.lshift
@@ -71,6 +60,7 @@ end
 -- This is only meant to be used when errors occur
 function oops(err)
        print("ERROR: ",err)
+       return nil,err
 end
 --- 
 -- Usage help
@@ -207,7 +197,6 @@ local function ValidateCheckSums(blocks)
        calc = CalcCheckSum(blocks,2,3)
        if crc == calc then isOk='Ok' else isOk = 'Error' end   
        io.write( ('TYPE 3 area 2: %04x = %04x -- %s\n'):format(crc,calc,isOk))
-end
 
        local cmd
        local blockdata
Impressum, Datenschutz