]>
git.zerfleddert.de Git - proxmark3-svn/blob - client/cmdlfhid.c
8 static int CmdHelp(const char *Cmd
);
10 int CmdHIDDemod(const char *Cmd
)
12 if (GraphTraceLen
< 4800) {
13 PrintAndLog("too short; need at least 4800 samples");
18 for (int i
= 0; i
< GraphTraceLen
; ++i
) {
19 if (GraphBuffer
[i
] < 0) {
29 int CmdHIDDemodFSK(const char *Cmd
)
31 UsbCommand c
={CMD_HID_DEMOD_FSK
};
36 int CmdHIDSim(const char *Cmd
)
38 unsigned int hi
= 0, lo
= 0;
41 while (sscanf(&Cmd
[i
++], "%1x", &n
) == 1) {
42 hi
= (hi
<< 4) | (lo
>> 28);
43 lo
= (lo
<< 4) | (n
& 0xf);
46 PrintAndLog("Emulating tag with ID %x%16x", hi
, lo
);
48 UsbCommand c
= {CMD_HID_SIM_TAG
, {hi
, lo
, 0}};
53 static command_t CommandTable
[] =
55 {"help", CmdHelp
, 1, "This help"},
56 {"demod", CmdHIDDemod
, 1, "Demodulate HID Prox Card II (not optimal)"},
57 {"fskdemod", CmdHIDDemodFSK
, 0, "Realtime HID FSK demodulator"},
58 {"sim", CmdHIDSim
, 0, "<ID> -- HID tag simulator"},
62 int CmdLFHID(const char *Cmd
)
64 CmdsParse(CommandTable
, Cmd
);
68 int CmdHelp(const char *Cmd
)
70 CmdsHelp(CommandTable
);