chg: @piwi's code cleanup and some more.

ref: 43534cbad2
This commit is contained in:
iceman1001
2017-02-23 00:03:10 +01:00
parent b4762e2712
commit 9c624f67b3
31 changed files with 176 additions and 183 deletions

View File

@@ -1229,6 +1229,26 @@ void UsbPacketReceived(uint8_t *packet, int len)
case CMD_EMV_DUMP_CARD:
EMVdumpcard();
break;
/*
case CMD_EMV_READ_RECORD:
EMVReadRecord(c->arg[0], c->arg[1], NULL);
break;
case CMD_EMV_TRANSACTION:
EMVTransaction();
break;
case CMD_EMV_CLONE:
EMVClone(c->arg[0], c->arg[1]);
break;
case CMD_EMV_SIM:
EMVSim();
break;
case CMD_EMV_TEST:
EMVTest();
break;
case CMD_EMV_FUZZ_RATS:
EMVFuzz_RATS(c->arg[0],c->d.asBytes);
break;
*/
#endif
#ifdef WITH_ICLASS
// Makes use of ISO14443a FPGA Firmware
@@ -1303,7 +1323,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
// arg0 = startindex
// arg1 = length bytes to transfer
// arg2 = RFU
//Dbprintf("transfer to client parameters: %llu | %llu | %llu", c->arg[0], c->arg[1], c->arg[2]);
//Dbprintf("transfer to client parameters: %" PRIu64 " | %" PRIu64 " | %" PRIu64, c->arg[0], c->arg[1], c->arg[2]);
for(size_t i = 0; i < c->arg[1]; i += USB_CMD_DATA_SIZE) {
len = MIN( (c->arg[1] - i), USB_CMD_DATA_SIZE);

View File

@@ -179,7 +179,7 @@ size_t enciphered_data_length (const desfiretag_t tag, const size_t nbytes, int
void cmac_generate_subkeys (desfirekey_t key);
void cmac (const desfirekey_t key, uint8_t *ivect, const uint8_t *data, size_t len, uint8_t *cmac);
/// iso15693.h
// iso15693.h
void RecordRawAdcSamplesIso15693(void);
void AcquireRawAdcSamplesIso15693(void);
void ReaderIso15693(uint32_t parameter); // Simulate an ISO15693 reader - greg
@@ -188,7 +188,7 @@ void BruteforceIso15693Afi(uint32_t speed); // find an AFI of a tag - atrox
void DirectTag15693Command(uint32_t datalen,uint32_t speed, uint32_t recv, uint8_t data[]); // send arbitrary commands from CLI - atrox
void SetDebugIso15693(uint32_t flag);
/// iclass.h
// iclass.h
void RAMFUNC SnoopIClass(void);
void SimulateIClass(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
void ReaderIClass(uint8_t arg0);
@@ -226,6 +226,18 @@ void EMVgetUDOL(void);
void EMVloadvalue(uint32_t tag, uint8_t* datain);
void EMVdumpcard(void);
/*
//void EMVSelect(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *data);
void EMVFuzz_RATS(uint8_t len, uint8_t* RATS);
void EMVReadRecord(uint8_t arg0, uint8_t arg1,emvcard* inputcard);
void EMVSelectPPSE();
void EMVSelectAID(uint8_t *AID, uint8_t AIDlen, emvcard* inputcard);
void EMVTransaction(); //perform an EMV transaction
void EMVClone(uint8_t maxsfi, uint8_t maxrecord); //clone an EMV card.
void EMVSim();
void EMVTest(); //test function for emv stuff.
*/
#ifdef __cplusplus
}
#endif