remove redundant function...
This commit is contained in:
parent
2107028bd3
commit
7ca4f660cc
|
@ -1,8 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <Windows.h>
|
||||
BYTE 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 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";
|
||||
char* password_chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||
unsigned short output_vals[6];
|
||||
|
@ -57,33 +56,6 @@ int the_crazy_math_part(unsigned int val1, unsigned int val2, int carry, int sta
|
|||
}
|
||||
|
||||
|
||||
char* find_pattern(char* enc, char* input)
|
||||
{
|
||||
int i;
|
||||
int ii;
|
||||
char* iii;
|
||||
|
||||
i = 0;
|
||||
if (!*enc)
|
||||
return 0;
|
||||
while (1)
|
||||
{
|
||||
ii = 0;
|
||||
iii = &enc[i];
|
||||
while (input[ii] && *iii == input[ii])
|
||||
{
|
||||
++iii;
|
||||
++ii;
|
||||
}
|
||||
if (!input[ii])
|
||||
break;
|
||||
if (!enc[++i])
|
||||
return 0;
|
||||
}
|
||||
return &enc[i];
|
||||
}
|
||||
|
||||
|
||||
int find_multiplier(char* system_in)
|
||||
{
|
||||
int total_iterations = 0;
|
||||
|
@ -99,7 +71,7 @@ int find_multiplier(char* system_in)
|
|||
memset(characters, 0, 2);
|
||||
characters[0] = c;
|
||||
|
||||
char* a2b = find_pattern(hex_values_ptr, characters);
|
||||
char* a2b = strstr(hex_values_ptr, characters);
|
||||
next_var = a2b - (uintptr_t)hex_values_ptr;
|
||||
if (!a2b)
|
||||
next_var = 0;
|
||||
|
@ -146,8 +118,8 @@ int find_multiplier(char* system_in)
|
|||
|
||||
unsigned int hex_to_bytes(char* input, int iterator)
|
||||
{
|
||||
byte* iteration;
|
||||
byte* final_char;
|
||||
char* iteration;
|
||||
char* final_char;
|
||||
int result;
|
||||
int i;
|
||||
char* current_char;
|
||||
|
@ -161,8 +133,8 @@ unsigned int hex_to_bytes(char* input, int iterator)
|
|||
memset(curChar, 0x00, 2);
|
||||
curChar[0] = current_char[0];
|
||||
|
||||
iteration = find_pattern(enc, curChar);
|
||||
final_char = iteration + -(int)enc;
|
||||
iteration = strstr(enc, curChar);
|
||||
final_char = iteration + -(intptr_t)enc;
|
||||
if (iteration == (char*)0x0) {
|
||||
final_char = (char*)0x0;
|
||||
}
|
||||
|
@ -204,7 +176,7 @@ int main()
|
|||
printf("-- A backdoor on the worlds rarest DS game.\n");
|
||||
entry:
|
||||
|
||||
printf("Enter your NDS's Mac Address (without any seperators): ");
|
||||
printf("Enter your NDS's Mac Address (ALL uppercase, no seperators): ");
|
||||
gets_s(mac_address, 64);
|
||||
if (strlen(mac_address) != 12)
|
||||
goto entry;
|
||||
|
|
Loading…
Reference in New Issue
Block a user