]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfhid.c
ADD: new found cloner pwd.
[proxmark3-svn] / client / cmdlfhid.c
index 162096601ff1e61c179eb3e981b53c55c2095972..d4fd1522316cafbef0bf58f4edac5b62b9128bc5 100644 (file)
@@ -127,7 +127,7 @@ int CmdHIDSim(const char *Cmd) {
 
 int CmdHIDClone(const char *Cmd) {
        
-       unsigned int hi2 = 0, hi = 0, lo = 0;
+       uint32_t hi2 = 0, hi = 0, lo = 0;
        int n = 0, i = 0;
        UsbCommand c;
 
@@ -428,12 +428,15 @@ int CmdHIDBrute(const char *Cmd){
                case 'A':
                        fmtlen = param_get8(Cmd, cmdp+1);                       
                        cmdp += 2;
+                       bool is_ftm_ok = FALSE;
                        uint8_t ftms[] = {26,33,34,35,37};
                        for ( uint8_t i = 0; i < sizeof(ftms); i++){
                                if ( ftms[i] == fmtlen ) {
-                                       errors = FALSE;
+                                       is_ftm_ok = TRUE;
                                }
                        }
+                       // negated
+                       errors = !is_ftm_ok;
                        break;
                default:
                        PrintAndLog("Unknown parameter '%c'", param_getchar(Cmd, cmdp));
@@ -479,7 +482,7 @@ static command_t CommandTable[] = {
        {"fskdemod",CmdHIDDemodFSK, 0, "Realtime HID FSK demodulator"},
        {"sim",     CmdHIDSim,      0, "HID tag simulator"},
        {"clone",   CmdHIDClone,    0, "Clone HID to T55x7"},
-       {"wiegand", CmdHIDWiegand,  0, "Convert facility code/card number to Wiegand code"},
+       {"wiegand", CmdHIDWiegand,  1, "Convert facility code/card number to Wiegand code"},
        {"brute",   CmdHIDBrute,        0, "Bruteforce card number against reader"},
        {NULL, NULL, 0, NULL}
 };
Impressum, Datenschutz