mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
commit
ad13b3409c
2 changed files with 11 additions and 10 deletions
|
@ -567,13 +567,9 @@ static int CmdIndalaSim(const char *Cmd) {
|
||||||
|
|
||||||
static int CmdIndalaClone(const char *Cmd) {
|
static int CmdIndalaClone(const char *Cmd) {
|
||||||
|
|
||||||
bool is_long_uid = false, got_cn = false, got_26 = false;
|
|
||||||
bool is_t5555 = false;
|
|
||||||
int32_t cardnumber;
|
int32_t cardnumber;
|
||||||
uint32_t blocks[8] = {0};
|
uint32_t blocks[8] = {0};
|
||||||
uint8_t max = 0;
|
uint8_t max = 0;
|
||||||
uint8_t data[7 * 4];
|
|
||||||
int datalen = 0;
|
|
||||||
uint8_t fc = 0;
|
uint8_t fc = 0;
|
||||||
uint16_t cn = 0;
|
uint16_t cn = 0;
|
||||||
|
|
||||||
|
@ -597,13 +593,16 @@ static int CmdIndalaClone(const char *Cmd) {
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||||
|
|
||||||
is_long_uid = arg_get_lit(ctx, 1);
|
bool is_long_uid = arg_get_lit(ctx, 1);
|
||||||
|
|
||||||
// raw param
|
// raw param
|
||||||
|
int datalen = 0;
|
||||||
|
uint8_t data[(7 * 4) + 1 ];
|
||||||
CLIGetHexWithReturn(ctx, 3, data, &datalen);
|
CLIGetHexWithReturn(ctx, 3, data, &datalen);
|
||||||
|
|
||||||
is_t5555 = arg_get_lit(ctx, 4);
|
bool is_t5555 = arg_get_lit(ctx, 4);
|
||||||
|
|
||||||
|
bool got_cn = false, got_26 = false;
|
||||||
if (is_long_uid == false) {
|
if (is_long_uid == false) {
|
||||||
|
|
||||||
// Heden param
|
// Heden param
|
||||||
|
@ -618,11 +617,13 @@ static int CmdIndalaClone(const char *Cmd) {
|
||||||
|
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
|
PrintAndLogEx(INFO, "Target chip " _YELLOW_("%s"), (is_t5555) ? "Q5/T5555" : "T55x7");
|
||||||
|
|
||||||
if (is_long_uid) {
|
if (is_long_uid) {
|
||||||
// 224 BIT UID
|
// 224 BIT UID
|
||||||
// config for Indala (RF/32;PSK2 with RF/2;Maxblock=7)
|
// config for Indala (RF/32;PSK2 with RF/2;Maxblock=7)
|
||||||
PrintAndLogEx(INFO, "Preparing to clone Indala 224bit tag");
|
PrintAndLogEx(INFO, "Preparing to clone Indala 224bit tag");
|
||||||
PrintAndLogEx(INFO, "RawID %s", sprint_hex(data, datalen));
|
PrintAndLogEx(INFO, "Using raw " _GREEN_("%s"), sprint_hex_inrow(data, datalen));
|
||||||
|
|
||||||
if (is_t5555)
|
if (is_t5555)
|
||||||
blocks[0] = T5555_FIXED | T5555_SET_BITRATE(32) | T5555_MODULATION_PSK2 | (7 << T5555_MAXBLOCK_SHIFT);
|
blocks[0] = T5555_FIXED | T5555_SET_BITRATE(32) | T5555_MODULATION_PSK2 | (7 << T5555_MAXBLOCK_SHIFT);
|
||||||
|
@ -675,7 +676,7 @@ static int CmdIndalaClone(const char *Cmd) {
|
||||||
|
|
||||||
// config for Indala 64 format (RF/32;PSK1 with RF/2;Maxblock=2)
|
// config for Indala 64 format (RF/32;PSK1 with RF/2;Maxblock=2)
|
||||||
PrintAndLogEx(INFO, "Preparing to clone Indala 64bit tag");
|
PrintAndLogEx(INFO, "Preparing to clone Indala 64bit tag");
|
||||||
PrintAndLogEx(INFO, "RawID %s", sprint_hex(data, datalen));
|
PrintAndLogEx(INFO, "Using raw " _GREEN_("%s"), sprint_hex_inrow(data, datalen));
|
||||||
|
|
||||||
if (is_t5555)
|
if (is_t5555)
|
||||||
blocks[0] = T5555_FIXED | T5555_SET_BITRATE(32) | T5555_MODULATION_PSK1 | (2 << T5555_MAXBLOCK_SHIFT);
|
blocks[0] = T5555_FIXED | T5555_SET_BITRATE(32) | T5555_MODULATION_PSK1 | (2 << T5555_MAXBLOCK_SHIFT);
|
||||||
|
|
|
@ -60,7 +60,7 @@ extern "C" void InitGraphics(int argc, char **argv, char *script_cmds_file, char
|
||||||
if (getenv("DISPLAY") == NULL)
|
if (getenv("DISPLAY") == NULL)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
unsetenv("SESSION_MANAGER");
|
qunsetenv("SESSION_MANAGER");
|
||||||
main_loop_thread = new WorkerThread(script_cmds_file, script_cmd, stayInCommandLoop);
|
main_loop_thread = new WorkerThread(script_cmds_file, script_cmd, stayInCommandLoop);
|
||||||
gui = new ProxGuiQT(argc, argv, main_loop_thread);
|
gui = new ProxGuiQT(argc, argv, main_loop_thread);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue