projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation error on OS X (#730)
[proxmark3-svn]
/
client
/
cmdhfepa.c
diff --git
a/client/cmdhfepa.c
b/client/cmdhfepa.c
index e50ce7082f9c2f973f72fee21e3e5d2b22966c01..76664bf59616468ba55c832dae8da24e6ba5e2e6 100644
(file)
--- a/
client/cmdhfepa.c
+++ b/
client/cmdhfepa.c
@@
-8,15
+8,20
@@
// Commands related to the German electronic Identification Card
//-----------------------------------------------------------------------------
// Commands related to the German electronic Identification Card
//-----------------------------------------------------------------------------
-#include "
util
.h"
+#include "
cmdhfepa
.h"
-#include "proxmark3.h"
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include "util.h"
+#include "util_posix.h"
+#include "comms.h"
#include "ui.h"
#include "cmdparser.h"
#include "common.h"
#include "cmdmain.h"
#include "ui.h"
#include "cmdparser.h"
#include "common.h"
#include "cmdmain.h"
-#include "sleep.h"
-#include "cmdhfepa.h"
static int CmdHelp(const char *Cmd);
static int CmdHelp(const char *Cmd);
@@
-37,7
+42,7
@@
int CmdHFEPACollectPACENonces(const char *Cmd)
n = n > 0 ? n : 1;
PrintAndLog("Collecting %u %u-byte nonces", n, m);
n = n > 0 ? n : 1;
PrintAndLog("Collecting %u %u-byte nonces", n, m);
- PrintAndLog("Start: %
u", time(NULL)
);
+ PrintAndLog("Start: %
" PRIu64 , msclock()/1000
);
// repeat n times
for (unsigned int i = 0; i < n; i++) {
// execute PACE
// repeat n times
for (unsigned int i = 0; i < n; i++) {
// execute PACE
@@
-64,7
+69,7
@@
int CmdHFEPACollectPACENonces(const char *Cmd)
sleep(d);
}
}
sleep(d);
}
}
- PrintAndLog("End: %
u", time(NULL)
);
+ PrintAndLog("End: %
" PRIu64, msclock()/1000
);
return 1;
}
return 1;
}
@@
-82,7
+87,7
@@
int CmdHFEPAPACEReplay(const char *Cmd)
uint8_t *apdus[] = {msesa_apdu, gn_apdu, map_apdu, pka_apdu, ma_apdu};
// usage message
uint8_t *apdus[] = {msesa_apdu, gn_apdu, map_apdu, pka_apdu, ma_apdu};
// usage message
- static const char
const
*usage_msg =
+ static const char *usage_msg =
"Please specify 5 APDUs separated by spaces. "
"Example:\n preplay 0022C1A4 1068000000 1086000002 1234ABCDEF 1A2B3C4D";
"Please specify 5 APDUs separated by spaces. "
"Example:\n preplay 0022C1A4 1068000000 1086000002 1234ABCDEF 1A2B3C4D";
@@
-197,10
+202,7
@@
int CmdHelp(const char *Cmd)
int CmdHFEPA(const char *Cmd)
{
int CmdHFEPA(const char *Cmd)
{
- // flush
- WaitForResponseTimeout(CMD_ACK,NULL,100);
-
- // parse
- CmdsParse(CommandTable, Cmd);
- return 0;
+ (void)WaitForResponseTimeout(CMD_ACK,NULL,100);
+ CmdsParse(CommandTable, Cmd);
+ return 0;
}
}
Impressum
,
Datenschutz