]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfawid.c
CHG: `hf 14a read` - started to add a Magic tag gen2 detection. SKipping it for...
[proxmark3-svn] / client / cmdlfawid.c
index a323f52b098b5e7f46c5d505fcca43f05c97a106..9883437a759c93824656172c685fc86611e51a7f 100644 (file)
@@ -116,10 +116,9 @@ static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, ui
 }
 
 int CmdAWIDDemodFSK(const char *Cmd) {
-       int findone = 0;
-       if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_awid_fskdemod();
-       if (Cmd[0] == '1') findone = 1;
 
+       if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_awid_fskdemod();
+       uint8_t findone = (Cmd[0] == '1') ? 1 : 0;
        UsbCommand c = {CMD_AWID_DEMOD_FSK, {findone, 0, 0}};
        clearCommandBuffer();
        SendCommand(&c);
@@ -282,9 +281,9 @@ int CmdAWIDClone(const char *Cmd) {
 
        if ( !fc || !cn) return usage_lf_awid_clone();
        
-       if (param_getchar(Cmd, 4) == 'Q' || param_getchar(Cmd, 4) == 'q')
+       if (param_getchar(Cmd, 3) == 'Q' || param_getchar(Cmd, 3) == 'q')
                //t5555 (Q5) BITRATE = (RF-2)/2 (iceman)
-               blocks[0] = T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | 50<<T5555_BITRATE_SHIFT | 3<<T5555_MAXBLOCK_SHIFT;
+               blocks[0] = T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | ((50-2)>>1) << T5555_BITRATE_SHIFT | 3<<T5555_MAXBLOCK_SHIFT;
 
        verify_values(&fmtlen, &fc, &cn);
                
Impressum, Datenschutz