X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1c4c0b068131edc4bc382b767e26dae494e0d4c3..b69adb794594cc7ea43d3aa70aab091265195abf:/client/lualibs/utils.lua diff --git a/client/lualibs/utils.lua b/client/lualibs/utils.lua index 592d0477..da179758 100644 --- a/client/lualibs/utils.lua +++ b/client/lualibs/utils.lua @@ -37,9 +37,7 @@ local Utils = ------------ FILE READING ReadDumpFile = function (filename) - if filename == nil then - return nil, 'Filename is empty' - end + filename = filename or 'dumpdata.bin' if #filename == 0 then return nil, 'Filename length is zero' end @@ -112,7 +110,7 @@ local Utils = return hash end return nil - end, + end, -- Takes a hex string and calculates a SHA1 hash Sha1Hex = function(s) if s == nil then return nil end @@ -124,8 +122,8 @@ local Utils = return hash end return nil - end, - + end, + -- input parameter is a string -- Swaps the endianess and returns a number, @@ -314,4 +312,4 @@ local Utils = -- end } -return Utils +return Utils \ No newline at end of file