projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix hf mf sim (#812)
[proxmark3-svn]
/
client
/
cmdlfvisa2000.c
diff --git
a/client/cmdlfvisa2000.c
b/client/cmdlfvisa2000.c
index 6166903545785bd6f6104f47d78dc97f2cf7d5dc..332597946984fa76e144ed296dd81f43645f2ed9 100644
(file)
--- a/
client/cmdlfvisa2000.c
+++ b/
client/cmdlfvisa2000.c
@@
-6,13
+6,14
@@
//-----------------------------------------------------------------------------
// Low frequency visa 2000 tag commands
// by iceman
//-----------------------------------------------------------------------------
// Low frequency visa 2000 tag commands
// by iceman
+// ASK/Manchester, RF/64, STT, 96 bits (complete)
//-----------------------------------------------------------------------------
#include "cmdlfvisa2000.h"
#include <stdio.h>
#include <string.h>
//-----------------------------------------------------------------------------
#include "cmdlfvisa2000.h"
#include <stdio.h>
#include <string.h>
-#include "
proxmark3
.h"
+#include "
comms
.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
#include "ui.h"
#include "util.h"
#include "graph.h"
@@
-28,26
+29,26
@@
static int CmdHelp(const char *Cmd);
int usage_lf_visa2k_clone(void){
PrintAndLog("clone a Visa2000 tag to a T55x7 tag.");
int usage_lf_visa2k_clone(void){
PrintAndLog("clone a Visa2000 tag to a T55x7 tag.");
- PrintAndLog("Usage: lf visa2
k
clone [h] <card ID> <Q5>");
+ PrintAndLog("Usage: lf visa2
000
clone [h] <card ID> <Q5>");
PrintAndLog("Options:");
PrintAndLog(" h : This help");
PrintAndLog("Options:");
PrintAndLog(" h : This help");
- PrintAndLog(" <card ID> : Visa2
k
card ID");
+ PrintAndLog(" <card ID> : Visa2
000
card ID");
PrintAndLog(" <Q5> : specify write to Q5 (t5555 instead of t55x7)");
PrintAndLog("");
PrintAndLog(" <Q5> : specify write to Q5 (t5555 instead of t55x7)");
PrintAndLog("");
- PrintAndLog("Sample: lf visa2
k
clone 112233");
+ PrintAndLog("Sample: lf visa2
000
clone 112233");
return 0;
}
int usage_lf_visa2k_sim(void) {
return 0;
}
int usage_lf_visa2k_sim(void) {
- PrintAndLog("Enables simulation of visa2
k
card with specified card number.");
+ PrintAndLog("Enables simulation of visa2
000
card with specified card number.");
PrintAndLog("Simulation runs until the button is pressed or another USB command is issued.");
PrintAndLog("");
PrintAndLog("Simulation runs until the button is pressed or another USB command is issued.");
PrintAndLog("");
- PrintAndLog("Usage: lf visa2
k
sim [h] <card ID>");
+ PrintAndLog("Usage: lf visa2
000
sim [h] <card ID>");
PrintAndLog("Options:");
PrintAndLog(" h : This help");
PrintAndLog("Options:");
PrintAndLog(" h : This help");
- PrintAndLog(" <card ID> : Visa2
k
card ID");
+ PrintAndLog(" <card ID> : Visa2
000
card ID");
PrintAndLog("");
PrintAndLog("");
- PrintAndLog("Sample: lf visa2
k
sim 112233");
+ PrintAndLog("Sample: lf visa2
000
sim 112233");
return 0;
}
return 0;
}
@@
-83,12
+84,12
@@
static uint8_t visa_parity( uint32_t id) {
/**
*
* 56495332 00096ebd 00000077 —> tag id 618173
/**
*
* 56495332 00096ebd 00000077 —> tag id 618173
-* aaaaaaaa iiiiiiii -----
..
c
+* aaaaaaaa iiiiiiii -----
pp
c
*
* a = fixed value ascii 'VIS2'
* i = card id
*
* a = fixed value ascii 'VIS2'
* i = card id
+* p = even parity bit for each nibble in card id.
* c = checksum (xor of card id)
* c = checksum (xor of card id)
-* . = unknown
*
**/
//see ASKDemod for what args are accepted
*
**/
//see ASKDemod for what args are accepted
@@
-99,7
+100,7
@@
int CmdVisa2kDemod(const char *Cmd) {
//ASK / Manchester
bool st = true;
if (!ASKDemod_ext("64 0 0", false, false, 1, &st)) {
//ASK / Manchester
bool st = true;
if (!ASKDemod_ext("64 0 0", false, false, 1, &st)) {
- if (g_debugMode) PrintAndLog("DEBUG: Error - Visa2
k
: ASK/Manchester Demod failed");
+ if (g_debugMode) PrintAndLog("DEBUG: Error - Visa2
000
: ASK/Manchester Demod failed");
return 0;
}
size_t size = DemodBufferLen;
return 0;
}
size_t size = DemodBufferLen;
@@
-107,18
+108,18
@@
int CmdVisa2kDemod(const char *Cmd) {
if (ans < 0){
if (g_debugMode){
if (ans == -1)
if (ans < 0){
if (g_debugMode){
if (ans == -1)
- PrintAndLog("DEBUG: Error - Visa2
k
: too few bits found");
+ PrintAndLog("DEBUG: Error - Visa2
000
: too few bits found");
else if (ans == -2)
else if (ans == -2)
- PrintAndLog("DEBUG: Error - Visa2
k
: preamble not found");
+ PrintAndLog("DEBUG: Error - Visa2
000
: preamble not found");
else if (ans == -3)
else if (ans == -3)
- PrintAndLog("DEBUG: Error - Visa2
k
: Size not correct: %d", size);
+ PrintAndLog("DEBUG: Error - Visa2
000
: Size not correct: %d", size);
else
else
- PrintAndLog("DEBUG: Error - Visa2
k
: ans: %d", ans);
+ PrintAndLog("DEBUG: Error - Visa2
000
: ans: %d", ans);
}
return 0;
}
setDemodBuf(DemodBuffer, 96, ans);
}
return 0;
}
setDemodBuf(DemodBuffer, 96, ans);
-
//setGrid_Clock(64
);
+
setClockGrid(g_DemodClock, g_DemodStartIdx + (ans*g_DemodClock)
);
//got a good demod
uint32_t raw1 = bytebits_to_byte(DemodBuffer, 32);
//got a good demod
uint32_t raw1 = bytebits_to_byte(DemodBuffer, 32);
@@
-146,9
+147,8
@@
int CmdVisa2kDemod(const char *Cmd) {
}
int CmdVisa2kRead(const char *Cmd) {
}
int CmdVisa2kRead(const char *Cmd) {
- CmdLFRead("s");
//64*96*2=12288 samples just in case we just missed the first preamble we can still catch 2 of them
//64*96*2=12288 samples just in case we just missed the first preamble we can still catch 2 of them
- getSamples("12500",true);
+ lf_read(true, 12500);
return CmdVisa2kDemod(Cmd);
}
return CmdVisa2kDemod(Cmd);
}
Impressum
,
Datenschutz