]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlft55xx.c
minor cleanups
[proxmark3-svn] / client / cmdlft55xx.c
index b11a64945325166b97ad7db941349b6181e197e2..55b4ab65284a8f921f9199fa31f4bce894f810ac 100644 (file)
 // Default configuration\r
 t55xx_conf_block_t config = { .modulation = DEMOD_ASK, .inverted = FALSE, .offset = 0x00, .block0 = 0x00};\r
 \r
+t55xx_conf_block_t Get_t55xx_Config(){\r
+       return config;\r
+}\r
+void Set_t55xx_Config(t55xx_conf_block_t conf){\r
+       config = conf;\r
+}\r
+\r
 int usage_t55xx_config(){\r
        PrintAndLog("Usage: lf t55xx config [d <demodulation>] [i 1] [o <offset>]");\r
        PrintAndLog("Options:");\r
@@ -533,7 +540,7 @@ bool tryDetectModulation(){
 bool testModulation(uint8_t mode, uint8_t modread){\r
        switch( mode ){\r
                case DEMOD_FSK:\r
-                       if (modread > 3 && modread < 8) return TRUE;\r
+                       if (modread >= DEMOD_FSK1 && modread <= DEMOD_FSK2a) return TRUE;\r
                        break;\r
                case DEMOD_ASK:\r
                        if (modread == DEMOD_ASK) return TRUE;\r
@@ -1175,7 +1182,7 @@ int CmdResetRead(const char *Cmd) {
                return 0;\r
        }\r
 \r
-       uint8_t got[39999];\r
+       uint8_t got[BIGBUF_SIZE-1];\r
        GetFromBigBuf(got,sizeof(got),0);\r
        WaitForResponse(CMD_ACK,NULL);\r
        setGraphBuf(got, sizeof(got));\r
@@ -1187,12 +1194,12 @@ static command_t CommandTable[] =
   {"help",     CmdHelp,           1, "This help"},\r
   {"config",   CmdT55xxSetConfig, 1, "Set/Get T55XX configuration (modulation, inverted, offset, rate)"},\r
   {"detect",   CmdT55xxDetect,    0, "[1] Try detecting the tag modulation from reading the configuration block."},\r
-  {"read",     CmdT55xxReadBlock, 0, "b <block> p [password] [o] [1] -- Read T55xx block data (page 0) [optional password]"},\r
+  {"read",     CmdT55xxReadBlock, 0, "b <block> p [password] [o] [1] -- Read T55xx block data. Optional [p password], [override], [page1]"},\r
   {"resetread",CmdResetRead,      0, "Send Reset Cmd then lf read the stream to attempt to identify the start of it (needs a demod and/or plot after)"},\r
-  {"write",    CmdT55xxWriteBlock,0, "b <block> d <data> p [password] [1] -- Write T55xx block data (page 0) [optional password]"},\r
+  {"write",    CmdT55xxWriteBlock,0, "b <block> d <data> p [password] [1] -- Write T55xx block data. Optional [p password], [page1]"},\r
   {"trace",    CmdT55xxReadTrace, 0, "[1] Show T55xx traceability data (page 1/ blk 0-1)"},\r
   {"info",     CmdT55xxInfo,      0, "[1] Show T55xx configuration data (page 0/ blk 0)"},\r
-  {"dump",     CmdT55xxDump,      0, "[password] [o] Dump T55xx card block 0-7. [optional password]"},\r
+  {"dump",     CmdT55xxDump,      0, "[password] [o] Dump T55xx card block 0-7. Optional [password], [override]"},\r
   {"special",  special,           0, "Show block changes with 64 different offsets"},\r
   {"wakeup",   CmdT55xxWakeUp,    0, "Send AOR wakeup command"},\r
   {NULL, NULL, 0, NULL}\r
Impressum, Datenschutz