Merge remote-tracking branch 'upstream/master' into pm3sub

Conflicts:
	armsrc/appmain.c
	armsrc/epa.c
	armsrc/hitag2.c
	armsrc/iclass.c
	armsrc/iso14443a.c
	armsrc/lfops.c
	armsrc/mifarecmd.c
	armsrc/mifareutil.c
	client/cmddata.c
	client/cmdhf.c
	client/cmdhf14a.c
	client/cmdhf15.c
	client/cmdhfmf.c
	client/cmdlf.c
	client/cmdlfem4x.c
	client/cmdlfhid.c
	client/cmdlfio.c
	client/cmdmain.c
	client/loclass/ikeys.c
	client/mifarehost.c
	include/usb_cmd.h
This commit is contained in:
iceman1001 2015-01-06 12:12:10 +01:00
commit a3133321ea
9 changed files with 18 additions and 12 deletions

View file

@ -1100,7 +1100,6 @@ int doIClassSimulation(uint8_t csn[], int breakAfterMacReceived, uint8_t *reader
//Signal tracer
// Can be used to get a trigger for an oscilloscope..
LED_C_OFF();
if(!GetIClassCommandFromReader(receivedCmd, &len, 100)) {
buttonPressed = true;
break;

View file

@ -399,7 +399,7 @@ static RAMFUNC bool MillerDecoding(uint8_t bit, uint32_t non_real_time)
if (Uart.len) {
return TRUE; // we are finished with decoding the raw data sequence
} else {
UartReset(); // Nothing receiver - start over
UartReset(); // Nothing received - try again
}
}
if (Uart.state == STATE_START_OF_COMMUNICATION) { // error - must not follow directly after SOC
@ -473,6 +473,7 @@ void DemodReset()
Demod.endTime = 0;
}
void DemodInit(uint8_t *data, uint8_t *parity)
{
Demod.output = data;
@ -762,6 +763,7 @@ static void CodeIso14443aAsTagPar(const uint8_t *cmd, uint16_t len, uint8_t *par
// Send startbit
ToSend[++ToSendMax] = SEC_D;
LastProxToAirDuration = 8 * ToSendMax - 4;
for(uint16_t i = 0; i < len; i++) {
@ -1232,7 +1234,6 @@ void SimulateIso14443aTag(int tagType, int uid_1st, int uid_2nd, byte_t* data)
// do the tracing for the previous reader request and this tag answer:
uint8_t par[MAX_PARITY_SIZE];
GetParity(p_response->response, p_response->response_n, par);
EmLogTrace(Uart.output,
Uart.len,
Uart.startTime*16 - DELAY_AIR2ARM_AS_TAG,

View file

@ -717,6 +717,7 @@ void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol)
hi2 = hi = lo = 0;
}
WDT_HIT();
//SpinDelay(50);
}
DbpString("Stopped");
if (ledcontrol) LED_A_OFF();

View file

@ -11,6 +11,7 @@
#include "mifaresniff.h"
#include "apps.h"
static int sniffState = SNF_INIT;
static uint8_t sniffUIDType;
static uint8_t sniffUID[8];

View file

@ -412,7 +412,8 @@ int mifare_ultra_special_writeblock(uint32_t uid, uint8_t blockNo, uint8_t *bloc
if (MF_DBGLEVEL >= 1) Dbprintf("Cmd Send Error: %02x %d", receivedAnswer[0],len);
return 1;
}
return 0;
return 0;
}
int mifare_classic_halt(struct Crypto1State *pcs, uint32_t uid)

View file

@ -988,6 +988,7 @@ int CmdHF14AMfChk(const char *Cmd)
int transferToEml = 0;
int createDumpFile = 0;
keyBlock = calloc(stKeyBlock, 6);
if (keyBlock == NULL) return 1;

View file

@ -18,6 +18,7 @@
#include "cmddata.h"
#include "cmdhw.h"
#include "cmdmain.h"
#include "cmddata.h"
/* low-level hardware control */

View file

@ -131,7 +131,6 @@ int getCommand(UsbCommand* response)
*/
bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout) {
UsbCommand resp;
if (response == NULL)
response = &resp;

View file

@ -551,6 +551,8 @@ lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8],
return 0;
}
}
s = statelist;
for(o = odd; *o != -1; ++o)
for(e = even; *e != -1; ++e)