]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/scripts/dumptoemul-mfu.lua
textual change @4m4rOk
[proxmark3-svn] / client / scripts / dumptoemul-mfu.lua
index bdcc667bffb8b5a3d648445e71561f91b6f3a455..83274935184229e893ff7f6cfbe3c71da7fd166c 100644 (file)
@@ -2,12 +2,11 @@
 -- Have a look there for further details
 getopt = require('getopt')
 bin = require('bin')
-
-example = "script run dumptoemul -i dumpdata-foobar.bin"
-author = "Martin Holst Swende"
-usage = "script run dumptoemul [-i <file>] [-o <file>]"
+example = "script run dumptoemul-mfu -i dumpdata-foobar.bin"
+author = "Martin Holst Swende \n @Marshmellow"
+usage = "script run dumptoemul-mfu [-i <file>] [-o <file>]"
 desc =[[
-This script takes a dumpfile from 'hf mf dump' and converts it to a format that can be used
+This script takes a dumpfile from 'hf mfu dump' and converts it to a format that can be used
 by the emulator
 
 Arguments:
@@ -16,11 +15,6 @@ Arguments:
        -o <filename>   Specifies the output file. If omitted, <uid>.eml is used.       
 
 ]]
-
--------------------------------
--- Some utilities 
--------------------------------
-
 --- 
 -- A debug printout-function
 function dbg(args)
@@ -34,11 +28,11 @@ function oops(err)
        print("ERROR: ",err)
 end
 
-
 --- 
 -- Usage help
 function help()
        print(desc)
+       print(author)
        print("Example usage")
        print(example)
 end
@@ -58,10 +52,8 @@ end
 
 local function readdump(infile)
         t = infile:read("*all")
-        --print(string.len(t))
         len = string.len(t)
         local len,hex = bin.unpack(("H%d"):format(len),t)
-        --print(len,hex)
         return hex
 end
 
@@ -97,7 +89,7 @@ local function main(args)
        -- The hex-data is now in ascii-format,
 
        -- But first, check the uid
-       local uid = string.sub(dumpdata,1,8)
+       local uid = string.sub(dumpdata,1+48,8)
        output = output or (uid .. ".eml")
 
        -- Format some linebreaks
Impressum, Datenschutz