mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
style
This commit is contained in:
parent
c6aa14efb7
commit
d17191d0a4
1 changed files with 10 additions and 9 deletions
|
@ -57,8 +57,6 @@ int GetModels(char *Models[], int *count, uint8_t *width) {
|
||||||
|
|
||||||
SETBMP();
|
SETBMP();
|
||||||
|
|
||||||
int args = 0, psets, pass;
|
|
||||||
int Cnt = 0;
|
|
||||||
if (width[0] == 0) { //reveng -D
|
if (width[0] == 0) { //reveng -D
|
||||||
*count = mcount();
|
*count = mcount();
|
||||||
if (!*count) {
|
if (!*count) {
|
||||||
|
@ -100,6 +98,8 @@ int GetModels(char *Models[], int *count, uint8_t *width) {
|
||||||
if (!ptst(qpoly))
|
if (!ptst(qpoly))
|
||||||
rflags &= ~R_HAVEQ;
|
rflags &= ~R_HAVEQ;
|
||||||
|
|
||||||
|
int pass;
|
||||||
|
|
||||||
/* if endianness not specified, try
|
/* if endianness not specified, try
|
||||||
* little-endian then big-endian.
|
* little-endian then big-endian.
|
||||||
* NB: crossed-endian algorithms will not be
|
* NB: crossed-endian algorithms will not be
|
||||||
|
@ -108,7 +108,7 @@ int GetModels(char *Models[], int *count, uint8_t *width) {
|
||||||
/* scan against preset models */
|
/* scan against preset models */
|
||||||
if (~uflags & C_NOPCK) {
|
if (~uflags & C_NOPCK) {
|
||||||
pass = 0;
|
pass = 0;
|
||||||
Cnt = 0;
|
int Cnt = 0, psets;
|
||||||
do {
|
do {
|
||||||
psets = mcount();
|
psets = mcount();
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ int GetModels(char *Models[], int *count, uint8_t *width) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pass = 0;
|
pass = 0;
|
||||||
|
int args = 0;
|
||||||
do {
|
do {
|
||||||
mptr = candmods = reveng(&model, qpoly, rflags, args, apolys);
|
mptr = candmods = reveng(&model, qpoly, rflags, args, apolys);
|
||||||
if (mptr && plen(mptr->spoly)) {
|
if (mptr && plen(mptr->spoly)) {
|
||||||
|
@ -233,7 +234,7 @@ int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
|
||||||
static model_t model = MZERO;
|
static model_t model = MZERO;
|
||||||
|
|
||||||
int ibperhx = 8, obperhx = 8;
|
int ibperhx = 8, obperhx = 8;
|
||||||
int rflags = 0; // search flags
|
// int rflags = 0; // search flags
|
||||||
int c;
|
int c;
|
||||||
poly_t apoly, crc;
|
poly_t apoly, crc;
|
||||||
|
|
||||||
|
@ -255,17 +256,17 @@ int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
|
||||||
PrintAndLogEx(WARNING, "no preset models available");
|
PrintAndLogEx(WARNING, "no preset models available");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
rflags |= R_HAVEP | R_HAVEI | R_HAVERI | R_HAVERO | R_HAVEX;
|
// rflags |= R_HAVEP | R_HAVEI | R_HAVERI | R_HAVERO | R_HAVEX;
|
||||||
|
|
||||||
//set flags
|
//set flags
|
||||||
switch (endian) {
|
switch (endian) {
|
||||||
case 'b': /* b big-endian (RefIn = false, RefOut = false ) */
|
case 'b': /* b big-endian (RefIn = false, RefOut = false ) */
|
||||||
model.flags &= ~P_REFIN;
|
model.flags &= ~P_REFIN;
|
||||||
rflags |= R_HAVERI;
|
//rflags |= R_HAVERI;
|
||||||
/* fall through: */
|
/* fall through: */
|
||||||
case 'B': /* B big-endian output (RefOut = false) */
|
case 'B': /* B big-endian output (RefOut = false) */
|
||||||
model.flags &= ~P_REFOUT;
|
model.flags &= ~P_REFOUT;
|
||||||
rflags |= R_HAVERO;
|
//rflags |= R_HAVERO;
|
||||||
mnovel(&model);
|
mnovel(&model);
|
||||||
/* fall through: */
|
/* fall through: */
|
||||||
case 'r': /* r right-justified */
|
case 'r': /* r right-justified */
|
||||||
|
@ -273,11 +274,11 @@ int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
|
||||||
break;
|
break;
|
||||||
case 'l': /* l little-endian input and output */
|
case 'l': /* l little-endian input and output */
|
||||||
model.flags |= P_REFIN;
|
model.flags |= P_REFIN;
|
||||||
rflags |= R_HAVERI;
|
//rflags |= R_HAVERI;
|
||||||
/* fall through: */
|
/* fall through: */
|
||||||
case 'L': /* L little-endian output */
|
case 'L': /* L little-endian output */
|
||||||
model.flags |= P_REFOUT;
|
model.flags |= P_REFOUT;
|
||||||
rflags |= R_HAVERO;
|
//rflags |= R_HAVERO;
|
||||||
mnovel(&model);
|
mnovel(&model);
|
||||||
/* fall through: */
|
/* fall through: */
|
||||||
case 't': /* t left-justified */
|
case 't': /* t left-justified */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue