mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
remove spurious spaces & tabs at end of lines
This commit is contained in:
parent
edc19f202a
commit
60f292b18e
249 changed files with 8481 additions and 8481 deletions
|
@ -32,7 +32,7 @@ int CmdCOTAGDemod(const char *Cmd) {
|
|||
uint8_t bits[COTAG_BITS] = {0};
|
||||
size_t bitlen = COTAG_BITS;
|
||||
memcpy(bits, DemodBuffer, COTAG_BITS);
|
||||
|
||||
|
||||
uint8_t alignPos = 0;
|
||||
int err = manrawdecode(bits, &bitlen, 1, &alignPos);
|
||||
if (err){
|
||||
|
@ -45,18 +45,18 @@ int CmdCOTAGDemod(const char *Cmd) {
|
|||
//got a good demod
|
||||
uint16_t cn = bytebits_to_byteLSBF(bits+1, 16);
|
||||
uint32_t fc = bytebits_to_byteLSBF(bits+1+16, 8);
|
||||
|
||||
|
||||
uint32_t raw1 = bytebits_to_byteLSBF(bits, 32);
|
||||
uint32_t raw2 = bytebits_to_byteLSBF(bits+32, 32);
|
||||
uint32_t raw3 = bytebits_to_byteLSBF(bits+64, 32);
|
||||
uint32_t raw4 = bytebits_to_byteLSBF(bits+96, 32);
|
||||
|
||||
|
||||
/*
|
||||
fc 161: 1010 0001 -> LSB 1000 0101
|
||||
cn 33593 1000 0011 0011 1001 -> LSB 1001 1100 1100 0001
|
||||
cccc cccc cccc cccc ffffffff
|
||||
0 1001 1100 1100 0001 1000 0101 0000 0000 100001010000000001111011100000011010000010000000000000000000000000000000000000000000000000000000100111001100000110000101000
|
||||
1001 1100 1100 0001 10000101
|
||||
1001 1100 1100 0001 10000101
|
||||
*/
|
||||
PrintAndLogEx(SUCCESS, "COTAG Found: FC %u, CN: %u Raw: %08X%08X%08X%08X", fc, cn, raw1 ,raw2, raw3, raw4);
|
||||
return 1;
|
||||
|
@ -65,32 +65,32 @@ int CmdCOTAGDemod(const char *Cmd) {
|
|||
// When reading a COTAG.
|
||||
// 0 = HIGH/LOW signal - maxlength bigbuff
|
||||
// 1 = translation for HI/LO into bytes with manchester 0,1 - length 300
|
||||
// 2 = raw signal - maxlength bigbuff
|
||||
// 2 = raw signal - maxlength bigbuff
|
||||
int CmdCOTAGRead(const char *Cmd) {
|
||||
|
||||
|
||||
if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_cotag_read();
|
||||
|
||||
|
||||
uint32_t rawsignal = 1;
|
||||
sscanf(Cmd, "%u", &rawsignal);
|
||||
|
||||
|
||||
UsbCommand c = {CMD_COTAG, {rawsignal, 0, 0}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
if ( !WaitForResponseTimeout(CMD_ACK, NULL, 7000) ) {
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
switch ( rawsignal ){
|
||||
case 0:
|
||||
case 0:
|
||||
case 2: {
|
||||
CmdPlot("");
|
||||
CmdGrid("384");
|
||||
getSamples(0, true);
|
||||
getSamples(0, true);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
|
||||
|
||||
if ( !GetFromDevice(BIG_BUF, DemodBuffer, COTAG_BITS, 0, NULL, 1000, false)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
return -1;
|
||||
|
@ -98,7 +98,7 @@ int CmdCOTAGRead(const char *Cmd) {
|
|||
DemodBufferLen = COTAG_BITS;
|
||||
return CmdCOTAGDemod("");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue