repo.or.cz
/
legacy-proxmark3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge pull request #969 from pwpiwi/gcc10_fixes
[legacy-proxmark3.git]
/
client
/
scripts
/
cmdline.lua
blob
9c4df14461fab4812694b13a2f4121cdd5bf6865
1
print
(
"This is how a cmd-line interface could be implemented
\n
Print 'exit' to exit.
\n
"
)
2
local
answer
3
repeat
4
io
.
write
(
"$>"
)
5
io
.
flush
()
6
answer
=
io
.
read
()
7
if
answer
~=
'exit'
then
8
local
func
=
assert
(
loadstring
(
"return "
..
answer
))
9
io
.
write
(
"
\n
"
..
tostring
(
func
()
or
""
)..
"
\n
"
);
10
end
--]]
11
until
answer
==
"exit"
12
print
(
"Bye
\n
"
);