}\r
\r
// No args\r
- if (cmdp == 0) return printConfiguration( config );\r
+ if (cmdp == 0) return printConfiguration( config);\r
\r
//Validations\r
if (errors) return usage_t55xx_config();\r
\r
config.block0 = 0;\r
- return printConfiguration ( config );\r
+ return printConfiguration ( config);\r
}\r
\r
int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, bool override, uint32_t password, uint8_t downlink_mode){\r
return (bool) ASKDemod("64 0 1", false, false, 1);\r
}\r
\r
+void T55xx_Print_DownlinkMode (uint8_t downlink_mode)\r
+{\r
+ char Msg[80];\r
+ sprintf (Msg,"Downlink Mode used : ");\r
+ \r
+ switch (downlink_mode) {\r
+ case 0 : strcat (Msg,"default/fixed bit length"); break;\r
+ case 1 : strcat (Msg,"long leading reference (r 1)"); break;\r
+ case 2 : strcat (Msg,"leading zero reference (r 2)"); break;\r
+ case 3 : strcat (Msg,"1 of 4 coding reference (r 3)"); break;\r
+ default :\r
+ strcat (Msg,"default/fixed bit length"); break;\r
+\r
+ }\r
+ \r
+ PrintAndLog (Msg);\r
+ \r
+}\r
+\r
int CmdT55xxDetect(const char *Cmd){\r
bool errors = false;\r
bool useGB = false;\r
if ( !tryDetectModulation() )\r
PrintAndLog("Could not detect modulation automatically. Try setting it manually with \'lf t55xx config\'");\r
else {\r
- // Add downlink mode to reference.\r
- switch (downlink_mode) {\r
- case 0 : PrintAndLog ("Downlink : r 0 - default/fixed bit length"); break;\r
- case 1 : PrintAndLog ("Downlink : r 1 - long leading reference"); break;\r
- case 2 : PrintAndLog ("Downlink : r 2 - leading zero reference"); break;\r
- case 3 : PrintAndLog ("Downlink : r 3 - 1 of 4 coding reference"); break;\r
- }\r
+ // Add downlink mode for reference.\r
+ T55xx_Print_DownlinkMode (downlink_mode);\r
}\r
return 1;\r
}\r
config.block0 = tests[0].block0;\r
config.Q5 = tests[0].Q5;\r
config.ST = tests[0].ST;\r
- printConfiguration( config );\r
+ \r
+ printConfiguration( config);\r
return true;\r
}\r
\r
PrintAndLog("Found [%d] possible matches for modulation.",hits);\r
for(int i=0; i<hits; ++i){\r
PrintAndLog("--[%d]---------------", i+1);\r
- printConfiguration( tests[i] );\r
+ printConfiguration( tests[i]);\r
}\r
}\r
return false;\r
// donwlink_mode will = 0 if > 3 or set to 0, so loop from 0 - 3\r
for (dl_mode = downlink_mode; dl_mode <= 3; dl_mode++){\r
if ( !AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, testpwd, dl_mode)) {\r
- PrintAndLog("Aquireing data from device failed. Quitting");\r
+ PrintAndLog("Acquiring data from device failed. Quitting");\r
free(keyBlock);\r
return 0;\r
}\r
if ( found ) {\r
PrintAndLog("Found valid password: [%08X]", testpwd);\r
free(keyBlock);\r
- switch (dl_mode) {\r
- case 0 : PrintAndLog ("Downlink : r 0 - default/fixed bit length"); break;\r
- case 1 : PrintAndLog ("Downlink : r 1 - long leading reference"); break;\r
- case 2 : PrintAndLog ("Downlink : r 2 - leading zero reference"); break;\r
- case 3 : PrintAndLog ("Downlink : r 3 - 1 of 4 coding reference"); break;\r
- } \r
+ \r
+ T55xx_Print_DownlinkMode (dl_mode);\r
+\r
return 0;\r
}\r
if (!try_all_dl_modes) // Exit loop if not trying all downlink modes\r
// donwlink_mode will = 0 if > 3 or set to 0, so loop from 0 - 3\r
for (dl_mode = downlink_mode; dl_mode <= 3; dl_mode++){\r
if (!AquireData(T55x7_PAGE0, T55x7_CONFIGURATION_BLOCK, true, i,dl_mode)) {\r
- PrintAndLog("Aquireing data from device failed. Quitting");\r
+ PrintAndLog("Acquiring data from device failed. Quitting");\r
free(keyBlock);\r
return 0;\r
}\r
\r
if (found){\r
PrintAndLog("Found valid password: [%08x]", i);\r
- switch (dl_mode) {\r
- case 0 : PrintAndLog ("Downlink : r 0 - default/fixed bit length"); break;\r
- case 1 : PrintAndLog ("Downlink : r 1 - long leading reference"); break;\r
- case 2 : PrintAndLog ("Downlink : r 2 - leading Zero reference"); break;\r
- case 3 : PrintAndLog ("Downlink : r 3 - 1 of 4 coding reference"); break;\r
- }\r
+ T55xx_Print_DownlinkMode (downlink_mode);\r
}\r
else{\r
PrintAndLog("");\r