]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhficlass.c
Further implementation of iclass 'fullsim'. Moved protocol definitions to shared...
[proxmark3-svn] / client / cmdhficlass.c
index b945e12b4c2b850360113533a8c7bf41f0210c63..7bc23e9bb522d32db4e3db637dfc60aa7b3eea9b 100644 (file)
@@ -364,6 +364,8 @@ int CmdHFiClassReader_Dump(const char *Cmd)
                                        snprintf(filename, 100,"iclass_tagdump-%02x%02x%02x%02x%02x%02x%02x%02x",
                                                         CSN[0],CSN[1],CSN[2],CSN[3],
                                                        CSN[4],CSN[5],CSN[6],CSN[7]);
+                                       //Place the div_key in block 3
+                                       memcpy(iclass_data+(3*8), div_key, 8);
                                        saveFile(filename,"bin",iclass_data, iclass_datalen );
                                }
                                //Aaaand we're finished
@@ -451,11 +453,12 @@ int usage_hf_iclass_decrypt()
 {
        PrintAndLog("Usage: hf iclass decrypt f <tagdump> o ");
        PrintAndLog("");
-       PrintAndLog("In order to use this function, the file 'iclass_decryptionkey.bin must reside");
+       PrintAndLog("OBS! In order to use this function, the file 'iclass_decryptionkey.bin' must reside");
        PrintAndLog("in the working directory. The file should be 16 bytes binary data");
+       PrintAndLog("");
        PrintAndLog("example: hf iclass decrypt tagdump_12312342343.bin");
        PrintAndLog("");
-       PrintAndLog("OBS! This is pretty stupid implementation, it tries to decrypt every block after block 5. ");
+       PrintAndLog("OBS! This is pretty stupid implementation, it tries to decrypt every block after block 6. ");
        PrintAndLog("Correct behaviour would be to decrypt only the application areas where the key is valid,");
        PrintAndLog("which is defined by the configuration block.");
        return 1;
@@ -527,7 +530,7 @@ int CmdHFiClassDecrypt(const char *Cmd)
        size_t blocknum =0;
        while(bytes_read == 8)
        {
-               if(blocknum < 6)
+               if(blocknum < 7)
                {
                        memcpy(decrypted+(blocknum*8), enc_dump, 8);
                }else{
Impressum, Datenschutz