This commit is contained in:
osboxes.org 2019-03-14 12:30:32 +01:00
commit 9c2736d1eb
14 changed files with 273 additions and 273 deletions

View file

@ -106,7 +106,7 @@ int usage_hitag_writer(void) {
}
int usage_hitag_checkchallenges(void) {
PrintAndLogEx(NORMAL, "Check challenges, load a file with save hitag crypto challenges and test them all.");
PrintAndLogEx(NORMAL, "The file should be 8 * 60 bytes long, the file extension defaults to " _YELLOW_("`.cc`") );
PrintAndLogEx(NORMAL, "The file should be 8 * 60 bytes long, the file extension defaults to " _YELLOW_("`.cc`"));
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Usage: lf hitag cc [h] f <filename w/o extension>");
PrintAndLogEx(NORMAL, "Options:");
@ -289,9 +289,9 @@ int CmdLFHitagSim(const char *Cmd) {
cmdp++;
break;
case 'e':
param_getstr(Cmd, cmdp+1, filename, sizeof(filename));
param_getstr(Cmd, cmdp + 1, filename, sizeof(filename));
res = loadFileEML(filename, "eml", data, &datalen);
if ( res > 0 || datalen != maxdatalen) {
if (res > 0 || datalen != maxdatalen) {
PrintAndLogDevice(FAILED, "error, bytes read mismatch file size");
errors = true;
break;
@ -300,9 +300,9 @@ int CmdLFHitagSim(const char *Cmd) {
cmdp += 2;
break;
case 'j':
param_getstr(Cmd, cmdp+1, filename, sizeof(filename));
param_getstr(Cmd, cmdp + 1, filename, sizeof(filename));
res = loadFileJSON(filename, "json", data, maxdatalen, &datalen);
if ( res > 0) {
if (res > 0) {
errors = true;
break;
}
@ -310,9 +310,9 @@ int CmdLFHitagSim(const char *Cmd) {
cmdp += 2;
break;
case 'b':
param_getstr(Cmd, cmdp+1, filename, sizeof(filename));
param_getstr(Cmd, cmdp + 1, filename, sizeof(filename));
res = loadFile(filename, "bin", data, maxdatalen, &datalen);
if ( res > 0 ) {
if (res > 0) {
errors = true;
break;
}
@ -333,7 +333,7 @@ int CmdLFHitagSim(const char *Cmd) {
}
c.arg[0] = (uint32_t)tag_mem_supplied;
if ( tag_mem_supplied ) {
if (tag_mem_supplied) {
memcpy(c.d.asBytes, data, datalen);
}
clearCommandBuffer();
@ -447,9 +447,9 @@ int CmdLFHitagCheckChallenges(const char *Cmd) {
free(data);
return usage_hitag_checkchallenges();
case 'f':
param_getstr(Cmd, cmdp+1, filename, sizeof(filename));
param_getstr(Cmd, cmdp + 1, filename, sizeof(filename));
res = loadFile(filename, "cc", data, 8 * 60, &datalen);
if ( res > 0 ) {
if (res > 0) {
errors = true;
break;
}

View file

@ -191,7 +191,7 @@ uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *trace, ui
for (int j = 0; j < data_len && j / 18 < 18; j++) {
uint8_t parityBits = parityBytes[j >> 3];
if ( protocol != LEGIC
if (protocol != LEGIC
&& protocol != ISO_14443B
&& protocol != ISO_7816_4
&& protocol != PROTO_HITAG

View file

@ -314,7 +314,7 @@ int loadFile(const char *preferredName, const char *suffix, void *data, size_t m
goto out;
}
if ( bytes_read != maxdatalen ) {
if (bytes_read != maxdatalen) {
PrintAndLogDevice(WARNING, "Warning, bytes read exeed calling array limit. Max bytes is %d bytes", maxdatalen);
bytes_read = maxdatalen;
}
@ -470,7 +470,7 @@ int loadFileJSON(const char *preferredName, const char *suffix, void *data, size
if (!strcmp(ctype, "hitag")) {
size_t sptr = 0;
for (int i = 0; i < (maxdatalen/4); i++) {
for (int i = 0; i < (maxdatalen / 4); i++) {
if (sptr + 4 > maxdatalen) {
retval = 5;
goto out;

View file

@ -2,7 +2,7 @@
function wait4proxmark_Linux {
echo >&2 "Waiting for Proxmark to appear..."
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
while [ ! -c /dev/ttyACM? -a ! -c /dev/pm3-? ]; do
sleep .1
done
local PM3=`ls -1 /dev/pm3-? /dev/ttyACM? 2>/dev/null | head -1`