mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
A lot of changes...
.. ntag simulation stuff from @marshmellows branch "ntag/sim" .. hf mf mifare fixes from @pwpivi. .. hw status command .. speedtest function from @pwpivi .. Viking Functionalities, (not a proper DEMOD, but a start) .. GetCountUS better precision from @pwpivi .. bin2hex, hex2bin from @holiman ... starting with getting the T55x7 CONFIGURATION_BLOCK for different clone situations. Ripped from Adam Lauries RFidler, nothing working or finished.. ... Started working with the T55x7 read command with password actually performs a write block... See Issue #136 https://github.com/Proxmark/proxmark3/issues/136 Not solved yet. ... Started add SHA256.. not working yet..
This commit is contained in:
parent
05beaa8dd8
commit
0de8e3874d
41 changed files with 2222 additions and 237 deletions
65
client/cmdlfviking.c
Normal file
65
client/cmdlfviking.c
Normal file
|
@ -0,0 +1,65 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include "proxmark3.h"
|
||||
#include "ui.h"
|
||||
#include "util.h"
|
||||
#include "graph.h"
|
||||
#include "cmdparser.h"
|
||||
#include "cmddata.h"
|
||||
#include "cmdmain.h"
|
||||
#include "cmdlf.h"
|
||||
#include "cmdlfviking.h"
|
||||
#include "lfdemod.h"
|
||||
static int CmdHelp(const char *Cmd);
|
||||
int CmdVikingDemod(const char *Cmd)
|
||||
{
|
||||
uint8_t id[4];
|
||||
if (param_gethex(Cmd,0,id,8) == 1)
|
||||
{
|
||||
PrintAndLog("Usage: lf viking demod <CardID 8 bytes of hex number>");
|
||||
return 0;
|
||||
}
|
||||
UsbCommand c = {CMD_ACQUIRE_RAW_ADC_SAMPLES_125K, {false,0,0}};
|
||||
SendCommand(&c);
|
||||
WaitForResponse(CMD_ACK,NULL);
|
||||
getSamples("40000",true);
|
||||
// try to demod AMViking
|
||||
return AMVikingDemod(id);
|
||||
}
|
||||
int CmdVikingClone(const char *Cmd)
|
||||
{
|
||||
uint32_t b1,b2;
|
||||
// get the tag number 64 bits (8 bytes) in hex
|
||||
uint8_t id[8];
|
||||
if (param_gethex(Cmd,0,id,16) == 1)
|
||||
{
|
||||
PrintAndLog("Usage: lf viking clone <Card ID 16 bytes of hex number>");
|
||||
return 0;
|
||||
}
|
||||
b1 = bytes_to_num(id,sizeof(uint32_t));
|
||||
b2 = bytes_to_num(id + sizeof(uint32_t),sizeof(uint32_t));
|
||||
UsbCommand c = {CMD_VIKING_CLONE_TAG,{b1,b2}};
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static command_t CommandTable[] =
|
||||
{
|
||||
{"help", CmdHelp, 1, "This help"},
|
||||
{"demod",CmdVikingDemod ,1, "<8 digits tag id> -- Extract tag data"},
|
||||
{"clone", CmdVikingClone, 1, "<16 digits card data> clone viking tag"},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
int CmdLFViking(const char *Cmd)
|
||||
{
|
||||
CmdsParse(CommandTable, Cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CmdHelp(const char *Cmd)
|
||||
{
|
||||
CmdsHelp(CommandTable);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue