mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
scripts: move examples and tests in subdirs
This commit is contained in:
parent
610b456a97
commit
b166dc166a
7 changed files with 4 additions and 4 deletions
19
client/luascripts/examples/example_cmdline.lua
Executable file
19
client/luascripts/examples/example_cmdline.lua
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env -S pm3 -l
|
||||
|
||||
--[[
|
||||
A sampe script file on how to implement at cmd line inteface.
|
||||
It also demonstrates how the script can be used with a shebang.
|
||||
--]]
|
||||
|
||||
print("This is how a cmd-line interface could be implemented\nPrint 'exit' to exit.\n")
|
||||
local answer
|
||||
repeat
|
||||
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");
|
Loading…
Add table
Add a link
Reference in a new issue