remove unused commented out #includes
coverity indicates compressed_fpga_stream.opaque needs to be initialized
to Z_NULL
fgetc returns int
define llu
#include "usb_cmd.h"
#include "cmdhfmfu.h"
#include "usb_cmd.h"
#include "cmdhfmfu.h"
static int CmdHelp(const char *Cmd);
#define ICLASS_KEYS_MAX 8
static int CmdHelp(const char *Cmd);
#define ICLASS_KEYS_MAX 8
for (int i = 0;i < 8;i++)
sprintf(&temp[(i *2)],"%02X",key[i]);
temp[16] = '\0';
for (int i = 0;i < 8;i++)
sprintf(&temp[(i *2)],"%02X",key[i]);
temp[16] = '\0';
- if (sscanf(temp,"%016"llX,&uint_key) < 1)
+ if (sscanf(temp,"%016"llx,&uint_key) < 1)
return 0;
return uint_key;
}
return 0;
return uint_key;
}
#include "cmdlfem4x.h"
#include "lfdemod.h"
#include "cmdlfem4x.h"
#include "lfdemod.h"
char *global_em410xId;
static int CmdHelp(const char *Cmd);
char *global_em410xId;
static int CmdHelp(const char *Cmd);
return 0;
}
char id[12] = {0x00};
return 0;
}
char id[12] = {0x00};
- sprintf(id, "%010llx",lo);
+ sprintf(id, "%010"PRIx64,lo);
global_em410xId = id;
return 1;
global_em410xId = id;
return 1;
#include <stdio.h>\r
#include <string.h>\r
#include <inttypes.h>\r
#include <stdio.h>\r
#include <string.h>\r
#include <inttypes.h>\r
-//#include <time.h> //not used - marshmellow\r
#include "proxmark3.h"\r
#include "ui.h"\r
#include "graph.h"\r
#include "proxmark3.h"\r
#include "ui.h"\r
#include "graph.h"\r
#include "util.h"\r
#include "data.h"\r
#include "lfdemod.h"\r
#include "util.h"\r
#include "data.h"\r
#include "lfdemod.h"\r
-//#include "../common/crc.h" //not used - marshmellow\r
-//#include "../common/iso14443crc.h" //not used - marshmellow\r
#include "cmdhf14a.h" //for getTagInfo\r
\r
#define T55x7_CONFIGURATION_BLOCK 0x00\r
#include "cmdhf14a.h" //for getTagInfo\r
\r
#define T55x7_CONFIGURATION_BLOCK 0x00\r
for(uint16_t j = 0; j < num_infiles; j++) {
fclose(infile[j]);
}
for(uint16_t j = 0; j < num_infiles; j++) {
fclose(infile[j]);
}
compressed_fpga_stream.avail_in = i;
compressed_fpga_stream.zalloc = fpga_deflate_malloc;
compressed_fpga_stream.zfree = fpga_deflate_free;
compressed_fpga_stream.avail_in = i;
compressed_fpga_stream.zalloc = fpga_deflate_malloc;
compressed_fpga_stream.zfree = fpga_deflate_free;
+ compressed_fpga_stream.opaque = Z_NULL;
ret = deflateInit2(&compressed_fpga_stream,
COMPRESS_LEVEL,
Z_DEFLATED,
ret = deflateInit2(&compressed_fpga_stream,
COMPRESS_LEVEL,
Z_DEFLATED,
compressed_fpga_stream.avail_out = DECOMPRESS_BUF_SIZE;
compressed_fpga_stream.zalloc = fpga_deflate_malloc;
compressed_fpga_stream.zfree = fpga_deflate_free;
compressed_fpga_stream.avail_out = DECOMPRESS_BUF_SIZE;
compressed_fpga_stream.zalloc = fpga_deflate_malloc;
compressed_fpga_stream.zfree = fpga_deflate_free;
+ compressed_fpga_stream.opaque = Z_NULL;
ret = inflateInit2(&compressed_fpga_stream, 0);
ret = inflateInit2(&compressed_fpga_stream, 0);
compressed_fpga_stream.next_in = inbuf;
uint16_t i = 0;
do {
compressed_fpga_stream.next_in = inbuf;
uint16_t i = 0;
do {
- uint8_t c = fgetc(infile);
compressed_fpga_stream.avail_in++;
} else {
break;
compressed_fpga_stream.avail_in++;
} else {
break;
errors += bruteforceItem(*attack, keytable);
}
free(attack);
errors += bruteforceItem(*attack, keytable);
}
free(attack);
- clock_t t2 = clock();
- float diff = (((float)t2 - (float)t1) / CLOCKS_PER_SEC );
+ t1 = clock() - t1;
+ float diff = ((float)t1 / CLOCKS_PER_SEC );
prnlog("\nPerformed full crack in %f seconds",diff);
// Pick out the first 16 bytes of the keytable.
prnlog("\nPerformed full crack in %f seconds",diff);
// Pick out the first 16 bytes of the keytable.
#include <inttypes.h>
#define llx PRIx64
#define lli PRIi64
#include <inttypes.h>
#define llx PRIx64
#define lli PRIi64
#define hhu PRIu8
#include "usb_cmd.h"
#define hhu PRIu8
#include "usb_cmd.h"