mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
ADD: LF JABLOTRON functionality. with clone/sim and detection in LF SEARCH.
CHG: removed no-existing crc8ja code FIX: a check in ASKbiphaseDemod to make sure graphbuff is not empty.
This commit is contained in:
parent
e92948c60c
commit
6c28395106
12 changed files with 426 additions and 177 deletions
|
@ -82,16 +82,11 @@ int GetNedapBits(uint32_t cn, uint8_t *nedapBits) {
|
|||
|
||||
int CmdLFNedapDemod(const char *Cmd) {
|
||||
//raw ask demod no start bit finding just get binary from wave
|
||||
uint8_t BitStream[MAX_GRAPH_TRACE_LEN]={0};
|
||||
size_t size = getFromGraphBuf(BitStream);
|
||||
if (size==0) return 0;
|
||||
|
||||
//get binary from ask wave
|
||||
if (!ASKbiphaseDemod("0 64 0 0", FALSE)) {
|
||||
if (g_debugMode) PrintAndLog("Error NEDAP: ASKbiphaseDemod failed");
|
||||
return 0;
|
||||
}
|
||||
size = DemodBufferLen;
|
||||
size_t size = DemodBufferLen;
|
||||
int idx = NedapDemod(DemodBuffer, &size);
|
||||
if (idx < 0){
|
||||
if (g_debugMode){
|
||||
|
@ -143,13 +138,13 @@ int CmdLFNedapDemod(const char *Cmd) {
|
|||
uint8_t firstParity = GetParity( DemodBuffer, EVEN, 63);
|
||||
if ( firstParity != DemodBuffer[63] ) {
|
||||
PrintAndLog("1st 64bit parity check failed: %d|%d ", DemodBuffer[63], firstParity);
|
||||
//return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t secondParity = GetParity( DemodBuffer+64, EVEN, 63);
|
||||
if ( secondParity != DemodBuffer[127] ) {
|
||||
PrintAndLog("2st 64bit parity check failed: %d|%d ", DemodBuffer[127], secondParity);
|
||||
//return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ok valid card found!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue