mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
hook reveng outputs to pm3 machinery, add regression test
This commit is contained in:
parent
a9964f4f51
commit
b9f6f096aa
4 changed files with 14 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
# Add -DPRESETS to compile with preset models (edit config.h)
|
# Add -DPRESETS to compile with preset models (edit config.h)
|
||||||
|
|
||||||
MYSRCPATHS =
|
MYSRCPATHS =
|
||||||
MYINCLUDES = -I../cliparser
|
MYINCLUDES = -I../cliparser -I../../src -I../../../include
|
||||||
MYCFLAGS =
|
MYCFLAGS =
|
||||||
MYDEFS = -DPRESETS
|
MYDEFS = -DPRESETS
|
||||||
MYSRCS = \
|
MYSRCS = \
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
#endif
|
#endif
|
||||||
#include "reveng.h"
|
#include "reveng.h"
|
||||||
|
|
||||||
|
#ifdef BMPTST
|
||||||
|
# undef fprintf
|
||||||
|
# undef puts
|
||||||
|
# undef fputs
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined BMPTST) || (BMP_BIT < 32)
|
#if (defined BMPTST) || (BMP_BIT < 32)
|
||||||
/* Size in bits of a bmp_t. Not necessarily a power of two. */
|
/* Size in bits of a bmp_t. Not necessarily a power of two. */
|
||||||
int bmpbit;
|
int bmpbit;
|
||||||
|
|
|
@ -101,4 +101,10 @@
|
||||||
* *
|
* *
|
||||||
*****************************************/
|
*****************************************/
|
||||||
|
|
||||||
|
// Proxmark3 stdout/stderr hooking
|
||||||
|
#include "ui.h"
|
||||||
|
#define fprintf(stream, ...) PrintAndLogEx(INFO, __VA_ARGS__)
|
||||||
|
#define fputs(s, stream) PrintAndLogEx(INFO, "%s", s)
|
||||||
|
#define puts(s) PrintAndLogEx(SUCCESS, "%s", s)
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
|
|
@ -108,7 +108,7 @@ while true; do
|
||||||
if ! CheckExecute "proxmark help text hardnested" "$PM3BIN -t 2>&1" "hardnested"; then break; fi
|
if ! CheckExecute "proxmark help text hardnested" "$PM3BIN -t 2>&1" "hardnested"; then break; fi
|
||||||
|
|
||||||
printf "\n${C_BLUE}Testing data manipulation:${C_NC}\n"
|
printf "\n${C_BLUE}Testing data manipulation:${C_NC}\n"
|
||||||
if ! CheckExecute "reveng test" "$PM3BIN -c 'reveng -w 8 -s 01020304e3 010204039d'" "CRC-8/SMBUS"; then break; fi
|
if ! CheckExecute "reveng test" "$PM3BIN -c 'reveng -h;reveng -w 8 -s 01020304e3 010204039d'" "CRC-8/SMBUS"; then break; fi
|
||||||
if ! CheckExecute "mfu pwdgen test" "$PM3BIN -c 'hf mfu pwdgen t'" "Selftest OK"; then break; fi
|
if ! CheckExecute "mfu pwdgen test" "$PM3BIN -c 'hf mfu pwdgen t'" "Selftest OK"; then break; fi
|
||||||
|
|
||||||
printf "\n${C_BLUE}Testing LF:${C_NC}\n"
|
printf "\n${C_BLUE}Testing LF:${C_NC}\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue