CHG: removed some "DONE!" device prints..
CHG: unified some "clone" commands output.
13 files changed:
data[4] = manchesterEncode2Bytes(hi & 0xFFFF);
data[5] = manchesterEncode2Bytes(lo >> 16);
data[6] = manchesterEncode2Bytes(lo & 0xFFFF);
data[4] = manchesterEncode2Bytes(hi & 0xFFFF);
data[5] = manchesterEncode2Bytes(lo >> 16);
data[6] = manchesterEncode2Bytes(lo & 0xFFFF);
// Ensure no more than 44 bits supplied
if (hi > 0xFFF) {
DbpString("Tags can only have 44 bits.");
// Ensure no more than 44 bits supplied
if (hi > 0xFFF) {
DbpString("Tags can only have 44 bits.");
// data[0] = (((50-2)/2)<<T5555_BITRATE_SHIFT) | T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | last_block << T5555_MAXBLOCK_SHIFT;
LED_D_ON();
// data[0] = (((50-2)/2)<<T5555_BITRATE_SHIFT) | T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | last_block << T5555_MAXBLOCK_SHIFT;
LED_D_ON();
- // Program the data blocks for supplied ID
- // and the block 0 for HID format
WriteT55xx(data, 0, last_block+1);
WriteT55xx(data, 0, last_block+1);
}
void CopyIOtoT55x7(uint32_t hi, uint32_t lo) {
}
void CopyIOtoT55x7(uint32_t hi, uint32_t lo) {
// and the block 0 config
WriteT55xx(data, 0, 3);
LED_D_OFF();
// and the block 0 config
WriteT55xx(data, 0, 3);
LED_D_OFF();
}
// Clone Indala 64-bit tag by UID to T55x7
}
// Clone Indala 64-bit tag by UID to T55x7
WriteT55xx(data, 0, 3);
//Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=2;Inverse data)
// T5567WriteBlock(0x603E1042,0);
WriteT55xx(data, 0, 3);
//Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=2;Inverse data)
// T5567WriteBlock(0x603E1042,0);
}
// Clone Indala 224-bit tag by UID to T55x7
void CopyIndala224toT55x7(uint32_t uid1, uint32_t uid2, uint32_t uid3, uint32_t uid4, uint32_t uid5, uint32_t uid6, uint32_t uid7) {
}
// Clone Indala 224-bit tag by UID to T55x7
void CopyIndala224toT55x7(uint32_t uid1, uint32_t uid2, uint32_t uid3, uint32_t uid4, uint32_t uid5, uint32_t uid6, uint32_t uid7) {
WriteT55xx(data, 0, 8);
//Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=7;Inverse data)
// T5567WriteBlock(0x603E10E2,0);
WriteT55xx(data, 0, 8);
//Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=7;Inverse data)
// T5567WriteBlock(0x603E10E2,0);
}
// clone viking tag to T55xx
void CopyVikingtoT55xx(uint32_t block1, uint32_t block2, uint8_t Q5) {
}
// clone viking tag to T55xx
void CopyVikingtoT55xx(uint32_t block1, uint32_t block2, uint8_t Q5) {
#include <string.h>
#include <limits.h>
#include "proxmark3.h"
#include <string.h>
#include <limits.h>
#include "proxmark3.h"
+#include "lfdemod.h" // device/client demods of LF signals
#include "util.h" // for parsing cli command utils
#include "ui.h" // for show graph controls
#include "graph.h" // for graph data
#include "util.h" // for parsing cli command utils
#include "ui.h" // for show graph controls
#include "graph.h" // for graph data
#include "cmdlfvisa2000.h" // for VISA2000 menu
#include "cmdlfnoralsy.h" // for NORALSY meny
#include "cmdlffdx.h" // for FDX-B meny
#include "cmdlfvisa2000.h" // for VISA2000 menu
#include "cmdlfnoralsy.h" // for NORALSY meny
#include "cmdlffdx.h" // for FDX-B meny
+
+#define T55XX_WRITE_TIMEOUT 1500
+
int CmdLF(const char *Cmd);
int CmdLFCommandRead(const char *Cmd);
int CmdLF(const char *Cmd);
int CmdLFCommandRead(const char *Cmd);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
//-----------------------------------------------------------------------------
// Low frequency Farpoint / Pyramid tag commands
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Low frequency Farpoint / Pyramid tag commands
//-----------------------------------------------------------------------------
-#include <string.h>
-#include <inttypes.h>
#include "cmdlfguard.h"
static int CmdHelp(const char *Cmd);
#include "cmdlfguard.h"
static int CmdHelp(const char *Cmd);
// Works for 26bits.
int GetGuardBits(uint32_t fc, uint32_t cn, uint8_t *guardBits) {
// Works for 26bits.
int GetGuardBits(uint32_t fc, uint32_t cn, uint8_t *guardBits) {
//uint8_t xorKey = rand() % 0xFF;
uint8_t xorKey = 0x66;
uint8_t i;
//uint8_t xorKey = rand() % 0xFF;
uint8_t xorKey = 0x66;
uint8_t i;
uint8_t pre[96];
memset(pre, 0x00, sizeof(pre));
uint8_t pre[96];
memset(pre, 0x00, sizeof(pre));
int CmdGuardRead(const char *Cmd) {
CmdLFRead("s");
int CmdGuardRead(const char *Cmd) {
CmdLFRead("s");
- getSamples("20000", TRUE);
+ getSamples("12000", TRUE);
return CmdG_Prox_II_Demod("");
}
return CmdG_Prox_II_Demod("");
}
PrintAndLog("Blk | Data ");
PrintAndLog("----+------------");
for ( i = 0; i<4; ++i )
PrintAndLog("Blk | Data ");
PrintAndLog("----+------------");
for ( i = 0; i<4; ++i )
- PrintAndLog(" %02d | %08x", i, blocks[i]);
+ PrintAndLog(" %02d | 0x%08x", i, blocks[i]);
UsbCommand resp;
UsbCommand c = {CMD_T55XX_WRITE_BLOCK, {0,0,0}};
UsbCommand resp;
UsbCommand c = {CMD_T55XX_WRITE_BLOCK, {0,0,0}};
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
//-----------------------------------------------------------------------------
#ifndef CMDLFGUARD_H__
#define CMDLFGUARD_H__
//-----------------------------------------------------------------------------
#ifndef CMDLFGUARD_H__
#define CMDLFGUARD_H__
+#include <string.h>
+#include <inttypes.h>
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
#include "proxmark3.h"
#include "ui.h"
#include "util.h"
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
//see ASKDemod for what args are accepted
int CmdPrescoDemod(const char *Cmd) {
bool st = true;
//see ASKDemod for what args are accepted
int CmdPrescoDemod(const char *Cmd) {
bool st = true;
if (!ASKDemod_ext("32 0 0", FALSE, FALSE, 1, &st)) {
if (g_debugMode) PrintAndLog("DEBUG: Error Presco ASKDemod failed");
return 0;
}
size_t size = DemodBufferLen;
if (!ASKDemod_ext("32 0 0", FALSE, FALSE, 1, &st)) {
if (g_debugMode) PrintAndLog("DEBUG: Error Presco ASKDemod failed");
return 0;
}
size_t size = DemodBufferLen;
- //call lfdemod.c demod for Viking
+ //call lfdemod.c demod for Presco
int ans = PrescoDemod(DemodBuffer, &size);
if (ans < 0) {
if (g_debugMode){
int ans = PrescoDemod(DemodBuffer, &size);
if (ans < 0) {
if (g_debugMode){
// read lf silently
CmdLFRead("s");
// get samples silently
// read lf silently
CmdLFRead("s");
// get samples silently
- getSamples("20000", TRUE);
+ getSamples("12000", TRUE);
// demod and output Presco ID
return CmdPrescoDemod(Cmd);
}
// demod and output Presco ID
return CmdPrescoDemod(Cmd);
}
bool Q5 = false;
uint32_t sitecode=0, usercode=0, fullcode=0;
bool Q5 = false;
uint32_t sitecode=0, usercode=0, fullcode=0;
- uint32_t blocks[5] = {T55x7_MODULATION_MANCHESTER | T55x7_BITRATE_RF_32 | 4<<T55x7_MAXBLOCK_SHIFT | T55x7_ST_TERMINATOR, 0, 0, 0, 5};
+ uint32_t blocks[5] = {T55x7_MODULATION_MANCHESTER | T55x7_BITRATE_RF_32 | 4<<T55x7_MAXBLOCK_SHIFT | T55x7_ST_TERMINATOR, 0, 0, 0, 0};
// get wiegand from printed number.
if (GetWiegandFromPresco(Cmd, &sitecode, &usercode, &fullcode, &Q5) == -1) return usage_lf_presco_clone();
// get wiegand from printed number.
if (GetWiegandFromPresco(Cmd, &sitecode, &usercode, &fullcode, &Q5) == -1) return usage_lf_presco_clone();
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Blk | Data ");
PrintAndLog("----+------------");
for ( i = 0; i<5; ++i )
PrintAndLog("Blk | Data ");
PrintAndLog("----+------------");
for ( i = 0; i<5; ++i )
- PrintAndLog(" %02d | %08" PRIx32, i, blocks[i]);
+ PrintAndLog(" %02d | 0x%08" PRIx32, i, blocks[i]);
UsbCommand resp;
UsbCommand c = {CMD_T55XX_WRITE_BLOCK, {0,0,0}};
UsbCommand resp;
UsbCommand c = {CMD_T55XX_WRITE_BLOCK, {0,0,0}};
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
\r
int CmdResetRead(const char *Cmd) {\r
UsbCommand c = {CMD_T55XX_RESET_READ, {0,0,0}};\r
\r
int CmdResetRead(const char *Cmd) {\r
UsbCommand c = {CMD_T55XX_RESET_READ, {0,0,0}};\r
clearCommandBuffer();\r
SendCommand(&c);\r
clearCommandBuffer();\r
SendCommand(&c);\r
- if ( !WaitForResponseTimeout(CMD_ACK,NULL,2500) ) {\r
+ if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500) ) {\r
PrintAndLog("command execution time out");\r
return 0;\r
}\r
PrintAndLog("command execution time out");\r
return 0;\r
}\r
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
c.arg[1] = i;
clearCommandBuffer();
SendCommand(&c);
- if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){
+ if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}
PrintAndLog("Error occurred, device did not respond during write operation.");
return -1;
}