mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -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 <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include <stdlib.h>
|
|
||||||
//#include <ctype.h>
|
|
||||||
#include "cmdmain.h"
|
#include "cmdmain.h"
|
||||||
#include "cmdcrc.h"
|
#include "cmdcrc.h"
|
||||||
#include "reveng/reveng.h"
|
#include "reveng/reveng.h"
|
||||||
|
@ -137,6 +135,7 @@ int GetModels(char *Models[], int *count, uint8_t *width){
|
||||||
praloc(&model.spoly, (unsigned long)width[0]);
|
praloc(&model.spoly, (unsigned long)width[0]);
|
||||||
praloc(&model.init, (unsigned long)width[0]);
|
praloc(&model.init, (unsigned long)width[0]);
|
||||||
praloc(&model.xorout, (unsigned long)width[0]);
|
praloc(&model.xorout, (unsigned long)width[0]);
|
||||||
|
|
||||||
if(!plen(model.spoly))
|
if(!plen(model.spoly))
|
||||||
palloc(&model.spoly, (unsigned long)width[0]);
|
palloc(&model.spoly, (unsigned long)width[0]);
|
||||||
else
|
else
|
||||||
|
@ -318,9 +317,13 @@ int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
|
||||||
model.flags &= ~P_RTJUST;
|
model.flags &= ~P_RTJUST;
|
||||||
break;
|
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);
|
mcanon(&model);
|
||||||
|
|
||||||
|
|
||||||
if (reverse) {
|
if (reverse) {
|
||||||
// v calculate reversed CRC
|
// v calculate reversed CRC
|
||||||
/* Distinct from the -V switch as this causes
|
/* Distinct from the -V switch as this causes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue