mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 11:33:51 +08:00
fix: nice output..
This commit is contained in:
parent
dd1df4901d
commit
68ff832584
1 changed files with 6 additions and 4 deletions
|
@ -39,7 +39,7 @@ end
|
||||||
-- The main entry point
|
-- The main entry point
|
||||||
function main(args)
|
function main(args)
|
||||||
|
|
||||||
local data = '01020304'
|
local data
|
||||||
local width = 0
|
local width = 0
|
||||||
|
|
||||||
-- Read the parameters
|
-- Read the parameters
|
||||||
|
@ -49,6 +49,8 @@ function main(args)
|
||||||
if o == "w" then width = a end
|
if o == "w" then width = a end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
data = data or '01020304'
|
||||||
|
|
||||||
print( string.rep('-',60) )
|
print( string.rep('-',60) )
|
||||||
print('Bit width of CRC | '..width)
|
print('Bit width of CRC | '..width)
|
||||||
print('Bytes | '..data)
|
print('Bytes | '..data)
|
||||||
|
@ -57,9 +59,9 @@ function main(args)
|
||||||
print( string.rep('-',60) )
|
print( string.rep('-',60) )
|
||||||
local lists = core.reveng_models(width)
|
local lists = core.reveng_models(width)
|
||||||
for _,i in pairs(lists) do
|
for _,i in pairs(lists) do
|
||||||
local one = core.reveng_runmodel(i, data, false, 0)
|
local one = core.reveng_runmodel(i, data, false, '0')
|
||||||
local two = core.reveng_runmodel(i, data, true, 0)
|
local two = core.reveng_runmodel(i, data, true, '0')
|
||||||
print( ('%-20s| %-16s| %s'):format(i, one, two) )
|
print( ('%-20s| %-16s| %s'):format(i, one:upper(), two:upper()) )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue