mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-15 01:23:04 -07:00
adjustments, still breaks on ubuntu,
This commit is contained in:
parent
0234ca5654
commit
7de458486f
2 changed files with 6 additions and 7 deletions
|
@ -459,15 +459,14 @@ static int l_reveng_models(lua_State *L){
|
||||||
|
|
||||||
// This array needs to be adjusted if RevEng adds more crc-models.
|
// This array needs to be adjusted if RevEng adds more crc-models.
|
||||||
uint8_t width[102];
|
uint8_t width[102];
|
||||||
|
memset(width, 0, sizeof(width));
|
||||||
// This array needs to be adjusted if RevEng adds more crc-models.
|
// This array needs to be adjusted if RevEng adds more crc-models.
|
||||||
char *models[102];
|
char *models[102];
|
||||||
|
|
||||||
width[0] = in_width;
|
width[0] = in_width;
|
||||||
|
|
||||||
int ans = GetModels(models, &count, width);
|
if (!GetModels(models, &count, width))
|
||||||
if (!ans) {
|
return returnToLuaWithError(L, "didn't find any models");
|
||||||
return returnToLuaWithError(L, "Didn't find any models");
|
|
||||||
}
|
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
for (int i = 0; i < count; i++){
|
for (int i = 0; i < count; i++){
|
||||||
|
|
|
@ -49,7 +49,7 @@ function main(args)
|
||||||
if o == "w" then width = a end
|
if o == "w" then width = a end
|
||||||
end
|
end
|
||||||
|
|
||||||
data = data or '01020304'
|
data = data or '01020304'
|
||||||
width = width or 0
|
width = width or 0
|
||||||
|
|
||||||
print( string.rep('-',60) )
|
print( string.rep('-',60) )
|
||||||
|
@ -58,8 +58,8 @@ function main(args)
|
||||||
print('')
|
print('')
|
||||||
print( ('%-20s| %-16s| %s'):format('Model','CRC', 'CRC reverse','bigEnd', 'bigEnd','little','little'))
|
print( ('%-20s| %-16s| %s'):format('Model','CRC', 'CRC reverse','bigEnd', 'bigEnd','little','little'))
|
||||||
print( string.rep('-',60) )
|
print( string.rep('-',60) )
|
||||||
local lists = core.reveng_models(width)
|
local lists, err = core.reveng_models(width)
|
||||||
if lists == nil then return oops("Couldn't find any CRC algos with that width") end
|
if lists == nil then return oops(err) end
|
||||||
|
|
||||||
for _,i in pairs(lists) do
|
for _,i in pairs(lists) do
|
||||||
if string.len(i) > 1 then
|
if string.len(i) > 1 then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue