X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1604d0a2909a6ae1a5b615d280671d867c1028a4..9bef1216b98ab37573afa24195fe61f46e076232:/client/cmdhficlass.c diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index b8e1e098..90856e91 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -1,6 +1,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 2010 iZsh , Hagen Fritsch // Copyright (C) 2011 Gerhard de Koning Gans +// Copyright (C) 2014 Midnitesnake & Andy Davies & Martin Holst Swende // // 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 @@ -9,25 +10,196 @@ // High frequency iClass commands //----------------------------------------------------------------------------- -#include -#include -#include -#include -#include "iso14443crc.h" // Can also be used for iClass, using 0xE012 as CRC-type -#include "data.h" -//#include "proxusb.h" -#include "proxmark3.h" -#include "ui.h" -#include "cmdparser.h" #include "cmdhficlass.h" -#include "common.h" -#include "util.h" -#include "cmdmain.h" static int CmdHelp(const char *Cmd); -int xorbits_8(uint8_t val) -{ +#define NUM_CSNS 15 +#define ICLASS_KEYS_MAX 8 +static uint8_t iClass_Key_Table[ICLASS_KEYS_MAX][8] = { + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, + { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } +}; + +typedef struct iclass_block { + uint8_t d[8]; +} iclass_block_t; + +int usage_hf_iclass_sim(void) { + PrintAndLog("Usage: hf iclass sim