]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
CHG: "hf legic dump" now automatically detects tagtype and dumps accordingly.
[proxmark3-svn] / client / mifarehost.c
index 97e53f1e97820d241c1fe67157324b5621afe3a4..b41c368702e6cbb4c94e82ee519ff9f2b5e7c8f5 100644 (file)
@@ -125,8 +125,8 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t * key, uint8_t trgBlockNo
        p4->even = 0; p4->odd = 0;\r
        statelists[0].len = p3 - statelists[0].head.slhead;\r
        statelists[1].len = p4 - statelists[1].head.slhead;\r
-       statelists[0].tail.sltail=--p3;\r
-       statelists[1].tail.sltail=--p4;\r
+       statelists[0].tail.sltail = --p3;\r
+       statelists[1].tail.sltail = --p4;\r
 \r
        // the statelists now contain possible keys. The key we are searching for must be in the\r
        // intersection of both lists. Create the intersection:\r
@@ -654,12 +654,12 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
 \r
 int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t *data, int len){\r
        PrintAndLog("\nEncrypted data: [%s]", sprint_hex(data, len) );\r
-       struct Crypto1State *pcs = NULL;\r
+       struct Crypto1State *s;\r
        ks2 = ar_enc ^ prng_successor(nt, 64);\r
        ks3 = at_enc ^ prng_successor(nt, 96);\r
-       pcs = lfsr_recovery64(ks2, ks3);\r
-       mf_crypto1_decrypt(pcs, data, len, FALSE);\r
+       s = lfsr_recovery64(ks2, ks3);\r
+       mf_crypto1_decrypt(s, data, len, FALSE);\r
        PrintAndLog("Decrypted data: [%s]", sprint_hex(data, len) );\r
-       crypto1_destroy(pcs);\r
+       crypto1_destroy(s);\r
        return 0;\r
 }\r
Impressum, Datenschutz