mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-01 10:34:45 +08:00
CHG: "hf mf hardnested" - less printing
CHG: some filehandles = NULL.
This commit is contained in:
parent
3c528f5fda
commit
2dcf60f3df
15 changed files with 112 additions and 61 deletions
|
@ -1026,8 +1026,7 @@ void SimulateHitagSTag(bool tag_mem_supplied, byte_t* data) {
|
||||||
// Set up simulator mode, frequency divisor which will drive the FPGA
|
// Set up simulator mode, frequency divisor which will drive the FPGA
|
||||||
// and analog mux selection.
|
// and analog mux selection.
|
||||||
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
|
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
|
||||||
FpgaWriteConfWord(
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_READER_FIELD);
|
||||||
FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_READER_FIELD);
|
|
||||||
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 95); //125Khz
|
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 95); //125Khz
|
||||||
SetAdcMuxFor(GPIO_MUXSEL_LOPKD);
|
SetAdcMuxFor(GPIO_MUXSEL_LOPKD);
|
||||||
RELAY_OFF();
|
RELAY_OFF();
|
||||||
|
|
|
@ -2216,7 +2216,10 @@ int CmdLoad(const char *Cmd)
|
||||||
GraphBuffer[GraphTraceLen] = atoi(line);
|
GraphBuffer[GraphTraceLen] = atoi(line);
|
||||||
GraphTraceLen++;
|
GraphTraceLen++;
|
||||||
}
|
}
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
PrintAndLog("loaded %d samples", GraphTraceLen);
|
PrintAndLog("loaded %d samples", GraphTraceLen);
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2290,7 +2293,10 @@ int CmdSave(const char *Cmd)
|
||||||
for (i = 0; i < GraphTraceLen; i++) {
|
for (i = 0; i < GraphTraceLen; i++) {
|
||||||
fprintf(f, "%d\n", GraphBuffer[i]);
|
fprintf(f, "%d\n", GraphBuffer[i]);
|
||||||
}
|
}
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
PrintAndLog("saved to '%s'", Cmd);
|
PrintAndLog("saved to '%s'", Cmd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,6 +475,7 @@ int CmdHF14AMfDump(const char *Cmd) {
|
||||||
if ( bytes_read == 0) {
|
if ( bytes_read == 0) {
|
||||||
PrintAndLog("File reading error.");
|
PrintAndLog("File reading error.");
|
||||||
fclose(fin);
|
fclose(fin);
|
||||||
|
fin = NULL;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,11 +486,13 @@ int CmdHF14AMfDump(const char *Cmd) {
|
||||||
if ( bytes_read == 0) {
|
if ( bytes_read == 0) {
|
||||||
PrintAndLog("File reading error.");
|
PrintAndLog("File reading error.");
|
||||||
fclose(fin);
|
fclose(fin);
|
||||||
|
fin = NULL;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(fin);
|
fclose(fin);
|
||||||
|
fin = NULL;
|
||||||
|
|
||||||
PrintAndLog("|-----------------------------------------|");
|
PrintAndLog("|-----------------------------------------|");
|
||||||
PrintAndLog("|------ Reading sector access bits...-----|");
|
PrintAndLog("|------ Reading sector access bits...-----|");
|
||||||
|
@ -596,6 +599,7 @@ int CmdHF14AMfDump(const char *Cmd) {
|
||||||
uint16_t numblocks = FirstBlockOfSector(numSectors - 1) + NumBlocksPerSector(numSectors - 1);
|
uint16_t numblocks = FirstBlockOfSector(numSectors - 1) + NumBlocksPerSector(numSectors - 1);
|
||||||
fwrite(carddata, 1, 16*numblocks, fout);
|
fwrite(carddata, 1, 16*numblocks, fout);
|
||||||
fclose(fout);
|
fclose(fout);
|
||||||
|
fout = NULL;
|
||||||
PrintAndLog("Dumped %d blocks (%d bytes) to file dumpdata.bin", numblocks, 16*numblocks);
|
PrintAndLog("Dumped %d blocks (%d bytes) to file dumpdata.bin", numblocks, 16*numblocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,6 +648,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
||||||
if ( bytes_read == 0) {
|
if ( bytes_read == 0) {
|
||||||
PrintAndLog("File reading error (dumpkeys.bin).");
|
PrintAndLog("File reading error (dumpkeys.bin).");
|
||||||
fclose(fkeys);
|
fclose(fkeys);
|
||||||
|
fkeys = NULL;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -653,6 +658,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
||||||
if ( bytes_read == 0) {
|
if ( bytes_read == 0) {
|
||||||
PrintAndLog("File reading error (dumpkeys.bin).");
|
PrintAndLog("File reading error (dumpkeys.bin).");
|
||||||
fclose(fkeys);
|
fclose(fkeys);
|
||||||
|
fkeys = NULL;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -673,6 +679,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
||||||
if ( bytes_read == 0) {
|
if ( bytes_read == 0) {
|
||||||
PrintAndLog("File reading error (dumpdata.bin).");
|
PrintAndLog("File reading error (dumpdata.bin).");
|
||||||
fclose(fdump);
|
fclose(fdump);
|
||||||
|
fdump = NULL;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,6 +715,7 @@ int CmdHF14AMfRestore(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(fdump);
|
fclose(fdump);
|
||||||
|
fdump = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,28 +13,7 @@
|
||||||
// Mifare Classic Cards" in Proceedings of the 22nd ACM SIGSAC Conference on
|
// Mifare Classic Cards" in Proceedings of the 22nd ACM SIGSAC Conference on
|
||||||
// Computer and Communications Security, 2015
|
// Computer and Communications Security, 2015
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
#include "cmdhfmfhard.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include "proxmark3.h"
|
|
||||||
#include "cmdmain.h"
|
|
||||||
#include "ui.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "nonce2key/crapto1.h"
|
|
||||||
#include "nonce2key/crypto1_bs.h"
|
|
||||||
#include "parity.h"
|
|
||||||
#ifdef __WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
// don't include for APPLE/mac which has malloc stuff elsewhere.
|
|
||||||
#ifndef __APPLE__
|
|
||||||
#include <malloc.h>
|
|
||||||
#endif
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
#define CONFIDENCE_THRESHOLD 0.95 // Collect nonces until we are certain enough that the following brute force is successfull
|
#define CONFIDENCE_THRESHOLD 0.95 // Collect nonces until we are certain enough that the following brute force is successfull
|
||||||
#define GOOD_BYTES_REQUIRED 13 // default 28, could be smaller == faster
|
#define GOOD_BYTES_REQUIRED 13 // default 28, could be smaller == faster
|
||||||
|
@ -639,6 +618,7 @@ static int read_nonce_file(void)
|
||||||
if ( bytes_read == 0) {
|
if ( bytes_read == 0) {
|
||||||
PrintAndLog("File reading error.");
|
PrintAndLog("File reading error.");
|
||||||
fclose(fnonces);
|
fclose(fnonces);
|
||||||
|
fnonces = NULL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
cuid = bytes_to_num(read_buf, 4);
|
cuid = bytes_to_num(read_buf, 4);
|
||||||
|
@ -656,6 +636,7 @@ static int read_nonce_file(void)
|
||||||
total_num_nonces += 2;
|
total_num_nonces += 2;
|
||||||
}
|
}
|
||||||
fclose(fnonces);
|
fclose(fnonces);
|
||||||
|
fnonces = NULL;
|
||||||
PrintAndLog("Read %d nonces from file. cuid=%08x, Block=%d, Keytype=%c", total_num_nonces, cuid, trgBlockNo, trgKeyType==0?'A':'B');
|
PrintAndLog("Read %d nonces from file. cuid=%08x, Block=%d, Keytype=%c", total_num_nonces, cuid, trgBlockNo, trgKeyType==0?'A':'B');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1339,8 +1320,8 @@ static bool generate_candidates(uint16_t sum_a0, uint16_t sum_a8)
|
||||||
for (uint16_t p = 0; p <= 16; p += 2) {
|
for (uint16_t p = 0; p <= 16; p += 2) {
|
||||||
for (uint16_t q = 0; q <= 16; q += 2) {
|
for (uint16_t q = 0; q <= 16; q += 2) {
|
||||||
if (p*(16-q) + (16-p)*q == sum_a0) {
|
if (p*(16-q) + (16-p)*q == sum_a0) {
|
||||||
printf("Reducing Partial Statelists (p,q) = (%d,%d) with lengths %d, %d\n",
|
// printf("Reducing Partial Statelists (p,q) = (%d,%d) with lengths %d, %d\n",
|
||||||
p, q, partial_statelist[p].len[ODD_STATE], partial_statelist[q].len[EVEN_STATE]);
|
// p, q, partial_statelist[p].len[ODD_STATE], partial_statelist[q].len[EVEN_STATE]);
|
||||||
for (uint16_t r = 0; r <= 16; r += 2) {
|
for (uint16_t r = 0; r <= 16; r += 2) {
|
||||||
for (uint16_t s = 0; s <= 16; s += 2) {
|
for (uint16_t s = 0; s <= 16; s += 2) {
|
||||||
if (r*(16-s) + (16-r)*s == sum_a8) {
|
if (r*(16-s) + (16-r)*s == sum_a8) {
|
||||||
|
|
|
@ -8,4 +8,32 @@
|
||||||
// hf mf hardnested command
|
// hf mf hardnested command
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef CMDHFMFHARD_H__
|
||||||
|
#define CMDHFMFHARD_H__
|
||||||
|
|
||||||
|
#include "sleep.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include "proxmark3.h"
|
||||||
|
#include "cmdmain.h"
|
||||||
|
#include "ui.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "nonce2key/crapto1.h"
|
||||||
|
#include "nonce2key/crypto1_bs.h"
|
||||||
|
#include "parity.h"
|
||||||
|
#ifdef __WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
// don't include for APPLE/mac which has malloc stuff elsewhere.
|
||||||
|
#ifndef __APPLE__
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *trgkey, bool nonce_file_read, bool nonce_file_write, bool slow, int tests);
|
int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *trgkey, bool nonce_file_read, bool nonce_file_write, bool slow, int tests);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1679,8 +1679,10 @@ int CmdHF14AMfUDump(const char *Cmd){
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fwrite( dump_file_data, 1, Pages*4 + DUMP_PREFIX_LENGTH, fout );
|
fwrite( dump_file_data, 1, Pages*4 + DUMP_PREFIX_LENGTH, fout );
|
||||||
|
if (fout) {
|
||||||
fclose(fout);
|
fclose(fout);
|
||||||
|
fout = NULL;
|
||||||
|
}
|
||||||
PrintAndLog("Dumped %d pages, wrote %d bytes to %s", Pages+(DUMP_PREFIX_LENGTH/4), Pages*4 + DUMP_PREFIX_LENGTH, filename);
|
PrintAndLog("Dumped %d pages, wrote %d bytes to %s", Pages+(DUMP_PREFIX_LENGTH/4), Pages*4 + DUMP_PREFIX_LENGTH, filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1491,7 +1491,10 @@ int CmdT55xxBruteForce(const char *Cmd) {
|
||||||
if (!p) {
|
if (!p) {
|
||||||
PrintAndLog("Cannot allocate memory for defaultKeys");
|
PrintAndLog("Cannot allocate memory for defaultKeys");
|
||||||
free(keyBlock);
|
free(keyBlock);
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
keyBlock = p;
|
keyBlock = p;
|
||||||
|
@ -1502,8 +1505,10 @@ int CmdT55xxBruteForce(const char *Cmd) {
|
||||||
keycnt++;
|
keycnt++;
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
}
|
}
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
if (keycnt == 0) {
|
if (keycnt == 0) {
|
||||||
PrintAndLog("No keys found in file");
|
PrintAndLog("No keys found in file");
|
||||||
free(keyBlock);
|
free(keyBlock);
|
||||||
|
|
|
@ -552,7 +552,6 @@ int bruteforceDump(uint8_t dump[], size_t dumpsize, uint16_t keytable[])
|
||||||
*/
|
*/
|
||||||
int bruteforceFile(const char *filename, uint16_t keytable[])
|
int bruteforceFile(const char *filename, uint16_t keytable[])
|
||||||
{
|
{
|
||||||
|
|
||||||
FILE *f = fopen(filename, "rb");
|
FILE *f = fopen(filename, "rb");
|
||||||
if(!f) {
|
if(!f) {
|
||||||
prnlog("Failed to read from file '%s'", filename);
|
prnlog("Failed to read from file '%s'", filename);
|
||||||
|
@ -565,19 +564,23 @@ int bruteforceFile(const char *filename, uint16_t keytable[])
|
||||||
|
|
||||||
if (fsize < 0) {
|
if (fsize < 0) {
|
||||||
prnlog("Error, when getting filesize");
|
prnlog("Error, when getting filesize");
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t *dump = malloc(fsize);
|
uint8_t *dump = malloc(fsize);
|
||||||
size_t bytes_read = fread(dump, 1, fsize, f);
|
size_t bytes_read = fread(dump, 1, fsize, f);
|
||||||
|
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
if (bytes_read < fsize)
|
f = NULL;
|
||||||
{
|
}
|
||||||
|
if (bytes_read < fsize) {
|
||||||
prnlog("Error, could only read %d bytes (should be %d)",bytes_read, fsize );
|
prnlog("Error, could only read %d bytes (should be %d)",bytes_read, fsize );
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t res = bruteforceDump(dump,fsize,keytable);
|
uint8_t res = bruteforceDump(dump,fsize,keytable);
|
||||||
free(dump);
|
free(dump);
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -77,17 +77,19 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
|
||||||
/* We should have a valid filename now, e.g. dumpdata-3.bin */
|
/* We should have a valid filename now, e.g. dumpdata-3.bin */
|
||||||
|
|
||||||
/*Opening file for writing in binary mode*/
|
/*Opening file for writing in binary mode*/
|
||||||
FILE *fileHandle=fopen(fileName,"wb");
|
FILE *f = fopen(fileName,"wb");
|
||||||
if(!fileHandle) {
|
if (!f) {
|
||||||
prnlog("Failed to write to file '%s'", fileName);
|
prnlog("Failed to write to file '%s'", fileName);
|
||||||
free(fileName);
|
free(fileName);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fwrite(data, 1, datalen, fileHandle);
|
fwrite(data, 1, datalen, f);
|
||||||
fclose(fileHandle);
|
if (f) {
|
||||||
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
prnlog("Saved data to '%s'", fileName);
|
prnlog("Saved data to '%s'", fileName);
|
||||||
free(fileName);
|
free(fileName);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -748,7 +748,10 @@ int readKeyFile(uint8_t key[8])
|
||||||
if ( bytes_read == 1) {
|
if ( bytes_read == 1) {
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -412,14 +412,20 @@ int loadTraceCard(uint8_t *tuid, uint8_t uidlen) {
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
if (fgets(buf, sizeof(buf), f) == NULL) {
|
if (fgets(buf, sizeof(buf), f) == NULL) {
|
||||||
PrintAndLog("No trace file found or reading error.");
|
PrintAndLog("No trace file found or reading error.");
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(buf) < 32){
|
if (strlen(buf) < 32){
|
||||||
if (feof(f)) break;
|
if (feof(f)) break;
|
||||||
PrintAndLog("File content error. Block data must include 32 HEX symbols");
|
PrintAndLog("File content error. Block data must include 32 HEX symbols");
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
for (i = 0; i < 32; i += 2)
|
for (i = 0; i < 32; i += 2)
|
||||||
|
@ -429,7 +435,10 @@ int loadTraceCard(uint8_t *tuid, uint8_t uidlen) {
|
||||||
|
|
||||||
blockNum++;
|
blockNum++;
|
||||||
}
|
}
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -447,7 +456,10 @@ int saveTraceCard(void) {
|
||||||
fprintf(f,"\n");
|
fprintf(f,"\n");
|
||||||
}
|
}
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,10 @@ void AddLogLine(char *file, char *extData, char *c) {
|
||||||
fprintf(f, "%s", extData);
|
fprintf(f, "%s", extData);
|
||||||
fprintf(f, "%s\n", c);
|
fprintf(f, "%s\n", c);
|
||||||
fflush(f);
|
fflush(f);
|
||||||
|
if (f) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
f = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len){
|
void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len){
|
||||||
|
|
|
@ -25,15 +25,13 @@ void dummy(char *fmt, ...){}
|
||||||
#define prnt dummy
|
#define prnt dummy
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t justNoise(uint8_t *BitStream, size_t size)
|
|
||||||
{
|
|
||||||
static const uint8_t THRESHOLD = 123;
|
|
||||||
//test samples are not just noise
|
//test samples are not just noise
|
||||||
uint8_t justNoise1 = 1;
|
uint8_t justNoise(uint8_t *bits, size_t size) {
|
||||||
for(size_t idx=0; idx < size && justNoise1 ;idx++){
|
#define THRESHOLD 123
|
||||||
justNoise1 = BitStream[idx] < THRESHOLD;
|
uint8_t val = 1;
|
||||||
}
|
for(size_t idx=0; idx < size && val ;idx++)
|
||||||
return justNoise1;
|
val = bits[idx] < THRESHOLD;
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
//by marshmellow
|
//by marshmellow
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <stdbool.h> // for bool
|
#include <stdbool.h> // for bool
|
||||||
|
|
||||||
//generic
|
//generic
|
||||||
|
uint8_t justNoise(uint8_t *bits, size_t size);
|
||||||
size_t addParity(uint8_t *BitSource, uint8_t *dest, uint8_t sourceLen, uint8_t pLen, uint8_t pType);
|
size_t addParity(uint8_t *BitSource, uint8_t *dest, uint8_t sourceLen, uint8_t pLen, uint8_t pType);
|
||||||
int askdemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr, uint8_t amp, uint8_t askType);
|
int askdemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr, uint8_t amp, uint8_t askType);
|
||||||
int BiphaseRawDecode(uint8_t * BitStream, size_t *size, int offset, int invert);
|
int BiphaseRawDecode(uint8_t * BitStream, size_t *size, int offset, int invert);
|
||||||
|
|
Loading…
Reference in a new issue