+int CmdDump(const char *Cmd){\r
+\r
+ char cmdp = param_getchar(Cmd, 0);\r
+ char s[20];\r
+ uint8_t pwd[4] = {0x00};\r
+ bool hasPwd = ( strlen(Cmd) > 0);\r
+ \r
+ if ( cmdp == 'h' || cmdp == 'H') {\r
+ PrintAndLog("Usage: lf t55xx dump <password>");\r
+ PrintAndLog(" sample: lf t55xx dump FFFFFFFF");\r
+ return 0;\r
+ }\r
+ \r
+ if ( hasPwd ){\r
+ if (param_gethex(Cmd, 0, pwd, 8)) {\r
+ PrintAndLog("password must include 8 HEX symbols");\r
+ return 0;\r
+ }\r
+ }\r
+\r
+ for ( int i = 0; i <8; ++i){\r
+ memset(s,0,sizeof(s));\r
+ if ( hasPwd ) {\r
+ sprintf(s,"%d %02x%02x%02x%02x", i, pwd[0],pwd[1],pwd[2],pwd[3]);\r
+ CmdReadBlkPWD(s);\r
+ } else {\r
+ sprintf(s,"%d", i);\r
+ CmdReadBlk(s);\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+int CmdIceFsk(const char *Cmd){\r
+\r
+ if (!HasGraphData()) return 0;\r
+\r
+ iceFsk3(GraphBuffer, LF_TRACE_BUFF_SIZE);\r
+ RepaintGraphWindow();\r
+ return 0;\r
+}\r
+int CmdIceManchester(const char *Cmd){\r
+ ManchesterDemod( -1);\r
+ return 0;\r
+}\r
+int ManchesterDemod(int blockNum){\r
+\r
+ if (!HasGraphData()) return 0;\r
+ \r
+ uint8_t sizebyte = 32;\r
+ uint8_t offset = 5;\r
+ uint32_t blockData;\r
+ uint8_t bits[LF_BITSSTREAM_LEN] = {0x00};\r
+ uint8_t * bitstream = bits;\r
+ \r
+ manchester_decode(GraphBuffer, LF_TRACE_BUFF_SIZE, bitstream, LF_BITSSTREAM_LEN); \r
+ blockData = PackBits(offset, sizebyte, bitstream);\r
+\r
+ if ( blockNum < 0)\r
+ PrintAndLog(" Decoded : 0x%08X %s", blockData, sprint_bin(bitstream+offset,sizebyte) );\r
+ else\r
+ PrintAndLog(" Block %d : 0x%08X %s", blockNum, blockData, sprint_bin(bitstream+offset,sizebyte) );\r
+ \r
+ return 0;\r
+} \r
+\r