projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: AVX512 detection
[proxmark3-svn]
/
client
/
cmdcrc.c
diff --git
a/client/cmdcrc.c
b/client/cmdcrc.c
index 8a60fef60efd071ccd39a93161be631a9fc01b5f..27d081b911de0c459206092d40473020d4002b17 100644
(file)
--- a/
client/cmdcrc.c
+++ b/
client/cmdcrc.c
@@
-8,7
+8,6
@@
// CRC Calculations from the software reveng commands
//-----------------------------------------------------------------------------
// CRC Calculations from the software reveng commands
//-----------------------------------------------------------------------------
-#include <stdlib.h>
#ifdef _WIN32
# include <io.h>
# include <fcntl.h>
#ifdef _WIN32
# include <io.h>
# include <fcntl.h>
@@
-19,8
+18,8
@@
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
-
//
#include <stdlib.h>
-
//
#include <ctype.h>
+#include <stdlib.h>
+#include <ctype.h>
#include "cmdmain.h"
#include "cmdcrc.h"
#include "reveng/reveng.h"
#include "cmdmain.h"
#include "cmdcrc.h"
#include "reveng/reveng.h"
@@
-44,9
+43,10
@@
int split(char *str, char *arr[MAX_ARGS]){
while(isspace(str[beginIndex])){
++beginIndex;
}
while(isspace(str[beginIndex])){
++beginIndex;
}
- if(str[beginIndex] == '\0')
+ if(str[beginIndex] == '\0')
{
break;
break;
- endIndex = beginIndex;
+ }
+ endIndex = beginIndex;
while (str[endIndex] && !isspace(str[endIndex])){
++endIndex;
}
while (str[endIndex] && !isspace(str[endIndex])){
++endIndex;
}
@@
-311,7
+311,7
@@
int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
int ibperhx = 8, obperhx = 8;
int rflags = 0; // search flags
int c;
int ibperhx = 8, obperhx = 8;
int rflags = 0; // search flags
int c;
- unsigned long width;
+
//
unsigned long width;
poly_t apoly, crc;
char *string;
poly_t apoly, crc;
char *string;
@@
-331,7
+331,7
@@
int RunModel(char *inModel, char *inHexStr, bool reverse, char endian, char *res
return uerr("no preset models available");
// must set width so that parameter to -ipx is not zeroed
return uerr("no preset models available");
// must set width so that parameter to -ipx is not zeroed
- width = plen(model.spoly);
+
//
width = plen(model.spoly);
rflags |= R_HAVEP | R_HAVEI | R_HAVERI | R_HAVERO | R_HAVEX;
//set flags
rflags |= R_HAVEP | R_HAVEI | R_HAVERI | R_HAVERO | R_HAVEX;
//set flags
@@
-434,9
+434,9
@@
int CmdrevengTestC(const char *Cmd){
char result[30];
int dataLen;
char endian = 0;
char result[30];
int dataLen;
char endian = 0;
- dataLen = param_getstr(Cmd, cmdp++, inModel);
+ dataLen = param_getstr(Cmd, cmdp++, inModel
, sizeof(inModel)
);
if (dataLen < 4) return 0;
if (dataLen < 4) return 0;
- dataLen = param_getstr(Cmd, cmdp++, inHexStr);
+ dataLen = param_getstr(Cmd, cmdp++, inHexStr
, sizeof(inHexStr)
);
if (dataLen < 4) return 0;
bool reverse = (param_get8(Cmd, cmdp++)) ? true : false;
endian = param_getchar(Cmd, cmdp++);
if (dataLen < 4) return 0;
bool reverse = (param_get8(Cmd, cmdp++)) ? true : false;
endian = param_getchar(Cmd, cmdp++);
@@
-464,7
+464,7
@@
char *SwapEndianStr(const char *inStr, const size_t len, const uint8_t blockSize
// takes hex string in and searches for a matching result (hex string must include checksum)
int CmdrevengSearch(const char *Cmd){
char inHexStr[50] = {0x00};
// takes hex string in and searches for a matching result (hex string must include checksum)
int CmdrevengSearch(const char *Cmd){
char inHexStr[50] = {0x00};
- int dataLen = param_getstr(Cmd, 0, inHexStr);
+ int dataLen = param_getstr(Cmd, 0, inHexStr
, sizeof(inHexStr)
);
if (dataLen < 4) return 0;
char *Models[80];
if (dataLen < 4) return 0;
char *Models[80];
Impressum
,
Datenschutz