mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
add command hf cipurse test
This commit is contained in:
parent
40f08108f0
commit
8aee946895
|
@ -213,6 +213,7 @@ set (TARGET_SOURCES
|
|||
${PM3_ROOT}/client/src/iso7816/iso7816core.c
|
||||
${PM3_ROOT}/client/src/cipurse/cipursecrypto.c
|
||||
${PM3_ROOT}/client/src/cipurse/cipursecore.c
|
||||
${PM3_ROOT}/client/src/cipurse/cipursetest.c
|
||||
${PM3_ROOT}/client/src/loclass/cipher.c
|
||||
${PM3_ROOT}/client/src/loclass/cipherutils.c
|
||||
${PM3_ROOT}/client/src/loclass/elite_crack.c
|
||||
|
|
|
@ -559,6 +559,7 @@ SRCS = aiddesfire.c \
|
|||
fido/fidocore.c \
|
||||
cipurse/cipursecore.c \
|
||||
cipurse/cipursecrypto.c \
|
||||
cipurse/cipursetest.c \
|
||||
fileutils.c \
|
||||
flash.c \
|
||||
generator.c \
|
||||
|
|
16
client/src/cipurse/cipursetest.c
Normal file
16
client/src/cipurse/cipursetest.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2021 Merlok
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// tests for crypto
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "cipursetest.h"
|
||||
|
||||
bool CIPURSETest(bool verbose) {
|
||||
|
||||
return true;
|
||||
}
|
20
client/src/cipurse/cipursetest.h
Normal file
20
client/src/cipurse/cipursetest.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2021 Merlok
|
||||
//
|
||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||
// the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// tests for crypto
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __CIPURSETEST_H__
|
||||
#define __CIPURSETEST_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "common.h"
|
||||
#include "cipurse/cipursecrypto.h"
|
||||
|
||||
bool CIPURSETest(bool verbose);
|
||||
|
||||
#endif /* __CIPURSETEST_H__ */
|
|
@ -25,6 +25,7 @@
|
|||
#include "cmdhfcipurse.h"
|
||||
#include "cipurse/cipursecore.h"
|
||||
#include "cipurse/cipursecrypto.h"
|
||||
#include "cipurse/cipursetest.h"
|
||||
#include "ui.h"
|
||||
#include "cmdhf14a.h"
|
||||
#include "cmdtrace.h"
|
||||
|
@ -698,6 +699,12 @@ bool CheckCardCipurse(void) {
|
|||
return (res == 0 && sw == 0x9000);
|
||||
}
|
||||
|
||||
static int CmdHFCipurseTest(const char *Cmd) {
|
||||
CIPURSETest(true);
|
||||
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
static command_t CommandTable[] = {
|
||||
{"help", CmdHelp, AlwaysAvailable, "This help."},
|
||||
{"info", CmdHFCipurseInfo, IfPm3Iso14443a, "Get info about CIPURSE tag"},
|
||||
|
@ -706,6 +713,7 @@ static command_t CommandTable[] = {
|
|||
{"write", CmdHFCipurseWriteFile, IfPm3Iso14443a, "Write binary file"},
|
||||
{"aread", CmdHFCipurseReadFileAttr, IfPm3Iso14443a, "Read file attributes"},
|
||||
{"delete", CmdHFCipurseDeleteFile, IfPm3Iso14443a, "Delete file"},
|
||||
{"test", CmdHFCipurseTest, IfPm3Iso14443a, "Tests"},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
|
|
@ -491,6 +491,7 @@ while true; do
|
|||
if ! $SLOWTESTS; then
|
||||
if ! CheckExecute "hf iclass loclass test" "$CLIENTBIN -c 'hf iclass loclass --test'" "key diversification (ok)"; then break; fi
|
||||
if ! CheckExecute "emv test" "$CLIENTBIN -c 'emv test'" "Test(s) \[ ok"; then break; fi
|
||||
if ! CheckExecute "hf cipurse test" "$CLIENTBIN -c 'hf cipurse test'" "Test(s) \[ ok"; then break; fi
|
||||
fi
|
||||
fi
|
||||
echo -e "\n------------------------------------------------------------"
|
||||
|
|
Loading…
Reference in a new issue