X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1ee79256095a770dd406a9cbd48f2a04c2d1499a..b97311b1bde85d0aa388085e9a5747ac4da680d5:/client/cmdlf.c diff --git a/client/cmdlf.c b/client/cmdlf.c index 10a70d7c..f78b3801 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -37,6 +37,12 @@ #include "cmdlfvisa2000.h" // for VISA2000 menu #include "cmdlfindala.h" // for indala menu #include "cmdlfgproxii.h"// for gproxii menu +#include "cmdlffdx.h" // for fdx-b menu +#include "cmdlfparadox.h"// for paradox menu +#include "cmdlfnexwatch.h"//for nexwatch menu +#include "cmdlfjablotron.h" //for jablotron menu +#include "cmdlfnoralsy.h"// for noralsy menu +#include "cmdlfsecurakey.h"//for securakey menu bool g_lf_threshold_set = false; static int CmdHelp(const char *Cmd); @@ -857,16 +863,25 @@ int CheckChipType(char cmdp) { //check for em4x05/em4x69 chips first save_restoreGB(1); + save_restoreDB(1); if ((!offline && (cmdp != '1')) && EM4x05Block0Test(&wordData)) { PrintAndLog("\nValid EM4x05/EM4x69 Chip Found\nTry lf em 4x05... commands\n"); save_restoreGB(0); + save_restoreDB(0); return 1; } //TODO check for t55xx chip... + if ((!offline && (cmdp != '1')) && tryDetectP1(true)) { + PrintAndLog("\nValid T55xx Chip Found\nTry lf t55xx ... commands\n"); + save_restoreGB(0); + save_restoreDB(0); + return 1; + } save_restoreGB(0); - return 1; + save_restoreDB(0); + return 0; } //by marshmellow @@ -918,7 +933,7 @@ int CmdLFfind(const char *Cmd) return 1; } ans=CmdCOTAGRead(""); - if (ans>0){ + if (ans>0) { PrintAndLog("\nValid COTAG ID Found!"); return 1; } @@ -926,6 +941,8 @@ int CmdLFfind(const char *Cmd) return 0; } + // TODO test for modulation then only test formats that use that modulation + ans=CmdFSKdemodIO(""); if (ans>0) { PrintAndLog("\nValid IO Prox ID Found!"); @@ -974,25 +991,43 @@ int CmdLFfind(const char *Cmd) return CheckChipType(cmdp); } - ans=CmdFDXBdemodBI(""); + ans=CmdFdxDemod(""); //biphase if (ans>0) { PrintAndLog("\nValid FDX-B ID Found!"); return CheckChipType(cmdp); } - ans=EM4x50Read("", false); + ans=EM4x50Read("", false); //ask if (ans>0) { PrintAndLog("\nValid EM4x50 ID Found!"); return 1; - } + } + + ans=CmdJablotronDemod(""); + if (ans>0) { + PrintAndLog("\nValid Jablotron ID Found!"); + return CheckChipType(cmdp); + } + + ans=CmdNoralsyDemod(""); + if (ans>0) { + PrintAndLog("\nValid Noralsy ID Found!"); + return CheckChipType(cmdp); + } + + ans=CmdSecurakeyDemod(""); + if (ans>0) { + PrintAndLog("\nValid Securakey ID Found!"); + return CheckChipType(cmdp); + } ans=CmdVikingDemod(""); if (ans>0) { PrintAndLog("\nValid Viking ID Found!"); return CheckChipType(cmdp); - } + } - ans=CmdIndalaDecode(""); + ans=CmdIndalaDecode(""); //psk if (ans>0) { PrintAndLog("\nValid Indala ID Found!"); return CheckChipType(cmdp); @@ -1005,14 +1040,14 @@ int CmdLFfind(const char *Cmd) } PrintAndLog("\nNo Known Tags Found!\n"); - if (testRaw=='u' || testRaw=='U'){ + if (testRaw=='u' || testRaw=='U') { ans=CheckChipType(cmdp); //test unknown tag formats (raw mode)0 PrintAndLog("\nChecking for Unknown tags:\n"); ans=AutoCorrelate(4000, false, false); if (ans > 0) PrintAndLog("Possible Auto Correlation of %d repeating samples",ans); ans=GetFskClock("",false,false); - if (ans != 0){ //fsk + if (ans != 0) { //fsk ans=FSKrawDemod("",true); if (ans>0) { PrintAndLog("\nUnknown FSK Modulated Tag Found!"); @@ -1041,21 +1076,27 @@ int CmdLFfind(const char *Cmd) static command_t CommandTable[] = { {"help", CmdHelp, 1, "This help"}, - {"awid", CmdLFAWID, 1, "{ AWID RFIDs... }"}, - {"cotag", CmdLFCOTAG, 1, "{ COTAG RFIDs... }"}, - {"em", CmdLFEM4X, 1, "{ EM4X RFIDs... }"}, - {"gproxii", CmdLF_G_Prox_II, 1, "{ G Prox II tags... }"}, - {"hid", CmdLFHID, 1, "{ HID RFIDs... }"}, - {"hitag", CmdLFHitag, 1, "{ Hitag tags and transponders... }"}, - {"io", CmdLFIO, 1, "{ ioProx tags... }"}, - {"indala", CmdLFINDALA, 1, "{ Indala tags... }"}, - {"presco", CmdLFPresco, 1, "{ Presco RFIDs... }"}, - {"pcf7931", CmdLFPCF7931, 1, "{ PCF7931 RFIDs... }"}, + {"awid", CmdLFAWID, 1, "{ AWID RFIDs... }"}, + {"cotag", CmdLFCOTAG, 1, "{ COTAG CHIPs... }"}, + {"em", CmdLFEM4X, 1, "{ EM4X CHIPs & RFIDs... }"}, + {"fdx", CmdLFFdx, 1, "{ FDX-B RFIDs... }"}, + {"gproxii", CmdLF_G_Prox_II, 1, "{ G Prox II RFIDs... }"}, + {"hid", CmdLFHID, 1, "{ HID RFIDs... }"}, + {"hitag", CmdLFHitag, 1, "{ Hitag CHIPs... }"}, + {"io", CmdLFIO, 1, "{ ioProx RFIDs... }"}, + {"indala", CmdLFINDALA, 1, "{ Indala RFIDs... }"}, + {"jablotron", CmdLFJablotron, 1, "{ Jablotron RFIDs... }"}, + {"nexwatch", CmdLFNexWatch, 1, "{ NexWatch RFIDs... }"}, + {"noralsy", CmdLFNoralsy, 1, "{ Noralsy RFIDs... }"}, + {"paradox", CmdLFParadox, 1, "{ Paradox RFIDs... }"}, + {"presco", CmdLFPresco, 1, "{ Presco RFIDs... }"}, + {"pcf7931", CmdLFPCF7931, 1, "{ PCF7931 CHIPs... }"}, {"pyramid", CmdLFPyramid, 1, "{ Farpointe/Pyramid RFIDs... }"}, - {"t55xx", CmdLFT55XX, 1, "{ T55xx RFIDs... }"}, - {"ti", CmdLFTI, 1, "{ TI RFIDs... }"}, - {"viking", CmdLFViking, 1, "{ Viking tags... }"}, - {"visa2000", CmdLFVisa2k, 1, "{ Visa2000 RFIDs...}"}, + {"securakey", CmdLFSecurakey, 1, "{ Securakey RFIDs... }"}, + {"t55xx", CmdLFT55XX, 1, "{ T55xx CHIPs... }"}, + {"ti", CmdLFTI, 1, "{ TI CHIPs... }"}, + {"viking", CmdLFViking, 1, "{ Viking RFIDs... }"}, + {"visa2000", CmdLFVisa2k, 1, "{ Visa2000 RFIDs... }"}, {"cmdread", CmdLFCommandRead, 0, " ['H'] -- Modulate LF reader field to send command before read (all periods in microseconds) (option 'H' for 134)"}, {"config", CmdLFSetConfig, 0, "Set config for LF sampling, bit/sample, decimation, frequency"}, {"flexdemod", CmdFlexdemod, 1, "Demodulate samples for FlexPass"},