|
|
@@ -17,6 +17,11 @@
|
|
|
-- along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
|
|
|
--
|
|
|
|
|
|
+-- example usage:
|
|
|
+--
|
|
|
+-- stdbuf -eL -oL ./proxmark3 /dev/ttyACM0 -l lf-hid-read.lua | tee lf-hid-read.log
|
|
|
+--
|
|
|
+
|
|
|
local cmds = require('commands')
|
|
|
local getopt = require('getopt')
|
|
|
local bin = require('bin')
|
|
|
@@ -25,23 +30,15 @@ local format=string.format
|
|
|
local floor=math.floor
|
|
|
local os = require("os")
|
|
|
|
|
|
-function sleep (a)
|
|
|
- local sec = tonumber(os.clock() + a);
|
|
|
- while (os.clock() < sec) do
|
|
|
- end
|
|
|
-end
|
|
|
-
|
|
|
local function main(args)
|
|
|
- print( string.rep('--',30) )
|
|
|
- print( string.rep('--',30) )
|
|
|
+ print( string.rep('#',30) )
|
|
|
+ print( string.rep('#',30) )
|
|
|
|
|
|
-- core.console will go async when waiting for the proxmark to return
|
|
|
-- so need to wait for a response (sleep)
|
|
|
+ --
|
|
|
core.console('lf hid read')
|
|
|
- -- sleep(30) -- run for 30 seconds
|
|
|
- os.execute("sleep 30")
|
|
|
+ os.execute("sleep infinity")
|
|
|
|
|
|
- print( string.rep('--',30) )
|
|
|
-
|
|
|
end
|
|
|
main(args)
|