mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Whitespace
This commit is contained in:
parent
c26583ebfd
commit
6947a61d98
21 changed files with 82 additions and 83 deletions
|
@ -83,7 +83,7 @@ static int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) {
|
|||
|
||||
if (num_infiles == 1) {
|
||||
// 1M bytes for now
|
||||
buffer_size = 1024 * 1024;
|
||||
buffer_size = 1024 * 1024;
|
||||
}
|
||||
|
||||
uint32_t outsize_max = LZ4_compressBound(buffer_size);
|
||||
|
@ -92,7 +92,7 @@ static int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) {
|
|||
if (outbuf == NULL) {
|
||||
fprintf(stderr, "failed to allocate memory");
|
||||
free(fpga_config);
|
||||
return (EXIT_FAILURE);
|
||||
return (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
char *ring_buffer = calloc(buffer_size, sizeof(char));
|
||||
|
@ -100,7 +100,7 @@ static int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) {
|
|||
fprintf(stderr, "failed to allocate memory");
|
||||
free(outbuf);
|
||||
free(fpga_config);
|
||||
return (EXIT_FAILURE);
|
||||
return (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
LZ4_streamHC_t *lz4_streamhc = LZ4_createStreamHC();
|
||||
|
@ -108,7 +108,7 @@ static int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile) {
|
|||
|
||||
int current_in = 0;
|
||||
int current_out = 0;
|
||||
|
||||
|
||||
while (current_in < total_size) {
|
||||
|
||||
int bytes_to_copy = MIN(FPGA_RING_BUFFER_BYTES, (total_size - current_in));
|
||||
|
@ -261,7 +261,7 @@ static int zlib_decompress(FILE *infile, FILE *outfiles[], uint8_t num_outfiles,
|
|||
for (long k = 0; k < *outsize / (FPGA_INTERLEAVE_SIZE * num_outfiles); k++) {
|
||||
for (uint16_t j = 0; j < num_outfiles; j++) {
|
||||
if (k * FPGA_INTERLEAVE_SIZE < outfilesizes[j]) {
|
||||
uint16_t chunk = (outfilesizes[j] - (k * FPGA_INTERLEAVE_SIZE) < FPGA_INTERLEAVE_SIZE) ?
|
||||
uint16_t chunk = (outfilesizes[j] - (k * FPGA_INTERLEAVE_SIZE) < FPGA_INTERLEAVE_SIZE) ?
|
||||
outfilesizes[j] - (k * FPGA_INTERLEAVE_SIZE) : FPGA_INTERLEAVE_SIZE;
|
||||
|
||||
fwrite(outbufall + offset, chunk, sizeof(char), outfiles[j]);
|
||||
|
@ -534,7 +534,7 @@ int main(int argc, char **argv) {
|
|||
for (uint16_t j = 0; j < num_input_files; j++) {
|
||||
fclose(infiles[j]);
|
||||
}
|
||||
|
||||
|
||||
free(infile_names);
|
||||
free(infiles);
|
||||
return (EXIT_FAILURE);
|
||||
|
@ -546,7 +546,7 @@ int main(int argc, char **argv) {
|
|||
} else {
|
||||
ret = zlib_compress(infiles, num_input_files, outfile);
|
||||
}
|
||||
|
||||
|
||||
// close file handlers
|
||||
fclose(outfile);
|
||||
for (uint16_t j = 0; j < num_input_files; j++) {
|
||||
|
|
6
tools/hitag2crack/crack2/.gitignore
vendored
6
tools/hitag2crack/crack2/.gitignore
vendored
|
@ -1,6 +1,6 @@
|
|||
ht2crack2buildtable
|
||||
ht2crack2search
|
||||
ht2crack2gentest
|
||||
ht2crack2buildtable
|
||||
ht2crack2search
|
||||
ht2crack2gentest
|
||||
|
||||
ht2crack2buildtable.exe
|
||||
ht2crack2search.exe
|
||||
|
|
|
@ -603,7 +603,7 @@ void find_state(const uint candidate_index_base,
|
|||
|
||||
const bitslice_t filter9_3 = f_b_bs(state[-2 + 37], state[-2 + 38], state[-2 + 40], state[-2 + 42]);
|
||||
const bitslice_t filter9 = f_c_bs(filter9_0, filter9_1, filter9_2, filter9_3, filter9_4);
|
||||
|
||||
|
||||
results8 &= (filter9 ^ keystream[9]);
|
||||
if (!results8) continue;
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ expected result:
|
|||
261c07a23f2bc8262f69f10a5bdf3764
|
||||
|
||||
|
||||
Bruteforce using 8 threads
|
||||
Found timestamp........ 1631100305 ( '2021-09-08 13:25:05' )
|
||||
key.................... 261c07a23f2bc8262f69f10a5bdf3764
|
||||
execution time 1.00 sec
|
||||
Bruteforce using 8 threads
|
||||
Found timestamp........ 1631100305 ( '2021-09-08 13:25:05' )
|
||||
key.................... 261c07a23f2bc8262f69f10a5bdf3764
|
||||
execution time 1.00 sec
|
||||
|
||||
#
|
||||
# complex
|
||||
|
@ -55,8 +55,8 @@ expected result:
|
|||
e757178e13516a4f3171bc6ea85e165a
|
||||
|
||||
|
||||
Bruteforce using 8 threads
|
||||
Found timestamp........ 1606834416 ( '2020-12-01 15:53:36' )
|
||||
key.................... e757178e13516a4f3171bc6ea85e165a
|
||||
execution time 18.54 sec
|
||||
Bruteforce using 8 threads
|
||||
Found timestamp........ 1606834416 ( '2020-12-01 15:53:36' )
|
||||
key.................... e757178e13516a4f3171bc6ea85e165a
|
||||
execution time 18.54 sec
|
||||
|
||||
|
|
|
@ -10,20 +10,20 @@
|
|||
+ 1287: : a1 e4 58 ce 6e ea 41 e0
|
||||
+ 64: 0: TAG 5c ad f4 39
|
||||
|
||||
:: Sample of trace above,
|
||||
:: Sample of trace above,
|
||||
./mfkey64 9c599b32 82a4166c a1e458ce 6eea41e0 5cadf439
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
:: For mfkey32, you want to get two different NR_0/NR_1 values.
|
||||
|
||||
:: <uid> <nt> <nr_0> <ar_0> <nr_1> <ar_1>
|
||||
./mfkey32 52B0F519 5417D1F8 4D545EA7 E15AC8C2 DAC1A7F4 5AE5C37F
|
||||
./mfkey32 52B0F519 5417D1F8 4D545EA7 E15AC8C2 DAC1A7F4 5AE5C37F
|
||||
|
||||
:: For mfkey32v2 (moebius), you want to get two different NT/NT1 values. (like in the SIM commands)
|
||||
|
||||
:: <uid> <nt> <nr_0> <ar_0> <nt1> <nr_1> <ar_1>
|
||||
./mfkey32v2 12345678 1AD8DF2B 1D316024 620EF048 30D6CB07 C52077E2 837AC61A
|
||||
./mfkey32v2 52B0F519 5417D1F8 4D545EA7 E15AC8C2 A1BA88C6 DAC1A7F4 5AE5C37F
|
||||
./mfkey32v2 52B0F519 5417D1F8 4D545EA7 E15AC8C2 A1BA88C6 DAC1A7F4 5AE5C37F
|
||||
|
||||
:: for mfkey64, you want to have the AT response from tag.
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
./mfkey64 52B0F519 5417D1F8 4D545EA7 E15AC8C2 5056E41B
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
New functionality from @zhovner,
|
||||
New functionality from @zhovner,
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
### Communication decryption
|
||||
RDR 26
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
To test the nonce2key tool.
|
||||
|
||||
:: tip
|
||||
You can use the output from "hf mf mifare" to use with this tool.
|
||||
You can use the output from "hf mf mifare" to use with this tool.
|
||||
|
||||
:: sample
|
||||
./nonce2key e9cadd9c a8bf4a12 a020a8285858b090 050f010607060e07 5693be6c00000000
|
||||
|
|
|
@ -288,7 +288,7 @@ while true; do
|
|||
if ! CheckFileExist "mf_nonce_brute exists" "$MFNONCEBRUTEBIN"; then break; fi
|
||||
if ! CheckExecute slow "mf_nonce_brute test 1/2" "$MFNONCEBRUTEBIN 9c599b32 5a920d85 1011 98d76b77 d6c6e870 0000 ca7e0b63 0111 3e709c8a" "Key found \[.*ffffffffffff.*\]"; then break; fi
|
||||
if ! CheckExecute slow "mf_nonce_brute test 2/2" "$MFNONCEBRUTEBIN 96519578 d7e3c6ac 0011 cd311951 9da49e49 0010 2bb22e00 0100 a4f7f398" "Key found \[.*3b7e4fd575ad.*\]"; then break; fi
|
||||
fi
|
||||
fi
|
||||
if $TESTALL || $TESTMFDAESBRUTE; then
|
||||
echo -e "\n${C_BLUE}Testing mfd_aes_brute:${C_NC} ${MFDASEBRUTEBIN:=./tools/mfd_aes_brute/mfd_aes_brute}"
|
||||
if ! CheckFileExist "mfd_aes_brute exists" "$MFDASEBRUTEBIN"; then break; fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue