From 2c29860db6cc535283156b931f96c3c5824e4555 Mon Sep 17 00:00:00 2001 From: Goppier <96147255+Goppier@users.noreply.github.com> Date: Thu, 6 Jan 2022 15:10:28 +0100 Subject: [PATCH] Create main.cpp --- main.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..5e0b41f --- /dev/null +++ b/main.cpp @@ -0,0 +1,48 @@ +/* + * main.cpp + * + * Created on: Dec 18, 2021 + * Author: Goppier + */ + +#include "./PasswordUtil.h" +#include + +void printAllEnglishKeys(uint8_t *U, wallpaper_params_t wallpaper); + +int main() +{ + wallpaper_params_t wallpaper; + uint8_t U[9] = { 0 }; + english_letter_t code[15] = { B }; + + wallpaper.pattern = 11; // Pikachu + wallpaper.icon = 1; // Heart + wallpaper.background_colour = 0xf850a1; // Red = 248; Green = 80; Blue = 160 + wallpaper.foreground_colour = 0xf850f8; // Red = 248; Green = 80; Blue = 248 + + wallpaper.trainer_id = 38381; + wallpaper.key = 0; + + + printAllEnglishKeys(U, wallpaper); + + while (1); +} + +void printAllEnglishKeys(uint8_t *U, wallpaper_params_t wallpaper) +{ + english_letter_t code[15] = { B }; + for (uint16_t x = 0; x <= 255; x++) + { + wallpaper.key = x; + prepareArray(U, wallpaper); + maskArray(U, wallpaper.key); + bitShiftRight(U, 7, wallpaper.key % 16); + bitShiftRight(U, 8, 21); + createEnglishCode(U, code); + //printBinaryEnglishCode(U, code); //For debugging + printf("Key %03d: ", wallpaper.key); + printSecretEnglishCode(code); + } +}