}
}
}
- printf("Number of possible keys with Sum(a0) = %d: %lld (2^%1.1f)\n", sum_a0, maximum_states, log(maximum_states)/log(2.0));
+ printf("Number of possible keys with Sum(a0) = %d: %ll (2^%1.1f)\n", sum_a0, maximum_states, log(maximum_states)/log(2.0));
init_statelist_cache();
for (statelist_t *sl = candidates; sl != NULL; sl = sl->next) {
maximum_states += (uint64_t)sl->len[ODD_STATE] * sl->len[EVEN_STATE];
}
- printf("Number of remaining possible keys: %lld (2^%1.1f)\n", maximum_states, log(maximum_states)/log(2.0));
+ printf("Number of remaining possible keys: %ll (2^%1.1f)\n", maximum_states, log(maximum_states)/log(2.0));
if (write_stats) {
if (maximum_states != 0) {
fprintf(fstats, "%1.1f;", log(maximum_states)/log(2.0));
PrintAndLog("Time for generating key candidates list: %1.0f seconds", (float)(clock() - start_time)/CLOCKS_PER_SEC);
brute_force();
- free_nonces_memory();
- free_statelist_cache();
- free_candidates_memory(candidates);
- candidates = NULL;
+ free_nonces_memory();
+ free_statelist_cache();
+ free_candidates_memory(candidates);
+ candidates = NULL;
}
return 0;
return 0;
}
char id[12] = {0x00};
- sprintf(id, "%010llx",lo);
+ //sprintf(id, "%010llx",lo);
+ sprintf(id, "%010" PRIu64 ", lo);
global_em410xId = id;
return 1;
do {
if (i >= num_infiles * FPGA_CONFIG_SIZE) {
- fprintf(stderr, "Input files too big (total > %lu bytes). These are probably not PM3 FPGA config files.\n", num_infiles*FPGA_CONFIG_SIZE);
- for(uint16_t j = 0; j < num_infiles; j++) {
+ fprintf(stderr, "Input files too big (total > %d bytes). These are probably not PM3 FPGA config files.\n", num_infiles*FPGA_CONFIG_SIZE);
+ for(uint16_t j = 0; j < num_infiles; j++) {
fclose(infile[j]);
}
return(EXIT_FAILURE);
ret = deflate(&compressed_fpga_stream, Z_FINISH);
}
- fprintf(stderr, "compressed %lu input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out);
+ fprintf(stderr, "compressed %lu input bytes to %u output bytes\n", i, compressed_fpga_stream.total_out);
if (ret != Z_STREAM_END) {
fprintf(stderr, "Error in deflate(): %d %s\n", ret, compressed_fpga_stream.msg);
# -- Henryk Plötz <henryk@ploetzli.ch> 2009-09-28
# Modified april 2014 because of the move to github.
# --- Martin Holst Swende <martin@swende.se>
-
+# Modified january 2016 to work with Travis-CI
+# --- iceman <iceman@iuse.se>
# Clear environment locale so that git will not use localized strings
$ENV{'LC_ALL'} = "C";
$ENV{'LANG'} = "C";
+my $githistory = `git fetch --all`;
my $gitversion = `git describe --dirty`;
my $gitbranch = `git rev-parse --abbrev-ref HEAD`;
my $clean = 2;