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);
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)
{
}
}
if (!clk) {
- PrintAndLog("ERROR: EM4x50 - didn't find a clock");
+ if (verbose || g_debugMode) PrintAndLog("ERROR: EM4x50 - didn't find a clock");
return 0;
}
} else tol = clk/8;
}
int testLen = (GraphTraceLen < 1000) ? GraphTraceLen : 1000;
if (graphJustNoise(GraphBuffer, testLen)) {
- PrintAndLog("no tag not found");
+ PrintAndLog("no tag found");
return -1;
}
return demodEM4x05resp(word);
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;
switch (chipType) {
case 9: PrintAndLog("\n Chip Type: %u | EM4305", chipType); break;
+ case 8: PrintAndLog("\n Chip Type: %u | EM4205", chipType); break;
case 4: PrintAndLog(" Chip Type: %u | Unknown", chipType); break;
case 2: PrintAndLog(" Chip Type: %u | EM4469", chipType); break;
//add more here when known