]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Added a PoC script which implements a commandline
authormartin.holst@gmail.com <martin.holst@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 24 May 2013 21:06:20 +0000 (21:06 +0000)
committermartin.holst@gmail.com <martin.holst@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Fri, 24 May 2013 21:06:20 +0000 (21:06 +0000)
client/scripts/cmdline.lua [new file with mode: 0644]

diff --git a/client/scripts/cmdline.lua b/client/scripts/cmdline.lua
new file mode 100644 (file)
index 0000000..9c4df14
--- /dev/null
@@ -0,0 +1,12 @@
+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");
Impressum, Datenschutz