X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/21452811e6f4319f11ba1b6aa19eb61233c30ba3..24d48e60fc5b29d317467cc260c40cad2bb6f695:/client/commands.lua diff --git a/client/commands.lua b/client/commands.lua index e09adb36..bf2a8a1f 100644 --- a/client/commands.lua +++ b/client/commands.lua @@ -162,6 +162,10 @@ Command = { return o end, + parse = function (packet) + local count,cmd,arg1,arg2,arg3,data = bin.unpack('LLLLH512',packet) + return Command:new{cmd = cmd, arg1 = arg1, arg2 = arg2, arg3 = arg3, data = data} + end, } function Command:__tostring() local output = ("%s\r\nargs : (%s, %s, %s)\r\ndata:\r\n%s\r\n"):format( @@ -181,6 +185,4 @@ function Command:getBytes() return bin.pack("LLLLH",cmd, arg1, arg2, arg3,data); end - - return _commands \ No newline at end of file