]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmfdes.c
ADD: added the possibility to choose which block num to attack with "hf mf mifare...
[proxmark3-svn] / client / cmdhfmfdes.c
index 4aeeffd92f83274537a63451c29de395e8a17e1a..9ab5a4af21cefa99a2e1e3eba4fab44ac081e410 100644 (file)
@@ -352,7 +352,7 @@ void GetKeySettings( uint8_t *aid){
                        PrintAndLog("   Can't read Application Master key settings");
                } else {
                        // Access rights.
-                       uint8_t rights = (resp.d.asBytes[3] >> 4 && 0xff);
+                       uint8_t rights = (resp.d.asBytes[3] >> 4 & 0xff);
                        switch (rights){
                                case 0x00:
                                        str = "AMK authentication is necessary to change any key (default)";
@@ -636,8 +636,7 @@ int CmdHF14ADesAuth(const char *Cmd){
 }
 
 
-static command_t CommandTable[] =
-{
+static command_t CommandTable[] = {
   {"help",             CmdHelp,                                        1, "This help"},
   {"info",             CmdHF14ADesInfo,                        0, "Get MIFARE DesFire information"},
   {"enum",             CmdHF14ADesEnumApplications,0, "Tries enumerate all applications"},
@@ -647,18 +646,17 @@ static command_t CommandTable[] =
   {NULL, NULL, 0, NULL}
 };
 
-int CmdHFMFDes(const char *Cmd)
-{
+int CmdHFMFDes(const char *Cmd) {
    // flush
-   WaitForResponseTimeout(CMD_ACK,NULL,100);
-   CmdsParse(CommandTable, Cmd);
-  return 0;
+       clearCommandBuffer();
+       //WaitForResponseTimeout(CMD_ACK,NULL,100);
+       CmdsParse(CommandTable, Cmd);
+       return 0;
 }
 
-int CmdHelp(const char *Cmd)
-{
-  CmdsHelp(CommandTable);
-  return 0;
+int CmdHelp(const char *Cmd) {
+       CmdsHelp(CommandTable);
+       return 0;
 }
 
 
Impressum, Datenschutz