Merge branch 'master' into electra_decode
Signed-off-by: Iceman <iceman@iuse.se>
This commit is contained in:
21 files changed
+173
-115
No files matched your search
@@ -44,6 +44,7 @@
|
||||
#include "preferences.h"
|
||||
#include "mifare/gen4.h"
|
||||
#include "generator.h" // keygens.
|
||||
#include "fpga.h"
|
||||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
|
||||
+3
-3
@@ -1468,12 +1468,12 @@ static command_t CommandTable[] = {
|
||||
{"ping", CmdPing, IfPm3Present, "Test if the Proxmark3 is responsive"},
|
||||
{"readmem", CmdReadmem, IfPm3Present, "Read from MCU flash"},
|
||||
{"reset", CmdReset, IfPm3Present, "Reset the device"},
|
||||
{"setlfdivisor", CmdSetDivisor, IfPm3Present, "Drive LF antenna at 12MHz / (divisor + 1)"},
|
||||
{"sethfthresh", CmdSetHFThreshold, IfPm3Present, "Set thresholds in HF/14a mode"},
|
||||
{"setlfdivisor", CmdSetDivisor, IfPm3Lf, "Drive LF antenna at 12MHz / (divisor + 1)"},
|
||||
{"sethfthresh", CmdSetHFThreshold, IfPm3Iso14443a, "Set thresholds in HF/14a mode"},
|
||||
{"setmux", CmdSetMux, IfPm3Present, "Set the ADC mux to a specific value"},
|
||||
{"standalone", CmdStandalone, IfPm3Present, "Start installed standalone mode on device"},
|
||||
{"tia", CmdTia, IfPm3Present, "Trigger a Timing Interval Acquisition to re-adjust the RealTimeCounter divider"},
|
||||
{"tune", CmdTune, IfPm3Present, "Measure tuning of device antenna"},
|
||||
{"tune", CmdTune, IfPm3Lf, "Measure tuning of device antenna"},
|
||||
{NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
+5
-4
@@ -34,7 +34,7 @@
|
||||
#include "cmdhw.h" // for setting FPGA image
|
||||
#include "cmdlfawid.h" // for awid menu
|
||||
#include "cmdlfem.h" // for em menu
|
||||
#include "cmdlfem410x.h" // for em4x menu
|
||||
#include "cmdlfem410x.h" // for em4x menu
|
||||
#include "cmdlfem4x05.h" // for em4x05 / 4x69
|
||||
#include "cmdlfem4x50.h" // for em4x50
|
||||
#include "cmdlfem4x70.h" // for em4x70
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "cmdlfzx8211.h" // for ZX8211 menu
|
||||
#include "crc.h"
|
||||
#include "pm3_cmd.h" // for LF_CMDREAD_MAX_EXTRA_SYMBOLS
|
||||
#include "fpga.h" // for set_fpga_mode
|
||||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
@@ -1552,7 +1553,7 @@ static bool check_chiptype(bool getDeviceData) {
|
||||
|
||||
//check for em4x05/em4x69 chips first
|
||||
uint32_t word = 0;
|
||||
if (em4x05_isblock0(&word)) {
|
||||
if (IfPm3EM4x50() && em4x05_isblock0(&word)) {
|
||||
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x05 / EM4x69"));
|
||||
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x05`") " commands");
|
||||
retval = true;
|
||||
@@ -1569,7 +1570,7 @@ static bool check_chiptype(bool getDeviceData) {
|
||||
|
||||
#if !defined ICOPYX
|
||||
// check for em4x50 chips
|
||||
if (detect_4x50_block()) {
|
||||
if (IfPm3EM4x50() && detect_4x50_block()) {
|
||||
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x50"));
|
||||
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x50`") " commands");
|
||||
retval = true;
|
||||
@@ -1577,7 +1578,7 @@ static bool check_chiptype(bool getDeviceData) {
|
||||
}
|
||||
|
||||
// check for em4x70 chips
|
||||
if (detect_4x70_block()) {
|
||||
if (IfPm3EM4x70() && detect_4x70_block()) {
|
||||
PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("EM4x70"));
|
||||
PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf em 4x70`") " commands");
|
||||
retval = true;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "cipher.h"
|
||||
#include "cipherutils.h"
|
||||
#include "commonutil.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -125,18 +125,6 @@ uint64_t x_bytes_to_num(uint8_t *src, size_t len) {
|
||||
return num;
|
||||
}
|
||||
|
||||
void reverse_arraybytes(uint8_t *arr, size_t len) {
|
||||
for (size_t i = 0; i < len ; i++) {
|
||||
arr[i] = reflect8(arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void reverse_arraycopy(uint8_t *arr, uint8_t *dest, size_t len) {
|
||||
for (size_t i = 0; i < len ; i++) {
|
||||
dest[i] = reflect8(arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void printarr(const char *name, uint8_t *arr, int len) {
|
||||
if (name == NULL || arr == NULL) return;
|
||||
|
||||
|
||||
@@ -62,9 +62,6 @@ int testCipherUtils(void);
|
||||
void push6bits(BitstreamOut_t *stream, uint8_t bits);
|
||||
void x_num_to_bytes(uint64_t n, size_t len, uint8_t *dest);
|
||||
uint64_t x_bytes_to_num(uint8_t *src, size_t len);
|
||||
uint8_t reversebyte(uint8_t b);
|
||||
void reverse_arraybytes(uint8_t *arr, size_t len);
|
||||
void reverse_arraycopy(uint8_t *arr, uint8_t *dest, size_t len);
|
||||
void printarr(const char *name, uint8_t *arr, int len);
|
||||
void printarr_human_readable(const char *title, uint8_t *arr, int len);
|
||||
#endif // CIPHERUTILS_H
|
||||
Reference in new issue
Block a user