#include "proxmark3.h"
#include "apps.h"
#include "string.h"
+#include "util.h"
// BigBuf is the large multi-purpose buffer, typically used to hold A/D samples or traces.
// Also used to hold various smaller buffers and the Mifare Emulator Memory.
# zlib includes:
APP_CFLAGS += -I../zlib
-# stdint.h provided locally until GCC 4.5 becomes C99 compliant
-APP_CFLAGS += -I.
-
# Compile these in thumb mode (small size)
THUMBSRC = start.c \
$(SRC_LCD) \
// executes.
//-----------------------------------------------------------------------------
+#include <stdarg.h>
+
#include "usb_cdc.h"
#include "cmd.h"
-
#include "proxmark3.h"
#include "apps.h"
#include "util.h"
#include "printf.h"
#include "string.h"
-
-#include <stdarg.h>
-
#include "legicrf.h"
-#include <hitag2.h>
-#include <hitagS.h>
+#include "hitag2.h"
+#include "hitagS.h"
#include "lfsampling.h"
#include "BigBuf.h"
#include "mifareutil.h"
#include <stdint.h>
#include <stddef.h>
#include "common.h"
+#include "usb_cmd.h"
#include "hitag2.h"
#include "hitagS.h"
#include "mifare.h"
*
*/
#include <stdint.h>
-#include <string.h>
+#include "string.h"
const uint8_t sbox[256] = {
/* S-box 1 */
// functions, You need to do the setup before calling them!
//-----------------------------------------------------------------------------
+#include "apps.h"
#include "iso14443a.h"
#include "iso14443b.h"
#include "epa.h"
#include "cmd.h"
+#include "fpgaloader.h"
+#include "string.h"
+#include "util.h"
// Protocol and Parameter Selection Request for ISO 14443 type A cards
// use regular (1x) speed in both directions
**/
#include "optimized_cipher.h"
-#include <stdlib.h>
-#include <string.h>
+#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "apps.h"
#include "lfsampling.h"
#include "pcf7931.h"
+#include "util.h"
#include "string.h"
#define T0_PCF 8 //period for the pcf7931 in us
#include "util.h"
#include "string.h"
-typedef uint32_t uintmax_t;
-typedef int32_t intmax_t;
-
typedef unsigned char u_char;
typedef unsigned int u_int;
typedef unsigned long u_long;
+++ /dev/null
-//-----------------------------------------------------------------------------
-// Copyright (C) 2010 Hector Martin "marcan" <marcan@marcansoft.com>
-//
-// This code is licensed to you under the terms of the GNU GPL, version 2 or,
-// at your option, any later version. See the LICENSE.txt file for the text of
-// the license.
-//-----------------------------------------------------------------------------
-// Replacement stdint.h because GCC doesn't come with it yet (C99)
-//-----------------------------------------------------------------------------
-
-#ifndef __STDINT_H
-#define __STDINT_H
-
-typedef signed char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int intptr_t;
-typedef unsigned int uintptr_t;
-
-#endif /* __STDINT_H */
#define __STRING_H
#include <stdint.h>
-#include <util.h>
+#include "util.h"
int strlen(const char *str);
RAMFUNC void *memcpy(void *dest, const void *src, int len);
#ifndef _HITAG2_H_
#define _HITAG2_H_
+#ifdef _MSC_VER
+#define PACKED
+#else
+#define PACKED __attribute__((packed))
+#endif
+
typedef enum {
RHTSF_CHALLENGE = 01,
RHTSF_KEY = 02,
//-----------------------------------------------------------------------------
-#include <stdlib.h>
-#include <string.h>
-#include <hitag2.h>
-
#ifndef _HITAGS_H_
#define _HITAGS_H_
+#include "hitag2.h"
+
typedef enum PROTO_STATE {READY=0,INIT,AUTHENTICATE,SELECTED,QUIET,TTF,FAIL} PSTATE; //protocol-state
typedef enum TAG_STATE {NO_OP=0,READING_PAGE,WRITING_PAGE_ACK,WRITING_PAGE_DATA,WRITING_BLOCK_DATA} TSATE; //tag-state
typedef enum SOF_TYPE {STANDARD=0,ADVANCED,FAST_ADVANCED,ONE,NO_BITS} stype; //number of start-of-frame bits