ADD: num_to_bytebitsLSBF function.

ADD: lf guard clone - works...  needs some checking.
ADD: added a option to "addparity" to set zero on fixed pos.
This commit is contained in:
iceman1001 2016-02-28 22:43:21 +01:00
commit 0d2c590974
5 changed files with 121 additions and 70 deletions

View file

@ -619,13 +619,13 @@ int CmdG_Prox_II_Demod(const char *Cmd)
continue;
}
if (keyCnt<8){ //lsb first
xorKey = xorKey | (DemodBuffer[startIdx+idx]<<keyCnt);
xorKey |= (DemodBuffer[startIdx+idx]<<keyCnt);
keyCnt++;
if (keyCnt==8 && g_debugMode) PrintAndLog("xorKey Found: %02x", xorKey);
continue;
}
//lsb first
ByteStream[ByteCnt] = ByteStream[ByteCnt] | (DemodBuffer[startIdx+idx]<<bitCnt);
ByteStream[ByteCnt] |= (DemodBuffer[startIdx+idx]<<bitCnt);
bitCnt++;
if (bitCnt % 8 == 0){
if (g_debugMode) PrintAndLog("byte %u: %02x", (unsigned int)ByteCnt, ByteStream[ByteCnt]);