]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
ADD: fixed some spelling misstakes in luascript.
authoriceman1001 <iceman@iuse.se>
Mon, 5 Oct 2015 19:25:00 +0000 (21:25 +0200)
committericeman1001 <iceman@iuse.se>
Mon, 5 Oct 2015 19:25:00 +0000 (21:25 +0200)
ADD: fixed some spelling misstakes in "hf mfu eload" help

client/cmdhfmfu.c
client/cmdlfawid.c
client/hid-flasher/usb_cmd.h
client/lualibs/commands.lua
client/scripts/dumptoemul-mfu.lua

index f6905b242f8ac66397e6b392598907bbc691c0c2..aec95e79b5a1899cb84b994df68e846eaf099fd5 100644 (file)
@@ -1199,7 +1199,7 @@ int usage_hf_mfu_wrbl(void) {
 
 int usage_hf_mfu_eload(void) {
        PrintAndLog("It loads emulator dump from the file `filename.eml`\n");
-       PrintAndLog("Usage:  hf mf eload t <card memory> i <file name w/o `.eml`>\n");
+       PrintAndLog("Usage:  hf mfu eload t <card memory> i <file name w/o `.eml`>\n");
        PrintAndLog("  Options:");      
        PrintAndLog("  t <card memory> : Tag memorysize/type");
        PrintAndLog("  i <file>        : file name w/o `.eml`");
index 5fdbf65498fa46cdafc9a5b92f37c399621f35a1..ed56f660a3b531940c523db64f3d7f9ddb4b1f7e 100644 (file)
@@ -175,66 +175,67 @@ int CmdAWIDSim(const char *Cmd)
 
 int CmdAWIDClone(const char *Cmd)
 {
-clearCommandBuffer();
-  uint32_t fc=0,cn=0,blocks[4] = {0x00107060, 0, 0, 0x11111111}, i=0;
-  uint8_t BitStream[12];
-  uint8_t *BS=BitStream;
+       clearCommandBuffer();
+       uint32_t fc=0,cn=0,blocks[4] = {0x00107060, 0, 0, 0x11111111}, i=0;
+       uint8_t BitStream[12];
+       uint8_t *BS=BitStream;
        UsbCommand c, resp;
 
-  if (sscanf(Cmd, "%u %u", &fc, &cn ) != 2) {
-    return usage_lf_awid_clone();
-  }
-
-  if ((fc & 0xFF) != fc) {
-    fc &= 0xFF;
-    PrintAndLog("Facility-Code Truncated to 8-bits (AWID26): %u", fc);
-  }
-  if ((cn & 0xFFFF) != cn) {
-    cn &= 0xFFFF;
-    PrintAndLog("Card Number Truncated to 16-bits (AWID26): %u", cn);
-  }
-  if (getAWIDBits(fc,cn,BS)) {
-    PrintAndLog("Preparing to clone AWID26 to T55x7 with FC: %u, CN: %u (Raw: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x)", 
-                  fc,cn, BS[0],BS[1],BS[2],BS[3],BS[4],BS[5],BS[6],BS[7],BS[8],BS[9],BS[10],BS[11]);
-    blocks[1] = (BS[0]<<24) + (BS[1]<<16) + (BS[2]<<8) + (BS[3]);
-    blocks[2] = (BS[4]<<24) + (BS[5]<<16) + (BS[6]<<8) + (BS[7]);
-    PrintAndLog("Block 0: 0x%08x", blocks[0]);
-    PrintAndLog("Block 1: 0x%08x", blocks[1]);
-    PrintAndLog("Block 2: 0x%08x", blocks[2]);
-    PrintAndLog("Block 3: 0x%08x", blocks[3]);
-    for (i=0; i<4; i++) {
-      c.cmd = CMD_T55XX_WRITE_BLOCK;
-      c.arg[0] = blocks[i];
-      c.arg[1] = i;
-      c.arg[2] = 0;
-      SendCommand(&c);
+       if (sscanf(Cmd, "%u %u", &fc, &cn ) != 2) {
+               return usage_lf_awid_clone();
+       }
+
+       if ((fc & 0xFF) != fc) {
+               fc &= 0xFF;
+               PrintAndLog("Facility-Code Truncated to 8-bits (AWID26): %u", fc);
+       }
+
+       if ((cn & 0xFFFF) != cn) {
+               cn &= 0xFFFF;
+               PrintAndLog("Card Number Truncated to 16-bits (AWID26): %u", cn);
+       }
+
+       if (getAWIDBits(fc,cn,BS)) {
+               PrintAndLog("Preparing to clone AWID26 to T55x7 with FC: %u, CN: %u (Raw: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x)", 
+                                         fc,cn, BS[0],BS[1],BS[2],BS[3],BS[4],BS[5],BS[6],BS[7],BS[8],BS[9],BS[10],BS[11]);
+               blocks[1] = (BS[0]<<24) + (BS[1]<<16) + (BS[2]<<8) + (BS[3]);
+               blocks[2] = (BS[4]<<24) + (BS[5]<<16) + (BS[6]<<8) + (BS[7]);
+               PrintAndLog("Block 0: 0x%08x", blocks[0]);
+               PrintAndLog("Block 1: 0x%08x", blocks[1]);
+               PrintAndLog("Block 2: 0x%08x", blocks[2]);
+               PrintAndLog("Block 3: 0x%08x", blocks[3]);
+               for (i=0; i<4; i++) {
+                       c.cmd = CMD_T55XX_WRITE_BLOCK;
+                       c.arg[0] = blocks[i];
+                       c.arg[1] = i;
+                       c.arg[2] = 0;
+                       SendCommand(&c);
                        if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
                                PrintAndLog("Error occurred, device did not respond during write operation.");
                                return -1;
                        }
-
-    }
-  }
-  return 0;
+               }
+       }
+       return 0;
 }
 
 static command_t CommandTable[] = 
 {
-  {"help",      CmdHelp,        1, "This help"},
-  {"fskdemod",  CmdAWIDDemodFSK, 0, "['1'] Realtime AWID FSK demodulator (option '1' for one tag only)"},
-  {"sim",       CmdAWIDSim,      0, "<Facility-Code> <Card Number> -- AWID tag simulator"},
-  {"clone",     CmdAWIDClone,    0, "<Facility-Code> <Card Number> -- Clone AWID to T55x7 (tag must be in range of antenna)"},
-  {NULL, NULL, 0, NULL}
+       {"help",      CmdHelp,         1, "This help"},
+       {"fskdemod",  CmdAWIDDemodFSK, 0, "['1'] Realtime AWID FSK demodulator (option '1' for one tag only)"},
+       {"sim",       CmdAWIDSim,      0, "<Facility-Code> <Card Number> -- AWID tag simulator"},
+       {"clone",     CmdAWIDClone,    0, "<Facility-Code> <Card Number> -- Clone AWID to T55x7 (tag must be in range of antenna)"},
+       {NULL, NULL, 0, NULL}
 };
 
 int CmdLFAWID(const char *Cmd)
 {
-  CmdsParse(CommandTable, Cmd);
-  return 0;
+       CmdsParse(CommandTable, Cmd);
+       return 0;
 }
 
 int CmdHelp(const char *Cmd)
 {
-  CmdsHelp(CommandTable);
-  return 0;
+       CmdsHelp(CommandTable);
+       return 0;
 }
index 9371556358437b34dcd98b4f0c985d2a871c7897..8f4eee97224bf42e9c0d658207da67bff79ae50e 100644 (file)
@@ -87,6 +87,7 @@ typedef struct{
 #define CMD_T55XX_WRITE_BLOCK                                             0x0215
 #define CMD_T55XX_READ_TRACE                                              0x0216
 #define CMD_PCF7931_READ                                                  0x0217
+#define CMD_PCF7931_WRITE                                                 0x0223
 #define CMD_EM4X_READ_WORD                                                0x0218
 #define CMD_EM4X_WRITE_WORD                                               0x0219
 #define CMD_IO_DEMOD_FSK                                                  0x021A
index 96805e433e8ca2838528830899cc499febc6f272..ae0568f8a3ff13cf88c492d1e7446cdd23ee71d9 100644 (file)
@@ -46,6 +46,7 @@ local _commands = {
        CMD_T55XX_WRITE_BLOCK =                                              0x0215,
        CMD_T55XX_READ_TRACE =                                               0x0216,
        CMD_PCF7931_READ =                                                   0x0217,
+       CMD_PCF7931_WRITE =                                                  0x0223,
        CMD_EM4X_READ_WORD =                                                 0x0218,
        CMD_EM4X_WRITE_WORD =                                                0x0219,
        CMD_IO_DEMOD_FSK =                                                   0x021A,
index bdcc667bffb8b5a3d648445e71561f91b6f3a455..b901a2bae8c0abc5689d0fdfcbe327b80c7f19b7 100644 (file)
@@ -2,9 +2,8 @@
 -- Have a look there for further details
 getopt = require('getopt')
 bin = require('bin')
-
-example = "script run dumptoemul -i dumpdata-foobar.bin"
-author = "Martin Holst Swende"
+example = "script run dumptoemul-mfu -i dumpdata-foobar.bin"
+author = "Martin Holst Swende \n @Marshmellow"
 usage = "script run dumptoemul [-i <file>] [-o <file>]"
 desc =[[
 This script takes a dumpfile from 'hf mf dump' and converts it to a format that can be used
@@ -16,11 +15,6 @@ Arguments:
        -o <filename>   Specifies the output file. If omitted, <uid>.eml is used.       
 
 ]]
-
--------------------------------
--- Some utilities 
--------------------------------
-
 --- 
 -- A debug printout-function
 function dbg(args)
@@ -34,11 +28,11 @@ function oops(err)
        print("ERROR: ",err)
 end
 
-
 --- 
 -- Usage help
 function help()
        print(desc)
+       print(author)
        print("Example usage")
        print(example)
 end
Impressum, Datenschutz