X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aa53efc340d9f2dc382e4bb98d49bede5a18e920..385c1a5ebc90f134d9856f491065476e8ef44741:/client/cmdhficlass.c diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index db3de205..37cf4dee 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "iso14443crc.h" // Can also be used for iClass, using 0xE012 as CRC-type #include "data.h" #include "proxmark3.h" @@ -23,7 +24,7 @@ #include "common.h" #include "util.h" #include "cmdmain.h" -#include "loclass/des.h" +#include "polarssl/des.h" #include "loclass/cipherutils.h" #include "loclass/cipher.h" #include "loclass/ikeys.h" @@ -32,8 +33,7 @@ #include "protocols.h" #include "usb_cmd.h" #include "cmdhfmfu.h" - -#define llX PRIx64 +#include "util_posix.h" static int CmdHelp(const char *Cmd); @@ -53,8 +53,15 @@ typedef struct iclass_block { uint8_t d[8]; } iclass_block_t; -int xorbits_8(uint8_t val) -{ +int usage_hf_iclass_chk(void) { + PrintAndLog("Usage: hf iclass chk [h] "); + PrintAndLog("Options:"); + PrintAndLog("h Show this help"); + PrintAndLog("f Dictionary file with default iclass keys"); + return 0; +} + +int xorbits_8(uint8_t val) { uint8_t res = val ^ (val >> 1); //1st pass res = res ^ (res >> 1); // 2nd pass res = res ^ (res >> 2); // 3rd pass @@ -62,20 +69,18 @@ int xorbits_8(uint8_t val) return res & 1; } -int CmdHFiClassList(const char *Cmd) -{ +int CmdHFiClassList(const char *Cmd) { PrintAndLog("Deprecated command, use 'hf list iclass' instead"); return 0; } -int CmdHFiClassSnoop(const char *Cmd) -{ +int CmdHFiClassSnoop(const char *Cmd) { UsbCommand c = {CMD_SNOOP_ICLASS}; SendCommand(&c); return 0; } -int usage_hf_iclass_sim() -{ + +int usage_hf_iclass_sim(void) { PrintAndLog("Usage: hf iclass sim