Merge branch 'master' into experimental_varlen

* master:
  Add ref to new mifaresim.h in standalone modes
  fix: Standalone/hf_colin now compiles
  Update readme.md
  chg: hitag compile flag optional
  fix: standalonemode matty_run now compiles
  typo
  smallfix
  chg: fpga lf simulation
  chg: 'fpga lf sim' - 25% both on sides.
This commit is contained in:
Philippe Teuwen 2019-04-19 23:17:36 +02:00
commit 7331b7d6d2
10 changed files with 20 additions and 9 deletions

View file

@ -31,7 +31,6 @@ APP_CFLAGS = $(PLATFORM_DEFS) \
-DWITH_CRC \
-DON_DEVICE \
-DWITH_LF \
-DWITH_HITAG \
-DWITH_ISO15693 \
-DWITH_LEGICRF \
-DWITH_ISO14443b \
@ -43,6 +42,7 @@ APP_CFLAGS = $(PLATFORM_DEFS) \
-fno-strict-aliasing -ffunction-sections -fdata-sections
### IMPORTANT - move the commented variable below this line
# -DWITH_HITAG \
# -DWITH_FPC \
# -DWITH_LCD \
# -DWITH_EMV \
@ -54,11 +54,11 @@ APP_CFLAGS = $(PLATFORM_DEFS) \
# -DWITH_LF_PROXBRUTE
# -DWITH_LF_HIDBRUTE
# -DWITH_HF_YOUNG
# -DWITH_HF_MATTYRUN -
# -DWITH_HF_MATTYRUN
# -DWITH_HF_COLIN
# -DWITH_HF_BOG
SRC_LF = lfops.c hitag2_crypto.c hitag2.c hitagS.c lfsampling.c pcf7931.c lfdemod.c
SRC_LF = lfops.c lfsampling.c pcf7931.c lfdemod.c
SRC_ISO15693 = iso15693.c iso15693tools.c
SRC_ISO14443a = iso14443a.c mifareutil.c mifarecmd.c epa.c mifaresim.c
SRC_ISO14443b = iso14443b.c
@ -88,6 +88,12 @@ else
SRC_FPC =
endif
ifneq (,$(findstring WITH_HITAG,$(APP_CLAGS)))
SRC_HITAG = hitag2_crypto.c hitag2.c hitagS.c
else
SRC_HITAG =
endif
ifneq (,$(findstring WITH_LCD,$(APP_CLAGS)))
SRC_LCD = fonts.c LCD.c
else
@ -155,6 +161,7 @@ THUMBSRC = start.c \
$(SRC_FLASH) \
$(SRC_SMARTCARD) \
$(SRC_FPC) \
$(SRC_HITAG) \
appmain.c \
printf.c \
commonutil.c \

View file

@ -17,7 +17,9 @@
#define __HF_COLIN_H
#include "proxmark3.h"
#include "mifaresim.h" // mifare1ksim
#include "mifareutil.h"
#include "mifaresim.h"
#include "iso14443a.h"
#include "protocols.h"
#include "util.h"

View file

@ -328,7 +328,7 @@ void RunMod() {
/*
TODO:
- Get UID from tag and set accordingly in emulator memory and call mifare1ksim with right flags (iceman)
- Get UID from tag and set accordingly in emulator memory and call mifaresim with right flags (iceman)
*/
if (!allKeysFound && keyFound) {
Dbprintf("\t✕ There's currently no nested attack in MattyRun, sorry!");

View file

@ -12,11 +12,12 @@
#ifndef __HF_MATTYRUN_H
#define __HF_MATTYRUN_H
//#include <stdbool.h> // for bool
#include "standalone.h" // standalone definitions
#include "apps.h" // debugstatements, lfops?
#include "usb_cmd.h" // mifare1ksim flags
#include "mifaresim.h" // mifare1ksim
#include "mifareutil.h"
#include "mifaresim.h"
#define OPTS 2

View file

@ -81,7 +81,7 @@ APP_CFLAGS = -DWITH_CRC \
-DWITH_FLASH \
-DWITH_SMARTCARD \
-DWITH_HFSNOOP \
-DWITH_HF_COLIN\
-DWITH_HF_COLIN \
-DWITH_FPC \
-fno-strict-aliasing -ffunction-sections -fdata-sections

View file

@ -2416,7 +2416,7 @@ static command_t CommandTable[] = {
{"readblk", CmdHFiClass_ReadBlock, 0, "[options..] Authenticate and Read iClass block"},
{"reader", CmdHFiClassReader, 0, " Act like an iClass reader"},
{"readtagfile", CmdHFiClassReadTagFile, 1, "[options..] Display Content from tagfile"},
{"replay", CmdHFiClassReader_Replay, 0, "<mac> Read an iClass tag via Reply Attack"},
{"replay", CmdHFiClassReader_Replay, 0, "<mac> Read an iClass tag via Replay Attack"},
{"sim", CmdHFiClassSim, 0, "[options..] Simulate iClass tag"},
{"sniff", CmdHFiClassSniff, 0, " Eavesdrop iClass communication"},
{"writeblk", CmdHFiClass_WriteBlock, 0, "[options..] Authenticate and Write iClass block"},

View file

@ -142,6 +142,7 @@ cleanup:
int roca_self_test(void) {
int ret = 0;
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "ROCA check vulnerability tests");
// positive

View file

@ -1,4 +1,4 @@
include ../common/Makefile.common
include ../common/Makefile.common # for $(DETECTED_OS)
all: fpga_lf.bit fpga_hf.bit
clean:

Binary file not shown.

View file

@ -64,7 +64,7 @@ reg output_state;
always @(posedge pck0)
begin
if((pck_divider == 8'd7) && !clk_state) begin
is_high = (adc_d >= 8'd200);
is_high = (adc_d >= 8'd191);
is_low = (adc_d <= 8'd64);
end
end