]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfem4x.c
CHG: some of @marshmellow42 's ref: https://github.com/marshmellow42/proxmark3/commi...
[proxmark3-svn] / client / cmdlfem4x.c
index 89f68171bf4ca0d6de8fd13458cb3e2064b21bbf..ff7a5f69b8d7046049556db17a0adf011c17a09a 100644 (file)
@@ -14,6 +14,20 @@ uint64_t g_em410xid = 0;
 
 static int CmdHelp(const char *Cmd);
 
+int usage_lf_em410x_sim(void) {
+       PrintAndLog("Simulating EM410x tag");
+       PrintAndLog("");
+       PrintAndLog("Usage:  lf em 410xsim [h] <uid> <clock>");
+       PrintAndLog("Options:");
+       PrintAndLog("       h         - this help");
+       PrintAndLog("       uid       - uid (10 HEX symbols)");
+       PrintAndLog("       clock     - clock (32|64) (optional)");
+       PrintAndLog("samples:");
+       PrintAndLog("      lf em 410xsim 0F0368568B");
+       PrintAndLog("      lf em 410xsim 0F0368568B 32");
+       return 0;
+}
+
 int CmdEMdemodASK(const char *Cmd)
 {
        char cmdp = param_getchar(Cmd, 0);
@@ -37,31 +51,12 @@ int CmdEM410xRead(const char *Cmd)
        uint64_t lo = 0;
 
        if(!AskEm410xDemod("", &hi, &lo, false)) return 0;
-       if (hi)
-               PrintAndLog ("EM410x XL pattern found");
-       else
-               PrintAndLog("EM410x pattern found: ");
 
        printEM410x(hi, lo);
        g_em410xid = lo;
        return 1;
 }
 
-
-int usage_lf_em410x_sim(void) {
-       PrintAndLog("Simulating EM410x tag");
-       PrintAndLog("");
-       PrintAndLog("Usage:  lf em 410xsim [h] <uid> <clock>");
-       PrintAndLog("Options:");
-       PrintAndLog("       h         - this help");
-       PrintAndLog("       uid       - uid (10 HEX symbols)");
-       PrintAndLog("       clock     - clock (32|64) (optional)");
-       PrintAndLog("samples:");
-       PrintAndLog("      lf em 410xsim 0F0368568B");
-       PrintAndLog("      lf em 410xsim 0F0368568B 32");
-       return 0;
-}
-
 // emulate an EM410X tag
 int CmdEM410xSim(const char *Cmd)
 {
@@ -889,7 +884,7 @@ int CmdEM4x05Write(const char *Cmd) {
                PrintAndLog("Address must be between 0 and 15");
                return 1;
        }
-       if ( pwd == -1 )
+       if ( pwd == 1 )
                PrintAndLog("Writing address %d data %08X", addr, data);        
        else {
                usePwd = true;
Impressum, Datenschutz