summer restructuring:
* .h include only the strict minimum for their own parsing * this forces all files to include explicitment their needs and not count on far streched dependencies * this helps Makefile to rebuild only the minimum * according to this rule, most standalone .h are now gone * big app.h is gone * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway * all unrequired include were removed * split common/ into common/ (client+arm) and common_arm/ (os+bootloader) * bring zlib to common/ * bring stuff not really/not yet used in common back to armsrc/ or client/ * bring liblua into client/ * bring uart into client/ * move some portions of code around (dbprint, protocols,...) * rename unused files into *_disabled.[ch] to make it explicit * rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash * remove PrintAndLogDevice * move deprecated-hid-flasher from client to tools * Makefiles * treat deps in armsrc/ as in client/ * client: stop on warning (-Werror), same as for armsrc/ Tested on: * all standalone modes * Linux
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
#include "mad.h"
|
||||
#include "ui.h"
|
||||
#include "commonutil.h" // ARRAYLEN
|
||||
|
||||
#include "crc.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#ifndef _MAD_H_
|
||||
#define _MAD_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
uint16_t AID;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "mfkey.h"
|
||||
|
||||
#include "crapto1/crapto1.h"
|
||||
|
||||
// MIFARE
|
||||
int compare_uint64(const void *a, const void *b) {
|
||||
if (*(uint64_t *)b == *(uint64_t *)a) return 0;
|
||||
|
||||
@@ -13,11 +13,8 @@
|
||||
#ifndef MFKEY_H
|
||||
#define MFKEY_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "common.h"
|
||||
#include "mifare.h"
|
||||
#include "crapto1/crapto1.h"
|
||||
|
||||
uint32_t nonce2key(uint32_t uid, uint32_t nt, uint32_t nr, uint32_t ar, uint64_t par_info, uint64_t ks_info, uint64_t **keys);
|
||||
bool mfkey32(nonces_t data, uint64_t *outputkey);
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "mifare4.h"
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "commonutil.h" // ARRAYLEN
|
||||
#include "comms.h" // DropField
|
||||
#include "cmdhf14a.h"
|
||||
#include "util.h"
|
||||
#include "ui.h"
|
||||
#include "crypto/libpcrypto.h"
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
#ifndef MIFARE4_H
|
||||
#define MIFARE4_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
bool Authenticated;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifndef MIFAREDEFAULT_H__
|
||||
#define MIFAREDEFAULT_H__
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "common.h"
|
||||
|
||||
static const uint64_t g_mifare_default_keys[] = {
|
||||
0xffffffffffff, // Default key (first key used by program if no user defined key)
|
||||
|
||||
@@ -8,7 +8,22 @@
|
||||
// mifare commands
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "mifarehost.h"
|
||||
#include "cmdmain.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "comms.h"
|
||||
#include "commonutil.h"
|
||||
#include "mifare4.h"
|
||||
#include "ui.h" // PrintAndLog...
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "crc16.h"
|
||||
#include "protocols.h"
|
||||
#include "mfkey.h"
|
||||
#include "util_posix.h" // msclock
|
||||
|
||||
|
||||
int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) {
|
||||
uint32_t uid = 0;
|
||||
|
||||
@@ -10,22 +10,9 @@
|
||||
#ifndef __MIFARE_HOST_H
|
||||
#define __MIFARE_HOST_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "proxmark3.h" // time_t
|
||||
#include "common.h"
|
||||
|
||||
#include "util.h" // FILE_PATH_SIZE
|
||||
#include "ui.h" // PrintAndLog...
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "crc16.h"
|
||||
#include "protocols.h"
|
||||
#include "mifare.h"
|
||||
#include "mfkey.h"
|
||||
#include "util_posix.h" // msclock
|
||||
|
||||
#define MIFARE_SECTOR_RETRY 10
|
||||
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "ndef.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "ui.h"
|
||||
#include "util.h" // sprint_hex...
|
||||
#include "emv/dump.h"
|
||||
#include "crypto/asn1utils.h"
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#ifndef _NDEF_H_
|
||||
#define _NDEF_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include "common.h"
|
||||
|
||||
typedef enum {
|
||||
tnfEmptyRecord = 0x00,
|
||||
|
||||
Reference in New Issue
Block a user