mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
fix const param, bitwiseboolean
This commit is contained in:
parent
4bbfc944f3
commit
5fd4d7e774
|
@ -17,7 +17,7 @@
|
|||
#define DBG if (g_dbglevel >= DBG_EXTENDED)
|
||||
|
||||
#include "hitag2.h"
|
||||
#include "hitag2_crypto.h"
|
||||
#include "hitag2/hitag2_crypto.h"
|
||||
#include "string.h"
|
||||
#include "proxmark3_arm.h"
|
||||
#include "cmd.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
#include "hitag2_crack.h"
|
||||
#include "hitag2_crypto.h"
|
||||
#include "hitag2/hitag2_crypto.h"
|
||||
#include "hitag2.h"
|
||||
#include "proxmark3_arm.h"
|
||||
#include "commonutil.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "util.h"
|
||||
#include "string.h"
|
||||
#include "commonutil.h"
|
||||
#include "hitag2_crypto.h"
|
||||
#include "hitag2/hitag2_crypto.h"
|
||||
#include "lfadc.h"
|
||||
#include "crc.h"
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ static void hitagS_receive_frame(uint8_t *rx, size_t sizeofrx, size_t *rxlen, ui
|
|||
// Dbprintf("RX0 %i:%02X.. err:%i resptime:%i", *rxlen, rx[0], errorCount, *resptime);
|
||||
}
|
||||
|
||||
static void sendReceiveHitagS(uint8_t *tx, size_t txlen, uint8_t *rx, size_t sizeofrx, size_t *prxbits, int t_wait, bool ledcontrol, bool ac_seq) {
|
||||
static void sendReceiveHitagS( const uint8_t *tx, size_t txlen, uint8_t *rx, size_t sizeofrx, size_t *prxbits, int t_wait, bool ledcontrol, bool ac_seq) {
|
||||
|
||||
LogTraceBits(tx, txlen, HITAG_T_WAIT_2, HITAG_T_WAIT_2, true);
|
||||
|
||||
|
@ -1557,7 +1557,7 @@ void WritePageHitagS(const lf_hitag_data_t *payload, bool ledcontrol) {
|
|||
break;
|
||||
default: {
|
||||
res = PM3_EINVARG;
|
||||
return;
|
||||
goto write_end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -863,7 +863,7 @@ int CmdHF14ASim(const char *Cmd) {
|
|||
if ((flags & FLAG_NR_AR_ATTACK) != FLAG_NR_AR_ATTACK)
|
||||
break;
|
||||
|
||||
nonces_t *data = (nonces_t *)resp.data.asBytes;
|
||||
const nonces_t *data = (nonces_t *)resp.data.asBytes;
|
||||
readerAttack(k_sector, k_sectors_cnt, data[0], setEmulatorMem, verbose);
|
||||
|
||||
keypress = kbd_enter_pressed();
|
||||
|
@ -1099,7 +1099,7 @@ int SelectCard14443A_4(bool disconnect, bool verbose, iso14a_card_select_t *card
|
|||
return SelectCard14443A_4_WithParameters(disconnect, verbose, card, NULL);
|
||||
}
|
||||
|
||||
static int CmdExchangeAPDU(bool chainingin, uint8_t *datain, int datainlen, bool activateField, uint8_t *dataout, int maxdataoutlen, int *dataoutlen, bool *chainingout) {
|
||||
static int CmdExchangeAPDU(bool chainingin, const uint8_t *datain, int datainlen, bool activateField, uint8_t *dataout, int maxdataoutlen, int *dataoutlen, bool *chainingout) {
|
||||
*chainingout = false;
|
||||
|
||||
size_t timeout = 1500;
|
||||
|
@ -1158,7 +1158,7 @@ static int CmdExchangeAPDU(bool chainingin, uint8_t *datain, int datainlen, bool
|
|||
PacketResponseNG resp;
|
||||
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, timeout)) {
|
||||
uint8_t *recv = resp.data.asBytes;
|
||||
const uint8_t *recv = resp.data.asBytes;
|
||||
int iLen = resp.oldarg[0];
|
||||
uint8_t res = resp.oldarg[1];
|
||||
|
||||
|
@ -1216,7 +1216,7 @@ static int CmdExchangeAPDU(bool chainingin, uint8_t *datain, int datainlen, bool
|
|||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen) {
|
||||
int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen) {
|
||||
*dataoutlen = 0;
|
||||
bool chaining = false;
|
||||
int res;
|
||||
|
@ -1519,7 +1519,7 @@ static int CmdHF14ACmdRaw(const char *Cmd) {
|
|||
}
|
||||
|
||||
// TODO: allow to use reader command with both data and polling configuration
|
||||
if (use_ecp | use_magsafe) {
|
||||
if (use_ecp || use_magsafe) {
|
||||
PrintAndLogEx(WARNING, "ECP and Magsafe not supported with this command at this moment. Instead use 'hf 14a reader -sk --ecp/--mag'");
|
||||
// flags |= ISO14A_USE_MAGSAFE;
|
||||
// flags |= ISO14A_USE_ECP;
|
||||
|
|
|
@ -66,7 +66,7 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search);
|
|||
int infoHF14A4Applications(bool verbose);
|
||||
const char *getTagInfo(uint8_t uid);
|
||||
int Hf14443_4aGetCardData(iso14a_card_select_t *card);
|
||||
int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
|
||||
int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen, bool silentMode);
|
||||
|
||||
iso14a_polling_parameters_t iso14a_get_polling_parameters(bool use_ecp, bool use_magsafe);
|
||||
|
|
|
@ -3253,7 +3253,7 @@ int CmdHF14MfUTamper(const char *Cmd) {
|
|||
}
|
||||
}
|
||||
|
||||
if (enable | disable | lock_msg) {
|
||||
if (enable || disable || lock_msg) {
|
||||
|
||||
if (ul_select(&card) == false) {
|
||||
PrintAndLogEx(ERR, "Unable to select tag");
|
||||
|
|
|
@ -166,7 +166,7 @@ static void pm3_staticnested(uint32_t uid, uint32_t nt1, uint32_t ks1, uint32_t
|
|||
for (uint32_t k = 0; k < keycnt; k++) {
|
||||
uint64_t key64 = 0;
|
||||
crypto1_get_lfsr(statelists[0].head.slhead + k, &key64);
|
||||
printf("[ %d ] " _GREEN_("%012" PRIx64) "\n", k + 1, key64);
|
||||
printf("[ %u ] " _GREEN_("%012" PRIx64) "\n", k + 1, key64);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ int main(int argc, char *const argv[]) {
|
|||
if (key_count) {
|
||||
printf("Ultra Static nested --> Found " _YELLOW_("%u") " key candidates\n", key_count);
|
||||
for (uint32_t k = 0; k < key_count; k++) {
|
||||
printf("[ %d ] " _GREEN_("%012" PRIx64) "\n", k + 1, keys[k]);
|
||||
printf("[ %u ] " _GREEN_("%012" PRIx64) "\n", k + 1, keys[k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue