mirror of
https://github.com/LiEnby/eCDP-Serial-Code.git
synced 2025-04-18 22:18:51 +01:00
change from gets_s to fgets..
required a bit more effort than i thought it would, but hey it should work with GCC now ..
This commit is contained in:
parent
994c87e95f
commit
b72083dfe2
@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
char key[0xA8] = { 0x01,0x0A,0x16,0x04,0x07,0x18,0x0C,0x10,0x05,0x17,0x09,0x03,0x12,0x08,0x15,0x13,0x0B,0x02,0x0F,0x0D,0x11,0x0E,0x06,0x14,0x07,0x0C,0x0E,0x11,0x09,0x16,0x10,0x06,0x14,0x0D,0x01,0x02,0x12,0x08,0x13,0x0B,0x0F,0x0A,0x18,0x15,0x04,0x05,0x03,0x17,0x0F,0x04,0x09,0x03,0x06,0x07,0x11,0x12,0x15,0x16,0x02,0x08,0x05,0x17,0x0C,0x0D,0x01,0x18,0x0B,0x14,0x0E,0x10,0x13,0x0A,0x02,0x0A,0x0E,0x12,0x0B,0x03,0x0C,0x06,0x13,0x07,0x11,0x09,0x15,0x18,0x10,0x17,0x14,0x0F,0x04,0x01,0x05,0x08,0x16,0x0D,0x0B,0x02,0x09,0x16,0x14,0x01,0x12,0x11,0x15,0x06,0x0F,0x17,0x07,0x10,0x0C,0x0E,0x08,0x18,0x13,0x03,0x0A,0x0D,0x04,0x05,0x09,0x0F,0x05,0x0D,0x16,0x15,0x12,0x11,0x03,0x0A,0x04,0x10,0x0E,0x14,0x02,0x01,0x13,0x0C,0x06,0x0B,0x17,0x18,0x07,0x08,0x12,0x02,0x0C,0x09,0x0D,0x0E,0x04,0x07,0x16,0x14,0x17,0x01,0x11,0x03,0x10,0x15,0x08,0x0A,0x05,0x13,0x0B,0x18,0x0F,0x06 };
|
||||
char* hex_values = "0123456789ABCDEF";
|
||||
@ -159,6 +160,7 @@ void generate_password(unsigned short* input, char* output)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char maccas_id[64];
|
||||
@ -179,21 +181,35 @@ int main(int argc, char* argv[])
|
||||
|
||||
entry:
|
||||
|
||||
memset(mac_address, 0x00, 64);
|
||||
memset(maccas_id, 0x00, 64);
|
||||
memset(mannager_id, 0x00, 64);
|
||||
int len = 0;
|
||||
|
||||
printf("Enter your NDS's Mac Address (ALL uppercase, no seperators): ");
|
||||
gets_s(mac_address, 64);
|
||||
if (strlen(mac_address) != 12)
|
||||
fgets(mac_address, 64, stdin);
|
||||
|
||||
len = strlen(mac_address)-1;
|
||||
mac_address[len] = '\0'; // remove \n
|
||||
if (len != 12)
|
||||
goto entry;
|
||||
|
||||
|
||||
printf("Enter McDonalds Store Id (first 6 digit entry): ");
|
||||
gets_s(maccas_id,64);
|
||||
if (strlen(maccas_id) != 6)
|
||||
printf("Enter McDonalds 'Store Number' (first 6 digit entry): ");
|
||||
fgets(maccas_id, 64, stdin);
|
||||
|
||||
len = strlen(maccas_id)-1;
|
||||
maccas_id[len] = '\0';
|
||||
if (len != 6)
|
||||
goto entry;
|
||||
|
||||
|
||||
printf("Enter McDonalds Manager Id (second 6 digit entry): ");
|
||||
gets_s(mannager_id, 64);
|
||||
if (strlen(mannager_id) != 6)
|
||||
printf("Enter McDonalds 'Store Management Number of DS Card' (second 6 digit entry): ");
|
||||
fgets(mannager_id, 64, stdin);
|
||||
|
||||
len = strlen(mannager_id)-1;
|
||||
mannager_id[len] = '\0';
|
||||
if (len != 6)
|
||||
goto entry;
|
||||
|
||||
run:
|
||||
|
Loading…
x
Reference in New Issue
Block a user