arm: fix prototypes

This commit is contained in:
Philippe Teuwen
2020-05-11 13:48:57 +02:00
parent 838d345918
commit 026707b960
54 changed files with 211 additions and 208 deletions
+2 -2
View File
@@ -68,7 +68,7 @@
#define HF_14ASNIFF_LOGFILE "hf_14asniff.trc"
void DownloadTraceInstructions() {
void DownloadTraceInstructions(void) {
Dbprintf("");
Dbprintf("To get the trace from flash and display it:");
Dbprintf("1. mem spiffs dump o "HF_14ASNIFF_LOGFILE" f trace.trc");
@@ -81,7 +81,7 @@ void ModInfo(void) {
DownloadTraceInstructions();
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf("Starting standalone mode: hf_14asniff");
+1 -1
View File
@@ -235,7 +235,7 @@ void ModInfo(void) {
DbpString(" HF 14a sniff standalone with ULC/ULEV1/NTAG auth storing in flashmem - aka BogitoRun (Bogito)");
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
+6 -6
View File
@@ -215,22 +215,22 @@ void delete_schema(MFC1KSchema *p, int *schemas_counter, int index) {
}
}
void cjSetCursFRight() {
void cjSetCursFRight(void) {
vtsend_cursor_position(NULL, 98, (currfline));
currfline++;
}
void cjSetCursRight() {
void cjSetCursRight(void) {
vtsend_cursor_position(NULL, 59, (currline));
currline++;
}
void cjSetCursLeft() {
void cjSetCursLeft(void) {
vtsend_cursor_position(NULL, 0, (curlline));
curlline++;
}
void cjTabulize() { DbprintfEx(FLAG_RAWPRINT, "\t\t\t"); }
void cjTabulize(void) { DbprintfEx(FLAG_RAWPRINT, "\t\t\t"); }
/*
void cjPrintKey(uint64_t key, uint8_t *foundKey, uint16_t sectorNo, uint8_t type) {
@@ -275,7 +275,7 @@ void add_schemas_from_json_in_spiffs(char *filename) {
}
}
void ReadLastTagFromFlash() {
void ReadLastTagFromFlash(void) {
SpinOff(0);
LED_A_ON();
LED_B_ON();
@@ -332,7 +332,7 @@ void WriteTagToFlash(uint32_t uid, size_t size) {
void ModInfo(void) { DbpString(" HF Mifare ultra fast sniff/sim/clone - aka VIGIKPWN (Colin Brigato)"); }
void RunMod() {
void RunMod(void) {
StandAloneMode();
// add_schema(Schemas, Noralsy, &total_schemas);
+2 -2
View File
@@ -44,7 +44,7 @@
*
*/
void DownloadLogInstructions() {
void DownloadLogInstructions(void) {
Dbprintf("");
Dbprintf("[=] List all dumps from flash:");
Dbprintf("[=] " _YELLOW_("-") " mem spiffs tree");
@@ -99,7 +99,7 @@ void ModInfo(void) {
// A, B, C = Reading
// A, D = Simulating
void RunMod() {
void RunMod(void) {
StandAloneMode();
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
Dbprintf("[=] >> HF Legic Prime Read/Simulate Started <<");
+1 -1
View File
@@ -210,7 +210,7 @@ void ModInfo(void) {
DbpString(" HF Mifare sniff/clone - aka MattyRun (Matías A. Ré Medina)");
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf(">> Matty mifare chk/dump/sim a.k.a MattyRun Started <<");
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
+2 -2
View File
@@ -54,7 +54,7 @@ void ModInfo(void) {
uint8_t ppdol [255] = {0x80, 0xA8, 0x00, 0x00, 0x02, 0x83, 0x00}; // Default GET PROCESSING
uint8_t treatPDOL(uint8_t *apdu) { //Generate GET PROCESSING
static uint8_t treatPDOL(uint8_t *apdu) { //Generate GET PROCESSING
uint8_t plen = 7;
//PDOL Format: 80 A8 00 00 + (PDOL Length+2) + 83 + PDOL Length + PDOL + 00
for (uint8_t i = 1; i <= apdu[0]; i++) { //Magic stuff, the generation order is important
@@ -117,7 +117,7 @@ uint8_t treatPDOL(uint8_t *apdu) { //Generate GET PROCESSING
return plen;
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf(_YELLOW_(">>") "Reading Visa cards & Emulating a Visa MSD Transaction a.k.a. MSDSal Started<<");
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
+1 -1
View File
@@ -37,7 +37,7 @@ void ModInfo(void) {
DbpString(" HF Mifare sniff/simulation - (Craig Young)");
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf(">> Craig Young Mifare sniff UID/clone uid 2 magic/sim a.k.a YoungRun Started <<");
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
+1 -1
View File
@@ -79,7 +79,7 @@ void LED_Slot(int i) {
}
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
Dbprintf("[=] >> LF EM4100 simulator started <<");
+1 -1
View File
@@ -118,7 +118,7 @@ void SaveIDtoFlash(int addr, uint64_t id) {
}
#endif
void RunMod() {
void RunMod(void) {
StandAloneMode();
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
Dbprintf("[=] >> LF EM4100 read/write/clone started <<");
+1 -1
View File
@@ -42,7 +42,7 @@ void ModInfo(void) {
}
// samy's sniff and repeat routine for LF
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf(">> LF HID corporate bruteforce a.k.a CorporateBrute Started <<");
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
+6 -6
View File
@@ -54,7 +54,7 @@
#define LF_HIDCOLLECT_LOGFILE "lf_hidcollect.log"
void DownloadLogInstructions() {
void DownloadLogInstructions(void) {
Dbprintf("");
Dbprintf("[=] To get the logfile from flash and display it:");
Dbprintf("[=] " _YELLOW_("1.") " mem spiffs dump o "LF_HIDCOLLECT_LOGFILE" f "LF_HIDCOLLECT_LOGFILE);
@@ -76,7 +76,7 @@ void append(uint8_t *entry, size_t entry_len) {
LED_B_OFF();
}
uint32_t IceEM410xdemod() {
uint32_t IceEM410xdemod(void) {
uint8_t *dest = BigBuf_get_addr();
size_t idx = 0;
@@ -128,7 +128,7 @@ uint32_t IceEM410xdemod() {
return PM3_SUCCESS;
}
uint32_t IceAWIDdemod() {
uint32_t IceAWIDdemod(void) {
uint8_t *dest = BigBuf_get_addr();
size_t size = MIN(12800, BigBuf_max_traceLen());
@@ -180,7 +180,7 @@ uint32_t IceAWIDdemod() {
return PM3_SUCCESS;
}
uint32_t IceIOdemod() {
uint32_t IceIOdemod(void) {
int dummyIdx = 0;
uint8_t version = 0, facilitycode = 0;
@@ -224,7 +224,7 @@ uint32_t IceIOdemod() {
return PM3_SUCCESS;
}
uint32_t IceHIDDemod() {
uint32_t IceHIDDemod(void) {
int dummyIdx = 0;
@@ -320,7 +320,7 @@ void ModInfo(void) {
DbpString(_YELLOW_(" LF HID / IOprox / AWID / EM4100 collector mode") " - a.k.a IceHID (Iceman)");
}
void RunMod() {
void RunMod(void) {
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
LFSetupFPGAForADC(LF_DIVISOR_125, true);
+1 -1
View File
@@ -23,7 +23,7 @@ void ModInfo(void) {
}
// samy's sniff and repeat routine for LF
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf(">> LF HID proxII bruteforce a.k.a ProxBrute Started (Brad Antoniewicz) <<");
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
+1 -1
View File
@@ -31,7 +31,7 @@ void ModInfo(void) {
// C = playing bank A
// D = playing bank B
void RunMod() {
void RunMod(void) {
StandAloneMode();
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
Dbprintf(">> LF HID Read/Clone/Sim a.k.a SamyRun Started <<");
+1 -1
View File
@@ -18,7 +18,7 @@ void ModInfo(void) {
DbpString(" LF skeleton mode - aka Skeleton (iceman)");
}
void RunMod() {
void RunMod(void) {
StandAloneMode();
Dbprintf("[=] LF skeleton code a.k.a Skeleton started");
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
+1 -1
View File
@@ -6,5 +6,5 @@ void ModInfo(void) {
DbpString(" No standalone mode present");
}
void RunMod() {
void RunMod(void) {
}
+2 -2
View File
@@ -11,7 +11,7 @@
#ifndef __STANDALONE_H
#define __STANDALONE_H
void RunMod();
void ModInfo();
void RunMod(void);
void ModInfo(void);
#endif /* __STANDALONE_H */
+8 -8
View File
@@ -144,7 +144,7 @@ uint16_t AvgAdc(int ch) {
return (a + 15) >> 5;
}
void MeasureAntennaTuning(void) {
static void MeasureAntennaTuning(void) {
uint32_t peak = 0;
@@ -221,7 +221,7 @@ void MeasureAntennaTuning(void) {
}
// Measure HF in milliVolt
uint16_t MeasureAntennaTuningHfData(void) {
static uint16_t MeasureAntennaTuningHfData(void) {
#if defined RDV4
return (MAX_ADC_HF_VOLTAGE_RDV40 * AvgAdc(ADC_CHAN_HF_RDV40)) >> 10;
@@ -232,7 +232,7 @@ uint16_t MeasureAntennaTuningHfData(void) {
}
// Measure LF in milliVolt
uint32_t MeasureAntennaTuningLfData(void) {
static uint32_t MeasureAntennaTuningLfData(void) {
return (MAX_ADC_LF_VOLTAGE * AvgAdc(ADC_CHAN_LF)) >> 10;
}
@@ -246,7 +246,7 @@ void ReadMem(int addr) {
extern struct version_information version_information;
/* bootrom version information is pointed to from _bootphase1_version_pointer */
extern char *_bootphase1_version_pointer, _flash_start, _flash_end, __data_src_start__;
void SendVersion(void) {
static void SendVersion(void) {
char temp[PM3_CMD_DATA_SIZE - 12]; /* Limited data payload in USB packets */
char VersionString[PM3_CMD_DATA_SIZE - 12] = { '\0' };
@@ -302,7 +302,7 @@ void SendVersion(void) {
reply_ng(CMD_VERSION, PM3_SUCCESS, (uint8_t *)&payload, 12 + payload.versionstr_len);
}
void TimingIntervalAcquisition(void) {
static void TimingIntervalAcquisition(void) {
// trigger new acquisition by turning main oscillator off and on
mck_from_pll_to_slck();
mck_from_slck_to_pll();
@@ -312,7 +312,7 @@ void TimingIntervalAcquisition(void) {
// measure the Connection Speed by sending SpeedTestBufferSize bytes to client and measuring the elapsed time.
// Note: this mimics GetFromBigbuf(), i.e. we have the overhead of the PacketCommandNG structure included.
void printConnSpeed(void) {
static void printConnSpeed(void) {
DbpString(_BLUE_("Transfer Speed"));
Dbprintf(" Sending packets to client...");
@@ -339,7 +339,7 @@ void printConnSpeed(void) {
/**
* Prints runtime information about the PM3.
**/
void SendStatus(void) {
static void SendStatus(void) {
BigBuf_print_status();
Fpga_print_status();
#ifdef WITH_FLASH
@@ -382,7 +382,7 @@ void SendStatus(void) {
reply_ng(CMD_STATUS, PM3_SUCCESS, NULL, 0);
}
void SendCapabilities(void) {
static void SendCapabilities(void) {
capabilities_t capabilities;
capabilities.version = CAPABILITIES_VERSION;
capabilities.via_fpc = reply_via_fpc;
+3 -3
View File
@@ -113,7 +113,7 @@ static char iso_type = 0;
//-----------------------------------------------------------------------------
// Wrapper for sending APDUs to type A and B cards
//-----------------------------------------------------------------------------
int EPA_APDU(uint8_t *apdu, size_t length, uint8_t *response) {
static int EPA_APDU(uint8_t *apdu, size_t length, uint8_t *response) {
switch (iso_type) {
case 'a':
return iso14_apdu(apdu, (uint16_t) length, false, response, NULL);
@@ -130,7 +130,7 @@ int EPA_APDU(uint8_t *apdu, size_t length, uint8_t *response) {
//-----------------------------------------------------------------------------
// Closes the communication channel and turns off the field
//-----------------------------------------------------------------------------
void EPA_Finish() {
void EPA_Finish(void) {
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
LEDsoff();
iso_type = 0;
@@ -501,7 +501,7 @@ void EPA_PACE_Replay(PacketCommandNG *c) {
// Set up a communication channel (Card Select, PPS)
// Returns 0 on success or a non-zero error code on failure
//-----------------------------------------------------------------------------
int EPA_Setup() {
int EPA_Setup(void) {
// first, look for type A cards
// power up the field
+2 -2
View File
@@ -23,12 +23,12 @@ typedef struct {
} pace_version_info_t;
// general functions
void EPA_Finish();
void EPA_Finish(void);
size_t EPA_Parse_CardAccess(uint8_t *data,
size_t length,
pace_version_info_t *pace_info);
int EPA_Read_CardAccess(uint8_t *buffer, size_t max_length);
int EPA_Setup();
int EPA_Setup(void);
// PACE related functions
int EPA_PACE_MSE_Set_AT(pace_version_info_t pace_version_info, uint8_t password);
+5 -5
View File
@@ -37,11 +37,11 @@ static uint8_t felica_select_card(felica_card_select_t *card);
static void TransmitFor18092_AsReader(uint8_t *frame, int len, uint32_t *timing, uint8_t power, uint8_t highspeed);
bool WaitForFelicaReply(uint16_t maxbytes);
void iso18092_set_timeout(uint32_t timeout) {
static void iso18092_set_timeout(uint32_t timeout) {
felica_timeout = timeout + (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER) / (16 * 8) + 2;
}
uint32_t iso18092_get_timeout(void) {
static uint32_t iso18092_get_timeout(void) {
return felica_timeout - (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER) / (16 * 8) - 2;
}
@@ -80,7 +80,7 @@ static struct {
# define SYNC_16BIT 0xB24D
#endif
static void FelicaFrameReset() {
static void FelicaFrameReset(void) {
FelicaFrame.state = STATE_UNSYNCD;
FelicaFrame.posCnt = 0;
FelicaFrame.crc_ok = false;
@@ -481,7 +481,7 @@ static void iso18092_setup(uint8_t fpga_minor_mode) {
LED_D_ON();
}
void felica_reset_frame_mode() {
static void felica_reset_frame_mode(void) {
switch_off();
//Resetting Frame mode (First set in fpgaloader.c)
AT91C_BASE_SSC->SSC_RFMR = SSC_FRAME_MODE_BITS_IN_WORD(8) | AT91C_SSC_MSBF | SSC_FRAME_MODE_WORDS_PER_TRANSFER(0);
@@ -738,7 +738,7 @@ void felica_sim_lite(uint64_t uid) {
#define RES_SVC_LEN 11 + 3
void felica_dump_lite_s() {
void felica_dump_lite_s(void) {
uint8_t ndef[8];
uint8_t poll[10] = { 0xb2, 0x4d, 0x06, FELICA_POLL_REQ, 0xff, 0xff, 0x00, 0x00, 0x09, 0x21};
uint16_t liteblks[28] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x90, 0x91, 0x92, 0xa0};

Some files were not shown because too many files have changed in this diff Show More