proxmark3/client/scripts/cmdline.lua

13 lines
356 B
Lua
Raw Normal View History

print("This is how a cmd-line interface could be implemented\nPrint 'exit' to exit.\n")
local answer
repeat
2019-03-09 17:34:43 +08:00
io.write("$>")
io.flush()
answer=io.read()
if answer ~= 'exit' then
local func = assert(loadstring("return " .. answer))
io.write("\n"..tostring(func() or "").."\n");
end--]]
until answer=="exit"
print("Bye\n");