mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
minor adjustements, found some comments.
This commit is contained in:
parent
ef085a5948
commit
13629a71d3
1 changed files with 104 additions and 101 deletions
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
//#include <stdlib.h>
|
||||
//#include <ctype.h>
|
||||
#include "cmdmain.h"
|
||||
#include "cmdcrc.h"
|
||||
#include "reveng/reveng.h"
|
||||
|
@ -77,7 +75,7 @@ int CmdCrc(const char *Cmd)
|
|||
reveng_main(argc, argv);
|
||||
}
|
||||
//PrintAndLog("DEBUG argc: %d, %s %s Cmd: %s",argc, argv[0], Cmd2, Cmd);
|
||||
for(int i = 0; i < argc; ++i){
|
||||
for(int i = 0; i < argc; ++i) {
|
||||
free(argv[i]);
|
||||
}
|
||||
|
||||
|
@ -137,6 +135,7 @@ int GetModels(char *Models[], int *count, uint8_t *width){
|
|||
praloc(&model.spoly, (unsigned long)width[0]);
|
||||
praloc(&model.init, (unsigned long)width[0]);
|
||||
praloc(&model.xorout, (unsigned long)width[0]);
|
||||
|
||||
if(!plen(model.spoly))
|
||||
palloc(&model.spoly, (unsigned long)width[0]);
|
||||
else
|
||||
|
@ -318,9 +317,13 @@ int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
|
|||
model.flags &= ~P_RTJUST;
|
||||
break;
|
||||
}
|
||||
|
||||
/* canonicalise the model, so the one we dump is the one we
|
||||
* calculate with (not with -s, spoly may be blank which will
|
||||
* normalise to zero and clear init and xorout.)
|
||||
*/
|
||||
mcanon(&model);
|
||||
|
||||
|
||||
if (reverse) {
|
||||
// v calculate reversed CRC
|
||||
/* Distinct from the -V switch as this causes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue