mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-31 12:00:10 -07:00
fix lf io clone (issue #331):
- remove confusing message about simulation - add h (help) parameter and usage text
This commit is contained in:
parent
067bfc8b76
commit
edf8806f15
1 changed files with 8 additions and 7 deletions
|
@ -133,20 +133,21 @@ int CmdIOClone(const char *Cmd)
|
||||||
{
|
{
|
||||||
unsigned int hi = 0, lo = 0;
|
unsigned int hi = 0, lo = 0;
|
||||||
int n = 0, i = 0;
|
int n = 0, i = 0;
|
||||||
|
char ch;
|
||||||
UsbCommand c;
|
UsbCommand c;
|
||||||
|
|
||||||
|
|
||||||
//if (1 == sscanf(str, "0x%"SCNx32, &hi)) {
|
|
||||||
// value now contains the value in the string--decimal 255, in this case.
|
|
||||||
//}
|
|
||||||
|
|
||||||
while (sscanf(&Cmd[i++], "%1x", &n ) == 1) {
|
while (sscanf(&Cmd[i++], "%1x", &n ) == 1) {
|
||||||
hi = (hi << 4) | (lo >> 28);
|
hi = (hi << 4) | (lo >> 28);
|
||||||
lo = (lo << 4) | (n & 0xf);
|
lo = (lo << 4) | (n & 0xf);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLog("Cloning tag with ID %08x %08x", hi, lo);
|
if (sscanf(&Cmd[--i], "%c", &ch) == 1) {
|
||||||
PrintAndLog("Press pm3-button to abort simulation");
|
PrintAndLog("Usage: lf io clone <tag-ID>");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
PrintAndLog("Cloning ioProx tag with ID %08x %08x", hi, lo);
|
||||||
|
|
||||||
c.cmd = CMD_IO_CLONE_TAG;
|
c.cmd = CMD_IO_CLONE_TAG;
|
||||||
c.arg[0] = hi;
|
c.arg[0] = hi;
|
||||||
c.arg[1] = lo;
|
c.arg[1] = lo;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue