X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/63852b2f5121013884826145e8d2dd2d7dbcf36d..3e134b4c20a5528b8264cd87d3fdebd0b2df6fd9:/armsrc/apps.h diff --git a/armsrc/apps.h b/armsrc/apps.h index 1d23caa4..55cd61b3 100644 --- a/armsrc/apps.h +++ b/armsrc/apps.h @@ -8,14 +8,13 @@ //----------------------------------------------------------------------------- // Definitions internal to the app source. //----------------------------------------------------------------------------- - #ifndef __APPS_H #define __APPS_H #include #include #include -#include +//#include #include "common.h" #include "crc32.h" #include "lfdemod.h" @@ -23,12 +22,13 @@ #include "fpgaloader.h" #include "usb_cdc.h" #include "hitag2.h" +#include "hitagS.h" #include "mifare.h" #include "pcf7931.h" //#include "des.h" //#include "aes.h" #include "desfire.h" - +#include "iso14443b.h" extern const uint8_t OddByteParity[256]; extern int rsamples; // = 0; @@ -54,13 +54,13 @@ void Dbhexdump(int len, uint8_t *d, bool bAsci); #define MAX_ADC_LF_VOLTAGE 140800 int AvgAdc(int ch); +void PrintToSendBuffer(void); void ToSendStuffBit(int b); void ToSendReset(void); void ListenReaderField(int limit); extern int ToSendMax; extern uint8_t ToSend[]; - /// lfops.h extern uint8_t decimation; extern uint8_t bits_per_sample ; @@ -99,9 +99,9 @@ void EM4xReadWord(uint8_t Address, uint32_t Pwd, uint8_t PwdMode); void EM4xWriteWord(uint32_t Data, uint8_t Address, uint32_t Pwd, uint8_t PwdMode); /// iso14443.h -void SimulateIso14443bTag(void); +void SimulateIso14443bTag(uint32_t pupi); void AcquireRawAdcSamplesIso14443b(uint32_t parameter); -void ReadSTMemoryIso14443b(uint32_t); +void ReadSTMemoryIso14443b(uint8_t numofblocks); void RAMFUNC SnoopIso14443b(void); void SendRawCommand14443B(uint32_t, uint32_t, uint8_t, uint8_t[]); @@ -110,7 +110,7 @@ void RAMFUNC SniffIso14443a(uint8_t param); void SimulateIso14443aTag(int tagType, int flags, byte_t* data); void ReaderIso14443a(UsbCommand * c); // Also used in iclass.c -bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t len, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool readerToTag); +//bool RAMFUNC LogTrace(const uint8_t *btBytes, uint16_t len, uint32_t timestamp_start, uint32_t timestamp_end, uint8_t *parity, bool readerToTag); void GetParity(const uint8_t *pbtCmd, uint16_t len, uint8_t *parity); void iso14a_set_trigger(bool enable); @@ -147,7 +147,6 @@ void MifareCIdent(); // is "magic chinese" card? void MifareUSetPwd(uint8_t arg0, uint8_t *datain); void OnSuccessMagic(); void OnErrorMagic(uint8_t reason); -void MifareCollectNonces(uint32_t arg0, uint32_t arg1); //desfire void Mifare_DES_Auth1(uint8_t arg0,uint8_t *datain); @@ -166,8 +165,8 @@ void OnError(uint8_t reason); // desfire_crypto.h -void *mifare_cryto_preprocess_data (desfiretag_t tag, void *data, size_t *nbytes, off_t offset, int communication_settings); -void *mifare_cryto_postprocess_data (desfiretag_t tag, void *data, ssize_t *nbytes, int communication_settings); +void *mifare_cryto_preprocess_data (desfiretag_t tag, void *data, size_t *nbytes, size_t offset, int communication_settings); +void *mifare_cryto_postprocess_data (desfiretag_t tag, void *data, size_t *nbytes, int communication_settings); void mifare_cypher_single_block (desfirekey_t key, uint8_t *data, uint8_t *ivect, MifareCryptoDirection direction, MifareCryptoOperation operation, size_t block_size); void mifare_cypher_blocks_chained (desfiretag_t tag, desfirekey_t key, uint8_t *ivect, uint8_t *data, size_t data_size, MifareCryptoDirection direction, MifareCryptoOperation operation); size_t key_block_size (const desfirekey_t key); @@ -206,6 +205,13 @@ void SnoopHitag(uint32_t type); void SimulateHitagTag(bool tag_mem_supplied, byte_t* data); void ReaderHitag(hitag_function htf, hitag_data* htd); +//hitagS.h +void SimulateHitagSTag(bool tag_mem_supplied, byte_t* data); +void ReadHitagS(hitag_function htf, hitag_data* htd); +void WritePageHitagS(hitag_function htf, hitag_data* htd,int page); +void check_challenges(bool file_given, byte_t* data); + + // cmd.h bool cmd_receive(UsbCommand* cmd); bool cmd_send(uint32_t cmd, uint32_t arg0, uint32_t arg1, uint32_t arg2, void* data, size_t len);