From 089bf96c229d71dd08b3c7cc792357ed0a08991e Mon Sep 17 00:00:00 2001 From: VCoding Date: Mon, 17 May 2021 01:02:28 +0200 Subject: [PATCH 01/68] First version of uGecko. --- README.md | 22 +- codehandler/Makefile | 62 ----- codehandler/codehandler310.ld | 35 --- codehandler/codehandler400.ld | 36 --- codehandler/codehandler410.ld | 35 --- codehandler/codehandler500.ld | 35 --- codehandler/codehandler532.ld | 35 --- codehandler/codehandler550.ld | 35 --- codehandler/main.c | 448 --------------------------------- codehandler/main.h | 98 -------- colors.py | 25 -- common.py | 53 ---- examples/getWiiuVersion.py | 22 ++ examples/launchCustomGame.py | 26 ++ examples/launchWiiuMenu.py | 20 ++ examples/pauseConsole.py | 24 ++ examples/readKern.py | 20 ++ installer/Makefile | 57 ----- installer/src/asm.s | 11 - installer/src/codehandler310.h | 275 -------------------- installer/src/codehandler400.h | 275 -------------------- installer/src/codehandler410.h | 275 -------------------- installer/src/codehandler500.h | 275 -------------------- installer/src/codehandler532.h | 275 -------------------- installer/src/codehandler550.h | 275 -------------------- installer/src/link.ld | 14 -- installer/src/loader.c | 305 ---------------------- installer/src/loader.h | 97 ------- kern.py | 7 - octoling.py | 139 ---------- purge.py | 6 - syshax.py | 19 -- tcpgecko.py | 353 -------------------------- uGecko.py | 282 +++++++++++++++++++++ 34 files changed, 401 insertions(+), 3570 deletions(-) delete mode 100644 codehandler/Makefile delete mode 100644 codehandler/codehandler310.ld delete mode 100644 codehandler/codehandler400.ld delete mode 100644 codehandler/codehandler410.ld delete mode 100644 codehandler/codehandler500.ld delete mode 100644 codehandler/codehandler532.ld delete mode 100644 codehandler/codehandler550.ld delete mode 100644 codehandler/main.c delete mode 100644 codehandler/main.h delete mode 100644 colors.py delete mode 100644 common.py create mode 100644 examples/getWiiuVersion.py create mode 100644 examples/launchCustomGame.py create mode 100644 examples/launchWiiuMenu.py create mode 100644 examples/pauseConsole.py create mode 100644 examples/readKern.py delete mode 100644 installer/Makefile delete mode 100644 installer/src/asm.s delete mode 100644 installer/src/codehandler310.h delete mode 100644 installer/src/codehandler400.h delete mode 100644 installer/src/codehandler410.h delete mode 100644 installer/src/codehandler500.h delete mode 100644 installer/src/codehandler532.h delete mode 100644 installer/src/codehandler550.h delete mode 100644 installer/src/link.ld delete mode 100644 installer/src/loader.c delete mode 100644 installer/src/loader.h delete mode 100644 kern.py delete mode 100644 octoling.py delete mode 100644 purge.py delete mode 100644 syshax.py delete mode 100644 tcpgecko.py create mode 100644 uGecko.py diff --git a/README.md b/README.md index 4dcec7e..1787743 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,11 @@ - -# pyGecko +# uGecko Python library for use with TCPGecko. Requires kernel exploit to use. -**Files:** - -tcpgecko.py is the actual library, can use just it in IDLE (only tested on python 2) - -octoling.py is a sample script to use it, to swap Inkling model with Octolings in Splatoon and edit money. - -common.py is another library to make things easier to work with. - -codehandler is in /codehandler, just run make - -**Credits:** +All the library is contained in the file named uGecko.py (WARNING: Only tested on Python 3.8). You can find examples in the folder `examples`. -Python library: NWPlayer123 +# Credits -TCPGecko codehandler: Chadderz, Marionumber1 +**NWPlayer123, wj44, and wiiudev** for `pyGecko` +**Chadderz and Marionumber1** for `TCPGecko codehandler` +**BullyWiiPlaza** for the current version of `TCPGecko` +**VCoding** for this modified version of `pyGecko`, specially designed for the `TCPGecko version` of **BullyWiiPlaza**. diff --git a/codehandler/Makefile b/codehandler/Makefile deleted file mode 100644 index 768872c..0000000 --- a/codehandler/Makefile +++ /dev/null @@ -1,62 +0,0 @@ - -PATH := $(DEVKITPPC)/bin:$(PATH) - -PREFIX ?= powerpc-eabi- -LD := $(PREFIX)ld -AS := $(PREFIX)as -CC := $(PREFIX)gcc -OBJDUMP ?= $(PREFIX)objdump -OBJCOPY ?= $(PREFIX)objcopy - -SFLAGS := -mgekko -mregnames - -# -O2: optimise lots -# -Wall: generate lots of warnings -# -x c: compile as C code -# -std=gnu99: use the C99 standard with GNU extensions -# -ffreestanding: we don't have libc; don't expect we do -# -mrvl: enable wii/gamecube compilation -# -mcpu=750: enable processor specific compilation -# -meabi: enable eabi specific compilation -# -mhard-float: enable hardware floating point instructions -# -fshort-wchar: use 16 bit whcar_t type in keeping with Wii executables -# -msdata-none: do not use r2 or r13 as small data areas -# -memb: enable embedded application specific compilation -# -ffunction-sections: split up functions so linker can garbage collect -# -fdata-sections: split up data so linker can garbage collect -CFLAGS := -O2 -Wall -x c -std=gnu99 \ - -ffreestanding \ - -mrvl -mcpu=750 -meabi -mhard-float -fshort-wchar \ - -msdata=none -memb -ffunction-sections -fdata-sections \ - -Wno-unknown-pragmas -Wno-strict-aliasing - -SRC := $(wildcard *.S) $(wildcard *.c) -OBJ := $(patsubst %.S,build/%.o,$(patsubst %.c,build/%.o,$(SRC))) - -# Simulate an order only dependency -BUILD_REQ := $(filter-out $(wildcard build),build) -BIN_REQ := $(filter-out $(wildcard bin),bin) - -all: bin/codehandler310.h bin/codehandler400.h bin/codehandler410.h bin/codehandler500.h bin/codehandler532.h bin/codehandler550.h - -bin/codehandler%.h: build/codehandler%.text.bin $(BIN_REQ) - xxd -i $< | sed "s/unsigned/static const unsigned/g;s/ler$*/ler/g;s/build_//g" > $@ - -build/codehandler%.text.bin: build/codehandler%.elf $(BUILD_REQ) - $(OBJCOPY) -j .text -O binary $< $@ - -build/codehandler%.elf: codehandler%.ld $(OBJ) $(BUILD_REQ) - $(LD) -T $< $(OBJ) - -build/%.o: %.c $(BUILD_REQ) - $(CC) -c $(CFLAGS) -o $@ $< -build/%.o: %.S $(BUILD_REQ) - $(AS) $(SFLAGS) -o $@ $< - -bin: - mkdir $@ -build: - mkdir $@ - -clean: - rm -rf $(wildcard build) $(wildcard bin) diff --git a/codehandler/codehandler310.ld b/codehandler/codehandler310.ld deleted file mode 100644 index 9eb3262..0000000 --- a/codehandler/codehandler310.ld +++ /dev/null @@ -1,35 +0,0 @@ -OUTPUT(build/codehandler310.elf); - -SECTIONS { - .text 0x011D3000 : { - *(.text._start); - *(.text*); - } - /DISCARD/ : { - *(*); - } -} - -PROVIDE(ver = 310); - -PROVIDE(DCFlushRange = 0x0101DA3C); -PROVIDE(memset = 0x0102B5B0); -PROVIDE(memcpy = 0x0102B5C4); -PROVIDE(__gh_errno_ptr = 0x010349DC); -PROVIDE(OSCreateThread = 0x010358B8); -PROVIDE(OSResumeThread = 0x01035D88); -PROVIDE(socket_lib_init = 0x010A7EE0); -PROVIDE(accept = 0x010A80D0); -PROVIDE(bind = 0x010A8250); -PROVIDE(listen = 0x010A8550); -PROVIDE(recv = 0x010A8670); -PROVIDE(send = 0x010A8B98); -PROVIDE(socket = 0x010A93EC); -PROVIDE(socketclose = 0x010A9534); -PROVIDE(GX2WaitForVsync = 0x01142148); -PROVIDE(entry_point = 0x1005BBC0); -PROVIDE(MEMAllocFromDefaultHeapEx = 0x100479AC); -PROVIDE(MEMAllocFromDefaultHeap = 0x100A88A0); -PROVIDE(MEMFreeToDefaultHeap = 0x100A88A4); -PROVIDE(OSDynLoad_FindExport = 0x01023D88); -PROVIDE(OSDynLoad_Acquire = 0x01022CBC); diff --git a/codehandler/codehandler400.ld b/codehandler/codehandler400.ld deleted file mode 100644 index 167d814..0000000 --- a/codehandler/codehandler400.ld +++ /dev/null @@ -1,36 +0,0 @@ -OUTPUT(build/codehandler400.elf); - -SECTIONS { - .text 0x011DD000 : { - *(.text._start); - *(.text*); - } - /DISCARD/ : { - *(*); - } -} - -PROVIDE(ver = 400); - -PROVIDE(DCFlushRange = 0x01020EAC); -PROVIDE(memset = 0x01030E84); -PROVIDE(memcpy = 0x01030E98); -PROVIDE(__gh_errno_ptr = 0x0103A434); -PROVIDE(OSCreateThread = 0x0103B5D0); -PROVIDE(OSResumeThread = 0x0103BAB4); -PROVIDE(socket_lib_init = 0x010B44D4); -PROVIDE(accept = 0x010B4720); -PROVIDE(bind = 0x010B48A0); -PROVIDE(listen = 0x010B4BA0); -PROVIDE(connect = 0x010B49FC); -PROVIDE(recv = 0x010B4CC0); -PROVIDE(send = 0x010B5528); -PROVIDE(socket = 0x010B5DA0); -PROVIDE(socketclose = 0x010B5EEC); -PROVIDE(GX2WaitForVsync = 0x011454BC); -PROVIDE(entry_point = 0x1005A600); -PROVIDE(MEMAllocFromDefaultHeapEx = 0x10049C1C); -PROVIDE(MEMAllocFromDefaultHeap = 0x100AD928); -PROVIDE(MEMFreeToDefaultHeap = 0x100AD92C); -PROVIDE(OSDynLoad_FindExport = 0x01028460); -PROVIDE(OSDynLoad_Acquire = 0x01026E60); diff --git a/codehandler/codehandler410.ld b/codehandler/codehandler410.ld deleted file mode 100644 index aca52be..0000000 --- a/codehandler/codehandler410.ld +++ /dev/null @@ -1,35 +0,0 @@ -OUTPUT(build/codehandler410.elf); - -SECTIONS { - .text 0x011D9800 : { - *(.text._start); - *(.text*); - } - /DISCARD/ : { - *(*); - } -} - -PROVIDE(ver = 410); - -PROVIDE(DCFlushRange = 0x01020EAC); -PROVIDE(memset = 0x01030ED0); -PROVIDE(memcpy = 0x01030EE4); -PROVIDE(__gh_errno_ptr = 0x0103A96C); -PROVIDE(OSCreateThread = 0x0103BB08); -PROVIDE(OSResumeThread = 0x0103BFEC); -PROVIDE(socket_lib_init = 0x010B44D4); -PROVIDE(accept = 0x010B4720); -PROVIDE(bind = 0x010B48A0); -PROVIDE(listen = 0x010B4BA0); -PROVIDE(recv = 0x010B4CC0); -PROVIDE(send = 0x010B5528); -PROVIDE(socket = 0x010B5DA0); -PROVIDE(socketclose = 0x010B5EEC); -PROVIDE(GX2WaitForVsync = 0x011454BC); -PROVIDE(entry_point = 0x1005A8C0); -PROVIDE(MEMAllocFromDefaultHeapEx = 0x10049EDC); -PROVIDE(MEMAllocFromDefaultHeap = 0x100ADC28); -PROVIDE(MEMFreeToDefaultHeap = 0x100ADC2C); -PROVIDE(OSDynLoad_FindExport = 0x01028460); -PROVIDE(OSDynLoad_Acquire = 0x01026E60); diff --git a/codehandler/codehandler500.ld b/codehandler/codehandler500.ld deleted file mode 100644 index 47418b5..0000000 --- a/codehandler/codehandler500.ld +++ /dev/null @@ -1,35 +0,0 @@ -OUTPUT(build/codehandler500.elf); - -SECTIONS { - .text 0x011DBC00 : { - *(.text._start); - *(.text*); - } - /DISCARD/ : { - *(*); - } -} - -PROVIDE(ver = 500); - -PROVIDE(DCFlushRange = 0x01023A00); -PROVIDE(memset = 0x0103544C); -PROVIDE(memcpy = 0x01035460); -PROVIDE(__gh_errno_ptr = 0x0103F2CC); -PROVIDE(OSCreateThread = 0x01040480); -PROVIDE(OSResumeThread = 0x01040968); -PROVIDE(socket_lib_init = 0x010BF2F4); -PROVIDE(accept = 0x010BF54C); -PROVIDE(bind = 0x010BF6CC); -PROVIDE(listen = 0x010BF9CC); -PROVIDE(recv = 0x010BFAEC); -PROVIDE(send = 0x010C06AC); -PROVIDE(socket = 0x010C11C8); -PROVIDE(socketclose = 0x010C1314); -PROVIDE(GX2WaitForVsync = 0x01150868); -PROVIDE(entry_point = 0x1005CB00); -PROVIDE(MEMAllocFromDefaultHeapEx = 0x1004E2D0); -PROVIDE(MEMAllocFromDefaultHeap = 0x100B41F8); -PROVIDE(MEMFreeToDefaultHeap = 0x100B41FC); -PROVIDE(OSDynLoad_FindExport = 0x0102B3E4); -PROVIDE(OSDynLoad_Acquire = 0x01029CD8); diff --git a/codehandler/codehandler532.ld b/codehandler/codehandler532.ld deleted file mode 100644 index 66503e4..0000000 --- a/codehandler/codehandler532.ld +++ /dev/null @@ -1,35 +0,0 @@ -OUTPUT(build/codehandler532.elf); - -SECTIONS { - .text 0x011DD000 : { - *(.text._start); - *(.text*); - } - /DISCARD/ : { - *(*); - } -} - -PROVIDE(ver = 532); - -PROVIDE(DCFlushRange = 0x01023EE8); -PROVIDE(memset = 0x01035A54); -PROVIDE(memcpy = 0x01035A68); -PROVIDE(__gh_errno_ptr = 0x01040308); -PROVIDE(OSCreateThread = 0x010414C8); -PROVIDE(OSResumeThread = 0x010419B0); -PROVIDE(socket_lib_init = 0x010C02F4); -PROVIDE(accept = 0x010C054C); -PROVIDE(bind = 0x010C06CC); -PROVIDE(listen = 0x010C09CC); -PROVIDE(recv = 0x010C0AEC); -PROVIDE(send = 0x010C16AC); -PROVIDE(socket = 0x010C21C8); -PROVIDE(socketclose = 0x010C2314); -PROVIDE(GX2WaitForVsync = 0x01151964); -PROVIDE(entry_point = 0x1005D180); -PROVIDE(MEMAllocFromDefaultHeapEx = 0x1004E9C0); -PROVIDE(MEMAllocFromDefaultHeap = 0x100B4878); -PROVIDE(MEMFreeToDefaultHeap = 0x100B487C); -PROVIDE(OSDynLoad_FindExport = 0x0102B790); -PROVIDE(OSDynLoad_Acquire = 0x0102A31C); diff --git a/codehandler/codehandler550.ld b/codehandler/codehandler550.ld deleted file mode 100644 index 97a4094..0000000 --- a/codehandler/codehandler550.ld +++ /dev/null @@ -1,35 +0,0 @@ -OUTPUT(build/codehandler550.elf); - -SECTIONS { - .text 0x011DD000 : { - *(.text._start); - *(.text*); - } - /DISCARD/ : { - *(*); - } -} - -PROVIDE(ver = 550); - -PROVIDE(DCFlushRange = 0x01023F88); -PROVIDE(memset = 0x01035FB4); -PROVIDE(memcpy = 0x01035FC8); -PROVIDE(__gh_errno_ptr = 0x01040900); -PROVIDE(OSCreateThread = 0x01041B64); -PROVIDE(OSResumeThread = 0x01042108); -PROVIDE(socket_lib_init = 0x010C02F4); -PROVIDE(accept = 0x010C054C); -PROVIDE(bind = 0x010C06CC); -PROVIDE(listen = 0x010C09CC); -PROVIDE(recv = 0x010C0AEC); -PROVIDE(send = 0x010C16AC); -PROVIDE(socket = 0x010C21C8); -PROVIDE(socketclose = 0x010C2314); -PROVIDE(GX2WaitForVsync = 0x01151964); -PROVIDE(entry_point = 0x1005E040); -PROVIDE(MEMAllocFromDefaultHeapEx = 0x1004F870); -PROVIDE(MEMAllocFromDefaultHeap = 0x100B5738); -PROVIDE(MEMFreeToDefaultHeap = 0x100B573C); -PROVIDE(OSDynLoad_FindExport = 0x0102B828); -PROVIDE(OSDynLoad_Acquire = 0x0102A3B4); diff --git a/codehandler/main.c b/codehandler/main.c deleted file mode 100644 index 2550296..0000000 --- a/codehandler/main.c +++ /dev/null @@ -1,448 +0,0 @@ -#include "main.h" - -static void start(int argc, void *argv); -static int rungecko(struct bss_t *bss, int clientfd); -static int recvwait(struct bss_t *bss, int sock, void *buffer, int len); -static int recvbyte(struct bss_t *bss, int sock); -static int checkbyte(struct bss_t *bss, int sock); -static int sendwait(struct bss_t *bss, int sock, const void *buffer, int len); -static int sendbyte(struct bss_t *bss, int sock, unsigned char byte); -static void *kern_read(const void *addr); -static void kern_write(void *addr, void *value); - -int _start(int argc, char *argv[]) { - struct bss_t *bss; - - bss = memalign(sizeof(struct bss_t), 0x40); - if (bss == 0) - goto error; - memset(bss, 0, sizeof(struct bss_t)); - OSCreateThread( - &bss->thread, - start, - 0, - bss, - bss->stack + sizeof(bss->stack), - sizeof(bss->stack), - 0, - 0xc - ); - OSResumeThread(&bss->thread); - -error: - return main(argc, argv); -} - -#define CHECK_ERROR(cond) if (cond) { bss->line = __LINE__; goto error; } - -static void start(int argc, void *argv) { - int sockfd = -1, clientfd = -1, ret, len; - struct sockaddr_in addr; - struct bss_t *bss = argv; - - socket_lib_init(); - - while (1) { - addr.sin_family = AF_INET; - addr.sin_port = 7331; - addr.sin_addr.s_addr = 0; - - sockfd = ret = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - CHECK_ERROR(ret == -1); - ret = bind(sockfd, (void *)&addr, 16); - CHECK_ERROR(ret < 0); - ret = listen(sockfd, 1); - CHECK_ERROR(ret < 0); - len = 16; - clientfd = ret = accept(sockfd, (void *)&addr, &len); - CHECK_ERROR(ret == -1); - socketclose(sockfd); - sockfd = -1; - ret = rungecko(bss, clientfd); - CHECK_ERROR(ret < 0); - socketclose(clientfd); - clientfd = -1; - - continue; -error: - if (clientfd != -1) - socketclose(clientfd); - if (sockfd != -1) - socketclose(sockfd); - bss->error = ret; - } -} - -static int rungecko(struct bss_t *bss, int clientfd) { - int ret; - unsigned char buffer[0x401]; - - while (1) { - ret = checkbyte(bss, clientfd); - - if (ret < 0) { - CHECK_ERROR(errno != EWOULDBLOCK); - GX2WaitForVsync(); - continue; - } - - switch (ret) { - case 0x01: { /* cmd_poke08 */ - char *ptr; - ret = recvwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - - ptr = ((char **)buffer)[0]; - *ptr = buffer[7]; - DCFlushRange(ptr, 1); - break; - } - case 0x02: { /* cmd_poke16 */ - short *ptr; - ret = recvwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - - ptr = ((short **)buffer)[0]; - *ptr = ((short *)buffer)[3]; - DCFlushRange(ptr, 2); - break; - } - case 0x03: { /* cmd_pokemem */ - int *ptr; - ret = recvwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - - ptr = ((int **)buffer)[0]; - *ptr = ((int *)buffer)[1]; - DCFlushRange(ptr, 4); - break; - } - case 0x04: { /* cmd_readmem */ - const unsigned char *ptr, *end; - ret = recvwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - ptr = ((const unsigned char **)buffer)[0]; - end = ((const unsigned char **)buffer)[1]; - - while (ptr != end) { - int len, i; - - len = end - ptr; - if (len > 0x400) - len = 0x400; - for (i = 0; i < len; i++) - if (ptr[i] != 0) break; - - if (i == len) { // all zero! - ret = sendbyte(bss, clientfd, 0xb0); - CHECK_ERROR(ret < 0); - } else { - memcpy(buffer + 1, ptr, len); - buffer[0] = 0xbd; - ret = sendwait(bss, clientfd, buffer, len + 1); - CHECK_ERROR(ret < 0); - } - - ret = checkbyte(bss, clientfd); - if (ret == 0xcc) /* GCFAIL */ - goto next_cmd; - ptr += len; - } - break; - } - case 0x0b: { /* cmd_writekern */ - void *ptr, * value; - ret = recvwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - - ptr = ((void **)buffer)[0]; - value = ((void **)buffer)[1]; - - kern_write(ptr, value); - break; - } - case 0x0c: { /* cmd_readkern */ - void *ptr, *value; - ret = recvwait(bss, clientfd, buffer, 4); - CHECK_ERROR(ret < 0); - - ptr = ((void **)buffer)[0]; - - value = kern_read(ptr); - - *(void **)buffer = value; - sendwait(bss, clientfd, buffer, 4); - break; - } - case 0x41: { /* cmd_upload */ - unsigned char *ptr, *end, *dst; - ret = recvwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - ptr = ((unsigned char **)buffer)[0]; - end = ((unsigned char **)buffer)[1]; - - while (ptr != end) { - int len; - - len = end - ptr; - if (len > 0x400) - len = 0x400; - if ((int)ptr >= 0x10000000 && (int)ptr <= 0x50000000) { - dst = ptr; - } else { - dst = buffer; - } - ret = recvwait(bss, clientfd, dst, len); - CHECK_ERROR(ret < 0); - if (dst == buffer) { - memcpy(ptr, buffer, len); - } - - ptr += len; - } - - sendbyte(bss, clientfd, 0xaa); /* GCACK */ - break; - } - case 0x50: { /* cmd_status */ - ret = sendbyte(bss, clientfd, 1); /* running */ - CHECK_ERROR(ret < 0); - break; - } - case 0x70: { /* cmd_rpc */ - long long (*fun)(int, int, int, int, int, int, int, int); - int r3, r4, r5, r6, r7, r8, r9, r10; - long long result; - - ret = recvwait(bss, clientfd, buffer, 4 + 8 * 4); - CHECK_ERROR(ret < 0); - - fun = ((void **)buffer)[0]; - r3 = ((int *)buffer)[1]; - r4 = ((int *)buffer)[2]; - r5 = ((int *)buffer)[3]; - r6 = ((int *)buffer)[4]; - r7 = ((int *)buffer)[5]; - r8 = ((int *)buffer)[6]; - r9 = ((int *)buffer)[7]; - r10 = ((int *)buffer)[8]; - - result = fun(r3, r4, r5, r6, r7, r8, r9, r10); - - ((long long *)buffer)[0] = result; - ret = sendwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - break; - } - case 0x71: { /* cmd_getsymbol */ - char size = recvbyte(bss, clientfd); - CHECK_ERROR(size < 0); - ret = recvwait(bss, clientfd, buffer, size); - CHECK_ERROR(ret < 0); - - /* Identify the RPL name and symbol name */ - char *rplname = (char*) &((int*)buffer)[2]; - char *symname = (char*) (&buffer[0] + ((int*)buffer)[1]); - - /* Get the symbol and store it in the buffer */ - unsigned int module_handle, function_address; - OSDynLoad_Acquire(rplname, &module_handle); - - char data = recvbyte(bss, clientfd); - OSDynLoad_FindExport(module_handle, data, symname, &function_address); - - ((int*)buffer)[0] = (int)function_address; - ret = sendwait(bss, clientfd, buffer, 4); - CHECK_ERROR(ret < 0); - break; - } - case 0x72: { /* cmd_search32 */ - ret = recvwait(bss, clientfd, buffer, 12); - CHECK_ERROR(ret < 0); - int addr = ((int *) buffer)[0]; - int val = ((int *) buffer)[1]; - int size = ((int *) buffer)[2]; - int i; - int resaddr = 0; - for(i = addr; i < (addr+size); i+=4) - { - if(*(int*)i == val) - { - resaddr = i; - break; - } - } - ((int *)buffer)[0] = resaddr; - ret = sendwait(bss, clientfd, buffer, 4); - CHECK_ERROR(ret < 0); - break; - } - case 0x80: { /* cmd_rpc_big */ - long long (*fun)(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); - int r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18; - long long result; - - ret = recvwait(bss, clientfd, buffer, 4 + 16 * 4); - CHECK_ERROR(ret < 0); - - fun = ((void **)buffer)[0]; - r3 = ((int *)buffer)[1]; - r4 = ((int *)buffer)[2]; - r5 = ((int *)buffer)[3]; - r6 = ((int *)buffer)[4]; - r7 = ((int *)buffer)[5]; - r8 = ((int *)buffer)[6]; - r9 = ((int *)buffer)[7]; - r10 = ((int *)buffer)[8]; - r11 = ((int *)buffer)[9]; - r12 = ((int *)buffer)[10]; - r13 = ((int *)buffer)[11]; - r14 = ((int *)buffer)[12]; - r15 = ((int *)buffer)[13]; - r16 = ((int *)buffer)[14]; - r17 = ((int *)buffer)[15]; - r18 = ((int *)buffer)[16]; - - result = fun(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18); - - ((long long *)buffer)[0] = result; - ret = sendwait(bss, clientfd, buffer, 8); - CHECK_ERROR(ret < 0); - break; - } - case 0x99: { /* cmd_version */ - ret = sendbyte(bss, clientfd, 0x82); /* WiiU */ - CHECK_ERROR(ret < 0); - break; - } - case 0x9A: { /* cmd_os_version */ - /* Little bit of a hack here, the linker script will define the - * symbol ver to have address of the version number! */ - extern char ver[]; - ((int *)buffer)[0] = (int)ver; - ret = sendwait(bss, clientfd, buffer, 4); - CHECK_ERROR(ret < 0); - break; - } - case 0xcc: { /* GCFAIL */ - break; - } - default: - ret = -1; - CHECK_ERROR(0); - break; - } -next_cmd: - continue; - } - return 0; -error: - bss->error = ret; - return 0; -} - -static int recvwait(struct bss_t *bss, int sock, void *buffer, int len) { - int ret; - while (len > 0) { - ret = recv(sock, buffer, len, 0); - CHECK_ERROR(ret < 0); - len -= ret; - buffer += ret; - } - return 0; -error: - bss->error = ret; - return ret; -} - -static int recvbyte(struct bss_t *bss, int sock) { - unsigned char buffer[1]; - int ret; - - ret = recvwait(bss, sock, buffer, 1); - if (ret < 0) return ret; - return buffer[0]; -} - -static int checkbyte(struct bss_t *bss, int sock) { - unsigned char buffer[1]; - int ret; - - ret = recv(sock, buffer, 1, MSG_DONTWAIT); - if (ret < 0) return ret; - if (ret == 0) return -1; - return buffer[0]; -} - -static int sendwait(struct bss_t *bss, int sock, const void *buffer, int len) { - int ret; - while (len > 0) { - ret = send(sock, buffer, len, 0); - CHECK_ERROR(ret < 0); - len -= ret; - buffer += ret; - } - return 0; -error: - bss->error = ret; - return ret; -} - -static int sendbyte(struct bss_t *bss, int sock, unsigned char byte) { - unsigned char buffer[1]; - - buffer[0] = byte; - return sendwait(bss, sock, buffer, 1); -} - -/* Naughty syscall which we installed to allow arbitrary kernel mode reading. - * This syscall actually branches part way into __OSReadRegister32Ex after the - * address validation has already occurred. */ -static void *kern_read(const void *addr) { - void *result; - asm( - "li 3,1\n" - "li 4,0\n" - "li 5,0\n" - "li 6,0\n" - "li 7,0\n" - "lis 8,1\n" - "mr 9,%1\n" - "li 0,0x3400\n" - "mr %0,1\n" - "sc\n" - "nop\n" /* sometimes on return it skips an instruction */ - "mr 1,%0\n" - "mr %0,3\n" - : "=r"(result) - : "b"(addr) - : "memory", "ctr", "lr", "0", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12" - ); - - return result; -} - -/* Naughty syscall which we installed to allow arbitrary kernel mode writing. - * This syscall actually branches part way into __OSWriteRegister32Ex after the - * address validation has already occurred. */ -static void kern_write(void *addr, void *value) { - asm( - "li 3,1\n" - "li 4,0\n" - "mr 5,%1\n" - "li 6,0\n" - "li 7,0\n" - "lis 8,1\n" - "mr 9,%0\n" - "mr %1,1\n" - "li 0,0x3500\n" - "sc\n" - "nop\n" /* sometimes on return it skips an instruction */ - "mr 1,%1\n" - : - : "r"(addr), "r"(value) - : "memory", "ctr", "lr", "0", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12" - ); -} diff --git a/codehandler/main.h b/codehandler/main.h deleted file mode 100644 index ae6f5c9..0000000 --- a/codehandler/main.h +++ /dev/null @@ -1,98 +0,0 @@ -/* string.h */ -#define NULL ((void *)0) - -extern void *memcpy(void *dst, const void *src, int bytes); -extern void *memset(void *dst, int val, int bytes); - -/* errno.h */ -extern int *__gh_errno_ptr(void); -#define errno (*__gh_errno_ptr()) - -#define EWOULDBLOCK 6 - -/* malloc.h */ -extern void *(* const MEMAllocFromDefaultHeapEx)(int size, int align); -extern void *(* const MEMAllocFromDefaultHeap)(int size); -extern void *(* const MEMFreeToDefaultHeap)(void *ptr); - -#define memalign (*MEMAllocFromDefaultHeapEx) -#define malloc (*MEMAllocFromDefaultHeap) -#define free (*MEMFreeToDefaultHeap) - -/* socket.h */ -#define AF_INET 2 -#define SOCK_STREAM 1 -#define IPPROTO_TCP 6 - -#define MSG_DONTWAIT 32 - -extern void socket_lib_init(); -extern int socket(int domain, int type, int protocol); -extern int socketclose(int socket); -extern int connect(int socket, void *addr, int addrlen); -extern int send(int socket, const void *buffer, int size, int flags); -extern int recv(int socket, void *buffer, int size, int flags); - -struct in_addr { - unsigned int s_addr; -}; -struct sockaddr_in { - short sin_family; - unsigned short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -extern int bind(int socket, void *addr, int size); -extern int listen(int socket, int backlog); -extern int accept(int socket, void *addr, int *size); - -/* coreinit.rpl */ -#include -#include -#include - -typedef struct { - char tag[8]; /* 0x000 "OSContxt" */ - int32_t gpr[32]; /* 0x008 from OSDumpContext */ - uint32_t cr; /* 0x088 from OSDumpContext */ - uint32_t lr; /* 0x08c from OSDumpContext */ - uint32_t ctr; /* 0x090 from context switch code */ - uint32_t xer; /* 0x094 from context switch code */ - uint32_t srr0; /* 0x098 from OSDumpContext */ - uint32_t srr1; /* 0x09c from OSDumpContext */ - char _unknowna0[0xb8 - 0xa0]; - uint64_t fpr[32]; /* 0x0b8 from OSDumpContext */ - int16_t spinLockCount; /* 0x1b8 from OSDumpContext */ - char _unknown1ba[0x1bc - 0x1ba]; /* 0x1ba could genuinely be padding? */ - uint32_t gqr[8]; /* 0x1bc from OSDumpContext */ - char _unknown1dc[0x1e0 - 0x1dc]; - uint64_t psf[32]; /* 0x1e0 from OSDumpContext */ - int64_t coretime[3]; /* 0x2e0 from OSDumpContext */ - int64_t starttime; /* 0x2f8 from OSDumpContext */ - int32_t error; /* 0x300 from OSDumpContext */ - char _unknown304[0x6a0 - 0x304]; -} OSThread; /* 0x6a0 total length from RAM dumps */ - -extern bool OSCreateThread(OSThread *thread, void (*entry)(int,void*), int argc, void *args, void *stack, size_t stack_size, int32_t priority, int16_t affinity); -extern void OSResumeThread(OSThread *thread); - -extern void DCFlushRange(const void *addr, size_t length); - -extern int OSDynLoad_Acquire(char* rpl, unsigned int *handle); -extern int OSDynLoad_FindExport(unsigned int handle, int isdata, char *symbol, void *address); - -/* gx */ -extern void GX2WaitForVsync(void); - -/* main */ -extern int (* const entry_point)(int argc, char *argv[]); - -#define main (*entry_point) - -/* BSS section */ -struct bss_t { - int error, line; - OSThread thread; - char stack[0x8000]; -}; \ No newline at end of file diff --git a/colors.py b/colors.py deleted file mode 100644 index b6dfede..0000000 --- a/colors.py +++ /dev/null @@ -1,25 +0,0 @@ -#You're probably better off using the GUI version, but... -#https://gbatemp.net/threads/splatoon-colorizer.406463/ - -from tcpgecko import TCPGecko -from textwrap import wrap -from struct import pack -from binascii import unhexlify -import sys - - -#!!! WARNING: ColorHax has been known to get permanent bans for users !!! -#!!! USE AT YOUR OWN RISK !!! -tcp = TCPGecko("192.168.0.10") #Wii U IP address -Colors = b"" -for i in range(1, 4): #Ignores Alpha since it doesn't use it - Color = wrap(sys.argv[i], 2) #Split it into 2 character chunks - for j in range(3): #Create the RGB floats - Colors += pack(">f", ord(unhexlify(Color[j])) / 256) - Colors += pack(">f", 1.0) #Alpha -tcp.writestr(0x12D53178, Colors) #Only overwrites currently loaded color - #Run a command right after the lobby is "ready" -tcp.s.close() -print("Done!") -#!!! WARNING: ColorHax has been known to get permanent bans for users !!! -#!!! USE AT YOUR OWN RISK !!! diff --git a/common.py b/common.py deleted file mode 100644 index a747fdd..0000000 --- a/common.py +++ /dev/null @@ -1,53 +0,0 @@ -import struct - -class switch(object): #Taken from http://code.activestate.com/recipes/410692/ - def __init__(self, value): - self.value = value - self.fall = False - - def __iter__(self): - """Return the match method once, then stop""" - yield self.match - raise StopIteration - - def match(self, *args): - """Indicate whether or not to enter a case suite""" - if self.fall or not args: - return True - elif self.value in args: - self.fall = True - return True - else: - return False -'''Example Use Case for switch: -for case in switch(variable): - if case(0): - #dostuff - elif case(1): - #dostuff - else: #default - #dodefaultstuff''' - -def hexstr(data, length): #Pad hex to value for prettyprint - return hex(data).lstrip("0x").rstrip("L").zfill(length).upper() -def hexstr0(data): #Uppercase hex to string - return "0x" + hex(data).lstrip("0x").rstrip("L").upper() -def binr(byte): #Get bits as a string - return bin(byte).lstrip("0b").zfill(8) -def uint8(data, pos): - return struct.unpack(">B", data[pos:pos + 1])[0] -def uint16(data, pos): - return struct.unpack(">H", data[pos:pos + 2])[0] -def uint24(data, pos): - return struct.unpack(">I", "\00" + data[pos:pos + 3])[0] #HAX -def uint32(data, pos): - return struct.unpack(">I", data[pos:pos + 4])[0] - -def getstr(data, pos): #Keep incrementing till you hit a stop - string = "" - while data[pos] != 0: - if pos != len(data): - string += chr(data[pos]) - pos += 1 - else: break - return string diff --git a/examples/getWiiuVersion.py b/examples/getWiiuVersion.py new file mode 100644 index 0000000..66a4539 --- /dev/null +++ b/examples/getWiiuVersion.py @@ -0,0 +1,22 @@ + ##################### + # Ignore this # +######################################################## +import os, sys +sys.dont_write_bytecode = True +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.insert(0, parentdir) +######################################################## + +from uGecko import uGecko + +gecko = uGecko("192.168.1.102") +gecko.connect() + +# 550 -> 5.5.X + +print(gecko.getOsVersion()) + +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/examples/launchCustomGame.py b/examples/launchCustomGame.py new file mode 100644 index 0000000..303174e --- /dev/null +++ b/examples/launchCustomGame.py @@ -0,0 +1,26 @@ + ##################### + # Ignore this # +######################################################## +import os, sys +sys.dont_write_bytecode = True +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.insert(0, parentdir) +######################################################## + +from uGecko import uGecko + +gecko = uGecko("192.168.1.102") +gecko.connect() + +titleID = 0x0005000010176A00 # Splatoon EUR +CheckTitleID = gecko.getSymbol("sysapp.rpl", "SYSCheckTitleExists") +exist = gecko.call(CheckTitleID, titleID >> 32, titleID & 0xFFFFFFFF) + +if exist == 1: # The game is on the WiiU + gecko.call(gecko.getSymbol("sysapp.rpl", "SYSLaunchTitle"), titleID >> 32, titleID & 0xFFFFFFFF) + print("Game switched.") +else: + print(f"The game has not been detected on the WiiU!") + +gecko.disconnect() \ No newline at end of file diff --git a/examples/launchWiiuMenu.py b/examples/launchWiiuMenu.py new file mode 100644 index 0000000..16c4f6e --- /dev/null +++ b/examples/launchWiiuMenu.py @@ -0,0 +1,20 @@ + ##################### + # Ignore this # +######################################################## +import os, sys +sys.dont_write_bytecode = True +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.insert(0, parentdir) +######################################################## + +from uGecko import uGecko + +gecko = uGecko("192.168.1.102") +gecko.connect() + +gecko.call(gecko.getSymbol("sysapp.rpl", "SYSLaunchMenu")) + +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/examples/pauseConsole.py b/examples/pauseConsole.py new file mode 100644 index 0000000..3335701 --- /dev/null +++ b/examples/pauseConsole.py @@ -0,0 +1,24 @@ + ##################### + # Ignore this # +######################################################## +import os, sys, time +sys.dont_write_bytecode = True +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.insert(0, parentdir) +######################################################## + +from uGecko import uGecko + +gecko = uGecko("192.168.1.102") +gecko.connect() + +gecko.pauseConsole() +print(f"Console Paused: {str(gecko.isConsolePaused())}") +time.sleep(5) +gecko.resumeConsole() +print(f"Console Paused: {str(gecko.isConsolePaused())}") + +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/examples/readKern.py b/examples/readKern.py new file mode 100644 index 0000000..e191324 --- /dev/null +++ b/examples/readKern.py @@ -0,0 +1,20 @@ + ##################### + # Ignore this # +######################################################## +import os, sys +sys.dont_write_bytecode = True +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.insert(0, parentdir) +######################################################## + +from uGecko import uGecko + +gecko = uGecko("192.168.1.102") +gecko.connect() + +print(gecko.kernelRead(0x10000000)) + +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/installer/Makefile b/installer/Makefile deleted file mode 100644 index 329f7c6..0000000 --- a/installer/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -root := . -project := $(root)/src -build := $(root)/bin -libs := $(root)/../../libwiiu/bin -www := $(root)/../../www -framework := $(root)/../../framework -AS=powerpc-eabi-as -CC=powerpc-eabi-gcc -CFLAGS=-nostdinc -fno-builtin -c -LDFLAGS=-T $(project)/link.ld -nostartfiles -nostdlib -s -all: clean setup main550 main532 main500 main410 main400 main310 main300 -setup: - mkdir -p $(root)/bin/ -main550: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=550 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code550.bin $(libs)/550/draw.o $(build)/*.o -main532: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=532 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code532.bin $(libs)/532/draw.o $(build)/*.o -main500: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=500 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code500.bin $(libs)/500/draw.o $(build)/*.o -main410: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=410 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code410.bin $(libs)/410/draw.o $(build)/*.o -main400: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=400 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code400.bin $(libs)/400/draw.o $(build)/*.o -main310: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=400 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code310.bin $(libs)/310/draw.o $(build)/*.o -main300: - $(AS) $(project)/asm.s -o $(root)/asm.o - $(CC) $(CFLAGS) -DVER=300 $(project)/*.c - #-Wa,-a,-ad - mv -f $(root)/*.o $(build) - $(CC) $(LDFLAGS) -o $(build)/code300.bin $(libs)/300/draw.o $(build)/*.o -clean: - rm -f -r $(build)/* diff --git a/installer/src/asm.s b/installer/src/asm.s deleted file mode 100644 index 89e6ba5..0000000 --- a/installer/src/asm.s +++ /dev/null @@ -1,11 +0,0 @@ - -.section .asmstart - -.extern _main -.globl _start -_start: - # Load a good stack - lis 1,0x1AB5 - ori 1,1,0xD138 - # Go! - b _main diff --git a/installer/src/codehandler310.h b/installer/src/codehandler310.h deleted file mode 100644 index 19e812d..0000000 --- a/installer/src/codehandler310.h +++ /dev/null @@ -1,275 +0,0 @@ -static const unsigned char codehandler_text_bin[] = { - 0x94, 0x21, 0xff, 0xe8, 0x7c, 0x08, 0x02, 0xa6, 0x3d, 0x20, 0x10, 0x04, - 0x81, 0x29, 0x79, 0xac, 0x93, 0x81, 0x00, 0x08, 0x7c, 0x7c, 0x1b, 0x78, - 0x38, 0x60, 0x00, 0x00, 0x93, 0xa1, 0x00, 0x0c, 0x93, 0xe1, 0x00, 0x14, - 0x7c, 0x9d, 0x23, 0x78, 0x90, 0x01, 0x00, 0x1c, 0x60, 0x63, 0x86, 0xa8, - 0x93, 0xc1, 0x00, 0x10, 0x38, 0x80, 0x00, 0x40, 0x7d, 0x29, 0x03, 0xa6, - 0x4e, 0x80, 0x04, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x82, 0x00, 0x50, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x60, 0xa5, 0x86, 0xa8, - 0x3b, 0xdf, 0x00, 0x08, 0x4b, 0xe5, 0x85, 0x59, 0x3c, 0xff, 0x00, 0x01, - 0x3c, 0x80, 0x01, 0x1d, 0x39, 0x00, 0x00, 0x00, 0x7f, 0xc3, 0xf3, 0x78, - 0x38, 0x84, 0x3b, 0x28, 0x38, 0xa0, 0x00, 0x00, 0x7f, 0xe6, 0xfb, 0x78, - 0x38, 0xe7, 0x86, 0xa8, 0x61, 0x08, 0x80, 0x00, 0x39, 0x20, 0x00, 0x00, - 0x39, 0x40, 0x00, 0x0c, 0x4b, 0xe6, 0x28, 0x31, 0x7f, 0xc3, 0xf3, 0x78, - 0x4b, 0xe6, 0x2c, 0xf9, 0x3d, 0x20, 0x10, 0x06, 0x80, 0x01, 0x00, 0x1c, - 0x81, 0x29, 0xbb, 0xc0, 0x7f, 0x83, 0xe3, 0x78, 0x83, 0xc1, 0x00, 0x10, - 0x7f, 0xa4, 0xeb, 0x78, 0x83, 0x81, 0x00, 0x08, 0x7d, 0x29, 0x03, 0xa6, - 0x83, 0xa1, 0x00, 0x0c, 0x83, 0xe1, 0x00, 0x14, 0x7c, 0x08, 0x03, 0xa6, - 0x38, 0x21, 0x00, 0x18, 0x4e, 0x80, 0x04, 0x20, 0x94, 0x21, 0xff, 0xe8, - 0x7c, 0x08, 0x02, 0xa6, 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x20, - 0x38, 0x81, 0x00, 0x08, 0x90, 0x01, 0x00, 0x1c, 0x4b, 0xed, 0x55, 0x91, - 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x00, 0x0c, 0x41, 0x82, 0x00, 0x18, - 0x88, 0x61, 0x00, 0x08, 0x80, 0x01, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x18, - 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0xff, 0xff, - 0x4b, 0xff, 0xff, 0xec, 0x94, 0x21, 0xff, 0xe0, 0x7c, 0x08, 0x02, 0xa6, - 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, 0x93, 0x61, 0x00, 0x0c, - 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, 0x93, 0xc1, 0x00, 0x18, - 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, 0x41, 0xa1, 0x00, 0x0c, - 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, 0x38, 0xc0, 0x00, 0x00, - 0x4b, 0xed, 0x55, 0x15, 0x7c, 0x69, 0x1b, 0x79, 0x7f, 0xe9, 0xf8, 0x50, - 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, 0x40, 0x80, 0xff, 0xd8, - 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x5c, 0x91, 0x5b, 0x00, 0x00, - 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, 0x91, 0x3c, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, - 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, - 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, 0x38, 0x60, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x94, 0x21, 0xff, 0xe0, - 0x7c, 0x08, 0x02, 0xa6, 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, - 0x93, 0x61, 0x00, 0x0c, 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, - 0x7c, 0x7c, 0x1b, 0x78, 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, - 0x93, 0xc1, 0x00, 0x18, 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, - 0x41, 0xa1, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, - 0x7f, 0xc4, 0xf3, 0x78, 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x4b, 0xed, 0x59, 0x79, 0x7c, 0x69, 0x1b, 0x79, - 0x7f, 0xe9, 0xf8, 0x50, 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, - 0x40, 0x80, 0xff, 0xd8, 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x7d, - 0x91, 0x5b, 0x00, 0x00, 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, - 0x91, 0x3c, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, - 0x38, 0x60, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, - 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, - 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, - 0x7c, 0x08, 0x02, 0xa6, 0x94, 0x21, 0xfb, 0x90, 0x92, 0xe1, 0x04, 0x4c, - 0x3e, 0xe0, 0x00, 0x00, 0x90, 0x01, 0x04, 0x74, 0x3a, 0xf7, 0x01, 0x36, - 0x92, 0x41, 0x04, 0x38, 0x92, 0x61, 0x04, 0x3c, 0x92, 0x81, 0x04, 0x40, - 0x93, 0x61, 0x04, 0x5c, 0x93, 0xc1, 0x04, 0x68, 0x93, 0xe1, 0x04, 0x6c, - 0x92, 0xa1, 0x04, 0x44, 0x3a, 0xa0, 0xff, 0xaa, 0x92, 0xc1, 0x04, 0x48, - 0x3a, 0xc0, 0xff, 0x82, 0x93, 0x01, 0x04, 0x50, 0x3f, 0x00, 0x40, 0x00, - 0x93, 0x21, 0x04, 0x54, 0x3b, 0x21, 0x00, 0x28, 0x93, 0x41, 0x04, 0x58, - 0x3b, 0x43, 0x00, 0x04, 0x93, 0x81, 0x04, 0x60, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x04, 0x64, 0x7c, 0x9d, 0x23, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x4b, 0xff, 0xfd, 0xc9, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x68, - 0x2f, 0x9f, 0x00, 0x41, 0x41, 0x9e, 0x06, 0x88, 0x40, 0x9d, 0x00, 0x58, - 0x2f, 0x9f, 0x00, 0x72, 0x41, 0x9e, 0x05, 0xbc, 0x41, 0x9d, 0x01, 0x78, - 0x2f, 0x9f, 0x00, 0x70, 0x41, 0x9e, 0x02, 0xfc, 0x41, 0x9d, 0x04, 0xe8, - 0x2f, 0x9f, 0x00, 0x50, 0x40, 0xbe, 0xff, 0xc8, 0x39, 0x20, 0x00, 0x01, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, 0x99, 0x21, 0x04, 0x2c, - 0x4b, 0xff, 0xfe, 0x7d, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0xa0, - 0x39, 0x20, 0x00, 0xd1, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x02, 0x20, - 0x2f, 0x9f, 0x00, 0x03, 0x41, 0x9e, 0x05, 0xec, 0x40, 0x9d, 0x02, 0x64, - 0x2f, 0x9f, 0x00, 0x0b, 0x41, 0x9e, 0x03, 0x58, 0x2f, 0x9f, 0x00, 0x0c, - 0x41, 0x9e, 0x03, 0xdc, 0x2f, 0x9f, 0x00, 0x04, 0x40, 0x9e, 0xff, 0x70, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfd, 0x69, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x07, 0x64, 0x83, 0xc1, 0x00, 0x28, - 0x3a, 0x40, 0xff, 0xb0, 0x82, 0x81, 0x00, 0x2c, 0x3a, 0x60, 0xff, 0xbd, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0xbe, 0xff, 0x38, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x40, 0x9d, 0x00, 0x7c, 0x3b, 0x60, 0x04, 0x00, - 0x89, 0x3e, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x78, - 0x7f, 0x69, 0x03, 0xa6, 0x48, 0x00, 0x00, 0x10, 0x7d, 0x5e, 0x48, 0xae, - 0x2f, 0x8a, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x64, 0x39, 0x29, 0x00, 0x01, - 0x42, 0x00, 0xff, 0xf0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x9a, 0x41, 0x04, 0x2c, 0x4b, 0xff, 0xfd, 0xb9, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x06, 0xfc, 0x7f, 0xa3, 0xeb, 0x78, 0x4b, 0xff, 0xfc, 0xa1, - 0x2f, 0x83, 0x00, 0xcc, 0x41, 0xbe, 0xfe, 0xcc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x41, 0xbe, 0xfe, 0xc0, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x41, 0xbd, 0xff, 0x8c, 0x2f, 0x9b, 0x00, 0x00, - 0x41, 0x9d, 0xff, 0x88, 0x41, 0xbe, 0xff, 0xac, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x38, 0x61, 0x00, 0x29, 0x4b, 0xe5, 0x81, 0x61, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xfb, 0x00, 0x01, 0x9a, 0x61, 0x00, 0x28, - 0x4b, 0xff, 0xfd, 0x51, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0x9c, - 0x39, 0x20, 0x00, 0x8f, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0xf4, - 0x2f, 0x9f, 0x00, 0x99, 0x41, 0x9e, 0x02, 0x08, 0x2f, 0x9f, 0x00, 0x9a, - 0x41, 0x9e, 0x02, 0x8c, 0x2f, 0x9f, 0x00, 0x80, 0x40, 0x9e, 0xfe, 0x50, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x44, 0x4b, 0xff, 0xfc, 0x49, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x06, 0x38, 0x80, 0x81, 0x00, 0x4c, - 0x81, 0x61, 0x00, 0x28, 0x90, 0x81, 0x00, 0x08, 0x80, 0x81, 0x00, 0x50, - 0x7d, 0x69, 0x03, 0xa6, 0x80, 0xa1, 0x00, 0x34, 0x90, 0x81, 0x00, 0x0c, - 0x80, 0x81, 0x00, 0x54, 0x80, 0xc1, 0x00, 0x38, 0x90, 0x81, 0x00, 0x10, - 0x80, 0x81, 0x00, 0x58, 0x80, 0xe1, 0x00, 0x3c, 0x90, 0x81, 0x00, 0x14, - 0x80, 0x81, 0x00, 0x5c, 0x81, 0x01, 0x00, 0x40, 0x90, 0x81, 0x00, 0x18, - 0x80, 0x81, 0x00, 0x60, 0x81, 0x21, 0x00, 0x44, 0x90, 0x81, 0x00, 0x1c, - 0x80, 0x81, 0x00, 0x64, 0x81, 0x41, 0x00, 0x48, 0x90, 0x81, 0x00, 0x20, - 0x80, 0x81, 0x00, 0x68, 0x80, 0x61, 0x00, 0x2c, 0x90, 0x81, 0x00, 0x24, - 0x80, 0x81, 0x00, 0x30, 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, - 0x90, 0x61, 0x00, 0x28, 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xfc, 0x79, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfd, 0x9c, - 0x39, 0x20, 0x01, 0x36, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0x1c, - 0x4b, 0xe6, 0x14, 0x6d, 0x81, 0x23, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x06, - 0x41, 0x9e, 0x04, 0xf8, 0x39, 0x20, 0x00, 0x54, 0x91, 0x3c, 0x00, 0x04, - 0x80, 0x01, 0x04, 0x74, 0x38, 0x60, 0x00, 0x00, 0x93, 0xfc, 0x00, 0x00, - 0x7c, 0x08, 0x03, 0xa6, 0x82, 0x41, 0x04, 0x38, 0x82, 0x61, 0x04, 0x3c, - 0x82, 0x81, 0x04, 0x40, 0x82, 0xa1, 0x04, 0x44, 0x82, 0xc1, 0x04, 0x48, - 0x82, 0xe1, 0x04, 0x4c, 0x83, 0x01, 0x04, 0x50, 0x83, 0x21, 0x04, 0x54, - 0x83, 0x41, 0x04, 0x58, 0x83, 0x61, 0x04, 0x5c, 0x83, 0x81, 0x04, 0x60, - 0x83, 0xa1, 0x04, 0x64, 0x83, 0xc1, 0x04, 0x68, 0x83, 0xe1, 0x04, 0x6c, - 0x38, 0x21, 0x04, 0x70, 0x4e, 0x80, 0x00, 0x20, 0x2f, 0x9f, 0x00, 0x01, - 0x41, 0x9e, 0x01, 0xfc, 0x2f, 0x9f, 0x00, 0x02, 0x40, 0xbe, 0xfd, 0x18, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0x90, 0x81, 0x21, 0x00, 0x28, - 0x38, 0x80, 0x00, 0x02, 0xa1, 0x41, 0x00, 0x2e, 0x7d, 0x23, 0x4b, 0x78, - 0xb1, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0xa4, 0x21, 0x4b, 0xff, 0xfc, 0xdc, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x24, 0x4b, 0xff, 0xfa, 0xd5, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0xa0, 0x81, 0x61, 0x00, 0x28, - 0x80, 0xa1, 0x00, 0x34, 0x80, 0xc1, 0x00, 0x38, 0x7d, 0x69, 0x03, 0xa6, - 0x80, 0xe1, 0x00, 0x3c, 0x81, 0x01, 0x00, 0x40, 0x81, 0x21, 0x00, 0x44, - 0x81, 0x41, 0x00, 0x48, 0x80, 0x61, 0x00, 0x2c, 0x80, 0x81, 0x00, 0x30, - 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, 0x90, 0x61, 0x00, 0x28, - 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x45, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x68, 0x39, 0x20, 0x00, 0xea, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xe8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xc1, 0x04, 0x2c, 0x4b, 0xff, 0xfb, 0x15, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x38, 0x39, 0x20, 0x01, 0x3b, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xb8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfa, 0x25, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x03, 0xd0, 0x83, 0xc1, 0x00, 0x2c, 0x83, 0xe1, 0x00, 0x28, - 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, 0x7f, 0xc5, 0xf3, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x01, - 0x7f, 0xe9, 0xfb, 0x78, 0x7c, 0x3e, 0x0b, 0x78, 0x38, 0x00, 0x35, 0x00, - 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0xf3, 0x78, - 0x4b, 0xff, 0xfb, 0xd0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x92, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x89, 0x7c, 0x7f, 0x1b, 0x79, - 0x40, 0x80, 0xfb, 0xac, 0x39, 0x20, 0x01, 0x44, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfe, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x4b, 0xff, 0xf9, 0x99, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x03, 0x0c, - 0x83, 0xe1, 0x00, 0x28, 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x01, 0x7f, 0xe9, 0xfb, 0x78, 0x38, 0x00, 0x34, 0x00, - 0x7c, 0x3f, 0x0b, 0x78, 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, - 0x7f, 0xe1, 0xfb, 0x78, 0x7c, 0x7f, 0x1b, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x93, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x01, - 0x4b, 0xff, 0xfb, 0x28, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xf9, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0xac, - 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x01, 0x89, 0x41, 0x00, 0x2f, - 0x7d, 0x23, 0x4b, 0x78, 0x99, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0xa2, 0x31, - 0x4b, 0xff, 0xfa, 0xec, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x4b, 0xff, 0xf8, 0xe5, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x02, 0x88, - 0x88, 0xe1, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x54, 0xe7, 0x06, 0x3e, - 0x4b, 0xff, 0xf8, 0xc1, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x80, - 0x38, 0x81, 0x04, 0x30, 0x38, 0x61, 0x00, 0x30, 0x83, 0xe1, 0x00, 0x2c, - 0x4b, 0xe4, 0xf4, 0x59, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x7f, 0xf9, 0xfa, 0x14, 0x4b, 0xff, 0xf8, 0x8d, 0x2c, 0x03, 0x00, 0x00, - 0x41, 0x80, 0x02, 0x44, 0x88, 0x81, 0x04, 0x2c, 0x80, 0x61, 0x04, 0x30, - 0x7f, 0xe5, 0xfb, 0x78, 0x54, 0x84, 0x06, 0x3e, 0x38, 0xc1, 0x04, 0x2c, - 0x4b, 0xe5, 0x04, 0xe9, 0x81, 0x21, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf9, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfa, 0x34, 0x39, 0x20, 0x01, 0x00, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xb4, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x0c, 0x4b, 0xff, 0xf8, 0x21, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x02, 0x04, 0x81, 0x21, 0x00, 0x28, 0x81, 0x01, 0x00, 0x30, - 0x80, 0xe1, 0x00, 0x2c, 0x7d, 0x09, 0x42, 0x14, 0x7f, 0x89, 0x40, 0x00, - 0x41, 0xbc, 0x00, 0x14, 0x48, 0x00, 0x01, 0x5c, 0x39, 0x29, 0x00, 0x04, - 0x7f, 0x89, 0x40, 0x00, 0x40, 0x9c, 0x01, 0x50, 0x81, 0x49, 0x00, 0x00, - 0x7f, 0x8a, 0x38, 0x00, 0x40, 0x9e, 0xff, 0xec, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf8, 0x8d, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xf9, 0xb0, 0x39, 0x20, 0x01, 0x15, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0x30, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x9d, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x34, 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x04, - 0x81, 0x41, 0x00, 0x2c, 0x7d, 0x23, 0x4b, 0x78, 0x91, 0x49, 0x00, 0x00, - 0x4b, 0xe4, 0xa0, 0xad, 0x4b, 0xff, 0xf9, 0x68, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x61, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x38, 0x83, 0xc1, 0x00, 0x28, 0x82, 0x81, 0x00, 0x2c, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0x9e, 0x00, 0x88, 0x7f, 0x7e, 0xa0, 0x50, - 0x3d, 0x3e, 0xf0, 0x00, 0x2f, 0x9b, 0x04, 0x00, 0x7f, 0xc6, 0xf3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x09, 0xc0, 0x40, 0x40, 0x9d, 0x00, 0x08, 0x3b, 0x60, 0x04, 0x00, - 0x7f, 0x67, 0xdb, 0x78, 0x40, 0x99, 0x00, 0x38, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x7f, 0x67, 0xdb, 0x78, - 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xff, 0xf7, 0x01, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x68, 0x7f, 0xc3, 0xf3, 0x78, 0x7f, 0x24, 0xcb, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x4b, 0xe5, 0x7b, 0xa1, 0x48, 0x00, 0x00, 0x18, - 0x4b, 0xff, 0xf6, 0xe1, 0x7f, 0x99, 0xf0, 0x00, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x44, 0x41, 0xbe, 0xff, 0xdc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x40, 0x9e, 0xff, 0x80, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xa1, 0x04, 0x2c, 0x4b, 0xff, 0xf7, 0x6d, - 0x4b, 0xff, 0xf8, 0x94, 0x39, 0x20, 0x00, 0x00, 0x4b, 0xff, 0xfe, 0xbc, - 0x4b, 0xf6, 0xe6, 0xd5, 0x4b, 0xff, 0xf8, 0x84, 0x39, 0x20, 0x00, 0xc4, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfb, 0x04, 0x39, 0x20, 0x00, 0xa7, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xf8, 0x39, 0x20, 0x00, 0x67, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xec, 0x39, 0x20, 0x00, 0x5d, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xe0, 0x39, 0x20, 0x00, 0x71, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xd4, 0x7c, 0x67, 0x1b, 0x78, - 0x4b, 0xff, 0xfd, 0x7c, 0x39, 0x20, 0x00, 0x9c, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfa, 0xc0, 0x7c, 0x64, 0x1b, 0x78, 0x4b, 0xff, 0xfd, 0xc0, - 0x39, 0x20, 0x00, 0xf1, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xac, - 0x39, 0x20, 0x00, 0xda, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xa0, - 0x39, 0x20, 0x00, 0xb4, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x94, - 0x39, 0x20, 0x01, 0x05, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x88, - 0x39, 0x20, 0x01, 0x1e, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x7c, - 0x39, 0x20, 0x00, 0x7b, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x70, - 0x39, 0x20, 0x00, 0x8a, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x64, - 0x94, 0x21, 0xff, 0xa0, 0x7c, 0x08, 0x02, 0xa6, 0x7d, 0x80, 0x00, 0x26, - 0x93, 0x81, 0x00, 0x50, 0x3b, 0x80, 0xff, 0xff, 0x2d, 0x9c, 0xff, 0xff, - 0x92, 0x81, 0x00, 0x30, 0x92, 0xa1, 0x00, 0x34, 0x3a, 0x80, 0x00, 0x3e, - 0x92, 0xc1, 0x00, 0x38, 0x3a, 0xa0, 0x00, 0x3a, 0x92, 0xe1, 0x00, 0x3c, - 0x3a, 0xc0, 0x00, 0x37, 0x93, 0x01, 0x00, 0x40, 0x3a, 0xe0, 0x00, 0x35, - 0x93, 0x21, 0x00, 0x44, 0x3b, 0x00, 0x00, 0x33, 0x93, 0x41, 0x00, 0x48, - 0x3b, 0x20, 0x00, 0x02, 0x93, 0x61, 0x00, 0x4c, 0x3b, 0x40, 0x1c, 0xa3, - 0x93, 0xa1, 0x00, 0x54, 0x3b, 0x60, 0x00, 0x00, 0x90, 0x01, 0x00, 0x64, - 0x7c, 0x9d, 0x23, 0x78, 0x93, 0xc1, 0x00, 0x58, 0x93, 0xe1, 0x00, 0x5c, - 0x91, 0x81, 0x00, 0x2c, 0x4b, 0xed, 0x43, 0x49, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xed, 0x58, 0x39, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x40, 0x92, 0x00, 0x4c, - 0x93, 0x1d, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, 0x2f, 0x9c, 0xff, 0xff, - 0x41, 0x9e, 0x00, 0x0c, 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xed, 0x59, 0x5d, - 0x40, 0x92, 0x00, 0x84, 0x93, 0xdd, 0x00, 0x00, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xed, 0x57, 0xf1, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x41, 0xb2, 0xff, 0xbc, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa0, 0x00, 0x10, 0x4b, 0xed, 0x46, 0x3d, - 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x54, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x80, 0x00, 0x01, 0x4b, 0xed, 0x49, 0x29, 0x7c, 0x7e, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x48, 0x39, 0x20, 0x00, 0x10, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa1, 0x00, 0x18, 0x91, 0x21, 0x00, 0x18, - 0x4b, 0xed, 0x44, 0x89, 0x2f, 0x83, 0xff, 0xff, 0x7c, 0x7c, 0x1b, 0x78, - 0x40, 0x9e, 0x00, 0x2c, 0x92, 0xbd, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, - 0x7f, 0xe3, 0xfb, 0x78, 0x4b, 0xed, 0x58, 0xd1, 0x93, 0xdd, 0x00, 0x00, - 0x4b, 0xff, 0xff, 0x78, 0x92, 0xfd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x58, - 0x92, 0xdd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x50, 0x7f, 0xe3, 0xfb, 0x78, - 0x4b, 0xed, 0x58, 0xb1, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0x84, 0xe3, 0x78, - 0x4b, 0xff, 0xf6, 0x05, 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x14, - 0x7f, 0x83, 0xe3, 0x78, 0x3b, 0x80, 0xff, 0xff, 0x4b, 0xed, 0x58, 0x91, - 0x4b, 0xff, 0xfe, 0xf4, 0x92, 0x9d, 0x00, 0x04, 0x3b, 0xe0, 0xff, 0xff, - 0x4e, 0x0c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x1c -}; -static const unsigned int codehandler_text_bin_len = 3260; diff --git a/installer/src/codehandler400.h b/installer/src/codehandler400.h deleted file mode 100644 index d66b2d7..0000000 --- a/installer/src/codehandler400.h +++ /dev/null @@ -1,275 +0,0 @@ -static const unsigned char codehandler_text_bin[] = { - 0x94, 0x21, 0xff, 0xe8, 0x7c, 0x08, 0x02, 0xa6, 0x3d, 0x20, 0x10, 0x05, - 0x81, 0x29, 0x9c, 0x1c, 0x93, 0x81, 0x00, 0x08, 0x7c, 0x7c, 0x1b, 0x78, - 0x38, 0x60, 0x00, 0x00, 0x93, 0xa1, 0x00, 0x0c, 0x93, 0xe1, 0x00, 0x14, - 0x7c, 0x9d, 0x23, 0x78, 0x90, 0x01, 0x00, 0x1c, 0x60, 0x63, 0x86, 0xa8, - 0x93, 0xc1, 0x00, 0x10, 0x38, 0x80, 0x00, 0x40, 0x7d, 0x29, 0x03, 0xa6, - 0x4e, 0x80, 0x04, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x82, 0x00, 0x50, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x60, 0xa5, 0x86, 0xa8, - 0x3b, 0xdf, 0x00, 0x08, 0x4b, 0xe5, 0x3e, 0x2d, 0x3c, 0xff, 0x00, 0x01, - 0x3c, 0x80, 0x01, 0x1e, 0x39, 0x00, 0x00, 0x00, 0x7f, 0xc3, 0xf3, 0x78, - 0x38, 0x84, 0xdb, 0x28, 0x38, 0xa0, 0x00, 0x00, 0x7f, 0xe6, 0xfb, 0x78, - 0x38, 0xe7, 0x86, 0xa8, 0x61, 0x08, 0x80, 0x00, 0x39, 0x20, 0x00, 0x00, - 0x39, 0x40, 0x00, 0x0c, 0x4b, 0xe5, 0xe5, 0x49, 0x7f, 0xc3, 0xf3, 0x78, - 0x4b, 0xe5, 0xea, 0x25, 0x3d, 0x20, 0x10, 0x06, 0x80, 0x01, 0x00, 0x1c, - 0x81, 0x29, 0xa6, 0x00, 0x7f, 0x83, 0xe3, 0x78, 0x83, 0xc1, 0x00, 0x10, - 0x7f, 0xa4, 0xeb, 0x78, 0x83, 0x81, 0x00, 0x08, 0x7d, 0x29, 0x03, 0xa6, - 0x83, 0xa1, 0x00, 0x0c, 0x83, 0xe1, 0x00, 0x14, 0x7c, 0x08, 0x03, 0xa6, - 0x38, 0x21, 0x00, 0x18, 0x4e, 0x80, 0x04, 0x20, 0x94, 0x21, 0xff, 0xe8, - 0x7c, 0x08, 0x02, 0xa6, 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x20, - 0x38, 0x81, 0x00, 0x08, 0x90, 0x01, 0x00, 0x1c, 0x4b, 0xed, 0x7b, 0xe1, - 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x00, 0x0c, 0x41, 0x82, 0x00, 0x18, - 0x88, 0x61, 0x00, 0x08, 0x80, 0x01, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x18, - 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0xff, 0xff, - 0x4b, 0xff, 0xff, 0xec, 0x94, 0x21, 0xff, 0xe0, 0x7c, 0x08, 0x02, 0xa6, - 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, 0x93, 0x61, 0x00, 0x0c, - 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, 0x93, 0xc1, 0x00, 0x18, - 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, 0x41, 0xa1, 0x00, 0x0c, - 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, 0x38, 0xc0, 0x00, 0x00, - 0x4b, 0xed, 0x7b, 0x65, 0x7c, 0x69, 0x1b, 0x79, 0x7f, 0xe9, 0xf8, 0x50, - 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, 0x40, 0x80, 0xff, 0xd8, - 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x5c, 0x91, 0x5b, 0x00, 0x00, - 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, 0x91, 0x3c, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, - 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, - 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, 0x38, 0x60, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x94, 0x21, 0xff, 0xe0, - 0x7c, 0x08, 0x02, 0xa6, 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, - 0x93, 0x61, 0x00, 0x0c, 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, - 0x7c, 0x7c, 0x1b, 0x78, 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, - 0x93, 0xc1, 0x00, 0x18, 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, - 0x41, 0xa1, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, - 0x7f, 0xc4, 0xf3, 0x78, 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x4b, 0xed, 0x83, 0x09, 0x7c, 0x69, 0x1b, 0x79, - 0x7f, 0xe9, 0xf8, 0x50, 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, - 0x40, 0x80, 0xff, 0xd8, 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x7d, - 0x91, 0x5b, 0x00, 0x00, 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, - 0x91, 0x3c, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, - 0x38, 0x60, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, - 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, - 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, - 0x7c, 0x08, 0x02, 0xa6, 0x94, 0x21, 0xfb, 0x90, 0x92, 0xe1, 0x04, 0x4c, - 0x3e, 0xe0, 0x00, 0x00, 0x90, 0x01, 0x04, 0x74, 0x3a, 0xf7, 0x01, 0x90, - 0x92, 0x41, 0x04, 0x38, 0x92, 0x61, 0x04, 0x3c, 0x92, 0x81, 0x04, 0x40, - 0x93, 0x61, 0x04, 0x5c, 0x93, 0xc1, 0x04, 0x68, 0x93, 0xe1, 0x04, 0x6c, - 0x92, 0xa1, 0x04, 0x44, 0x3a, 0xa0, 0xff, 0xaa, 0x92, 0xc1, 0x04, 0x48, - 0x3a, 0xc0, 0xff, 0x82, 0x93, 0x01, 0x04, 0x50, 0x3f, 0x00, 0x40, 0x00, - 0x93, 0x21, 0x04, 0x54, 0x3b, 0x21, 0x00, 0x28, 0x93, 0x41, 0x04, 0x58, - 0x3b, 0x43, 0x00, 0x04, 0x93, 0x81, 0x04, 0x60, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x04, 0x64, 0x7c, 0x9d, 0x23, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x4b, 0xff, 0xfd, 0xc9, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x68, - 0x2f, 0x9f, 0x00, 0x41, 0x41, 0x9e, 0x06, 0x88, 0x40, 0x9d, 0x00, 0x58, - 0x2f, 0x9f, 0x00, 0x72, 0x41, 0x9e, 0x05, 0xbc, 0x41, 0x9d, 0x01, 0x78, - 0x2f, 0x9f, 0x00, 0x70, 0x41, 0x9e, 0x02, 0xfc, 0x41, 0x9d, 0x04, 0xe8, - 0x2f, 0x9f, 0x00, 0x50, 0x40, 0xbe, 0xff, 0xc8, 0x39, 0x20, 0x00, 0x01, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, 0x99, 0x21, 0x04, 0x2c, - 0x4b, 0xff, 0xfe, 0x7d, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0xa0, - 0x39, 0x20, 0x00, 0xd1, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x02, 0x20, - 0x2f, 0x9f, 0x00, 0x03, 0x41, 0x9e, 0x05, 0xec, 0x40, 0x9d, 0x02, 0x64, - 0x2f, 0x9f, 0x00, 0x0b, 0x41, 0x9e, 0x03, 0x58, 0x2f, 0x9f, 0x00, 0x0c, - 0x41, 0x9e, 0x03, 0xdc, 0x2f, 0x9f, 0x00, 0x04, 0x40, 0x9e, 0xff, 0x70, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfd, 0x69, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x07, 0x64, 0x83, 0xc1, 0x00, 0x28, - 0x3a, 0x40, 0xff, 0xb0, 0x82, 0x81, 0x00, 0x2c, 0x3a, 0x60, 0xff, 0xbd, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0xbe, 0xff, 0x38, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x40, 0x9d, 0x00, 0x7c, 0x3b, 0x60, 0x04, 0x00, - 0x89, 0x3e, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x78, - 0x7f, 0x69, 0x03, 0xa6, 0x48, 0x00, 0x00, 0x10, 0x7d, 0x5e, 0x48, 0xae, - 0x2f, 0x8a, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x64, 0x39, 0x29, 0x00, 0x01, - 0x42, 0x00, 0xff, 0xf0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x9a, 0x41, 0x04, 0x2c, 0x4b, 0xff, 0xfd, 0xb9, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x06, 0xfc, 0x7f, 0xa3, 0xeb, 0x78, 0x4b, 0xff, 0xfc, 0xa1, - 0x2f, 0x83, 0x00, 0xcc, 0x41, 0xbe, 0xfe, 0xcc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x41, 0xbe, 0xfe, 0xc0, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x41, 0xbd, 0xff, 0x8c, 0x2f, 0x9b, 0x00, 0x00, - 0x41, 0x9d, 0xff, 0x88, 0x41, 0xbe, 0xff, 0xac, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x38, 0x61, 0x00, 0x29, 0x4b, 0xe5, 0x3a, 0x35, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xfb, 0x00, 0x01, 0x9a, 0x61, 0x00, 0x28, - 0x4b, 0xff, 0xfd, 0x51, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0x9c, - 0x39, 0x20, 0x00, 0x8f, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0xf4, - 0x2f, 0x9f, 0x00, 0x99, 0x41, 0x9e, 0x02, 0x08, 0x2f, 0x9f, 0x00, 0x9a, - 0x41, 0x9e, 0x02, 0x8c, 0x2f, 0x9f, 0x00, 0x80, 0x40, 0x9e, 0xfe, 0x50, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x44, 0x4b, 0xff, 0xfc, 0x49, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x06, 0x38, 0x80, 0x81, 0x00, 0x4c, - 0x81, 0x61, 0x00, 0x28, 0x90, 0x81, 0x00, 0x08, 0x80, 0x81, 0x00, 0x50, - 0x7d, 0x69, 0x03, 0xa6, 0x80, 0xa1, 0x00, 0x34, 0x90, 0x81, 0x00, 0x0c, - 0x80, 0x81, 0x00, 0x54, 0x80, 0xc1, 0x00, 0x38, 0x90, 0x81, 0x00, 0x10, - 0x80, 0x81, 0x00, 0x58, 0x80, 0xe1, 0x00, 0x3c, 0x90, 0x81, 0x00, 0x14, - 0x80, 0x81, 0x00, 0x5c, 0x81, 0x01, 0x00, 0x40, 0x90, 0x81, 0x00, 0x18, - 0x80, 0x81, 0x00, 0x60, 0x81, 0x21, 0x00, 0x44, 0x90, 0x81, 0x00, 0x1c, - 0x80, 0x81, 0x00, 0x64, 0x81, 0x41, 0x00, 0x48, 0x90, 0x81, 0x00, 0x20, - 0x80, 0x81, 0x00, 0x68, 0x80, 0x61, 0x00, 0x2c, 0x90, 0x81, 0x00, 0x24, - 0x80, 0x81, 0x00, 0x30, 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, - 0x90, 0x61, 0x00, 0x28, 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xfc, 0x79, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfd, 0x9c, - 0x39, 0x20, 0x01, 0x36, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0x1c, - 0x4b, 0xe5, 0xce, 0xc5, 0x81, 0x23, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x06, - 0x41, 0x9e, 0x04, 0xf8, 0x39, 0x20, 0x00, 0x54, 0x91, 0x3c, 0x00, 0x04, - 0x80, 0x01, 0x04, 0x74, 0x38, 0x60, 0x00, 0x00, 0x93, 0xfc, 0x00, 0x00, - 0x7c, 0x08, 0x03, 0xa6, 0x82, 0x41, 0x04, 0x38, 0x82, 0x61, 0x04, 0x3c, - 0x82, 0x81, 0x04, 0x40, 0x82, 0xa1, 0x04, 0x44, 0x82, 0xc1, 0x04, 0x48, - 0x82, 0xe1, 0x04, 0x4c, 0x83, 0x01, 0x04, 0x50, 0x83, 0x21, 0x04, 0x54, - 0x83, 0x41, 0x04, 0x58, 0x83, 0x61, 0x04, 0x5c, 0x83, 0x81, 0x04, 0x60, - 0x83, 0xa1, 0x04, 0x64, 0x83, 0xc1, 0x04, 0x68, 0x83, 0xe1, 0x04, 0x6c, - 0x38, 0x21, 0x04, 0x70, 0x4e, 0x80, 0x00, 0x20, 0x2f, 0x9f, 0x00, 0x01, - 0x41, 0x9e, 0x01, 0xfc, 0x2f, 0x9f, 0x00, 0x02, 0x40, 0xbe, 0xfd, 0x18, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0x90, 0x81, 0x21, 0x00, 0x28, - 0x38, 0x80, 0x00, 0x02, 0xa1, 0x41, 0x00, 0x2e, 0x7d, 0x23, 0x4b, 0x78, - 0xb1, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x38, 0x91, 0x4b, 0xff, 0xfc, 0xdc, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x24, 0x4b, 0xff, 0xfa, 0xd5, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0xa0, 0x81, 0x61, 0x00, 0x28, - 0x80, 0xa1, 0x00, 0x34, 0x80, 0xc1, 0x00, 0x38, 0x7d, 0x69, 0x03, 0xa6, - 0x80, 0xe1, 0x00, 0x3c, 0x81, 0x01, 0x00, 0x40, 0x81, 0x21, 0x00, 0x44, - 0x81, 0x41, 0x00, 0x48, 0x80, 0x61, 0x00, 0x2c, 0x80, 0x81, 0x00, 0x30, - 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, 0x90, 0x61, 0x00, 0x28, - 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x45, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x68, 0x39, 0x20, 0x00, 0xea, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xe8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xc1, 0x04, 0x2c, 0x4b, 0xff, 0xfb, 0x15, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x38, 0x39, 0x20, 0x01, 0x3b, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xb8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfa, 0x25, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x03, 0xd0, 0x83, 0xc1, 0x00, 0x2c, 0x83, 0xe1, 0x00, 0x28, - 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, 0x7f, 0xc5, 0xf3, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x01, - 0x7f, 0xe9, 0xfb, 0x78, 0x7c, 0x3e, 0x0b, 0x78, 0x38, 0x00, 0x35, 0x00, - 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0xf3, 0x78, - 0x4b, 0xff, 0xfb, 0xd0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x92, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x89, 0x7c, 0x7f, 0x1b, 0x79, - 0x40, 0x80, 0xfb, 0xac, 0x39, 0x20, 0x01, 0x44, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfe, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x4b, 0xff, 0xf9, 0x99, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x03, 0x0c, - 0x83, 0xe1, 0x00, 0x28, 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x01, 0x7f, 0xe9, 0xfb, 0x78, 0x38, 0x00, 0x34, 0x00, - 0x7c, 0x3f, 0x0b, 0x78, 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, - 0x7f, 0xe1, 0xfb, 0x78, 0x7c, 0x7f, 0x1b, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x93, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x01, - 0x4b, 0xff, 0xfb, 0x28, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xf9, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0xac, - 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x01, 0x89, 0x41, 0x00, 0x2f, - 0x7d, 0x23, 0x4b, 0x78, 0x99, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x36, 0xa1, - 0x4b, 0xff, 0xfa, 0xec, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x4b, 0xff, 0xf8, 0xe5, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x02, 0x88, - 0x88, 0xe1, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x54, 0xe7, 0x06, 0x3e, - 0x4b, 0xff, 0xf8, 0xc1, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x80, - 0x38, 0x81, 0x04, 0x30, 0x38, 0x61, 0x00, 0x30, 0x83, 0xe1, 0x00, 0x2c, - 0x4b, 0xe4, 0x95, 0xfd, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x7f, 0xf9, 0xfa, 0x14, 0x4b, 0xff, 0xf8, 0x8d, 0x2c, 0x03, 0x00, 0x00, - 0x41, 0x80, 0x02, 0x44, 0x88, 0x81, 0x04, 0x2c, 0x80, 0x61, 0x04, 0x30, - 0x7f, 0xe5, 0xfb, 0x78, 0x54, 0x84, 0x06, 0x3e, 0x38, 0xc1, 0x04, 0x2c, - 0x4b, 0xe4, 0xab, 0xc1, 0x81, 0x21, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf9, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfa, 0x34, 0x39, 0x20, 0x01, 0x00, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xb4, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x0c, 0x4b, 0xff, 0xf8, 0x21, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x02, 0x04, 0x81, 0x21, 0x00, 0x28, 0x81, 0x01, 0x00, 0x30, - 0x80, 0xe1, 0x00, 0x2c, 0x7d, 0x09, 0x42, 0x14, 0x7f, 0x89, 0x40, 0x00, - 0x41, 0xbc, 0x00, 0x14, 0x48, 0x00, 0x01, 0x5c, 0x39, 0x29, 0x00, 0x04, - 0x7f, 0x89, 0x40, 0x00, 0x40, 0x9c, 0x01, 0x50, 0x81, 0x49, 0x00, 0x00, - 0x7f, 0x8a, 0x38, 0x00, 0x40, 0x9e, 0xff, 0xec, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf8, 0x8d, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xf9, 0xb0, 0x39, 0x20, 0x01, 0x15, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0x30, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x9d, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x34, 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x04, - 0x81, 0x41, 0x00, 0x2c, 0x7d, 0x23, 0x4b, 0x78, 0x91, 0x49, 0x00, 0x00, - 0x4b, 0xe4, 0x35, 0x1d, 0x4b, 0xff, 0xf9, 0x68, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x61, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x38, 0x83, 0xc1, 0x00, 0x28, 0x82, 0x81, 0x00, 0x2c, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0x9e, 0x00, 0x88, 0x7f, 0x7e, 0xa0, 0x50, - 0x3d, 0x3e, 0xf0, 0x00, 0x2f, 0x9b, 0x04, 0x00, 0x7f, 0xc6, 0xf3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x09, 0xc0, 0x40, 0x40, 0x9d, 0x00, 0x08, 0x3b, 0x60, 0x04, 0x00, - 0x7f, 0x67, 0xdb, 0x78, 0x40, 0x99, 0x00, 0x38, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x7f, 0x67, 0xdb, 0x78, - 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xff, 0xf7, 0x01, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x68, 0x7f, 0xc3, 0xf3, 0x78, 0x7f, 0x24, 0xcb, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x4b, 0xe5, 0x34, 0x75, 0x48, 0x00, 0x00, 0x18, - 0x4b, 0xff, 0xf6, 0xe1, 0x7f, 0x99, 0xf0, 0x00, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x44, 0x41, 0xbe, 0xff, 0xdc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x40, 0x9e, 0xff, 0x80, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xa1, 0x04, 0x2c, 0x4b, 0xff, 0xf7, 0x6d, - 0x4b, 0xff, 0xf8, 0x94, 0x39, 0x20, 0x00, 0x00, 0x4b, 0xff, 0xfe, 0xbc, - 0x4b, 0xf6, 0x7a, 0x49, 0x4b, 0xff, 0xf8, 0x84, 0x39, 0x20, 0x00, 0xc4, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfb, 0x04, 0x39, 0x20, 0x00, 0xa7, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xf8, 0x39, 0x20, 0x00, 0x67, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xec, 0x39, 0x20, 0x00, 0x5d, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xe0, 0x39, 0x20, 0x00, 0x71, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xd4, 0x7c, 0x67, 0x1b, 0x78, - 0x4b, 0xff, 0xfd, 0x7c, 0x39, 0x20, 0x00, 0x9c, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfa, 0xc0, 0x7c, 0x64, 0x1b, 0x78, 0x4b, 0xff, 0xfd, 0xc0, - 0x39, 0x20, 0x00, 0xf1, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xac, - 0x39, 0x20, 0x00, 0xda, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xa0, - 0x39, 0x20, 0x00, 0xb4, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x94, - 0x39, 0x20, 0x01, 0x05, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x88, - 0x39, 0x20, 0x01, 0x1e, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x7c, - 0x39, 0x20, 0x00, 0x7b, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x70, - 0x39, 0x20, 0x00, 0x8a, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x64, - 0x94, 0x21, 0xff, 0xa0, 0x7c, 0x08, 0x02, 0xa6, 0x7d, 0x80, 0x00, 0x26, - 0x93, 0x81, 0x00, 0x50, 0x3b, 0x80, 0xff, 0xff, 0x2d, 0x9c, 0xff, 0xff, - 0x92, 0x81, 0x00, 0x30, 0x92, 0xa1, 0x00, 0x34, 0x3a, 0x80, 0x00, 0x3e, - 0x92, 0xc1, 0x00, 0x38, 0x3a, 0xa0, 0x00, 0x3a, 0x92, 0xe1, 0x00, 0x3c, - 0x3a, 0xc0, 0x00, 0x37, 0x93, 0x01, 0x00, 0x40, 0x3a, 0xe0, 0x00, 0x35, - 0x93, 0x21, 0x00, 0x44, 0x3b, 0x00, 0x00, 0x33, 0x93, 0x41, 0x00, 0x48, - 0x3b, 0x20, 0x00, 0x02, 0x93, 0x61, 0x00, 0x4c, 0x3b, 0x40, 0x1c, 0xa3, - 0x93, 0xa1, 0x00, 0x54, 0x3b, 0x60, 0x00, 0x00, 0x90, 0x01, 0x00, 0x64, - 0x7c, 0x9d, 0x23, 0x78, 0x93, 0xc1, 0x00, 0x58, 0x93, 0xe1, 0x00, 0x5c, - 0x91, 0x81, 0x00, 0x2c, 0x4b, 0xed, 0x69, 0x3d, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xed, 0x81, 0xed, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x40, 0x92, 0x00, 0x4c, - 0x93, 0x1d, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, 0x2f, 0x9c, 0xff, 0xff, - 0x41, 0x9e, 0x00, 0x0c, 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xed, 0x83, 0x15, - 0x40, 0x92, 0x00, 0x84, 0x93, 0xdd, 0x00, 0x00, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xed, 0x81, 0xa5, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x41, 0xb2, 0xff, 0xbc, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa0, 0x00, 0x10, 0x4b, 0xed, 0x6c, 0x8d, - 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x54, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x80, 0x00, 0x01, 0x4b, 0xed, 0x6f, 0x79, 0x7c, 0x7e, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x48, 0x39, 0x20, 0x00, 0x10, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa1, 0x00, 0x18, 0x91, 0x21, 0x00, 0x18, - 0x4b, 0xed, 0x6a, 0xd9, 0x2f, 0x83, 0xff, 0xff, 0x7c, 0x7c, 0x1b, 0x78, - 0x40, 0x9e, 0x00, 0x2c, 0x92, 0xbd, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, - 0x7f, 0xe3, 0xfb, 0x78, 0x4b, 0xed, 0x82, 0x89, 0x93, 0xdd, 0x00, 0x00, - 0x4b, 0xff, 0xff, 0x78, 0x92, 0xfd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x58, - 0x92, 0xdd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x50, 0x7f, 0xe3, 0xfb, 0x78, - 0x4b, 0xed, 0x82, 0x69, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0x84, 0xe3, 0x78, - 0x4b, 0xff, 0xf6, 0x05, 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x14, - 0x7f, 0x83, 0xe3, 0x78, 0x3b, 0x80, 0xff, 0xff, 0x4b, 0xed, 0x82, 0x49, - 0x4b, 0xff, 0xfe, 0xf4, 0x92, 0x9d, 0x00, 0x04, 0x3b, 0xe0, 0xff, 0xff, - 0x4e, 0x0c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x1c -}; -static const unsigned int codehandler_text_bin_len = 3260; diff --git a/installer/src/codehandler410.h b/installer/src/codehandler410.h deleted file mode 100644 index 739d3c1..0000000 --- a/installer/src/codehandler410.h +++ /dev/null @@ -1,275 +0,0 @@ -static const unsigned char codehandler_text_bin[] = { - 0x94, 0x21, 0xff, 0xe8, 0x7c, 0x08, 0x02, 0xa6, 0x3d, 0x20, 0x10, 0x05, - 0x81, 0x29, 0x9e, 0xdc, 0x93, 0x81, 0x00, 0x08, 0x7c, 0x7c, 0x1b, 0x78, - 0x38, 0x60, 0x00, 0x00, 0x93, 0xa1, 0x00, 0x0c, 0x93, 0xe1, 0x00, 0x14, - 0x7c, 0x9d, 0x23, 0x78, 0x90, 0x01, 0x00, 0x1c, 0x60, 0x63, 0x86, 0xa8, - 0x93, 0xc1, 0x00, 0x10, 0x38, 0x80, 0x00, 0x40, 0x7d, 0x29, 0x03, 0xa6, - 0x4e, 0x80, 0x04, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x82, 0x00, 0x50, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x60, 0xa5, 0x86, 0xa8, - 0x3b, 0xdf, 0x00, 0x08, 0x4b, 0xe5, 0x76, 0x79, 0x3c, 0xff, 0x00, 0x01, - 0x3c, 0x80, 0x01, 0x1e, 0x39, 0x00, 0x00, 0x00, 0x7f, 0xc3, 0xf3, 0x78, - 0x38, 0x84, 0xa3, 0x28, 0x38, 0xa0, 0x00, 0x00, 0x7f, 0xe6, 0xfb, 0x78, - 0x38, 0xe7, 0x86, 0xa8, 0x61, 0x08, 0x80, 0x00, 0x39, 0x20, 0x00, 0x00, - 0x39, 0x40, 0x00, 0x0c, 0x4b, 0xe6, 0x22, 0x81, 0x7f, 0xc3, 0xf3, 0x78, - 0x4b, 0xe6, 0x27, 0x5d, 0x3d, 0x20, 0x10, 0x06, 0x80, 0x01, 0x00, 0x1c, - 0x81, 0x29, 0xa8, 0xc0, 0x7f, 0x83, 0xe3, 0x78, 0x83, 0xc1, 0x00, 0x10, - 0x7f, 0xa4, 0xeb, 0x78, 0x83, 0x81, 0x00, 0x08, 0x7d, 0x29, 0x03, 0xa6, - 0x83, 0xa1, 0x00, 0x0c, 0x83, 0xe1, 0x00, 0x14, 0x7c, 0x08, 0x03, 0xa6, - 0x38, 0x21, 0x00, 0x18, 0x4e, 0x80, 0x04, 0x20, 0x94, 0x21, 0xff, 0xe8, - 0x7c, 0x08, 0x02, 0xa6, 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x20, - 0x38, 0x81, 0x00, 0x08, 0x90, 0x01, 0x00, 0x1c, 0x4b, 0xed, 0xb3, 0xe1, - 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x00, 0x0c, 0x41, 0x82, 0x00, 0x18, - 0x88, 0x61, 0x00, 0x08, 0x80, 0x01, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x18, - 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0xff, 0xff, - 0x4b, 0xff, 0xff, 0xec, 0x94, 0x21, 0xff, 0xe0, 0x7c, 0x08, 0x02, 0xa6, - 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, 0x93, 0x61, 0x00, 0x0c, - 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, 0x93, 0xc1, 0x00, 0x18, - 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, 0x41, 0xa1, 0x00, 0x0c, - 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, 0x38, 0xc0, 0x00, 0x00, - 0x4b, 0xed, 0xb3, 0x65, 0x7c, 0x69, 0x1b, 0x79, 0x7f, 0xe9, 0xf8, 0x50, - 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, 0x40, 0x80, 0xff, 0xd8, - 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x5c, 0x91, 0x5b, 0x00, 0x00, - 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, 0x91, 0x3c, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, - 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, - 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, 0x38, 0x60, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x94, 0x21, 0xff, 0xe0, - 0x7c, 0x08, 0x02, 0xa6, 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, - 0x93, 0x61, 0x00, 0x0c, 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, - 0x7c, 0x7c, 0x1b, 0x78, 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, - 0x93, 0xc1, 0x00, 0x18, 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, - 0x41, 0xa1, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, - 0x7f, 0xc4, 0xf3, 0x78, 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x4b, 0xed, 0xbb, 0x09, 0x7c, 0x69, 0x1b, 0x79, - 0x7f, 0xe9, 0xf8, 0x50, 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, - 0x40, 0x80, 0xff, 0xd8, 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x7d, - 0x91, 0x5b, 0x00, 0x00, 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, - 0x91, 0x3c, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, - 0x38, 0x60, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, - 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, - 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, - 0x7c, 0x08, 0x02, 0xa6, 0x94, 0x21, 0xfb, 0x90, 0x92, 0xe1, 0x04, 0x4c, - 0x3e, 0xe0, 0x00, 0x00, 0x90, 0x01, 0x04, 0x74, 0x3a, 0xf7, 0x01, 0x9a, - 0x92, 0x41, 0x04, 0x38, 0x92, 0x61, 0x04, 0x3c, 0x92, 0x81, 0x04, 0x40, - 0x93, 0x61, 0x04, 0x5c, 0x93, 0xc1, 0x04, 0x68, 0x93, 0xe1, 0x04, 0x6c, - 0x92, 0xa1, 0x04, 0x44, 0x3a, 0xa0, 0xff, 0xaa, 0x92, 0xc1, 0x04, 0x48, - 0x3a, 0xc0, 0xff, 0x82, 0x93, 0x01, 0x04, 0x50, 0x3f, 0x00, 0x40, 0x00, - 0x93, 0x21, 0x04, 0x54, 0x3b, 0x21, 0x00, 0x28, 0x93, 0x41, 0x04, 0x58, - 0x3b, 0x43, 0x00, 0x04, 0x93, 0x81, 0x04, 0x60, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x04, 0x64, 0x7c, 0x9d, 0x23, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x4b, 0xff, 0xfd, 0xc9, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x68, - 0x2f, 0x9f, 0x00, 0x41, 0x41, 0x9e, 0x06, 0x88, 0x40, 0x9d, 0x00, 0x58, - 0x2f, 0x9f, 0x00, 0x72, 0x41, 0x9e, 0x05, 0xbc, 0x41, 0x9d, 0x01, 0x78, - 0x2f, 0x9f, 0x00, 0x70, 0x41, 0x9e, 0x02, 0xfc, 0x41, 0x9d, 0x04, 0xe8, - 0x2f, 0x9f, 0x00, 0x50, 0x40, 0xbe, 0xff, 0xc8, 0x39, 0x20, 0x00, 0x01, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, 0x99, 0x21, 0x04, 0x2c, - 0x4b, 0xff, 0xfe, 0x7d, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0xa0, - 0x39, 0x20, 0x00, 0xd1, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x02, 0x20, - 0x2f, 0x9f, 0x00, 0x03, 0x41, 0x9e, 0x05, 0xec, 0x40, 0x9d, 0x02, 0x64, - 0x2f, 0x9f, 0x00, 0x0b, 0x41, 0x9e, 0x03, 0x58, 0x2f, 0x9f, 0x00, 0x0c, - 0x41, 0x9e, 0x03, 0xdc, 0x2f, 0x9f, 0x00, 0x04, 0x40, 0x9e, 0xff, 0x70, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfd, 0x69, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x07, 0x64, 0x83, 0xc1, 0x00, 0x28, - 0x3a, 0x40, 0xff, 0xb0, 0x82, 0x81, 0x00, 0x2c, 0x3a, 0x60, 0xff, 0xbd, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0xbe, 0xff, 0x38, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x40, 0x9d, 0x00, 0x7c, 0x3b, 0x60, 0x04, 0x00, - 0x89, 0x3e, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x78, - 0x7f, 0x69, 0x03, 0xa6, 0x48, 0x00, 0x00, 0x10, 0x7d, 0x5e, 0x48, 0xae, - 0x2f, 0x8a, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x64, 0x39, 0x29, 0x00, 0x01, - 0x42, 0x00, 0xff, 0xf0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x9a, 0x41, 0x04, 0x2c, 0x4b, 0xff, 0xfd, 0xb9, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x06, 0xfc, 0x7f, 0xa3, 0xeb, 0x78, 0x4b, 0xff, 0xfc, 0xa1, - 0x2f, 0x83, 0x00, 0xcc, 0x41, 0xbe, 0xfe, 0xcc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x41, 0xbe, 0xfe, 0xc0, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x41, 0xbd, 0xff, 0x8c, 0x2f, 0x9b, 0x00, 0x00, - 0x41, 0x9d, 0xff, 0x88, 0x41, 0xbe, 0xff, 0xac, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x38, 0x61, 0x00, 0x29, 0x4b, 0xe5, 0x72, 0x81, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xfb, 0x00, 0x01, 0x9a, 0x61, 0x00, 0x28, - 0x4b, 0xff, 0xfd, 0x51, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0x9c, - 0x39, 0x20, 0x00, 0x8f, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0xf4, - 0x2f, 0x9f, 0x00, 0x99, 0x41, 0x9e, 0x02, 0x08, 0x2f, 0x9f, 0x00, 0x9a, - 0x41, 0x9e, 0x02, 0x8c, 0x2f, 0x9f, 0x00, 0x80, 0x40, 0x9e, 0xfe, 0x50, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x44, 0x4b, 0xff, 0xfc, 0x49, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x06, 0x38, 0x80, 0x81, 0x00, 0x4c, - 0x81, 0x61, 0x00, 0x28, 0x90, 0x81, 0x00, 0x08, 0x80, 0x81, 0x00, 0x50, - 0x7d, 0x69, 0x03, 0xa6, 0x80, 0xa1, 0x00, 0x34, 0x90, 0x81, 0x00, 0x0c, - 0x80, 0x81, 0x00, 0x54, 0x80, 0xc1, 0x00, 0x38, 0x90, 0x81, 0x00, 0x10, - 0x80, 0x81, 0x00, 0x58, 0x80, 0xe1, 0x00, 0x3c, 0x90, 0x81, 0x00, 0x14, - 0x80, 0x81, 0x00, 0x5c, 0x81, 0x01, 0x00, 0x40, 0x90, 0x81, 0x00, 0x18, - 0x80, 0x81, 0x00, 0x60, 0x81, 0x21, 0x00, 0x44, 0x90, 0x81, 0x00, 0x1c, - 0x80, 0x81, 0x00, 0x64, 0x81, 0x41, 0x00, 0x48, 0x90, 0x81, 0x00, 0x20, - 0x80, 0x81, 0x00, 0x68, 0x80, 0x61, 0x00, 0x2c, 0x90, 0x81, 0x00, 0x24, - 0x80, 0x81, 0x00, 0x30, 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, - 0x90, 0x61, 0x00, 0x28, 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xfc, 0x79, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfd, 0x9c, - 0x39, 0x20, 0x01, 0x36, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0x1c, - 0x4b, 0xe6, 0x0b, 0xfd, 0x81, 0x23, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x06, - 0x41, 0x9e, 0x04, 0xf8, 0x39, 0x20, 0x00, 0x54, 0x91, 0x3c, 0x00, 0x04, - 0x80, 0x01, 0x04, 0x74, 0x38, 0x60, 0x00, 0x00, 0x93, 0xfc, 0x00, 0x00, - 0x7c, 0x08, 0x03, 0xa6, 0x82, 0x41, 0x04, 0x38, 0x82, 0x61, 0x04, 0x3c, - 0x82, 0x81, 0x04, 0x40, 0x82, 0xa1, 0x04, 0x44, 0x82, 0xc1, 0x04, 0x48, - 0x82, 0xe1, 0x04, 0x4c, 0x83, 0x01, 0x04, 0x50, 0x83, 0x21, 0x04, 0x54, - 0x83, 0x41, 0x04, 0x58, 0x83, 0x61, 0x04, 0x5c, 0x83, 0x81, 0x04, 0x60, - 0x83, 0xa1, 0x04, 0x64, 0x83, 0xc1, 0x04, 0x68, 0x83, 0xe1, 0x04, 0x6c, - 0x38, 0x21, 0x04, 0x70, 0x4e, 0x80, 0x00, 0x20, 0x2f, 0x9f, 0x00, 0x01, - 0x41, 0x9e, 0x01, 0xfc, 0x2f, 0x9f, 0x00, 0x02, 0x40, 0xbe, 0xfd, 0x18, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0x90, 0x81, 0x21, 0x00, 0x28, - 0x38, 0x80, 0x00, 0x02, 0xa1, 0x41, 0x00, 0x2e, 0x7d, 0x23, 0x4b, 0x78, - 0xb1, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x70, 0x91, 0x4b, 0xff, 0xfc, 0xdc, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x24, 0x4b, 0xff, 0xfa, 0xd5, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0xa0, 0x81, 0x61, 0x00, 0x28, - 0x80, 0xa1, 0x00, 0x34, 0x80, 0xc1, 0x00, 0x38, 0x7d, 0x69, 0x03, 0xa6, - 0x80, 0xe1, 0x00, 0x3c, 0x81, 0x01, 0x00, 0x40, 0x81, 0x21, 0x00, 0x44, - 0x81, 0x41, 0x00, 0x48, 0x80, 0x61, 0x00, 0x2c, 0x80, 0x81, 0x00, 0x30, - 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, 0x90, 0x61, 0x00, 0x28, - 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x45, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x68, 0x39, 0x20, 0x00, 0xea, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xe8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xc1, 0x04, 0x2c, 0x4b, 0xff, 0xfb, 0x15, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x38, 0x39, 0x20, 0x01, 0x3b, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xb8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfa, 0x25, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x03, 0xd0, 0x83, 0xc1, 0x00, 0x2c, 0x83, 0xe1, 0x00, 0x28, - 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, 0x7f, 0xc5, 0xf3, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x01, - 0x7f, 0xe9, 0xfb, 0x78, 0x7c, 0x3e, 0x0b, 0x78, 0x38, 0x00, 0x35, 0x00, - 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0xf3, 0x78, - 0x4b, 0xff, 0xfb, 0xd0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x92, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x89, 0x7c, 0x7f, 0x1b, 0x79, - 0x40, 0x80, 0xfb, 0xac, 0x39, 0x20, 0x01, 0x44, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfe, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x4b, 0xff, 0xf9, 0x99, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x03, 0x0c, - 0x83, 0xe1, 0x00, 0x28, 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x01, 0x7f, 0xe9, 0xfb, 0x78, 0x38, 0x00, 0x34, 0x00, - 0x7c, 0x3f, 0x0b, 0x78, 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, - 0x7f, 0xe1, 0xfb, 0x78, 0x7c, 0x7f, 0x1b, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x93, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x01, - 0x4b, 0xff, 0xfb, 0x28, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xf9, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0xac, - 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x01, 0x89, 0x41, 0x00, 0x2f, - 0x7d, 0x23, 0x4b, 0x78, 0x99, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x6e, 0xa1, - 0x4b, 0xff, 0xfa, 0xec, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x4b, 0xff, 0xf8, 0xe5, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x02, 0x88, - 0x88, 0xe1, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x54, 0xe7, 0x06, 0x3e, - 0x4b, 0xff, 0xf8, 0xc1, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x80, - 0x38, 0x81, 0x04, 0x30, 0x38, 0x61, 0x00, 0x30, 0x83, 0xe1, 0x00, 0x2c, - 0x4b, 0xe4, 0xcd, 0xfd, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x7f, 0xf9, 0xfa, 0x14, 0x4b, 0xff, 0xf8, 0x8d, 0x2c, 0x03, 0x00, 0x00, - 0x41, 0x80, 0x02, 0x44, 0x88, 0x81, 0x04, 0x2c, 0x80, 0x61, 0x04, 0x30, - 0x7f, 0xe5, 0xfb, 0x78, 0x54, 0x84, 0x06, 0x3e, 0x38, 0xc1, 0x04, 0x2c, - 0x4b, 0xe4, 0xe3, 0xc1, 0x81, 0x21, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf9, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfa, 0x34, 0x39, 0x20, 0x01, 0x00, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xb4, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x0c, 0x4b, 0xff, 0xf8, 0x21, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x02, 0x04, 0x81, 0x21, 0x00, 0x28, 0x81, 0x01, 0x00, 0x30, - 0x80, 0xe1, 0x00, 0x2c, 0x7d, 0x09, 0x42, 0x14, 0x7f, 0x89, 0x40, 0x00, - 0x41, 0xbc, 0x00, 0x14, 0x48, 0x00, 0x01, 0x5c, 0x39, 0x29, 0x00, 0x04, - 0x7f, 0x89, 0x40, 0x00, 0x40, 0x9c, 0x01, 0x50, 0x81, 0x49, 0x00, 0x00, - 0x7f, 0x8a, 0x38, 0x00, 0x40, 0x9e, 0xff, 0xec, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf8, 0x8d, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xf9, 0xb0, 0x39, 0x20, 0x01, 0x15, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0x30, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x9d, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x34, 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x04, - 0x81, 0x41, 0x00, 0x2c, 0x7d, 0x23, 0x4b, 0x78, 0x91, 0x49, 0x00, 0x00, - 0x4b, 0xe4, 0x6d, 0x1d, 0x4b, 0xff, 0xf9, 0x68, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x61, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x38, 0x83, 0xc1, 0x00, 0x28, 0x82, 0x81, 0x00, 0x2c, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0x9e, 0x00, 0x88, 0x7f, 0x7e, 0xa0, 0x50, - 0x3d, 0x3e, 0xf0, 0x00, 0x2f, 0x9b, 0x04, 0x00, 0x7f, 0xc6, 0xf3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x09, 0xc0, 0x40, 0x40, 0x9d, 0x00, 0x08, 0x3b, 0x60, 0x04, 0x00, - 0x7f, 0x67, 0xdb, 0x78, 0x40, 0x99, 0x00, 0x38, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x7f, 0x67, 0xdb, 0x78, - 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xff, 0xf7, 0x01, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x68, 0x7f, 0xc3, 0xf3, 0x78, 0x7f, 0x24, 0xcb, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x4b, 0xe5, 0x6c, 0xc1, 0x48, 0x00, 0x00, 0x18, - 0x4b, 0xff, 0xf6, 0xe1, 0x7f, 0x99, 0xf0, 0x00, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x44, 0x41, 0xbe, 0xff, 0xdc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x40, 0x9e, 0xff, 0x80, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xa1, 0x04, 0x2c, 0x4b, 0xff, 0xf7, 0x6d, - 0x4b, 0xff, 0xf8, 0x94, 0x39, 0x20, 0x00, 0x00, 0x4b, 0xff, 0xfe, 0xbc, - 0x4b, 0xf6, 0xb2, 0x49, 0x4b, 0xff, 0xf8, 0x84, 0x39, 0x20, 0x00, 0xc4, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfb, 0x04, 0x39, 0x20, 0x00, 0xa7, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xf8, 0x39, 0x20, 0x00, 0x67, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xec, 0x39, 0x20, 0x00, 0x5d, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xe0, 0x39, 0x20, 0x00, 0x71, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xd4, 0x7c, 0x67, 0x1b, 0x78, - 0x4b, 0xff, 0xfd, 0x7c, 0x39, 0x20, 0x00, 0x9c, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfa, 0xc0, 0x7c, 0x64, 0x1b, 0x78, 0x4b, 0xff, 0xfd, 0xc0, - 0x39, 0x20, 0x00, 0xf1, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xac, - 0x39, 0x20, 0x00, 0xda, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xa0, - 0x39, 0x20, 0x00, 0xb4, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x94, - 0x39, 0x20, 0x01, 0x05, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x88, - 0x39, 0x20, 0x01, 0x1e, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x7c, - 0x39, 0x20, 0x00, 0x7b, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x70, - 0x39, 0x20, 0x00, 0x8a, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x64, - 0x94, 0x21, 0xff, 0xa0, 0x7c, 0x08, 0x02, 0xa6, 0x7d, 0x80, 0x00, 0x26, - 0x93, 0x81, 0x00, 0x50, 0x3b, 0x80, 0xff, 0xff, 0x2d, 0x9c, 0xff, 0xff, - 0x92, 0x81, 0x00, 0x30, 0x92, 0xa1, 0x00, 0x34, 0x3a, 0x80, 0x00, 0x3e, - 0x92, 0xc1, 0x00, 0x38, 0x3a, 0xa0, 0x00, 0x3a, 0x92, 0xe1, 0x00, 0x3c, - 0x3a, 0xc0, 0x00, 0x37, 0x93, 0x01, 0x00, 0x40, 0x3a, 0xe0, 0x00, 0x35, - 0x93, 0x21, 0x00, 0x44, 0x3b, 0x00, 0x00, 0x33, 0x93, 0x41, 0x00, 0x48, - 0x3b, 0x20, 0x00, 0x02, 0x93, 0x61, 0x00, 0x4c, 0x3b, 0x40, 0x1c, 0xa3, - 0x93, 0xa1, 0x00, 0x54, 0x3b, 0x60, 0x00, 0x00, 0x90, 0x01, 0x00, 0x64, - 0x7c, 0x9d, 0x23, 0x78, 0x93, 0xc1, 0x00, 0x58, 0x93, 0xe1, 0x00, 0x5c, - 0x91, 0x81, 0x00, 0x2c, 0x4b, 0xed, 0xa1, 0x3d, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xed, 0xb9, 0xed, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x40, 0x92, 0x00, 0x4c, - 0x93, 0x1d, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, 0x2f, 0x9c, 0xff, 0xff, - 0x41, 0x9e, 0x00, 0x0c, 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xed, 0xbb, 0x15, - 0x40, 0x92, 0x00, 0x84, 0x93, 0xdd, 0x00, 0x00, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xed, 0xb9, 0xa5, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x41, 0xb2, 0xff, 0xbc, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa0, 0x00, 0x10, 0x4b, 0xed, 0xa4, 0x8d, - 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x54, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x80, 0x00, 0x01, 0x4b, 0xed, 0xa7, 0x79, 0x7c, 0x7e, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x48, 0x39, 0x20, 0x00, 0x10, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa1, 0x00, 0x18, 0x91, 0x21, 0x00, 0x18, - 0x4b, 0xed, 0xa2, 0xd9, 0x2f, 0x83, 0xff, 0xff, 0x7c, 0x7c, 0x1b, 0x78, - 0x40, 0x9e, 0x00, 0x2c, 0x92, 0xbd, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, - 0x7f, 0xe3, 0xfb, 0x78, 0x4b, 0xed, 0xba, 0x89, 0x93, 0xdd, 0x00, 0x00, - 0x4b, 0xff, 0xff, 0x78, 0x92, 0xfd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x58, - 0x92, 0xdd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x50, 0x7f, 0xe3, 0xfb, 0x78, - 0x4b, 0xed, 0xba, 0x69, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0x84, 0xe3, 0x78, - 0x4b, 0xff, 0xf6, 0x05, 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x14, - 0x7f, 0x83, 0xe3, 0x78, 0x3b, 0x80, 0xff, 0xff, 0x4b, 0xed, 0xba, 0x49, - 0x4b, 0xff, 0xfe, 0xf4, 0x92, 0x9d, 0x00, 0x04, 0x3b, 0xe0, 0xff, 0xff, - 0x4e, 0x0c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x1c -}; -static const unsigned int codehandler_text_bin_len = 3260; diff --git a/installer/src/codehandler500.h b/installer/src/codehandler500.h deleted file mode 100644 index 501b99d..0000000 --- a/installer/src/codehandler500.h +++ /dev/null @@ -1,275 +0,0 @@ -static const unsigned char codehandler_text_bin[] = { - 0x94, 0x21, 0xff, 0xe8, 0x7c, 0x08, 0x02, 0xa6, 0x3d, 0x20, 0x10, 0x05, - 0x81, 0x29, 0xe2, 0xd0, 0x93, 0x81, 0x00, 0x08, 0x7c, 0x7c, 0x1b, 0x78, - 0x38, 0x60, 0x00, 0x00, 0x93, 0xa1, 0x00, 0x0c, 0x93, 0xe1, 0x00, 0x14, - 0x7c, 0x9d, 0x23, 0x78, 0x90, 0x01, 0x00, 0x1c, 0x60, 0x63, 0x86, 0xa8, - 0x93, 0xc1, 0x00, 0x10, 0x38, 0x80, 0x00, 0x40, 0x7d, 0x29, 0x03, 0xa6, - 0x4e, 0x80, 0x04, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x82, 0x00, 0x50, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x60, 0xa5, 0x86, 0xa8, - 0x3b, 0xdf, 0x00, 0x08, 0x4b, 0xe5, 0x97, 0xf5, 0x3c, 0xff, 0x00, 0x01, - 0x3c, 0x80, 0x01, 0x1e, 0x39, 0x00, 0x00, 0x00, 0x7f, 0xc3, 0xf3, 0x78, - 0x38, 0x84, 0xc7, 0x28, 0x38, 0xa0, 0x00, 0x00, 0x7f, 0xe6, 0xfb, 0x78, - 0x38, 0xe7, 0x86, 0xa8, 0x61, 0x08, 0x80, 0x00, 0x39, 0x20, 0x00, 0x00, - 0x39, 0x40, 0x00, 0x0c, 0x4b, 0xe6, 0x47, 0xf9, 0x7f, 0xc3, 0xf3, 0x78, - 0x4b, 0xe6, 0x4c, 0xd9, 0x3d, 0x20, 0x10, 0x06, 0x80, 0x01, 0x00, 0x1c, - 0x81, 0x29, 0xcb, 0x00, 0x7f, 0x83, 0xe3, 0x78, 0x83, 0xc1, 0x00, 0x10, - 0x7f, 0xa4, 0xeb, 0x78, 0x83, 0x81, 0x00, 0x08, 0x7d, 0x29, 0x03, 0xa6, - 0x83, 0xa1, 0x00, 0x0c, 0x83, 0xe1, 0x00, 0x14, 0x7c, 0x08, 0x03, 0xa6, - 0x38, 0x21, 0x00, 0x18, 0x4e, 0x80, 0x04, 0x20, 0x94, 0x21, 0xff, 0xe8, - 0x7c, 0x08, 0x02, 0xa6, 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x20, - 0x38, 0x81, 0x00, 0x08, 0x90, 0x01, 0x00, 0x1c, 0x4b, 0xee, 0x3e, 0x0d, - 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x00, 0x0c, 0x41, 0x82, 0x00, 0x18, - 0x88, 0x61, 0x00, 0x08, 0x80, 0x01, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x18, - 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0xff, 0xff, - 0x4b, 0xff, 0xff, 0xec, 0x94, 0x21, 0xff, 0xe0, 0x7c, 0x08, 0x02, 0xa6, - 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, 0x93, 0x61, 0x00, 0x0c, - 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, 0x93, 0xc1, 0x00, 0x18, - 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, 0x41, 0xa1, 0x00, 0x0c, - 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, 0x38, 0xc0, 0x00, 0x00, - 0x4b, 0xee, 0x3d, 0x91, 0x7c, 0x69, 0x1b, 0x79, 0x7f, 0xe9, 0xf8, 0x50, - 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, 0x40, 0x80, 0xff, 0xd8, - 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x5c, 0x91, 0x5b, 0x00, 0x00, - 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, 0x91, 0x3c, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, - 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, - 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, 0x38, 0x60, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x94, 0x21, 0xff, 0xe0, - 0x7c, 0x08, 0x02, 0xa6, 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, - 0x93, 0x61, 0x00, 0x0c, 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, - 0x7c, 0x7c, 0x1b, 0x78, 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, - 0x93, 0xc1, 0x00, 0x18, 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, - 0x41, 0xa1, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, - 0x7f, 0xc4, 0xf3, 0x78, 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x4b, 0xee, 0x48, 0x8d, 0x7c, 0x69, 0x1b, 0x79, - 0x7f, 0xe9, 0xf8, 0x50, 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, - 0x40, 0x80, 0xff, 0xd8, 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x7d, - 0x91, 0x5b, 0x00, 0x00, 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, - 0x91, 0x3c, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, - 0x38, 0x60, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, - 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, - 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, - 0x7c, 0x08, 0x02, 0xa6, 0x94, 0x21, 0xfb, 0x90, 0x92, 0xe1, 0x04, 0x4c, - 0x3e, 0xe0, 0x00, 0x00, 0x90, 0x01, 0x04, 0x74, 0x3a, 0xf7, 0x01, 0xf4, - 0x92, 0x41, 0x04, 0x38, 0x92, 0x61, 0x04, 0x3c, 0x92, 0x81, 0x04, 0x40, - 0x93, 0x61, 0x04, 0x5c, 0x93, 0xc1, 0x04, 0x68, 0x93, 0xe1, 0x04, 0x6c, - 0x92, 0xa1, 0x04, 0x44, 0x3a, 0xa0, 0xff, 0xaa, 0x92, 0xc1, 0x04, 0x48, - 0x3a, 0xc0, 0xff, 0x82, 0x93, 0x01, 0x04, 0x50, 0x3f, 0x00, 0x40, 0x00, - 0x93, 0x21, 0x04, 0x54, 0x3b, 0x21, 0x00, 0x28, 0x93, 0x41, 0x04, 0x58, - 0x3b, 0x43, 0x00, 0x04, 0x93, 0x81, 0x04, 0x60, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x04, 0x64, 0x7c, 0x9d, 0x23, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x4b, 0xff, 0xfd, 0xc9, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x68, - 0x2f, 0x9f, 0x00, 0x41, 0x41, 0x9e, 0x06, 0x88, 0x40, 0x9d, 0x00, 0x58, - 0x2f, 0x9f, 0x00, 0x72, 0x41, 0x9e, 0x05, 0xbc, 0x41, 0x9d, 0x01, 0x78, - 0x2f, 0x9f, 0x00, 0x70, 0x41, 0x9e, 0x02, 0xfc, 0x41, 0x9d, 0x04, 0xe8, - 0x2f, 0x9f, 0x00, 0x50, 0x40, 0xbe, 0xff, 0xc8, 0x39, 0x20, 0x00, 0x01, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, 0x99, 0x21, 0x04, 0x2c, - 0x4b, 0xff, 0xfe, 0x7d, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0xa0, - 0x39, 0x20, 0x00, 0xd1, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x02, 0x20, - 0x2f, 0x9f, 0x00, 0x03, 0x41, 0x9e, 0x05, 0xec, 0x40, 0x9d, 0x02, 0x64, - 0x2f, 0x9f, 0x00, 0x0b, 0x41, 0x9e, 0x03, 0x58, 0x2f, 0x9f, 0x00, 0x0c, - 0x41, 0x9e, 0x03, 0xdc, 0x2f, 0x9f, 0x00, 0x04, 0x40, 0x9e, 0xff, 0x70, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfd, 0x69, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x07, 0x64, 0x83, 0xc1, 0x00, 0x28, - 0x3a, 0x40, 0xff, 0xb0, 0x82, 0x81, 0x00, 0x2c, 0x3a, 0x60, 0xff, 0xbd, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0xbe, 0xff, 0x38, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x40, 0x9d, 0x00, 0x7c, 0x3b, 0x60, 0x04, 0x00, - 0x89, 0x3e, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x78, - 0x7f, 0x69, 0x03, 0xa6, 0x48, 0x00, 0x00, 0x10, 0x7d, 0x5e, 0x48, 0xae, - 0x2f, 0x8a, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x64, 0x39, 0x29, 0x00, 0x01, - 0x42, 0x00, 0xff, 0xf0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x9a, 0x41, 0x04, 0x2c, 0x4b, 0xff, 0xfd, 0xb9, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x06, 0xfc, 0x7f, 0xa3, 0xeb, 0x78, 0x4b, 0xff, 0xfc, 0xa1, - 0x2f, 0x83, 0x00, 0xcc, 0x41, 0xbe, 0xfe, 0xcc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x41, 0xbe, 0xfe, 0xc0, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x41, 0xbd, 0xff, 0x8c, 0x2f, 0x9b, 0x00, 0x00, - 0x41, 0x9d, 0xff, 0x88, 0x41, 0xbe, 0xff, 0xac, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x38, 0x61, 0x00, 0x29, 0x4b, 0xe5, 0x93, 0xfd, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xfb, 0x00, 0x01, 0x9a, 0x61, 0x00, 0x28, - 0x4b, 0xff, 0xfd, 0x51, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0x9c, - 0x39, 0x20, 0x00, 0x8f, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0xf4, - 0x2f, 0x9f, 0x00, 0x99, 0x41, 0x9e, 0x02, 0x08, 0x2f, 0x9f, 0x00, 0x9a, - 0x41, 0x9e, 0x02, 0x8c, 0x2f, 0x9f, 0x00, 0x80, 0x40, 0x9e, 0xfe, 0x50, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x44, 0x4b, 0xff, 0xfc, 0x49, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x06, 0x38, 0x80, 0x81, 0x00, 0x4c, - 0x81, 0x61, 0x00, 0x28, 0x90, 0x81, 0x00, 0x08, 0x80, 0x81, 0x00, 0x50, - 0x7d, 0x69, 0x03, 0xa6, 0x80, 0xa1, 0x00, 0x34, 0x90, 0x81, 0x00, 0x0c, - 0x80, 0x81, 0x00, 0x54, 0x80, 0xc1, 0x00, 0x38, 0x90, 0x81, 0x00, 0x10, - 0x80, 0x81, 0x00, 0x58, 0x80, 0xe1, 0x00, 0x3c, 0x90, 0x81, 0x00, 0x14, - 0x80, 0x81, 0x00, 0x5c, 0x81, 0x01, 0x00, 0x40, 0x90, 0x81, 0x00, 0x18, - 0x80, 0x81, 0x00, 0x60, 0x81, 0x21, 0x00, 0x44, 0x90, 0x81, 0x00, 0x1c, - 0x80, 0x81, 0x00, 0x64, 0x81, 0x41, 0x00, 0x48, 0x90, 0x81, 0x00, 0x20, - 0x80, 0x81, 0x00, 0x68, 0x80, 0x61, 0x00, 0x2c, 0x90, 0x81, 0x00, 0x24, - 0x80, 0x81, 0x00, 0x30, 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, - 0x90, 0x61, 0x00, 0x28, 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xfc, 0x79, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfd, 0x9c, - 0x39, 0x20, 0x01, 0x36, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0x1c, - 0x4b, 0xe6, 0x31, 0x5d, 0x81, 0x23, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x06, - 0x41, 0x9e, 0x04, 0xf8, 0x39, 0x20, 0x00, 0x54, 0x91, 0x3c, 0x00, 0x04, - 0x80, 0x01, 0x04, 0x74, 0x38, 0x60, 0x00, 0x00, 0x93, 0xfc, 0x00, 0x00, - 0x7c, 0x08, 0x03, 0xa6, 0x82, 0x41, 0x04, 0x38, 0x82, 0x61, 0x04, 0x3c, - 0x82, 0x81, 0x04, 0x40, 0x82, 0xa1, 0x04, 0x44, 0x82, 0xc1, 0x04, 0x48, - 0x82, 0xe1, 0x04, 0x4c, 0x83, 0x01, 0x04, 0x50, 0x83, 0x21, 0x04, 0x54, - 0x83, 0x41, 0x04, 0x58, 0x83, 0x61, 0x04, 0x5c, 0x83, 0x81, 0x04, 0x60, - 0x83, 0xa1, 0x04, 0x64, 0x83, 0xc1, 0x04, 0x68, 0x83, 0xe1, 0x04, 0x6c, - 0x38, 0x21, 0x04, 0x70, 0x4e, 0x80, 0x00, 0x20, 0x2f, 0x9f, 0x00, 0x01, - 0x41, 0x9e, 0x01, 0xfc, 0x2f, 0x9f, 0x00, 0x02, 0x40, 0xbe, 0xfd, 0x18, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0x90, 0x81, 0x21, 0x00, 0x28, - 0x38, 0x80, 0x00, 0x02, 0xa1, 0x41, 0x00, 0x2e, 0x7d, 0x23, 0x4b, 0x78, - 0xb1, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x77, 0xe5, 0x4b, 0xff, 0xfc, 0xdc, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x24, 0x4b, 0xff, 0xfa, 0xd5, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0xa0, 0x81, 0x61, 0x00, 0x28, - 0x80, 0xa1, 0x00, 0x34, 0x80, 0xc1, 0x00, 0x38, 0x7d, 0x69, 0x03, 0xa6, - 0x80, 0xe1, 0x00, 0x3c, 0x81, 0x01, 0x00, 0x40, 0x81, 0x21, 0x00, 0x44, - 0x81, 0x41, 0x00, 0x48, 0x80, 0x61, 0x00, 0x2c, 0x80, 0x81, 0x00, 0x30, - 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, 0x90, 0x61, 0x00, 0x28, - 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x45, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x68, 0x39, 0x20, 0x00, 0xea, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xe8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xc1, 0x04, 0x2c, 0x4b, 0xff, 0xfb, 0x15, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x38, 0x39, 0x20, 0x01, 0x3b, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xb8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfa, 0x25, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x03, 0xd0, 0x83, 0xc1, 0x00, 0x2c, 0x83, 0xe1, 0x00, 0x28, - 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, 0x7f, 0xc5, 0xf3, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x01, - 0x7f, 0xe9, 0xfb, 0x78, 0x7c, 0x3e, 0x0b, 0x78, 0x38, 0x00, 0x35, 0x00, - 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0xf3, 0x78, - 0x4b, 0xff, 0xfb, 0xd0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x92, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x89, 0x7c, 0x7f, 0x1b, 0x79, - 0x40, 0x80, 0xfb, 0xac, 0x39, 0x20, 0x01, 0x44, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfe, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x4b, 0xff, 0xf9, 0x99, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x03, 0x0c, - 0x83, 0xe1, 0x00, 0x28, 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x01, 0x7f, 0xe9, 0xfb, 0x78, 0x38, 0x00, 0x34, 0x00, - 0x7c, 0x3f, 0x0b, 0x78, 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, - 0x7f, 0xe1, 0xfb, 0x78, 0x7c, 0x7f, 0x1b, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x93, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x01, - 0x4b, 0xff, 0xfb, 0x28, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xf9, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0xac, - 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x01, 0x89, 0x41, 0x00, 0x2f, - 0x7d, 0x23, 0x4b, 0x78, 0x99, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x75, 0xf5, - 0x4b, 0xff, 0xfa, 0xec, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x4b, 0xff, 0xf8, 0xe5, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x02, 0x88, - 0x88, 0xe1, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x54, 0xe7, 0x06, 0x3e, - 0x4b, 0xff, 0xf8, 0xc1, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x80, - 0x38, 0x81, 0x04, 0x30, 0x38, 0x61, 0x00, 0x30, 0x83, 0xe1, 0x00, 0x2c, - 0x4b, 0xe4, 0xd8, 0x75, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x7f, 0xf9, 0xfa, 0x14, 0x4b, 0xff, 0xf8, 0x8d, 0x2c, 0x03, 0x00, 0x00, - 0x41, 0x80, 0x02, 0x44, 0x88, 0x81, 0x04, 0x2c, 0x80, 0x61, 0x04, 0x30, - 0x7f, 0xe5, 0xfb, 0x78, 0x54, 0x84, 0x06, 0x3e, 0x38, 0xc1, 0x04, 0x2c, - 0x4b, 0xe4, 0xef, 0x45, 0x81, 0x21, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf9, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfa, 0x34, 0x39, 0x20, 0x01, 0x00, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xb4, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x0c, 0x4b, 0xff, 0xf8, 0x21, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x02, 0x04, 0x81, 0x21, 0x00, 0x28, 0x81, 0x01, 0x00, 0x30, - 0x80, 0xe1, 0x00, 0x2c, 0x7d, 0x09, 0x42, 0x14, 0x7f, 0x89, 0x40, 0x00, - 0x41, 0xbc, 0x00, 0x14, 0x48, 0x00, 0x01, 0x5c, 0x39, 0x29, 0x00, 0x04, - 0x7f, 0x89, 0x40, 0x00, 0x40, 0x9c, 0x01, 0x50, 0x81, 0x49, 0x00, 0x00, - 0x7f, 0x8a, 0x38, 0x00, 0x40, 0x9e, 0xff, 0xec, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf8, 0x8d, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xf9, 0xb0, 0x39, 0x20, 0x01, 0x15, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0x30, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x9d, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x34, 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x04, - 0x81, 0x41, 0x00, 0x2c, 0x7d, 0x23, 0x4b, 0x78, 0x91, 0x49, 0x00, 0x00, - 0x4b, 0xe4, 0x74, 0x71, 0x4b, 0xff, 0xf9, 0x68, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x61, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x38, 0x83, 0xc1, 0x00, 0x28, 0x82, 0x81, 0x00, 0x2c, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0x9e, 0x00, 0x88, 0x7f, 0x7e, 0xa0, 0x50, - 0x3d, 0x3e, 0xf0, 0x00, 0x2f, 0x9b, 0x04, 0x00, 0x7f, 0xc6, 0xf3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x09, 0xc0, 0x40, 0x40, 0x9d, 0x00, 0x08, 0x3b, 0x60, 0x04, 0x00, - 0x7f, 0x67, 0xdb, 0x78, 0x40, 0x99, 0x00, 0x38, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x7f, 0x67, 0xdb, 0x78, - 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xff, 0xf7, 0x01, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x68, 0x7f, 0xc3, 0xf3, 0x78, 0x7f, 0x24, 0xcb, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x4b, 0xe5, 0x8e, 0x3d, 0x48, 0x00, 0x00, 0x18, - 0x4b, 0xff, 0xf6, 0xe1, 0x7f, 0x99, 0xf0, 0x00, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x44, 0x41, 0xbe, 0xff, 0xdc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x40, 0x9e, 0xff, 0x80, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xa1, 0x04, 0x2c, 0x4b, 0xff, 0xf7, 0x6d, - 0x4b, 0xff, 0xf8, 0x94, 0x39, 0x20, 0x00, 0x00, 0x4b, 0xff, 0xfe, 0xbc, - 0x4b, 0xf7, 0x41, 0xf5, 0x4b, 0xff, 0xf8, 0x84, 0x39, 0x20, 0x00, 0xc4, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfb, 0x04, 0x39, 0x20, 0x00, 0xa7, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xf8, 0x39, 0x20, 0x00, 0x67, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xec, 0x39, 0x20, 0x00, 0x5d, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xe0, 0x39, 0x20, 0x00, 0x71, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xd4, 0x7c, 0x67, 0x1b, 0x78, - 0x4b, 0xff, 0xfd, 0x7c, 0x39, 0x20, 0x00, 0x9c, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfa, 0xc0, 0x7c, 0x64, 0x1b, 0x78, 0x4b, 0xff, 0xfd, 0xc0, - 0x39, 0x20, 0x00, 0xf1, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xac, - 0x39, 0x20, 0x00, 0xda, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xa0, - 0x39, 0x20, 0x00, 0xb4, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x94, - 0x39, 0x20, 0x01, 0x05, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x88, - 0x39, 0x20, 0x01, 0x1e, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x7c, - 0x39, 0x20, 0x00, 0x7b, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x70, - 0x39, 0x20, 0x00, 0x8a, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x64, - 0x94, 0x21, 0xff, 0xa0, 0x7c, 0x08, 0x02, 0xa6, 0x7d, 0x80, 0x00, 0x26, - 0x93, 0x81, 0x00, 0x50, 0x3b, 0x80, 0xff, 0xff, 0x2d, 0x9c, 0xff, 0xff, - 0x92, 0x81, 0x00, 0x30, 0x92, 0xa1, 0x00, 0x34, 0x3a, 0x80, 0x00, 0x3e, - 0x92, 0xc1, 0x00, 0x38, 0x3a, 0xa0, 0x00, 0x3a, 0x92, 0xe1, 0x00, 0x3c, - 0x3a, 0xc0, 0x00, 0x37, 0x93, 0x01, 0x00, 0x40, 0x3a, 0xe0, 0x00, 0x35, - 0x93, 0x21, 0x00, 0x44, 0x3b, 0x00, 0x00, 0x33, 0x93, 0x41, 0x00, 0x48, - 0x3b, 0x20, 0x00, 0x02, 0x93, 0x61, 0x00, 0x4c, 0x3b, 0x40, 0x1c, 0xa3, - 0x93, 0xa1, 0x00, 0x54, 0x3b, 0x60, 0x00, 0x00, 0x90, 0x01, 0x00, 0x64, - 0x7c, 0x9d, 0x23, 0x78, 0x93, 0xc1, 0x00, 0x58, 0x93, 0xe1, 0x00, 0x5c, - 0x91, 0x81, 0x00, 0x2c, 0x4b, 0xee, 0x2b, 0x5d, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xee, 0x4a, 0x15, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x40, 0x92, 0x00, 0x4c, - 0x93, 0x1d, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, 0x2f, 0x9c, 0xff, 0xff, - 0x41, 0x9e, 0x00, 0x0c, 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xee, 0x4b, 0x3d, - 0x40, 0x92, 0x00, 0x84, 0x93, 0xdd, 0x00, 0x00, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xee, 0x49, 0xcd, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x41, 0xb2, 0xff, 0xbc, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa0, 0x00, 0x10, 0x4b, 0xee, 0x2e, 0xb9, - 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x54, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x80, 0x00, 0x01, 0x4b, 0xee, 0x31, 0xa5, 0x7c, 0x7e, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x48, 0x39, 0x20, 0x00, 0x10, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa1, 0x00, 0x18, 0x91, 0x21, 0x00, 0x18, - 0x4b, 0xee, 0x2d, 0x05, 0x2f, 0x83, 0xff, 0xff, 0x7c, 0x7c, 0x1b, 0x78, - 0x40, 0x9e, 0x00, 0x2c, 0x92, 0xbd, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, - 0x7f, 0xe3, 0xfb, 0x78, 0x4b, 0xee, 0x4a, 0xb1, 0x93, 0xdd, 0x00, 0x00, - 0x4b, 0xff, 0xff, 0x78, 0x92, 0xfd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x58, - 0x92, 0xdd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x50, 0x7f, 0xe3, 0xfb, 0x78, - 0x4b, 0xee, 0x4a, 0x91, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0x84, 0xe3, 0x78, - 0x4b, 0xff, 0xf6, 0x05, 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x14, - 0x7f, 0x83, 0xe3, 0x78, 0x3b, 0x80, 0xff, 0xff, 0x4b, 0xee, 0x4a, 0x71, - 0x4b, 0xff, 0xfe, 0xf4, 0x92, 0x9d, 0x00, 0x04, 0x3b, 0xe0, 0xff, 0xff, - 0x4e, 0x0c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x1c -}; -static const unsigned int codehandler_text_bin_len = 3260; diff --git a/installer/src/codehandler532.h b/installer/src/codehandler532.h deleted file mode 100644 index a88ae46..0000000 --- a/installer/src/codehandler532.h +++ /dev/null @@ -1,275 +0,0 @@ -static const unsigned char codehandler_text_bin[] = { - 0x94, 0x21, 0xff, 0xe8, 0x7c, 0x08, 0x02, 0xa6, 0x3d, 0x20, 0x10, 0x05, - 0x81, 0x29, 0xe9, 0xc0, 0x93, 0x81, 0x00, 0x08, 0x7c, 0x7c, 0x1b, 0x78, - 0x38, 0x60, 0x00, 0x00, 0x93, 0xa1, 0x00, 0x0c, 0x93, 0xe1, 0x00, 0x14, - 0x7c, 0x9d, 0x23, 0x78, 0x90, 0x01, 0x00, 0x1c, 0x60, 0x63, 0x86, 0xa8, - 0x93, 0xc1, 0x00, 0x10, 0x38, 0x80, 0x00, 0x40, 0x7d, 0x29, 0x03, 0xa6, - 0x4e, 0x80, 0x04, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x82, 0x00, 0x50, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x60, 0xa5, 0x86, 0xa8, - 0x3b, 0xdf, 0x00, 0x08, 0x4b, 0xe5, 0x89, 0xfd, 0x3c, 0xff, 0x00, 0x01, - 0x3c, 0x80, 0x01, 0x1e, 0x39, 0x00, 0x00, 0x00, 0x7f, 0xc3, 0xf3, 0x78, - 0x38, 0x84, 0xdb, 0x28, 0x38, 0xa0, 0x00, 0x00, 0x7f, 0xe6, 0xfb, 0x78, - 0x38, 0xe7, 0x86, 0xa8, 0x61, 0x08, 0x80, 0x00, 0x39, 0x20, 0x00, 0x00, - 0x39, 0x40, 0x00, 0x0c, 0x4b, 0xe6, 0x44, 0x41, 0x7f, 0xc3, 0xf3, 0x78, - 0x4b, 0xe6, 0x49, 0x21, 0x3d, 0x20, 0x10, 0x06, 0x80, 0x01, 0x00, 0x1c, - 0x81, 0x29, 0xd1, 0x80, 0x7f, 0x83, 0xe3, 0x78, 0x83, 0xc1, 0x00, 0x10, - 0x7f, 0xa4, 0xeb, 0x78, 0x83, 0x81, 0x00, 0x08, 0x7d, 0x29, 0x03, 0xa6, - 0x83, 0xa1, 0x00, 0x0c, 0x83, 0xe1, 0x00, 0x14, 0x7c, 0x08, 0x03, 0xa6, - 0x38, 0x21, 0x00, 0x18, 0x4e, 0x80, 0x04, 0x20, 0x94, 0x21, 0xff, 0xe8, - 0x7c, 0x08, 0x02, 0xa6, 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x20, - 0x38, 0x81, 0x00, 0x08, 0x90, 0x01, 0x00, 0x1c, 0x4b, 0xee, 0x3a, 0x0d, - 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x00, 0x0c, 0x41, 0x82, 0x00, 0x18, - 0x88, 0x61, 0x00, 0x08, 0x80, 0x01, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x18, - 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0xff, 0xff, - 0x4b, 0xff, 0xff, 0xec, 0x94, 0x21, 0xff, 0xe0, 0x7c, 0x08, 0x02, 0xa6, - 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, 0x93, 0x61, 0x00, 0x0c, - 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, 0x93, 0xc1, 0x00, 0x18, - 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, 0x41, 0xa1, 0x00, 0x0c, - 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, 0x38, 0xc0, 0x00, 0x00, - 0x4b, 0xee, 0x39, 0x91, 0x7c, 0x69, 0x1b, 0x79, 0x7f, 0xe9, 0xf8, 0x50, - 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, 0x40, 0x80, 0xff, 0xd8, - 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x5c, 0x91, 0x5b, 0x00, 0x00, - 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, 0x91, 0x3c, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, - 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, - 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, 0x38, 0x60, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x94, 0x21, 0xff, 0xe0, - 0x7c, 0x08, 0x02, 0xa6, 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, - 0x93, 0x61, 0x00, 0x0c, 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, - 0x7c, 0x7c, 0x1b, 0x78, 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, - 0x93, 0xc1, 0x00, 0x18, 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, - 0x41, 0xa1, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, - 0x7f, 0xc4, 0xf3, 0x78, 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x4b, 0xee, 0x44, 0x8d, 0x7c, 0x69, 0x1b, 0x79, - 0x7f, 0xe9, 0xf8, 0x50, 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, - 0x40, 0x80, 0xff, 0xd8, 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x7d, - 0x91, 0x5b, 0x00, 0x00, 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, - 0x91, 0x3c, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, - 0x38, 0x60, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, - 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, - 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, - 0x7c, 0x08, 0x02, 0xa6, 0x94, 0x21, 0xfb, 0x90, 0x92, 0xe1, 0x04, 0x4c, - 0x3e, 0xe0, 0x00, 0x00, 0x90, 0x01, 0x04, 0x74, 0x3a, 0xf7, 0x02, 0x14, - 0x92, 0x41, 0x04, 0x38, 0x92, 0x61, 0x04, 0x3c, 0x92, 0x81, 0x04, 0x40, - 0x93, 0x61, 0x04, 0x5c, 0x93, 0xc1, 0x04, 0x68, 0x93, 0xe1, 0x04, 0x6c, - 0x92, 0xa1, 0x04, 0x44, 0x3a, 0xa0, 0xff, 0xaa, 0x92, 0xc1, 0x04, 0x48, - 0x3a, 0xc0, 0xff, 0x82, 0x93, 0x01, 0x04, 0x50, 0x3f, 0x00, 0x40, 0x00, - 0x93, 0x21, 0x04, 0x54, 0x3b, 0x21, 0x00, 0x28, 0x93, 0x41, 0x04, 0x58, - 0x3b, 0x43, 0x00, 0x04, 0x93, 0x81, 0x04, 0x60, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x04, 0x64, 0x7c, 0x9d, 0x23, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x4b, 0xff, 0xfd, 0xc9, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x68, - 0x2f, 0x9f, 0x00, 0x41, 0x41, 0x9e, 0x06, 0x88, 0x40, 0x9d, 0x00, 0x58, - 0x2f, 0x9f, 0x00, 0x72, 0x41, 0x9e, 0x05, 0xbc, 0x41, 0x9d, 0x01, 0x78, - 0x2f, 0x9f, 0x00, 0x70, 0x41, 0x9e, 0x02, 0xfc, 0x41, 0x9d, 0x04, 0xe8, - 0x2f, 0x9f, 0x00, 0x50, 0x40, 0xbe, 0xff, 0xc8, 0x39, 0x20, 0x00, 0x01, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, 0x99, 0x21, 0x04, 0x2c, - 0x4b, 0xff, 0xfe, 0x7d, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0xa0, - 0x39, 0x20, 0x00, 0xd1, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x02, 0x20, - 0x2f, 0x9f, 0x00, 0x03, 0x41, 0x9e, 0x05, 0xec, 0x40, 0x9d, 0x02, 0x64, - 0x2f, 0x9f, 0x00, 0x0b, 0x41, 0x9e, 0x03, 0x58, 0x2f, 0x9f, 0x00, 0x0c, - 0x41, 0x9e, 0x03, 0xdc, 0x2f, 0x9f, 0x00, 0x04, 0x40, 0x9e, 0xff, 0x70, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfd, 0x69, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x07, 0x64, 0x83, 0xc1, 0x00, 0x28, - 0x3a, 0x40, 0xff, 0xb0, 0x82, 0x81, 0x00, 0x2c, 0x3a, 0x60, 0xff, 0xbd, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0xbe, 0xff, 0x38, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x40, 0x9d, 0x00, 0x7c, 0x3b, 0x60, 0x04, 0x00, - 0x89, 0x3e, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x78, - 0x7f, 0x69, 0x03, 0xa6, 0x48, 0x00, 0x00, 0x10, 0x7d, 0x5e, 0x48, 0xae, - 0x2f, 0x8a, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x64, 0x39, 0x29, 0x00, 0x01, - 0x42, 0x00, 0xff, 0xf0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x9a, 0x41, 0x04, 0x2c, 0x4b, 0xff, 0xfd, 0xb9, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x06, 0xfc, 0x7f, 0xa3, 0xeb, 0x78, 0x4b, 0xff, 0xfc, 0xa1, - 0x2f, 0x83, 0x00, 0xcc, 0x41, 0xbe, 0xfe, 0xcc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x41, 0xbe, 0xfe, 0xc0, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x41, 0xbd, 0xff, 0x8c, 0x2f, 0x9b, 0x00, 0x00, - 0x41, 0x9d, 0xff, 0x88, 0x41, 0xbe, 0xff, 0xac, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x38, 0x61, 0x00, 0x29, 0x4b, 0xe5, 0x86, 0x05, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xfb, 0x00, 0x01, 0x9a, 0x61, 0x00, 0x28, - 0x4b, 0xff, 0xfd, 0x51, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0x9c, - 0x39, 0x20, 0x00, 0x8f, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0xf4, - 0x2f, 0x9f, 0x00, 0x99, 0x41, 0x9e, 0x02, 0x08, 0x2f, 0x9f, 0x00, 0x9a, - 0x41, 0x9e, 0x02, 0x8c, 0x2f, 0x9f, 0x00, 0x80, 0x40, 0x9e, 0xfe, 0x50, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x44, 0x4b, 0xff, 0xfc, 0x49, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x06, 0x38, 0x80, 0x81, 0x00, 0x4c, - 0x81, 0x61, 0x00, 0x28, 0x90, 0x81, 0x00, 0x08, 0x80, 0x81, 0x00, 0x50, - 0x7d, 0x69, 0x03, 0xa6, 0x80, 0xa1, 0x00, 0x34, 0x90, 0x81, 0x00, 0x0c, - 0x80, 0x81, 0x00, 0x54, 0x80, 0xc1, 0x00, 0x38, 0x90, 0x81, 0x00, 0x10, - 0x80, 0x81, 0x00, 0x58, 0x80, 0xe1, 0x00, 0x3c, 0x90, 0x81, 0x00, 0x14, - 0x80, 0x81, 0x00, 0x5c, 0x81, 0x01, 0x00, 0x40, 0x90, 0x81, 0x00, 0x18, - 0x80, 0x81, 0x00, 0x60, 0x81, 0x21, 0x00, 0x44, 0x90, 0x81, 0x00, 0x1c, - 0x80, 0x81, 0x00, 0x64, 0x81, 0x41, 0x00, 0x48, 0x90, 0x81, 0x00, 0x20, - 0x80, 0x81, 0x00, 0x68, 0x80, 0x61, 0x00, 0x2c, 0x90, 0x81, 0x00, 0x24, - 0x80, 0x81, 0x00, 0x30, 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, - 0x90, 0x61, 0x00, 0x28, 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xfc, 0x79, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfd, 0x9c, - 0x39, 0x20, 0x01, 0x36, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0x1c, - 0x4b, 0xe6, 0x2d, 0x99, 0x81, 0x23, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x06, - 0x41, 0x9e, 0x04, 0xf8, 0x39, 0x20, 0x00, 0x54, 0x91, 0x3c, 0x00, 0x04, - 0x80, 0x01, 0x04, 0x74, 0x38, 0x60, 0x00, 0x00, 0x93, 0xfc, 0x00, 0x00, - 0x7c, 0x08, 0x03, 0xa6, 0x82, 0x41, 0x04, 0x38, 0x82, 0x61, 0x04, 0x3c, - 0x82, 0x81, 0x04, 0x40, 0x82, 0xa1, 0x04, 0x44, 0x82, 0xc1, 0x04, 0x48, - 0x82, 0xe1, 0x04, 0x4c, 0x83, 0x01, 0x04, 0x50, 0x83, 0x21, 0x04, 0x54, - 0x83, 0x41, 0x04, 0x58, 0x83, 0x61, 0x04, 0x5c, 0x83, 0x81, 0x04, 0x60, - 0x83, 0xa1, 0x04, 0x64, 0x83, 0xc1, 0x04, 0x68, 0x83, 0xe1, 0x04, 0x6c, - 0x38, 0x21, 0x04, 0x70, 0x4e, 0x80, 0x00, 0x20, 0x2f, 0x9f, 0x00, 0x01, - 0x41, 0x9e, 0x01, 0xfc, 0x2f, 0x9f, 0x00, 0x02, 0x40, 0xbe, 0xfd, 0x18, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0x90, 0x81, 0x21, 0x00, 0x28, - 0x38, 0x80, 0x00, 0x02, 0xa1, 0x41, 0x00, 0x2e, 0x7d, 0x23, 0x4b, 0x78, - 0xb1, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x68, 0xcd, 0x4b, 0xff, 0xfc, 0xdc, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x24, 0x4b, 0xff, 0xfa, 0xd5, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0xa0, 0x81, 0x61, 0x00, 0x28, - 0x80, 0xa1, 0x00, 0x34, 0x80, 0xc1, 0x00, 0x38, 0x7d, 0x69, 0x03, 0xa6, - 0x80, 0xe1, 0x00, 0x3c, 0x81, 0x01, 0x00, 0x40, 0x81, 0x21, 0x00, 0x44, - 0x81, 0x41, 0x00, 0x48, 0x80, 0x61, 0x00, 0x2c, 0x80, 0x81, 0x00, 0x30, - 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, 0x90, 0x61, 0x00, 0x28, - 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x45, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x68, 0x39, 0x20, 0x00, 0xea, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xe8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xc1, 0x04, 0x2c, 0x4b, 0xff, 0xfb, 0x15, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x38, 0x39, 0x20, 0x01, 0x3b, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xb8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfa, 0x25, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x03, 0xd0, 0x83, 0xc1, 0x00, 0x2c, 0x83, 0xe1, 0x00, 0x28, - 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, 0x7f, 0xc5, 0xf3, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x01, - 0x7f, 0xe9, 0xfb, 0x78, 0x7c, 0x3e, 0x0b, 0x78, 0x38, 0x00, 0x35, 0x00, - 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0xf3, 0x78, - 0x4b, 0xff, 0xfb, 0xd0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x92, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x89, 0x7c, 0x7f, 0x1b, 0x79, - 0x40, 0x80, 0xfb, 0xac, 0x39, 0x20, 0x01, 0x44, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfe, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x4b, 0xff, 0xf9, 0x99, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x03, 0x0c, - 0x83, 0xe1, 0x00, 0x28, 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x01, 0x7f, 0xe9, 0xfb, 0x78, 0x38, 0x00, 0x34, 0x00, - 0x7c, 0x3f, 0x0b, 0x78, 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, - 0x7f, 0xe1, 0xfb, 0x78, 0x7c, 0x7f, 0x1b, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x93, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x01, - 0x4b, 0xff, 0xfb, 0x28, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xf9, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0xac, - 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x01, 0x89, 0x41, 0x00, 0x2f, - 0x7d, 0x23, 0x4b, 0x78, 0x99, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x66, 0xdd, - 0x4b, 0xff, 0xfa, 0xec, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x4b, 0xff, 0xf8, 0xe5, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x02, 0x88, - 0x88, 0xe1, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x54, 0xe7, 0x06, 0x3e, - 0x4b, 0xff, 0xf8, 0xc1, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x80, - 0x38, 0x81, 0x04, 0x30, 0x38, 0x61, 0x00, 0x30, 0x83, 0xe1, 0x00, 0x2c, - 0x4b, 0xe4, 0xca, 0xb9, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x7f, 0xf9, 0xfa, 0x14, 0x4b, 0xff, 0xf8, 0x8d, 0x2c, 0x03, 0x00, 0x00, - 0x41, 0x80, 0x02, 0x44, 0x88, 0x81, 0x04, 0x2c, 0x80, 0x61, 0x04, 0x30, - 0x7f, 0xe5, 0xfb, 0x78, 0x54, 0x84, 0x06, 0x3e, 0x38, 0xc1, 0x04, 0x2c, - 0x4b, 0xe4, 0xde, 0xf1, 0x81, 0x21, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf9, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfa, 0x34, 0x39, 0x20, 0x01, 0x00, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xb4, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x0c, 0x4b, 0xff, 0xf8, 0x21, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x02, 0x04, 0x81, 0x21, 0x00, 0x28, 0x81, 0x01, 0x00, 0x30, - 0x80, 0xe1, 0x00, 0x2c, 0x7d, 0x09, 0x42, 0x14, 0x7f, 0x89, 0x40, 0x00, - 0x41, 0xbc, 0x00, 0x14, 0x48, 0x00, 0x01, 0x5c, 0x39, 0x29, 0x00, 0x04, - 0x7f, 0x89, 0x40, 0x00, 0x40, 0x9c, 0x01, 0x50, 0x81, 0x49, 0x00, 0x00, - 0x7f, 0x8a, 0x38, 0x00, 0x40, 0x9e, 0xff, 0xec, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf8, 0x8d, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xf9, 0xb0, 0x39, 0x20, 0x01, 0x15, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0x30, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x9d, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x34, 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x04, - 0x81, 0x41, 0x00, 0x2c, 0x7d, 0x23, 0x4b, 0x78, 0x91, 0x49, 0x00, 0x00, - 0x4b, 0xe4, 0x65, 0x59, 0x4b, 0xff, 0xf9, 0x68, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x61, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x38, 0x83, 0xc1, 0x00, 0x28, 0x82, 0x81, 0x00, 0x2c, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0x9e, 0x00, 0x88, 0x7f, 0x7e, 0xa0, 0x50, - 0x3d, 0x3e, 0xf0, 0x00, 0x2f, 0x9b, 0x04, 0x00, 0x7f, 0xc6, 0xf3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x09, 0xc0, 0x40, 0x40, 0x9d, 0x00, 0x08, 0x3b, 0x60, 0x04, 0x00, - 0x7f, 0x67, 0xdb, 0x78, 0x40, 0x99, 0x00, 0x38, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x7f, 0x67, 0xdb, 0x78, - 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xff, 0xf7, 0x01, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x68, 0x7f, 0xc3, 0xf3, 0x78, 0x7f, 0x24, 0xcb, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x4b, 0xe5, 0x80, 0x45, 0x48, 0x00, 0x00, 0x18, - 0x4b, 0xff, 0xf6, 0xe1, 0x7f, 0x99, 0xf0, 0x00, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x44, 0x41, 0xbe, 0xff, 0xdc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x40, 0x9e, 0xff, 0x80, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xa1, 0x04, 0x2c, 0x4b, 0xff, 0xf7, 0x6d, - 0x4b, 0xff, 0xf8, 0x94, 0x39, 0x20, 0x00, 0x00, 0x4b, 0xff, 0xfe, 0xbc, - 0x4b, 0xf7, 0x3e, 0xf1, 0x4b, 0xff, 0xf8, 0x84, 0x39, 0x20, 0x00, 0xc4, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfb, 0x04, 0x39, 0x20, 0x00, 0xa7, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xf8, 0x39, 0x20, 0x00, 0x67, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xec, 0x39, 0x20, 0x00, 0x5d, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xe0, 0x39, 0x20, 0x00, 0x71, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xd4, 0x7c, 0x67, 0x1b, 0x78, - 0x4b, 0xff, 0xfd, 0x7c, 0x39, 0x20, 0x00, 0x9c, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfa, 0xc0, 0x7c, 0x64, 0x1b, 0x78, 0x4b, 0xff, 0xfd, 0xc0, - 0x39, 0x20, 0x00, 0xf1, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xac, - 0x39, 0x20, 0x00, 0xda, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xa0, - 0x39, 0x20, 0x00, 0xb4, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x94, - 0x39, 0x20, 0x01, 0x05, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x88, - 0x39, 0x20, 0x01, 0x1e, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x7c, - 0x39, 0x20, 0x00, 0x7b, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x70, - 0x39, 0x20, 0x00, 0x8a, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x64, - 0x94, 0x21, 0xff, 0xa0, 0x7c, 0x08, 0x02, 0xa6, 0x7d, 0x80, 0x00, 0x26, - 0x93, 0x81, 0x00, 0x50, 0x3b, 0x80, 0xff, 0xff, 0x2d, 0x9c, 0xff, 0xff, - 0x92, 0x81, 0x00, 0x30, 0x92, 0xa1, 0x00, 0x34, 0x3a, 0x80, 0x00, 0x3e, - 0x92, 0xc1, 0x00, 0x38, 0x3a, 0xa0, 0x00, 0x3a, 0x92, 0xe1, 0x00, 0x3c, - 0x3a, 0xc0, 0x00, 0x37, 0x93, 0x01, 0x00, 0x40, 0x3a, 0xe0, 0x00, 0x35, - 0x93, 0x21, 0x00, 0x44, 0x3b, 0x00, 0x00, 0x33, 0x93, 0x41, 0x00, 0x48, - 0x3b, 0x20, 0x00, 0x02, 0x93, 0x61, 0x00, 0x4c, 0x3b, 0x40, 0x1c, 0xa3, - 0x93, 0xa1, 0x00, 0x54, 0x3b, 0x60, 0x00, 0x00, 0x90, 0x01, 0x00, 0x64, - 0x7c, 0x9d, 0x23, 0x78, 0x93, 0xc1, 0x00, 0x58, 0x93, 0xe1, 0x00, 0x5c, - 0x91, 0x81, 0x00, 0x2c, 0x4b, 0xee, 0x27, 0x5d, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xee, 0x46, 0x15, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x40, 0x92, 0x00, 0x4c, - 0x93, 0x1d, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, 0x2f, 0x9c, 0xff, 0xff, - 0x41, 0x9e, 0x00, 0x0c, 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xee, 0x47, 0x3d, - 0x40, 0x92, 0x00, 0x84, 0x93, 0xdd, 0x00, 0x00, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xee, 0x45, 0xcd, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x41, 0xb2, 0xff, 0xbc, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa0, 0x00, 0x10, 0x4b, 0xee, 0x2a, 0xb9, - 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x54, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x80, 0x00, 0x01, 0x4b, 0xee, 0x2d, 0xa5, 0x7c, 0x7e, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x48, 0x39, 0x20, 0x00, 0x10, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa1, 0x00, 0x18, 0x91, 0x21, 0x00, 0x18, - 0x4b, 0xee, 0x29, 0x05, 0x2f, 0x83, 0xff, 0xff, 0x7c, 0x7c, 0x1b, 0x78, - 0x40, 0x9e, 0x00, 0x2c, 0x92, 0xbd, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, - 0x7f, 0xe3, 0xfb, 0x78, 0x4b, 0xee, 0x46, 0xb1, 0x93, 0xdd, 0x00, 0x00, - 0x4b, 0xff, 0xff, 0x78, 0x92, 0xfd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x58, - 0x92, 0xdd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x50, 0x7f, 0xe3, 0xfb, 0x78, - 0x4b, 0xee, 0x46, 0x91, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0x84, 0xe3, 0x78, - 0x4b, 0xff, 0xf6, 0x05, 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x14, - 0x7f, 0x83, 0xe3, 0x78, 0x3b, 0x80, 0xff, 0xff, 0x4b, 0xee, 0x46, 0x71, - 0x4b, 0xff, 0xfe, 0xf4, 0x92, 0x9d, 0x00, 0x04, 0x3b, 0xe0, 0xff, 0xff, - 0x4e, 0x0c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x1c -}; -static const unsigned int codehandler_text_bin_len = 3260; diff --git a/installer/src/codehandler550.h b/installer/src/codehandler550.h deleted file mode 100644 index 9546ec1..0000000 --- a/installer/src/codehandler550.h +++ /dev/null @@ -1,275 +0,0 @@ -static const unsigned char codehandler_text_bin[] = { - 0x94, 0x21, 0xff, 0xe8, 0x7c, 0x08, 0x02, 0xa6, 0x3d, 0x20, 0x10, 0x05, - 0x81, 0x29, 0xf8, 0x70, 0x93, 0x81, 0x00, 0x08, 0x7c, 0x7c, 0x1b, 0x78, - 0x38, 0x60, 0x00, 0x00, 0x93, 0xa1, 0x00, 0x0c, 0x93, 0xe1, 0x00, 0x14, - 0x7c, 0x9d, 0x23, 0x78, 0x90, 0x01, 0x00, 0x1c, 0x60, 0x63, 0x86, 0xa8, - 0x93, 0xc1, 0x00, 0x10, 0x38, 0x80, 0x00, 0x40, 0x7d, 0x29, 0x03, 0xa6, - 0x4e, 0x80, 0x04, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x82, 0x00, 0x50, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x60, 0xa5, 0x86, 0xa8, - 0x3b, 0xdf, 0x00, 0x08, 0x4b, 0xe5, 0x8f, 0x5d, 0x3c, 0xff, 0x00, 0x01, - 0x3c, 0x80, 0x01, 0x1e, 0x39, 0x00, 0x00, 0x00, 0x7f, 0xc3, 0xf3, 0x78, - 0x38, 0x84, 0xdb, 0x28, 0x38, 0xa0, 0x00, 0x00, 0x7f, 0xe6, 0xfb, 0x78, - 0x38, 0xe7, 0x86, 0xa8, 0x61, 0x08, 0x80, 0x00, 0x39, 0x20, 0x00, 0x00, - 0x39, 0x40, 0x00, 0x0c, 0x4b, 0xe6, 0x4a, 0xdd, 0x7f, 0xc3, 0xf3, 0x78, - 0x4b, 0xe6, 0x50, 0x79, 0x3d, 0x20, 0x10, 0x06, 0x80, 0x01, 0x00, 0x1c, - 0x81, 0x29, 0xe0, 0x40, 0x7f, 0x83, 0xe3, 0x78, 0x83, 0xc1, 0x00, 0x10, - 0x7f, 0xa4, 0xeb, 0x78, 0x83, 0x81, 0x00, 0x08, 0x7d, 0x29, 0x03, 0xa6, - 0x83, 0xa1, 0x00, 0x0c, 0x83, 0xe1, 0x00, 0x14, 0x7c, 0x08, 0x03, 0xa6, - 0x38, 0x21, 0x00, 0x18, 0x4e, 0x80, 0x04, 0x20, 0x94, 0x21, 0xff, 0xe8, - 0x7c, 0x08, 0x02, 0xa6, 0x38, 0xa0, 0x00, 0x01, 0x38, 0xc0, 0x00, 0x20, - 0x38, 0x81, 0x00, 0x08, 0x90, 0x01, 0x00, 0x1c, 0x4b, 0xee, 0x3a, 0x0d, - 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x00, 0x0c, 0x41, 0x82, 0x00, 0x18, - 0x88, 0x61, 0x00, 0x08, 0x80, 0x01, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x18, - 0x7c, 0x08, 0x03, 0xa6, 0x4e, 0x80, 0x00, 0x20, 0x38, 0x60, 0xff, 0xff, - 0x4b, 0xff, 0xff, 0xec, 0x94, 0x21, 0xff, 0xe0, 0x7c, 0x08, 0x02, 0xa6, - 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, 0x93, 0x61, 0x00, 0x0c, - 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, 0x93, 0xc1, 0x00, 0x18, - 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, 0x41, 0xa1, 0x00, 0x0c, - 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, 0x38, 0xc0, 0x00, 0x00, - 0x4b, 0xee, 0x39, 0x91, 0x7c, 0x69, 0x1b, 0x79, 0x7f, 0xe9, 0xf8, 0x50, - 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, 0x40, 0x80, 0xff, 0xd8, - 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x5c, 0x91, 0x5b, 0x00, 0x00, - 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, 0x91, 0x3c, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, - 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, - 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, 0x38, 0x60, 0x00, 0x00, - 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x94, 0x21, 0xff, 0xe0, - 0x7c, 0x08, 0x02, 0xa6, 0x93, 0xe1, 0x00, 0x1c, 0x7c, 0xff, 0x3b, 0x79, - 0x93, 0x61, 0x00, 0x0c, 0x7c, 0x9b, 0x23, 0x78, 0x93, 0x81, 0x00, 0x10, - 0x7c, 0x7c, 0x1b, 0x78, 0x93, 0xa1, 0x00, 0x14, 0x7c, 0xbd, 0x2b, 0x78, - 0x93, 0xc1, 0x00, 0x18, 0x7c, 0xde, 0x33, 0x78, 0x90, 0x01, 0x00, 0x24, - 0x41, 0xa1, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x64, 0x40, 0x9d, 0x00, 0x60, - 0x7f, 0xc4, 0xf3, 0x78, 0x7f, 0xe5, 0xfb, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x4b, 0xee, 0x44, 0x8d, 0x7c, 0x69, 0x1b, 0x79, - 0x7f, 0xe9, 0xf8, 0x50, 0x7f, 0xde, 0x4a, 0x14, 0x2f, 0x9f, 0x00, 0x00, - 0x40, 0x80, 0xff, 0xd8, 0x80, 0x01, 0x00, 0x24, 0x39, 0x40, 0x01, 0x7d, - 0x91, 0x5b, 0x00, 0x00, 0x7d, 0x23, 0x4b, 0x78, 0x7c, 0x08, 0x03, 0xa6, - 0x91, 0x3c, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x83, 0x81, 0x00, 0x10, - 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, 0x83, 0xe1, 0x00, 0x1c, - 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, 0x80, 0x01, 0x00, 0x24, - 0x38, 0x60, 0x00, 0x00, 0x83, 0x61, 0x00, 0x0c, 0x7c, 0x08, 0x03, 0xa6, - 0x83, 0x81, 0x00, 0x10, 0x83, 0xa1, 0x00, 0x14, 0x83, 0xc1, 0x00, 0x18, - 0x83, 0xe1, 0x00, 0x1c, 0x38, 0x21, 0x00, 0x20, 0x4e, 0x80, 0x00, 0x20, - 0x7c, 0x08, 0x02, 0xa6, 0x94, 0x21, 0xfb, 0x90, 0x92, 0xe1, 0x04, 0x4c, - 0x3e, 0xe0, 0x00, 0x00, 0x90, 0x01, 0x04, 0x74, 0x3a, 0xf7, 0x02, 0x26, - 0x92, 0x41, 0x04, 0x38, 0x92, 0x61, 0x04, 0x3c, 0x92, 0x81, 0x04, 0x40, - 0x93, 0x61, 0x04, 0x5c, 0x93, 0xc1, 0x04, 0x68, 0x93, 0xe1, 0x04, 0x6c, - 0x92, 0xa1, 0x04, 0x44, 0x3a, 0xa0, 0xff, 0xaa, 0x92, 0xc1, 0x04, 0x48, - 0x3a, 0xc0, 0xff, 0x82, 0x93, 0x01, 0x04, 0x50, 0x3f, 0x00, 0x40, 0x00, - 0x93, 0x21, 0x04, 0x54, 0x3b, 0x21, 0x00, 0x28, 0x93, 0x41, 0x04, 0x58, - 0x3b, 0x43, 0x00, 0x04, 0x93, 0x81, 0x04, 0x60, 0x7c, 0x7c, 0x1b, 0x78, - 0x93, 0xa1, 0x04, 0x64, 0x7c, 0x9d, 0x23, 0x78, 0x7f, 0xa3, 0xeb, 0x78, - 0x4b, 0xff, 0xfd, 0xc9, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x68, - 0x2f, 0x9f, 0x00, 0x41, 0x41, 0x9e, 0x06, 0x88, 0x40, 0x9d, 0x00, 0x58, - 0x2f, 0x9f, 0x00, 0x72, 0x41, 0x9e, 0x05, 0xbc, 0x41, 0x9d, 0x01, 0x78, - 0x2f, 0x9f, 0x00, 0x70, 0x41, 0x9e, 0x02, 0xfc, 0x41, 0x9d, 0x04, 0xe8, - 0x2f, 0x9f, 0x00, 0x50, 0x40, 0xbe, 0xff, 0xc8, 0x39, 0x20, 0x00, 0x01, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, 0x99, 0x21, 0x04, 0x2c, - 0x4b, 0xff, 0xfe, 0x7d, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0xa0, - 0x39, 0x20, 0x00, 0xd1, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x02, 0x20, - 0x2f, 0x9f, 0x00, 0x03, 0x41, 0x9e, 0x05, 0xec, 0x40, 0x9d, 0x02, 0x64, - 0x2f, 0x9f, 0x00, 0x0b, 0x41, 0x9e, 0x03, 0x58, 0x2f, 0x9f, 0x00, 0x0c, - 0x41, 0x9e, 0x03, 0xdc, 0x2f, 0x9f, 0x00, 0x04, 0x40, 0x9e, 0xff, 0x70, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfd, 0x69, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x07, 0x64, 0x83, 0xc1, 0x00, 0x28, - 0x3a, 0x40, 0xff, 0xb0, 0x82, 0x81, 0x00, 0x2c, 0x3a, 0x60, 0xff, 0xbd, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0xbe, 0xff, 0x38, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x40, 0x9d, 0x00, 0x7c, 0x3b, 0x60, 0x04, 0x00, - 0x89, 0x3e, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x78, - 0x7f, 0x69, 0x03, 0xa6, 0x48, 0x00, 0x00, 0x10, 0x7d, 0x5e, 0x48, 0xae, - 0x2f, 0x8a, 0x00, 0x00, 0x40, 0x9e, 0x00, 0x64, 0x39, 0x29, 0x00, 0x01, - 0x42, 0x00, 0xff, 0xf0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x9a, 0x41, 0x04, 0x2c, 0x4b, 0xff, 0xfd, 0xb9, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x06, 0xfc, 0x7f, 0xa3, 0xeb, 0x78, 0x4b, 0xff, 0xfc, 0xa1, - 0x2f, 0x83, 0x00, 0xcc, 0x41, 0xbe, 0xfe, 0xcc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x41, 0xbe, 0xfe, 0xc0, 0x7f, 0x7e, 0xa0, 0x50, - 0x2f, 0x9b, 0x04, 0x00, 0x41, 0xbd, 0xff, 0x8c, 0x2f, 0x9b, 0x00, 0x00, - 0x41, 0x9d, 0xff, 0x88, 0x41, 0xbe, 0xff, 0xac, 0x7f, 0xc4, 0xf3, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x38, 0x61, 0x00, 0x29, 0x4b, 0xe5, 0x8b, 0x65, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xfb, 0x00, 0x01, 0x9a, 0x61, 0x00, 0x28, - 0x4b, 0xff, 0xfd, 0x51, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xff, 0x9c, - 0x39, 0x20, 0x00, 0x8f, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0xf4, - 0x2f, 0x9f, 0x00, 0x99, 0x41, 0x9e, 0x02, 0x08, 0x2f, 0x9f, 0x00, 0x9a, - 0x41, 0x9e, 0x02, 0x8c, 0x2f, 0x9f, 0x00, 0x80, 0x40, 0x9e, 0xfe, 0x50, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x44, 0x4b, 0xff, 0xfc, 0x49, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x06, 0x38, 0x80, 0x81, 0x00, 0x4c, - 0x81, 0x61, 0x00, 0x28, 0x90, 0x81, 0x00, 0x08, 0x80, 0x81, 0x00, 0x50, - 0x7d, 0x69, 0x03, 0xa6, 0x80, 0xa1, 0x00, 0x34, 0x90, 0x81, 0x00, 0x0c, - 0x80, 0x81, 0x00, 0x54, 0x80, 0xc1, 0x00, 0x38, 0x90, 0x81, 0x00, 0x10, - 0x80, 0x81, 0x00, 0x58, 0x80, 0xe1, 0x00, 0x3c, 0x90, 0x81, 0x00, 0x14, - 0x80, 0x81, 0x00, 0x5c, 0x81, 0x01, 0x00, 0x40, 0x90, 0x81, 0x00, 0x18, - 0x80, 0x81, 0x00, 0x60, 0x81, 0x21, 0x00, 0x44, 0x90, 0x81, 0x00, 0x1c, - 0x80, 0x81, 0x00, 0x64, 0x81, 0x41, 0x00, 0x48, 0x90, 0x81, 0x00, 0x20, - 0x80, 0x81, 0x00, 0x68, 0x80, 0x61, 0x00, 0x2c, 0x90, 0x81, 0x00, 0x24, - 0x80, 0x81, 0x00, 0x30, 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, - 0x90, 0x61, 0x00, 0x28, 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xfc, 0x79, 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfd, 0x9c, - 0x39, 0x20, 0x01, 0x36, 0x91, 0x3c, 0x00, 0x04, 0x48, 0x00, 0x00, 0x1c, - 0x4b, 0xe6, 0x33, 0x91, 0x81, 0x23, 0x00, 0x00, 0x2f, 0x89, 0x00, 0x06, - 0x41, 0x9e, 0x04, 0xf8, 0x39, 0x20, 0x00, 0x54, 0x91, 0x3c, 0x00, 0x04, - 0x80, 0x01, 0x04, 0x74, 0x38, 0x60, 0x00, 0x00, 0x93, 0xfc, 0x00, 0x00, - 0x7c, 0x08, 0x03, 0xa6, 0x82, 0x41, 0x04, 0x38, 0x82, 0x61, 0x04, 0x3c, - 0x82, 0x81, 0x04, 0x40, 0x82, 0xa1, 0x04, 0x44, 0x82, 0xc1, 0x04, 0x48, - 0x82, 0xe1, 0x04, 0x4c, 0x83, 0x01, 0x04, 0x50, 0x83, 0x21, 0x04, 0x54, - 0x83, 0x41, 0x04, 0x58, 0x83, 0x61, 0x04, 0x5c, 0x83, 0x81, 0x04, 0x60, - 0x83, 0xa1, 0x04, 0x64, 0x83, 0xc1, 0x04, 0x68, 0x83, 0xe1, 0x04, 0x6c, - 0x38, 0x21, 0x04, 0x70, 0x4e, 0x80, 0x00, 0x20, 0x2f, 0x9f, 0x00, 0x01, - 0x41, 0x9e, 0x01, 0xfc, 0x2f, 0x9f, 0x00, 0x02, 0x40, 0xbe, 0xfd, 0x18, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0x90, 0x81, 0x21, 0x00, 0x28, - 0x38, 0x80, 0x00, 0x02, 0xa1, 0x41, 0x00, 0x2e, 0x7d, 0x23, 0x4b, 0x78, - 0xb1, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x69, 0x6d, 0x4b, 0xff, 0xfc, 0xdc, - 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, - 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x24, 0x4b, 0xff, 0xfa, 0xd5, - 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x04, 0xa0, 0x81, 0x61, 0x00, 0x28, - 0x80, 0xa1, 0x00, 0x34, 0x80, 0xc1, 0x00, 0x38, 0x7d, 0x69, 0x03, 0xa6, - 0x80, 0xe1, 0x00, 0x3c, 0x81, 0x01, 0x00, 0x40, 0x81, 0x21, 0x00, 0x44, - 0x81, 0x41, 0x00, 0x48, 0x80, 0x61, 0x00, 0x2c, 0x80, 0x81, 0x00, 0x30, - 0x4e, 0x80, 0x04, 0x21, 0x7f, 0xa5, 0xeb, 0x78, 0x90, 0x61, 0x00, 0x28, - 0x7f, 0x26, 0xcb, 0x78, 0x90, 0x81, 0x00, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfb, 0x45, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x68, 0x39, 0x20, 0x00, 0xea, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xe8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xc1, 0x04, 0x2c, 0x4b, 0xff, 0xfb, 0x15, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfc, 0x38, 0x39, 0x20, 0x01, 0x3b, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfe, 0xb8, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xfa, 0x25, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x03, 0xd0, 0x83, 0xc1, 0x00, 0x2c, 0x83, 0xe1, 0x00, 0x28, - 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, 0x7f, 0xc5, 0xf3, 0x78, - 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x01, - 0x7f, 0xe9, 0xfb, 0x78, 0x7c, 0x3e, 0x0b, 0x78, 0x38, 0x00, 0x35, 0x00, - 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x7f, 0xc1, 0xf3, 0x78, - 0x4b, 0xff, 0xfb, 0xd0, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x92, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x89, 0x7c, 0x7f, 0x1b, 0x79, - 0x40, 0x80, 0xfb, 0xac, 0x39, 0x20, 0x01, 0x44, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfe, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x04, - 0x4b, 0xff, 0xf9, 0x99, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x03, 0x0c, - 0x83, 0xe1, 0x00, 0x28, 0x38, 0x60, 0x00, 0x01, 0x38, 0x80, 0x00, 0x00, - 0x38, 0xa0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x01, 0x7f, 0xe9, 0xfb, 0x78, 0x38, 0x00, 0x34, 0x00, - 0x7c, 0x3f, 0x0b, 0x78, 0x44, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, - 0x7f, 0xe1, 0xfb, 0x78, 0x7c, 0x7f, 0x1b, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x93, 0xe1, 0x00, 0x28, 0x4b, 0xff, 0xfa, 0x01, - 0x4b, 0xff, 0xfb, 0x28, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x38, 0xe0, 0x00, 0x08, - 0x4b, 0xff, 0xf9, 0x21, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0xac, - 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x01, 0x89, 0x41, 0x00, 0x2f, - 0x7d, 0x23, 0x4b, 0x78, 0x99, 0x49, 0x00, 0x00, 0x4b, 0xe4, 0x67, 0x7d, - 0x4b, 0xff, 0xfa, 0xec, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x4b, 0xff, 0xf8, 0xe5, 0x2c, 0x03, 0x00, 0x00, 0x41, 0x80, 0x02, 0x88, - 0x88, 0xe1, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x54, 0xe7, 0x06, 0x3e, - 0x4b, 0xff, 0xf8, 0xc1, 0x7c, 0x7f, 0x1b, 0x79, 0x41, 0x80, 0x02, 0x80, - 0x38, 0x81, 0x04, 0x30, 0x38, 0x61, 0x00, 0x30, 0x83, 0xe1, 0x00, 0x2c, - 0x4b, 0xe4, 0xcb, 0x51, 0x7f, 0x83, 0xe3, 0x78, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, 0x38, 0xe0, 0x00, 0x01, - 0x7f, 0xf9, 0xfa, 0x14, 0x4b, 0xff, 0xf8, 0x8d, 0x2c, 0x03, 0x00, 0x00, - 0x41, 0x80, 0x02, 0x44, 0x88, 0x81, 0x04, 0x2c, 0x80, 0x61, 0x04, 0x30, - 0x7f, 0xe5, 0xfb, 0x78, 0x54, 0x84, 0x06, 0x3e, 0x38, 0xc1, 0x04, 0x2c, - 0x4b, 0xe4, 0xdf, 0x89, 0x81, 0x21, 0x04, 0x2c, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf9, 0x11, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xfa, 0x34, 0x39, 0x20, 0x01, 0x00, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0xb4, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x0c, 0x4b, 0xff, 0xf8, 0x21, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x02, 0x04, 0x81, 0x21, 0x00, 0x28, 0x81, 0x01, 0x00, 0x30, - 0x80, 0xe1, 0x00, 0x2c, 0x7d, 0x09, 0x42, 0x14, 0x7f, 0x89, 0x40, 0x00, - 0x41, 0xbc, 0x00, 0x14, 0x48, 0x00, 0x01, 0x5c, 0x39, 0x29, 0x00, 0x04, - 0x7f, 0x89, 0x40, 0x00, 0x40, 0x9c, 0x01, 0x50, 0x81, 0x49, 0x00, 0x00, - 0x7f, 0x8a, 0x38, 0x00, 0x40, 0x9e, 0xff, 0xec, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x04, 0x91, 0x21, 0x00, 0x28, 0x4b, 0xff, 0xf8, 0x8d, - 0x7c, 0x7f, 0x1b, 0x79, 0x40, 0x80, 0xf9, 0xb0, 0x39, 0x20, 0x01, 0x15, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfc, 0x30, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x9d, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x34, 0x81, 0x21, 0x00, 0x28, 0x38, 0x80, 0x00, 0x04, - 0x81, 0x41, 0x00, 0x2c, 0x7d, 0x23, 0x4b, 0x78, 0x91, 0x49, 0x00, 0x00, - 0x4b, 0xe4, 0x65, 0xf9, 0x4b, 0xff, 0xf9, 0x68, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, - 0x38, 0xe0, 0x00, 0x08, 0x4b, 0xff, 0xf7, 0x61, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x01, 0x38, 0x83, 0xc1, 0x00, 0x28, 0x82, 0x81, 0x00, 0x2c, - 0x7f, 0x9e, 0xa0, 0x40, 0x41, 0x9e, 0x00, 0x88, 0x7f, 0x7e, 0xa0, 0x50, - 0x3d, 0x3e, 0xf0, 0x00, 0x2f, 0x9b, 0x04, 0x00, 0x7f, 0xc6, 0xf3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x09, 0xc0, 0x40, 0x40, 0x9d, 0x00, 0x08, 0x3b, 0x60, 0x04, 0x00, - 0x7f, 0x67, 0xdb, 0x78, 0x40, 0x99, 0x00, 0x38, 0x7f, 0x44, 0xd3, 0x78, - 0x7f, 0xa5, 0xeb, 0x78, 0x7f, 0x26, 0xcb, 0x78, 0x7f, 0x67, 0xdb, 0x78, - 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xff, 0xf7, 0x01, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x68, 0x7f, 0xc3, 0xf3, 0x78, 0x7f, 0x24, 0xcb, 0x78, - 0x7f, 0x65, 0xdb, 0x78, 0x4b, 0xe5, 0x85, 0xa5, 0x48, 0x00, 0x00, 0x18, - 0x4b, 0xff, 0xf6, 0xe1, 0x7f, 0x99, 0xf0, 0x00, 0x7c, 0x7f, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x44, 0x41, 0xbe, 0xff, 0xdc, 0x7f, 0xde, 0xda, 0x14, - 0x7f, 0x94, 0xf0, 0x40, 0x40, 0x9e, 0xff, 0x80, 0x7f, 0x83, 0xe3, 0x78, - 0x7f, 0x44, 0xd3, 0x78, 0x7f, 0xa5, 0xeb, 0x78, 0x38, 0xc1, 0x04, 0x2c, - 0x38, 0xe0, 0x00, 0x01, 0x9a, 0xa1, 0x04, 0x2c, 0x4b, 0xff, 0xf7, 0x6d, - 0x4b, 0xff, 0xf8, 0x94, 0x39, 0x20, 0x00, 0x00, 0x4b, 0xff, 0xfe, 0xbc, - 0x4b, 0xf7, 0x3e, 0xf1, 0x4b, 0xff, 0xf8, 0x84, 0x39, 0x20, 0x00, 0xc4, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfb, 0x04, 0x39, 0x20, 0x00, 0xa7, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xf8, 0x39, 0x20, 0x00, 0x67, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xec, 0x39, 0x20, 0x00, 0x5d, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xe0, 0x39, 0x20, 0x00, 0x71, - 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xd4, 0x7c, 0x67, 0x1b, 0x78, - 0x4b, 0xff, 0xfd, 0x7c, 0x39, 0x20, 0x00, 0x9c, 0x91, 0x3c, 0x00, 0x04, - 0x4b, 0xff, 0xfa, 0xc0, 0x7c, 0x64, 0x1b, 0x78, 0x4b, 0xff, 0xfd, 0xc0, - 0x39, 0x20, 0x00, 0xf1, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xac, - 0x39, 0x20, 0x00, 0xda, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0xa0, - 0x39, 0x20, 0x00, 0xb4, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x94, - 0x39, 0x20, 0x01, 0x05, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x88, - 0x39, 0x20, 0x01, 0x1e, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x7c, - 0x39, 0x20, 0x00, 0x7b, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x70, - 0x39, 0x20, 0x00, 0x8a, 0x91, 0x3c, 0x00, 0x04, 0x4b, 0xff, 0xfa, 0x64, - 0x94, 0x21, 0xff, 0xa0, 0x7c, 0x08, 0x02, 0xa6, 0x7d, 0x80, 0x00, 0x26, - 0x93, 0x81, 0x00, 0x50, 0x3b, 0x80, 0xff, 0xff, 0x2d, 0x9c, 0xff, 0xff, - 0x92, 0x81, 0x00, 0x30, 0x92, 0xa1, 0x00, 0x34, 0x3a, 0x80, 0x00, 0x3e, - 0x92, 0xc1, 0x00, 0x38, 0x3a, 0xa0, 0x00, 0x3a, 0x92, 0xe1, 0x00, 0x3c, - 0x3a, 0xc0, 0x00, 0x37, 0x93, 0x01, 0x00, 0x40, 0x3a, 0xe0, 0x00, 0x35, - 0x93, 0x21, 0x00, 0x44, 0x3b, 0x00, 0x00, 0x33, 0x93, 0x41, 0x00, 0x48, - 0x3b, 0x20, 0x00, 0x02, 0x93, 0x61, 0x00, 0x4c, 0x3b, 0x40, 0x1c, 0xa3, - 0x93, 0xa1, 0x00, 0x54, 0x3b, 0x60, 0x00, 0x00, 0x90, 0x01, 0x00, 0x64, - 0x7c, 0x9d, 0x23, 0x78, 0x93, 0xc1, 0x00, 0x58, 0x93, 0xe1, 0x00, 0x5c, - 0x91, 0x81, 0x00, 0x2c, 0x4b, 0xee, 0x27, 0x5d, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xee, 0x46, 0x15, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x40, 0x92, 0x00, 0x4c, - 0x93, 0x1d, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, 0x2f, 0x9c, 0xff, 0xff, - 0x41, 0x9e, 0x00, 0x0c, 0x7f, 0x83, 0xe3, 0x78, 0x4b, 0xee, 0x47, 0x3d, - 0x40, 0x92, 0x00, 0x84, 0x93, 0xdd, 0x00, 0x00, 0x38, 0x60, 0x00, 0x02, - 0x38, 0x80, 0x00, 0x01, 0x38, 0xa0, 0x00, 0x06, 0xb3, 0x21, 0x00, 0x08, - 0xb3, 0x41, 0x00, 0x0a, 0x93, 0x61, 0x00, 0x0c, 0x4b, 0xee, 0x45, 0xcd, - 0x2e, 0x03, 0xff, 0xff, 0x7c, 0x7f, 0x1b, 0x78, 0x41, 0xb2, 0xff, 0xbc, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa0, 0x00, 0x10, 0x4b, 0xee, 0x2a, 0xb9, - 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x54, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x80, 0x00, 0x01, 0x4b, 0xee, 0x2d, 0xa5, 0x7c, 0x7e, 0x1b, 0x79, - 0x41, 0x80, 0x00, 0x48, 0x39, 0x20, 0x00, 0x10, 0x7f, 0xe3, 0xfb, 0x78, - 0x38, 0x81, 0x00, 0x08, 0x38, 0xa1, 0x00, 0x18, 0x91, 0x21, 0x00, 0x18, - 0x4b, 0xee, 0x29, 0x05, 0x2f, 0x83, 0xff, 0xff, 0x7c, 0x7c, 0x1b, 0x78, - 0x40, 0x9e, 0x00, 0x2c, 0x92, 0xbd, 0x00, 0x04, 0x3b, 0xc0, 0xff, 0xff, - 0x7f, 0xe3, 0xfb, 0x78, 0x4b, 0xee, 0x46, 0xb1, 0x93, 0xdd, 0x00, 0x00, - 0x4b, 0xff, 0xff, 0x78, 0x92, 0xfd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x58, - 0x92, 0xdd, 0x00, 0x04, 0x4b, 0xff, 0xff, 0x50, 0x7f, 0xe3, 0xfb, 0x78, - 0x4b, 0xee, 0x46, 0x91, 0x7f, 0xa3, 0xeb, 0x78, 0x7f, 0x84, 0xe3, 0x78, - 0x4b, 0xff, 0xf6, 0x05, 0x7c, 0x7e, 0x1b, 0x79, 0x41, 0x80, 0x00, 0x14, - 0x7f, 0x83, 0xe3, 0x78, 0x3b, 0x80, 0xff, 0xff, 0x4b, 0xee, 0x46, 0x71, - 0x4b, 0xff, 0xfe, 0xf4, 0x92, 0x9d, 0x00, 0x04, 0x3b, 0xe0, 0xff, 0xff, - 0x4e, 0x0c, 0x00, 0x00, 0x4b, 0xff, 0xff, 0x1c -}; -static const unsigned int codehandler_text_bin_len = 3260; diff --git a/installer/src/link.ld b/installer/src/link.ld deleted file mode 100644 index 23c825e..0000000 --- a/installer/src/link.ld +++ /dev/null @@ -1,14 +0,0 @@ -OUTPUT_ARCH(powerpc:common) -OUTPUT_FORMAT("binary") -ENTRY(_start) - -SECTIONS { - . = 0x01800000; - - .text : { *(.asmstart) *(.text) } - .rodata : { *(.rodata .rodata.*) } - - /DISCARD/ : { - *(*); - } -} \ No newline at end of file diff --git a/installer/src/loader.c b/installer/src/loader.c deleted file mode 100644 index bdf836c..0000000 --- a/installer/src/loader.c +++ /dev/null @@ -1,305 +0,0 @@ -#include "loader.h" - -#define RW_MEM_MAP 0xA0000000 -#if VER == 300 - #include "codehandler310.h" //TODO ??? - #define INSTALL_ADDR 0x011D3000 - #define MAIN_JMP_ADDR 0x0101894C -#elif VER == 310 - #include "codehandler310.h" - #define INSTALL_ADDR 0x011D3000 - #define MAIN_JMP_ADDR 0x0101894C -#elif VER == 400 - #include "codehandler400.h" - #define INSTALL_ADDR 0x011DD000 - #define MAIN_JMP_ADDR 0x0101BD4C -#elif VER == 410 - #include "codehandler410.h" - #define INSTALL_ADDR 0x011DD000 - #define MAIN_JMP_ADDR 0x0101C55C -#elif VER == 500 - #include "codehandler500.h" - #define INSTALL_ADDR 0x011DD000 - #define MAIN_JMP_ADDR 0x0101C55C -#elif VER == 532 - #include "codehandler532.h" - #define INSTALL_ADDR 0x011DD000 - #define MAIN_JMP_ADDR 0x0101C55C -#elif VER == 550 - #include "codehandler550.h" - #define INSTALL_ADDR 0x011DD000 - #define MAIN_JMP_ADDR 0x0101C56C -#endif - -#define assert(x) \ - do { \ - if (!(x)) \ - OSFatal("Assertion failed " #x ".\n"); \ - } while (0) - -#define ALIGN_BACKWARD(x,align) \ - ((typeof(x))(((unsigned int)(x)) & (~(align-1)))) - -int doBL( unsigned int dst, unsigned int src ); -void doOSScreenInit(unsigned int coreinit_handle); -inline void doOSScreenClear(); -void doOSScreenPrintPos(char *buf, int pos); -void doVPADWait(); - -void _main(){ - /* Get a handle to coreinit.rpl. */ - unsigned int coreinit_handle; - OSDynLoad_Acquire("coreinit.rpl", &coreinit_handle); - - /* Get for later socket patch */ - unsigned int nsysnet_handle; - OSDynLoad_Acquire("nsysnet.rpl", &nsysnet_handle); - - /* Get for IP address print */ - unsigned int nn_ac_handle; - OSDynLoad_Acquire("nn_ac.rpl", &nn_ac_handle); - - /* Load a few useful symbols. */ - void*(*OSEffectiveToPhysical)(const void *); - void*(*OSAllocFromSystem)(uint32_t size, int align); - void (*OSFreeToSystem)(void *ptr); - void (*DCFlushRange)(const void *, int); - void (*ICInvalidateRange)(const void *, int); - void (*_Exit)(void) __attribute__ ((noreturn)); - - OSDynLoad_FindExport(coreinit_handle, 0, "OSEffectiveToPhysical", &OSEffectiveToPhysical); - OSDynLoad_FindExport(coreinit_handle, 0, "OSAllocFromSystem", &OSAllocFromSystem); - OSDynLoad_FindExport(coreinit_handle, 0, "OSFreeToSystem", &OSFreeToSystem); - OSDynLoad_FindExport(coreinit_handle, 0, "DCFlushRange", &DCFlushRange); - OSDynLoad_FindExport(coreinit_handle, 0, "ICInvalidateRange", &ICInvalidateRange); - OSDynLoad_FindExport(coreinit_handle, 0, "_Exit", &_Exit); - - assert(OSEffectiveToPhysical); - assert(OSAllocFromSystem); - assert(OSFreeToSystem); - assert(DCFlushRange); - assert(ICInvalidateRange); - assert(_Exit); - - /* Socket functions */ - unsigned int *socket_lib_finish; - OSDynLoad_FindExport(nsysnet_handle, 0, "socket_lib_finish", &socket_lib_finish); - assert(socket_lib_finish); - - /* AC functions */ - int(*ACGetAssignedAddress)(unsigned int *addr); - OSDynLoad_FindExport(nn_ac_handle, 0, "ACGetAssignedAddress", &ACGetAssignedAddress); - assert(ACGetAssignedAddress); - - /* IM functions */ - int(*IM_SetDeviceState)(int fd, void *mem, int state, int a, int b); - int(*IM_Close)(int fd); - int(*IM_Open)(); - - OSDynLoad_FindExport(coreinit_handle, 0, "IM_SetDeviceState", &IM_SetDeviceState); - OSDynLoad_FindExport(coreinit_handle, 0, "IM_Close", &IM_Close); - OSDynLoad_FindExport(coreinit_handle, 0, "IM_Open", &IM_Open); - - assert(IM_SetDeviceState); - assert(IM_Close); - assert(IM_Open); - - /* Restart system to get lib access */ - int fd = IM_Open(); - void *mem = OSAllocFromSystem(0x100, 64); - memset(mem, 0, 0x100); - - /* set restart flag to force quit browser */ - IM_SetDeviceState(fd, mem, 3, 0, 0); - IM_Close(fd); - OSFreeToSystem(mem); - - /* wait a bit for browser end */ - unsigned int t1 = 0x1FFFFFFF; - while(t1--){}; - - doOSScreenInit(coreinit_handle); - doOSScreenClear(); - doOSScreenPrintPos("TCPGecko Installer", 0); - - /* Make sure the kernel exploit has been run */ - if (OSEffectiveToPhysical((void *)0xA0000000) == (void *)0){ - doOSScreenPrintPos("You must execute the kernel exploit before installing TCPGecko.", 1); - doOSScreenPrintPos("Returning to the home menu...",2); - t1 = 0x3FFFFFFF; - while(t1--) ; - doOSScreenClear(); - _Exit(); - }else{ - doOSScreenPrintPos("Trying to install TCPGecko...", 1); - - // Make sure everything has kern I/O - kern_write((void*)KERN_SYSCALL_TBL_1 + (0x34 * 4), KERN_CODE_READ); - kern_write((void*)KERN_SYSCALL_TBL_2 + (0x34 * 4), KERN_CODE_READ); - kern_write((void*)KERN_SYSCALL_TBL_3 + (0x34 * 4), KERN_CODE_READ); - kern_write((void*)KERN_SYSCALL_TBL_4 + (0x34 * 4), KERN_CODE_READ); - kern_write((void*)KERN_SYSCALL_TBL_5 + (0x34 * 4), KERN_CODE_READ); - - kern_write((void*)KERN_SYSCALL_TBL_1 + (0x35 * 4), KERN_CODE_WRITE); - kern_write((void*)KERN_SYSCALL_TBL_2 + (0x35 * 4), KERN_CODE_WRITE); - kern_write((void*)KERN_SYSCALL_TBL_3 + (0x35 * 4), KERN_CODE_WRITE); - kern_write((void*)KERN_SYSCALL_TBL_4 + (0x35 * 4), KERN_CODE_WRITE); - kern_write((void*)KERN_SYSCALL_TBL_5 + (0x35 * 4), KERN_CODE_WRITE); - - /* Our main writable area */ - unsigned int physWriteLoc = (unsigned int)OSEffectiveToPhysical((void*)RW_MEM_MAP); - - /* Install codehandler */ - unsigned int phys_codehandler_loc = (unsigned int)OSEffectiveToPhysical((void*)INSTALL_ADDR); - void *codehandler_loc = (unsigned int*)(RW_MEM_MAP + (phys_codehandler_loc - physWriteLoc)); - - memcpy(codehandler_loc, codehandler_text_bin, codehandler_text_bin_len); - DCFlushRange(codehandler_loc, codehandler_text_bin_len); - ICInvalidateRange(codehandler_loc, codehandler_text_bin_len); - - /* Patch coreinit jump */ - unsigned int phys_main_jmp_loc = (unsigned int)OSEffectiveToPhysical((void*)MAIN_JMP_ADDR); - unsigned int *main_jmp_loc = (unsigned int*)(RW_MEM_MAP + (phys_main_jmp_loc - physWriteLoc)); - - *main_jmp_loc = doBL(INSTALL_ADDR, MAIN_JMP_ADDR); - DCFlushRange(ALIGN_BACKWARD(main_jmp_loc, 32), 0x20); - ICInvalidateRange(ALIGN_BACKWARD(main_jmp_loc, 32), 0x20); - - /* Patch Socket Function */ - unsigned int phys_socket_loc = (unsigned int)OSEffectiveToPhysical(socket_lib_finish); - unsigned int *socket_loc = (unsigned int*)(RW_MEM_MAP + (phys_socket_loc - physWriteLoc)); - - socket_loc[0] = 0x38600000; - socket_loc[1] = 0x4E800020; - DCFlushRange(ALIGN_BACKWARD(socket_loc, 32), 0x40); - ICInvalidateRange(ALIGN_BACKWARD(socket_loc, 32), 0x40); - - /* The fix for Splatoon and such */ - kern_write((void*)(KERN_ADDRESS_TBL + (0x12 * 4)), 0x00000000); - kern_write((void*)(KERN_ADDRESS_TBL + (0x13 * 4)), 0x14000000); - - /* All good! */ - unsigned int addr; - ACGetAssignedAddress(&addr); - char buf[64]; - __os_snprintf(buf,64,"Success! Your Gecko IP is %i.%i.%i.%i.", (addr>>24)&0xFF,(addr>>16)&0xFF,(addr>>8)&0xFF,addr&0xFF); - doOSScreenPrintPos(buf, 2); - - doOSScreenPrintPos("Press any button to return to the home menu.", 3); - doVPADWait(); - } - doOSScreenClear(); - _Exit(); -} - -int doBL( unsigned int dst, unsigned int src ){ - unsigned int newval = (dst - src); - newval &= 0x03FFFFFC; - newval |= 0x48000001; - return newval; -} - -/* for internal and gcc usage */ -void* memset(void* dst, const uint8_t val, uint32_t size){ - uint32_t i; - for (i = 0; i < size; i++){ - ((uint8_t*) dst)[i] = val; - } - return dst; -} - -void* memcpy(void* dst, const void* src, uint32_t size){ - uint32_t i; - for (i = 0; i < size; i++){ - ((uint8_t*) dst)[i] = ((const uint8_t*) src)[i]; - } - return dst; -} - -/* Write a 32-bit word with kernel permissions */ -void kern_write(void *addr, uint32_t value){ - asm( - "li 3,1\n" - "li 4,0\n" - "mr 5,%1\n" - "li 6,0\n" - "li 7,0\n" - "lis 8,1\n" - "mr 9,%0\n" - "mr %1,1\n" - "li 0,0x3500\n" - "sc\n" - "nop\n" - "mr 1,%1\n" - : - : "r"(addr), "r"(value) - : "memory", "ctr", "lr", "0", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12" - ); -} - -/* OSScreen helper functions */ -void doOSScreenInit(unsigned int coreinit_handle){ - /* OSScreen functions */ - void(*OSScreenInit)(); - unsigned int(*OSScreenGetBufferSizeEx)(unsigned int bufferNum); - unsigned int(*OSScreenSetBufferEx)(unsigned int bufferNum, void * addr); - - OSDynLoad_FindExport(coreinit_handle, 0, "OSScreenInit", &OSScreenInit); - OSDynLoad_FindExport(coreinit_handle, 0, "OSScreenGetBufferSizeEx", &OSScreenGetBufferSizeEx); - OSDynLoad_FindExport(coreinit_handle, 0, "OSScreenSetBufferEx", &OSScreenSetBufferEx); - - assert(OSScreenInit); - assert(OSScreenGetBufferSizeEx); - assert(OSScreenSetBufferEx); - - /* Call the Screen initilzation function */ - OSScreenInit(); - - /* Grab the buffer size for each screen (TV and gamepad) */ - int buf0_size = OSScreenGetBufferSizeEx(0); - int buf1_size = OSScreenGetBufferSizeEx(1); - - /* Set the buffer area */ - OSScreenSetBufferEx(0, (void *)0xF4000000); - OSScreenSetBufferEx(1, (void *)0xF4000000 + buf0_size); -} - -inline void doOSScreenClear(){ - /* Clear both framebuffers */ - int ii; - for (ii = 0; ii < 2; ii++){ - fillScreen(0,0,0,0); - flipBuffers(); - } -} - -void doOSScreenPrintPos(char *buf, int pos){ - int i; - for(i=0;i<2;i++){ - drawString(0,pos,buf); - flipBuffers(); - } -} - -void doVPADWait(){ - unsigned int vpad_handle; - OSDynLoad_Acquire("vpad.rpl", &vpad_handle); - - /* VPAD functions */ - int(*VPADRead)(int controller, VPADData *buffer, unsigned int num, int *error); - OSDynLoad_FindExport(vpad_handle, 0, "VPADRead", &VPADRead); - assert(VPADRead); - - int error; - VPADData vpad_data; - - /* Read initial vpad status */ - VPADRead(0, &vpad_data, 1, &error); - while(1){ - VPADRead(0, &vpad_data, 1, &error); - if(vpad_data.btn_hold){ - break; - } - } -} diff --git a/installer/src/loader.h b/installer/src/loader.h deleted file mode 100644 index 3abd118..0000000 --- a/installer/src/loader.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef LOADER_H -#define LOADER_H - -#include "../../../libwiiu/src/coreinit.h" -#include "../../../libwiiu/src/draw.h" -#include "../../../libwiiu/src/socket.h" -#include "../../../libwiiu/src/types.h" -#include "../../../libwiiu/src/vpad.h" - -/* Kernel address table */ -#if VER == 300 - #define KERN_ADDRESS_TBL 0xFFEB66E4 - - #define KERN_SYSCALL_TBL_1 0xFFE84D50 - #define KERN_SYSCALL_TBL_2 0xFFE85150 - #define KERN_SYSCALL_TBL_3 0xFFE85D50 - #define KERN_SYSCALL_TBL_4 0xFFE85550 - #define KERN_SYSCALL_TBL_5 0xFFE85950 - - #define KERN_CODE_READ 0xFFF02214 - #define KERN_CODE_WRITE 0xFFF02234 -#elif VER == 310 - #define KERN_ADDRESS_TBL 0xFFEB66E4 - - #define KERN_SYSCALL_TBL_1 0xFFE84D50 - #define KERN_SYSCALL_TBL_2 0xFFE85150 - #define KERN_SYSCALL_TBL_3 0xFFE85D50 - #define KERN_SYSCALL_TBL_4 0xFFE85550 - #define KERN_SYSCALL_TBL_5 0xFFE85950 - - #define KERN_CODE_READ 0xFFF02214 - #define KERN_CODE_WRITE 0xFFF02234 -#elif VER == 400 - #define KERN_ADDRESS_TBL 0xFFEB7E5C - - #define KERN_SYSCALL_TBL_1 0xFFE84C90 - #define KERN_SYSCALL_TBL_2 0xFFE85090 - #define KERN_SYSCALL_TBL_3 0xFFE85C90 - #define KERN_SYSCALL_TBL_4 0xFFE85490 - #define KERN_SYSCALL_TBL_5 0xFFE85890 - - #define KERN_CODE_READ 0xFFF02214 - #define KERN_CODE_WRITE 0xFFF02234 -#elif VER == 410 - #define KERN_ADDRESS_TBL 0xFFEB902C - - #define KERN_SYSCALL_TBL_1 0xFFE84C90 - #define KERN_SYSCALL_TBL_2 0xFFE85090 - #define KERN_SYSCALL_TBL_3 0xFFE85C90 - #define KERN_SYSCALL_TBL_4 0xFFE85490 - #define KERN_SYSCALL_TBL_5 0xFFE85890 - - #define KERN_CODE_READ 0xFFF02214 - #define KERN_CODE_WRITE 0xFFF02234 -#elif VER == 500 - #define KERN_ADDRESS_TBL 0xFFEA9E4C - - #define KERN_SYSCALL_TBL_1 0xFFE84C70 - #define KERN_SYSCALL_TBL_2 0xFFE85070 - #define KERN_SYSCALL_TBL_3 0xFFE85470 - #define KERN_SYSCALL_TBL_4 0xFFEA9120 - #define KERN_SYSCALL_TBL_5 0xFFEA9520 - - #define KERN_CODE_READ 0xFFF021f4 - #define KERN_CODE_WRITE 0xFFF02214 -#elif VER == 532 - #define KERN_ADDRESS_TBL 0xFFEAAA10 - - #define KERN_SYSCALL_TBL_1 0xFFE84C70 - #define KERN_SYSCALL_TBL_2 0xFFE85070 - #define KERN_SYSCALL_TBL_3 0xFFE85470 - #define KERN_SYSCALL_TBL_4 0xFFEA9CE0 - #define KERN_SYSCALL_TBL_5 0xFFEAA0E0 - - #define KERN_CODE_READ 0xFFF02274 - #define KERN_CODE_WRITE 0xFFF02294 -#elif VER == 550 - #define KERN_ADDRESS_TBL 0xFFEAB7A0 - - #define KERN_SYSCALL_TBL_1 0xFFE84C70 - #define KERN_SYSCALL_TBL_2 0xFFE85070 - #define KERN_SYSCALL_TBL_3 0xFFE85470 - #define KERN_SYSCALL_TBL_4 0xFFEAAA60 - #define KERN_SYSCALL_TBL_5 0xFFEAAE60 - - #define KERN_CODE_READ 0xFFF023D4 - #define KERN_CODE_WRITE 0xFFF023F4 -#else -#error "Unsupported Wii U software version" -#endif - -void _main(); -void kern_write(void *addr, uint32_t value); -void* memset(void* dst, const uint8_t val, uint32_t size); -void* memcpy(void* dst, const void* src, uint32_t size); - -#endif /* LOADER_H */ \ No newline at end of file diff --git a/kern.py b/kern.py deleted file mode 100644 index f80d707..0000000 --- a/kern.py +++ /dev/null @@ -1,7 +0,0 @@ -from tcpgecko import TCPGecko -import sys - -tcp = TCPGecko("192.168.1.82") -print(tcp.readkern(0x10000000)) -tcp.s.close() -print("Done.") diff --git a/octoling.py b/octoling.py deleted file mode 100644 index 79ae46f..0000000 --- a/octoling.py +++ /dev/null @@ -1,139 +0,0 @@ -# -*- coding: cp1252 -*- -#Codename Octohax -#To find Octohax offsets on newer versions, dump memory -#in that area, eg 0x10500000 to 0x10700000, open in hex -#editor, search "Tnk_Simple", there are only 2 results -#Also search for Player00 -#There should be like a result or two before what you want -#Looks like this: -''' -.k.Œ.....k. Riva -l00.Rival00_Hlf. -Rival_Squid.Play -er00_anim...Play -er_Squid_anim... -Player01_anim... -Player00....Play -er00_Hlf....Play -er_Squid....Play -er01....Player01 -_Hlf....ToSquid. -ToHuman.Sqd_Jet. -''' -#Then dump 0x12000000 to 0x13000000, search for Tnk_Simple, -#should be first result, with three of them in a row with spacing - -from tcpgecko import TCPGecko -import sys -sys.argv.append("280") - -tcp = TCPGecko("192.168.1.82") -if sys.argv[1] == "100": #For 1.0.0-? - tcp.writestr(0x105068F0, b"Tnk_Rvl00") - tcp.writestr(0x1051A500, b"Tnk_Rvl00") - tcp.writestr(0x105DBFE0, b"Rival00") - tcp.writestr(0x105DBFEC, b"Rival00_Hlf") - tcp.writestr(0x105DBFFC, b"Rival_Squid") - #tcp.pokemem(0x12CB05A0, 42069) -elif sys.argv[1] == "130": #for 1.3.0 - tcp.writestr(0x105068F0, b"Tnk_Rvl00") - tcp.writestr(0x105D4000, b"Tnk_Rvl00") - tcp.writestr(0x105DC118, b"Rival00") - tcp.writestr(0x105DC124, b"Rival00_Hlf") - tcp.writestr(0x105DC134, b"Rival_Squid") - #tcp.pokemem(0x12CB07A0, 42069) -elif sys.argv[1] == "200": #For 2.0.0 - tcp.writestr(0x10506AB0, b"Tnk_Rvl00") - tcp.writestr(0x105E0278, b"Tnk_Rvl00") - tcp.writestr(0x105E85B0, b"Rival00") - tcp.writestr(0x105E85BC, b"Rival00_Hlf") - tcp.writestr(0x105E85CC, b"Rival_Squid") - tcp.writestr(0x12BE2350, b"Tnk_Rvl00") - tcp.writestr(0x12BE239C, b"Tnk_Rvl00") - tcp.writestr(0x12BE23E8, b"Tnk_Rvl00") -elif sys.argv[1] == "210": #For 2.1.0 - tcp.writestr(0x10506AF8, b"Tnk_Rvl00") - tcp.writestr(0x105E0350, b"Tnk_Rvl00") - tcp.writestr(0x105E8698, b"Rival00") - tcp.writestr(0x105E86A4, b"Rival00_Hlf") - tcp.writestr(0x105E86B4, b"Rival_Squid") - tcp.writestr(0x12BE2350, b"Tnk_Rvl00") - tcp.writestr(0x12BE239C, b"Tnk_Rvl00") - tcp.writestr(0x12BE23E8, b"Tnk_Rvl00") - tcp.pokemem(0x12CC7C80, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "220": #For 2.2.0 - tcp.writestr(0x10506AF8, b"Tnk_Rvl00") - tcp.writestr(0x105E0350, b"Tnk_Rvl00") - tcp.writestr(0x105EB040, b"Rival00") - tcp.writestr(0x105EB04C, b"Rival00_Hlf") - tcp.writestr(0x105EB05C, b"Rival_Squid") - tcp.writestr(0x12BE5350, b"Tnk_Rvl00") - tcp.writestr(0x12BE539C, b"Tnk_Rvl00") - tcp.writestr(0x12BE53E8, b"Tnk_Rvl00") - tcp.pokemem(0x12CCAC80, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "230": #For 2.3.0 - tcp.writestr(0x10506AF8, b"Tnk_Rvl00") - tcp.writestr(0x105E3BB8, b"Tnk_Rvl00") - tcp.writestr(0x105EBF98, b"Rival00") - tcp.writestr(0x105EBFA4, b"Rival00_Hlf") - tcp.writestr(0x105EBFB4, b"Rival_Squid") - tcp.writestr(0x12BE6350, b"Tnk_Rvl00") - tcp.writestr(0x12BE639C, b"Tnk_Rvl00") - tcp.writestr(0x12BE63E8, b"Tnk_Rvl00") - tcp.pokemem(0x12CCBB90, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "240": #For 2.4.0 - tcp.writestr(0x10506AF8, b"Tnk_Rvl00") - tcp.writestr(0x105E4EA0, b"Tnk_Rvl00") - tcp.writestr(0x105ED7B8, b"Rival00") - tcp.writestr(0x105ED7C4, b"Rival00_Hlf") - tcp.writestr(0x105ED7D4, b"Rival_Squid") - tcp.writestr(0x12BE8350, b"Tnk_Rvl00") - tcp.writestr(0x12BE839C, b"Tnk_Rvl00") - tcp.writestr(0x12BE83E8, b"Tnk_Rvl00") - tcp.pokemem(0x12CCDB90, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "250": #For 2.5.0 - tcp.writestr(0x10506AF8, b"Tnk_Rvl00") - tcp.writestr(0x105E4EB8, b"Tnk_Rvl00") - tcp.writestr(0x105ED7D0, b"Rival00") - tcp.writestr(0x105ED7DC, b"Rival00_Hlf") - #Don't really need squid, looks bad without proper bone offsets - #tcp.writestr(0x105ED7D4, b"Rival_Squid") - tcp.writestr(0x12BE8350, b"Tnk_Rvl00") - tcp.writestr(0x12BE839C, b"Tnk_Rvl00") - tcp.writestr(0x12BE83E8, b"Tnk_Rvl00") - tcp.pokemem(0x12CCDB90, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "260": #For 2.6.0 - tcp.writestr(0x10506B28, b"Tnk_Rvl00") - tcp.writestr(0x105E59B8, b"Tnk_Rvl00") - tcp.writestr(0x105EE350, b"Rival00") - tcp.writestr(0x105EE35C, b"Rival00_Hlf") - #Don't really need squid, looks bad without proper bone offsets - #tcp.writestr(0x105EE36C, b"Rival_Squid") - tcp.writestr(0x12BE9354, b"Tnk_Rvl00") - tcp.writestr(0x12BE93A0, b"Tnk_Rvl00") - tcp.writestr(0x12BE93EC, b"Tnk_Rvl00") - tcp.pokemem(0x12CCF990, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "270": #For 2.7.0 - tcp.writestr(0x10506B58, b"Tnk_Rvl00") - tcp.writestr(0x105E5F40, b"Tnk_Rvl00") - tcp.writestr(0x105EE968, b"Rival00") - tcp.writestr(0x105EE974, b"Rival00_Hlf") - #Don't really need squid, looks bad without proper bone offsets - #tcp.writestr(0x105EE984, b"Rival_Squid") - tcp.writestr(0x12BEA354, b"Tnk_Rvl00") - tcp.writestr(0x12BEA3A0, b"Tnk_Rvl00") - tcp.writestr(0x12BEA3EC, b"Tnk_Rvl00") - tcp.pokemem(0x12CD0D90, 0x00000000) #Enforce Female Inkling -elif sys.argv[1] == "280": #For 2.8.0 - tcp.writestr(0x10506B58, b"Tnk_Rvl00") - tcp.writestr(0x105E6000, b"Tnk_Rvl00") - tcp.writestr(0x105EEA28, b"Rival00") - tcp.writestr(0x105EEA34, b"Rival00_Hlf") - #Don't really need squid, looks bad without proper bone offsets - #tcp.writestr(0x105EE9A44, b"Rival_Squid") - tcp.writestr(0x12C1F354, b"Tnk_Rvl00") - tcp.writestr(0x12C1F3A0, b"Tnk_Rvl00") - tcp.writestr(0x12C1F3EC, b"Tnk_Rvl00") - tcp.pokemem(0x12D05D90, 0x00000000) #Enforce Female Inkling -tcp.s.close() -print("Done.") diff --git a/purge.py b/purge.py deleted file mode 100644 index c235e12..0000000 --- a/purge.py +++ /dev/null @@ -1,6 +0,0 @@ -from tcpgecko import TCPGecko -#Script to purge Miiverse save cache in Splatoon -tcp = TCPGecko("192.168.137.3") -tcp.writestr(0x12CE0100, b"\x00" * 0x1850) #Only for 2.0.0-2.1.0 AFAIK -tcp.s.close() -print("Done!") diff --git a/syshax.py b/syshax.py deleted file mode 100644 index e98530d..0000000 --- a/syshax.py +++ /dev/null @@ -1,19 +0,0 @@ -from tcpgecko import TCPGecko -from binascii import hexlify, unhexlify -import sys -try: import __builtin__ -except: import builtins as __builtin__ - -def hex(value, fill): - return "0x" + __builtin__.hex(value).lstrip("0x").rstrip("L").zfill(fill).upper() - -tcp = TCPGecko("192.168.0.10") -title_id = 0x0005000010144F00 #Smash USA -SYSCheckTitleExists = tcp.get_symbol("sysapp.rpl", "SYSCheckTitleExists", True) -doesExist = SYSCheckTitleExists(title_id >> 32, title_id & 0xFFFFFFFF) -if not doesExist: print("Title " + hex(title_id, 16) + " does not exist!") -else: - SYSLaunchTitle = tcp.get_symbol("sysapp.rpl", "SYSLaunchTitle", True) - SYSLaunchTitle(title_id >> 32, title_id & 0xFFFFFFFF) - print("Game switched!") -tcp.s.close() diff --git a/tcpgecko.py b/tcpgecko.py deleted file mode 100644 index 803a16c..0000000 --- a/tcpgecko.py +++ /dev/null @@ -1,353 +0,0 @@ -import socket, struct -from common import * -from binascii import hexlify, unhexlify - -def enum(**enums): - return type('Enum', (), enums) - -class TCPGecko: - def __init__(self, *args): - self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) - print("Connecting to " + str(args[0]) + ":7331") - self.s.connect((str(args[0]), 7331)) #IP, 1337 reversed, Cafiine uses 7332+ - print("Connected!") - - def readmem(self, address, length): #Number of bytes - if length == 0: raise BaseException("Reading memory requires a length (# of bytes)") - if not self.validrange(address, length): raise BaseException("Address range not valid") - if not self.validaccess(address, length, "read"): raise BaseException("Cannot read from address") - ret = b"" - if length > 0x400: - print("Length is greater than 0x400 bytes, need to read in chunks") - print("Start address: " + hexstr0(address)) - for i in range(int(length / 0x400)): #Number of blocks, ignores extra - self.s.send(b"\x04") #cmd_readmem - request = struct.pack(">II", address, address + 0x400) - self.s.send(request) - status = self.s.recv(1) - if status == b"\xbd": ret += self.s.recv(0x400) - elif status == b"\xb0": ret += b"\x00" * 0x400 - else: raise BaseException("Something went terribly wrong") - address += 0x400;length -= 0x400 - print("Current address: " + hexstr0(address)) - if length != 0: #Now read the last little bit - self.s.send(b"\x04") - request = struct.pack(">II", address, address + length) - self.s.send(request) - status = self.s.recv(1) - if status == b"\xbd": ret += self.s.recv(length) - elif status == b"\xb0": ret += b"\x00" * length - else: raise BaseException("Something went terribly wrong") - print("Finished!") - else: - self.s.send(b"\x04") - request = struct.pack(">II", address, address + length) - self.s.send(request) - status = self.s.recv(1) - if status == b"\xbd": ret += self.s.recv(length) - elif status == b"\xb0": ret += b"\x00" * length - else: raise BaseException("Something went terribly wrong") - return ret - - def readkern(self, address): #Only takes 4 bytes, may need to run multiple times - if not self.validrange(address, 4): raise BaseException("Address range not valid") - if not self.validaccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.s.send(b"\x0C") #cmd_readkern - request = struct.pack(">I", int(address)) - self.s.send(request) - value = struct.unpack(">I", self.s.recv(4))[0] - return value - - def writekern(self, address, value): #Only takes 4 bytes, may need to run multiple times - if not self.validrange(address, 4): raise BaseException("Address range not valid") - if not self.validaccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.s.send(b"\x0B") #cmd_readkern - print(value) - request = struct.pack(">II", int(address), int(value)) - self.s.send(request) - return - - def pokemem(self, address, value): #Only takes 4 bytes, may need to run multiple times - if not self.validrange(address, 4): raise BaseException("Address range not valid") - if not self.validaccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.s.send(b"\x03") #cmd_pokemem - request = struct.pack(">II", int(address), int(value)) - self.s.send(request) #Done, move on - return - - def search32(self, address, value, size): - self.s.send(b"\x72") #cmd_search32 - request = struct.pack(">III", address, value, size) - self.s.send(request) - reply = self.s.recv(4) - return struct.unpack(">I", reply)[0] - - def getversion(self): - self.s.send(b"\x9A") #cmd_os_version - reply = self.s.recv(4) - return struct.unpack(">I", reply)[0] - - def writestr(self, address, string): - if not self.validrange(address, len(string)): raise BaseException("Address range not valid") - if not self.validaccess(address, len(string), "write"): raise BaseException("Cannot write to address") - if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize - if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") - pos = 0 - for x in range(int(len(string) / 4)): - self.pokemem(address, struct.unpack(">I", string[pos:pos + 4])[0]) - address += 4;pos += 4 - return - - def memalign(self, size, align): - symbol = self.get_symbol("coreinit.rpl", "MEMAllocFromDefaultHeapEx", True, 1) - symbol = struct.unpack(">I", symbol.address)[0] - address = self.readmem(symbol, 4) - #print("memalign address: " + hexstr0(struct.unpack(">I", address)[0])) - ret = self.call(address, size, align) - return ret - - def freemem(self, address): - symbol = self.get_symbol("coreinit.rpl", "MEMFreeToDefaultHeap", True, 1) - symbol = struct.unpack(">I", symbol.address)[0] - addr = self.readmem(symbol, 4) - #print("freemem address: " + hexstr0(struct.unpack(">I", addr)[0])) - self.call(addr, address) #void, no return - - def memalloc(self, size, align, noprint=False): - return self.function("coreinit.rpl", "OSAllocFromSystem", noprint, 0, size, align) - - def freealloc(self, address): - return self.function("coreinit.rpl", "OSFreeToSystem", True, 0, address) - - def createpath(self, path): - if not hasattr(self, "pPath"): self.pPath = self.memalloc(len(path), 0x20, True) #It'll auto-pad - size = len(path) + (32 - (len(path) % 32)) - self.function("coreinit.rpl", "memset", True, 0, self.pPath, 0x00, size) - self.writestr(self.pPath, path) - #print("pPath address: " + hexstr0(self.pPath)) - - def createstr(self, string): - address = self.memalloc(len(string), 0x20, True) #It'll auto-pad - size = len(string) + (32 - (len(string) % 32)) - self.function("coreinit.rpl", "memset", True, 0, address, 0x00, size) - self.writestr(address, string) - print("String address: " + hexstr0(address)) - return address - - def FSInitClient(self): - self.pClient = self.memalign(0x1700, 0x20) - self.function("coreinit.rpl", "FSAddClient", True, 0, self.pClient) - #print("pClient address: " + hexstr0(self.pClient)) - - def FSInitCmdBlock(self): - self.pCmd = self.memalign(0xA80, 0x20) - self.function("coreinit.rpl", "FSInitCmdBlock", True, 0, self.pCmd) - #print("pCmd address: " + hexstr0(self.pCmd)) - - def FSOpenDir(self, path="/"): - print("Initializing...") - self.function("coreinit.rpl", "FSInit", True) - if not hasattr(self, "pClient"): self.FSInitClient() - if not hasattr(self, "pCmd"): self.FSInitCmdBlock() - print("Getting memory ready...") - self.createpath(path) - self.pDh = self.memalloc(4, 4, True) - #print("pDh address: " + hexstr0(self.pDh)) - print("Calling function...") - ret = self.function("coreinit.rpl", "FSOpenDir", False, 0, self.pClient, self.pCmd, self.pPath, self.pDh, 0xFFFFFFFF) - self.pDh = int(hexlify(self.readmem(self.pDh, 4)), 16) - print("Return value: " + hexstr0(ret)) - - def SAVEOpenDir(self, path="/", slot=255): - print("Initializing...") - self.function("coreinit.rpl", "FSInit", True, 0) - self.function("nn_save.rpl", "SAVEInit", True, 0, slot) - print("Getting memory ready...") - if not hasattr(self, "pClient"): self.FSInitClient() - if not hasattr(self, "pCmd"): self.FSInitCmdBlock() - self.createpath(path) - self.pDh = self.memalloc(4, 4, True) - #print("pDh address: " + hexstr0(self.pDh)) - print("Calling function...") - ret = self.function("nn_save.rpl", "SAVEOpenDir", False, 0, self.pClient, self.pCmd, slot, self.pPath, self.pDh, 0xFFFFFFFF) - self.pDh = int(hexlify(self.readmem(self.pDh, 4)), 16) - print("Return value: " + hexstr0(ret)) - - def FSReadDir(self): - global printe - if not hasattr(self, "pBuffer"): self.pBuffer = self.memalign(0x164, 0x20) - print("pBuffer address: " + hexstr0(self.pBuffer)) - ret = self.function("coreinit.rpl", "FSReadDir", True, 0, self.pClient, self.pCmd, self.pDh, self.pBuffer, 0xFFFFFFFF) - self.entry = self.readmem(self.pBuffer, 0x164) - printe = getstr(self.entry, 100) + " " - self.FileSystem().printflags(uint32(self.entry, 0), self.entry) - self.FileSystem().printperms(uint32(self.entry, 4)) - print(printe) - return self.entry, ret - - def SAVEOpenFile(self, path="/", mode="r", slot=255): - print("Initializing...") - self.function("coreinit.rpl", "FSInit", True) - self.function("nn_save.rpl", "SAVEInit", slot, True) - print("Getting memory ready...") - if not hasattr(self, "pClient"): self.FSInitClient() - if not hasattr(self, "pCmd"): self.FSInitCmdBlock() - self.createpath(path) - self.pMode = self.createstr(mode) - self.pFh = self.memalign(4, 4) - #print("pFh address: " + hexstr0(self.pFh)) - print("Calling function...") - print("This function may have errors") - #ret = self.function("nn_save.rpl", "SAVEOpenFile", self.pClient, self.pCmd, slot, self.pPath, self.pMode, self.pFh, 0xFFFFFFFF) - #self.pFh = int(self.readmem(self.pFh, 4).encode("hex"), 16) - #print(ret) - - def FSReadFile(self): - if not hasattr(self, "pBuffer"): self.pBuffer = self.memalign(0x200, 0x20) - print("pBuffer address: " + hexstr0(self.pBuffer)) - ret = self.function("coreinit.rpl", "FSReadFile", False, 0, self.pClient, self.pCmd, self.pBuffer, 1, 0x200, self.pFh, 0, 0xFFFFFFFF) - print(ret) - return tcp.readmem(self.pBuffer, 0x200) - - def get_symbol(self, rplname, symname, noprint=False, data=0): - self.s.send(b"\x71") #cmd_getsymbol - request = struct.pack(">II", 8, 8 + len(rplname) + 1) #Pointers - request += rplname.encode("UTF-8") + b"\x00" - request += symname.encode("UTF-8") + b"\x00" - size = struct.pack(">B", len(request)) - data = struct.pack(">B", data) - self.s.send(size) #Read this many bytes - self.s.send(request) #Get this symbol - self.s.send(data) #Is it data? - address = self.s.recv(4) - return ExportedSymbol(address, self, rplname, symname, noprint) - - def call(self, address, *args): - arguments = list(args) - if len(arguments)>8 and len(arguments)<=16: #Use the big call function - while len(arguments) != 16: - arguments.append(0) - self.s.send(b"\x80") - address = struct.unpack(">I", address)[0] - request = struct.pack(">I16I", address, *arguments) - self.s.send(request) - reply = self.s.recv(8) - return struct.unpack(">I", reply[:4])[0] - elif len(arguments) <= 8: #Use the normal one that dNet client uses - while len(arguments) != 8: - arguments.append(0) - self.s.send(b"\x70") - address = struct.unpack(">I", address)[0] - request = struct.pack(">I8I", address, *arguments) - self.s.send(request) - reply = self.s.recv(8) - return struct.unpack(">I", reply[:4])[0] - else: raise BaseException("Too many arguments!") - - #Data last, only a few functions need it, noprint for the big FS/SAVE ones above, acts as gateway for data arg - def function(self, rplname, symname, noprint=False, data=0, *args): - symbol = self.get_symbol(rplname, symname, noprint, data) - ret = self.call(symbol.address, *args) - return ret - - def validrange(self, address, length): - if 0x01000000 <= address and address + length <= 0x01800000: return True - elif 0x0E000000 <= address and address + length <= 0x10000000: return True #Depends on game - elif 0x10000000 <= address and address + length <= 0x50000000: return True #Doesn't quite go to 5 - elif 0xE0000000 <= address and address + length <= 0xE4000000: return True - elif 0xE8000000 <= address and address + length <= 0xEA000000: return True - elif 0xF4000000 <= address and address + length <= 0xF6000000: return True - elif 0xF6000000 <= address and address + length <= 0xF6800000: return True - elif 0xF8000000 <= address and address + length <= 0xFB000000: return True - elif 0xFB000000 <= address and address + length <= 0xFB800000: return True - elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: return True - else: return False - - def validaccess(self, address, length, access): - if 0x01000000 <= address and address + length <= 0x01800000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0x0E000000 <= address and address + length <= 0x10000000: #Depends on game, may be EG 0x0E3 - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0x10000000 <= address and address + length <= 0x50000000: - if access.lower() == "read": return True - if access.lower() == "write": return True - elif 0xE0000000 <= address and address + length <= 0xE4000000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0xE8000000 <= address and address + length <= 0xEA000000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0xF4000000 <= address and address + length <= 0xF6000000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0xF6000000 <= address and address + length <= 0xF6800000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0xF8000000 <= address and address + length <= 0xFB000000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0xFB000000 <= address and address + length <= 0xFB800000: - if access.lower() == "read": return True - if access.lower() == "write": return False - elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: - if access.lower() == "read": return True - if access.lower() == "write": return True - else: return False - - class FileSystem: #TODO: Try to clean this up ???? - Flags = enum( - IS_DIRECTORY = 0x80000000, - IS_QUOTA = 0x40000000, - SPRT_QUOTA_SIZE = 0x20000000, #Supports .quota_size field - SPRT_ENT_ID = 0x10000000, #Supports .ent_id field - SPRT_CTIME = 0x08000000, #Supports .ctime field - SPRT_MTIME = 0x04000000, #Supports .mtime field - SPRT_ATTRIBUTES = 0x02000000, #Supports .attributes field - SPRT_ALLOC_SIZE = 0x01000000, #Supports .alloc_size field - IS_RAW_FILE = 0x00800000, #Entry isn't encrypted - SPRT_DIR_SIZE = 0x00100000, #Supports .size field, doesn't apply to files - UNSUPPORTED_CHR = 0x00080000) #Entry name has an unsupported character - - Permissions = enum( #Pretty self explanitory - OWNER_READ = 0x00004000, - OWNER_WRITE = 0x00002000, - OTHER_READ = 0x00000400, - OTHER_WRITE = 0x00000200) - - def printflags(self, flags, data): - global printe - if flags & self.Flags.IS_DIRECTORY: printe += " Directory" - if flags & self.Flags.IS_QUOTA: printe += " Quota" - if flags & self.Flags.SPRT_QUOTA_SIZE: printe += " .quota_size: " + hexstr0(uint32(data, 24)) - if flags & self.Flags.SPRT_ENT_ID: printe += " .ent_id: " + hexstr0(uint32(data, 32)) - if flags & self.Flags.SPRT_CTIME: printe += " .ctime: " + hexstr0(uint32(data, 36)) - if flags & self.Flags.SPRT_MTIME: printe += " .mtime: " + hexstr0(uint32(data, 44)) - if flags & self.Flags.SPRT_ATTRIBUTES: pass #weh - if flags & self.Flags.SPRT_ALLOC_SIZE: printe += " .alloc_size: " + hexstr0(uint32(data, 20)) - if flags & self.Flags.IS_RAW_FILE: printe += " Raw (Unencrypted) file" - if flags & self.Flags.SPRT_DIR_SIZE: printe += " .dir_size: " + hexstr0(uint64(data, 24)) - if flags & self.Flags.UNSUPPORTED_CHR: printe += " !! UNSUPPORTED CHARACTER IN NAME" - - def printperms(self, perms): - global printe - if perms & self.Permissions.OWNER_READ: printe += " OWNER_READ" - if perms & self.Permissions.OWNER_WRITE: printe += " OWNER_WRITE" - if perms & self.Permissions.OTHER_READ: printe += " OTHER_READ" - if perms & self.Permissions.OTHER_WRITE: printe += " OTHER_WRITE" - -def hexstr0(data): #0xFFFFFFFF, uppercase hex string - return "0x" + hex(data).lstrip("0x").rstrip("L").zfill(8).upper() - -class ExportedSymbol(object): - def __init__(self, address, rpc=None, rplname=None, symname=None, noprint=False): - self.address = address - self.rpc = rpc - self.rplname = rplname - self.symname = symname - if not noprint: #Make command prompt not explode when using FS or SAVE functions - print(symname + " address: " + hexstr0(struct.unpack(">I", address)[0])) - - def __call__(self, *args): - return self.rpc.call(self.address, *args) #Pass in arguments, run address diff --git a/uGecko.py b/uGecko.py new file mode 100644 index 0000000..be90853 --- /dev/null +++ b/uGecko.py @@ -0,0 +1,282 @@ +import socket, struct + +class uGecko: + def __init__(self, ip): + self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) + self.ip = ip # TODO: Make checks + self.connected = False + + def connect(self): + if self.ip == None or self.ip == "": + raise BaseException("No ip address has been entered!") + else: + try: + self.socket.connect((str(self.ip), 7331)) + self.connected = True + except: + raise BaseException(f"Unable to connect to {self.ip}!") + + + def disconnect(self): + self.socket.close() # TODO: Make checks + self.connected = False + + def isConnected(self): + return self.connected + + def validRange(self, address, length): + if 0x01000000 <= address and address + length <= 0x01800000: return True + elif 0x0E000000 <= address and address + length <= 0x10000000: return True #Depends on game + elif 0x10000000 <= address and address + length <= 0x50000000: return True #Doesn't quite go to 5 + elif 0xE0000000 <= address and address + length <= 0xE4000000: return True + elif 0xE8000000 <= address and address + length <= 0xEA000000: return True + elif 0xF4000000 <= address and address + length <= 0xF6000000: return True + elif 0xF6000000 <= address and address + length <= 0xF6800000: return True + elif 0xF8000000 <= address and address + length <= 0xFB000000: return True + elif 0xFB000000 <= address and address + length <= 0xFB800000: return True + elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: return True + else: return False + + def validAccess(self, address, length, access): + if 0x01000000 <= address and address + length <= 0x01800000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0x0E000000 <= address and address + length <= 0x10000000: #Depends on game, may be EG 0x0E3 + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0x10000000 <= address and address + length <= 0x50000000: + if access.lower() == "read": return True + if access.lower() == "write": return True + elif 0xE0000000 <= address and address + length <= 0xE4000000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0xE8000000 <= address and address + length <= 0xEA000000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0xF4000000 <= address and address + length <= 0xF6000000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0xF6000000 <= address and address + length <= 0xF6800000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0xF8000000 <= address and address + length <= 0xFB000000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0xFB000000 <= address and address + length <= 0xFB800000: + if access.lower() == "read": return True + if access.lower() == "write": return False + elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: + if access.lower() == "read": return True + if access.lower() == "write": return True + else: return False + + def poke8(self, address, value, skip = False): + if not skip: + if not self.validRange(address, 1): raise BaseException("Address range not valid") + if not self.validAccess(address, 1, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x01') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + + def poke16(self, address, value, skip = False): + if not skip: + if not self.validRange(address, 2): raise BaseException("Address range not valid") + if not self.validAccess(address, 2, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x02') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + + def poke32(self, address, value, skip = False): + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x03') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + + def serialPoke(self, addressTable, value, skip = False): + if isinstance(addressTable, list): + for address in addressTable: + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + self.socket.send(b"\x03") + req = struct.pack(">II", address, value) + self.socket.send(req) + return + else: + raise BaseException("Address is not a list!") + + def writeString(self, address, string, skip = False): + if not skip: + if not self.validRange(address, len(string)): raise BaseException("Address range not valid") + if not self.validAccess(address, len(string), "write"): raise BaseException("Cannot write to address") + if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize + if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") + pos = 0 + for x in range(int(len(string) / 4)): + self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0]) + address += 4;pos += 4 + return + + def read(self, address, length, skip = False): + if not skip: + if length == 0: raise BaseException("Reading memory requires a length!") + if not self.validRange(address, length): raise BaseException("Address range not valid") + if not self.validAccess(address, length, "read"): raise BaseException("Cannot read to address") + ret = b'' + if length > 0x400: + for i in range(int(length / 0x400)): + self.socket.send(b'\x04') + req = struct.pack(">II", int(address), int(address + 0x400)) + self.socket.send(req) + if status == b'\xbd': ret += self.socket.recv(length) + elif status == b'\xb0': ret += b'\x00' * length + else: raise BaseException("Something went terribly wrong") + address += 0x400;length -= 0x400 + if length != 0: + self.socket.send(b'\x04') + req = struct.pack(">II", int(address), int(address + length)) + self.socket.send(req) + status = self.socket.recv(1) + if status == b'\xbd': ret += self.socket.recv(length) + elif status == b'\xb0': ret += b'\x00' * length + else: raise BaseException("Something went terribly wrong") + else: + self.socket.send(b'\x04') + req = struct.pack(">II", int(address), int(address + length)) + self.socket.send(req) + status = self.socket.recv(1) + if status == b'\xbd': ret += self.socket.recv(length) + elif status == b'\xb0': ret += b'\x00' * length + else: raise BaseException("Something went terribly wrong") + return ret + + def kernelWrite(self, address, value, skip = False): + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x0B') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + + def kernelRead(self, address, skip = False): + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "read"): raise BaseException("Cannot read to address") + self.socket.send(b'\x0C') + req = struct.pack(">I", int(address)) + self.socket.send(req) + return struct.unpack(">I", self.socket.recv(4))[0] + + def getServerStatus(self): + self.socket.send(b'\x50') + return int.from_bytes(self.socket.recv(1), "big") + + def isConsolePaused(self): + self.socket.send(b'\x84') + val = int.from_bytes(self.socket.recv(1), "big") + if val == 1: + return True + else: + return False + + def pauseConsole(self): + self.socket.send(b'\x82') + + def resumeConsole(self): + self.socket.send(b'\x83') + + def getServerVersion(self): + self.socket.send(b'\x99') + return self.socket.recv(16).decode("UTF-8").replace('\n', '') + + def getOsVersion(self): + self.socket.send(b'\x9A') + return int.from_bytes(self.socket.recv(4), "big") + + def getVersionHash(self): + self.socket.send(b'\xE0') + return int.from_bytes(self.socket.recv(4), "big") + + def getAccountID(self): + self.socket.send(b'\x57') + return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") + + def getCoreHandlerAddress(self): + self.socket.send(b'\x55') + return hex(int.from_bytes(self.socket.recv(4), "big")) + + def getDataBufferSize(self): + self.socket.send(b'\x51') + return int.from_bytes(self.socket.recv(4), "big") + + def search(self, startAddress, value, length): + self.socket.send(b'\x72') + req = struct.pack(">III", int(startAddress), int(value), int(length)) + self.socket.send(req) + return hex(int.from_bytes(self.socket.recv(4), "big")) + + def advancedSearch(self, start, length, value, kernel, limit, aligned): + self.socket.send(b'\x73') + req_val = struct.pack(">I", int(value)) + search_byte_count = len(req_val) + req = struct.pack(">IIIIII", int(start), int(length), int(kernel), int(limit), int(aligned), int(search_byte_count)) + self.socket.send(req) + self.socket.send(req_val) + count = int.from_bytes(self.socket.recv(4), "big") / 4 + foundOffset = [] + for i in range(int(count)): + foundOffset.append(hex(int.from_bytes(self.socket.recv(4), "big"))) + return foundOffset + + def getSymbol(self, rplname, sysname, data = 0): + self.socket.send(b'\x71') + req = struct.pack('>II', 8, 8 + len(rplname) + 1) + req += rplname.encode("UTF-8") + b"\x00" + req += sysname.encode("UTF-8") + b"\x00" + size = struct.pack(">B", len(req)) + data = struct.pack(">B", data) + self.socket.send(size) + self.socket.send(req) + self.socket.send(data) + return self.socket.recv(4) + + def call(self, address, *args): + arguments = list(args) + if len(arguments) <= 8: + while len(arguments) != 8: + arguments.append(0) + address = struct.unpack(">I", address)[0] + req = struct.pack(">I8I", address, *arguments) + self.socket.send(b'\x70') + self.socket.send(req) + return struct.unpack('>I', self.socket.recv(8)[:4])[0] + else: + raise BaseException("Too many arguments!") + + def getEntryPointAddress(self): + self.socket.send(b'\xB1') + return hex(int.from_bytes(self.socket.recv(4), "big")) + + def runKernelCopyService(self): + self.socket.send(b'\xCD') + return + + def clearAssembly(self): + self.socket.send(b'\xE2') + return + + def excecuteAssembly(self, assembly): + self.socket.send(b'\x81') + req = assembly.encode('UTF-8') + self.socket.send(req) + + def persistAssembly(self, assembly): + self.socket.send(b'\xE1') + req = assembly.encode('UTF-8') + self.socket.send(req) \ No newline at end of file From 73775c53c852283034f11d311a4837318a13395d Mon Sep 17 00:00:00 2001 From: VCoding Date: Mon, 17 May 2021 01:04:04 +0200 Subject: [PATCH 02/68] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1787743..b961a03 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ All the library is contained in the file named uGecko.py (WARNING: Only tested o # Credits -**NWPlayer123, wj44, and wiiudev** for `pyGecko` -**Chadderz and Marionumber1** for `TCPGecko codehandler` -**BullyWiiPlaza** for the current version of `TCPGecko` +**NWPlayer123, wj44, and wiiudev** for `pyGecko`
+**Chadderz and Marionumber1** for `TCPGecko codehandler`
+**BullyWiiPlaza** for the current version of `TCPGecko`
**VCoding** for this modified version of `pyGecko`, specially designed for the `TCPGecko version` of **BullyWiiPlaza**. From e6af50d539d7e1eb3cd9bfbb1933696cfa81883c Mon Sep 17 00:00:00 2001 From: VCoding Date: Sun, 13 Jun 2021 18:43:19 +0200 Subject: [PATCH 03/68] uGecko v1.0.1 - Test... --- .gitignore | 2 + DOCUMENTATION.md | 44 ++++ examples/launchCustomGame.py | 4 +- examples/shutdownWiiU.py | 20 ++ uGecko.py | 429 +++++++++++++++++++++-------------- 5 files changed, 323 insertions(+), 176 deletions(-) create mode 100644 .gitignore create mode 100644 DOCUMENTATION.md create mode 100644 examples/shutdownWiiU.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e8bcc23 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +testLIb.py diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md new file mode 100644 index 0000000..b8d3c4b --- /dev/null +++ b/DOCUMENTATION.md @@ -0,0 +1,44 @@ +# Documentation / uGecko +This file is intended to explain and show how to use the functions of ___uGecko___. + +| Name | Description | Example | Return | +|:----: |:-----------: |:-------: | :------: +|uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None +|||| +|connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None +|disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None +|isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`|Boolean +|||| +|poke8()|Allows to change the value in the ram|`gecko.poke8(address, 0x00)`| None +|poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x0000)`| None +|poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x00000000)`| None +|serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None +|writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None +|kernelWrite()| | `gecko.kernelWrite(0x10000000, 0x00000000)`| None +|||| +|read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Value +|kernelRead()| | `gecko.kernelRead(address)`| Value +|||| +|isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean +|pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None +|resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None +|||| +|getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) +|getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String +|getOsVersion()| Allows to recover the version of the console | `gecko.getOsVersion()`| Int +|getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int +|getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String +|getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCoreHandlerAddress()`| Hex +|getDataBufferSize()| | `gecko.getDataBufferSize()`| Int +|getEntryPointAddress()| | `gecko.getEntryPointAddress()`| Hex +|runKernelCopyService()| | `gecko.runKernelCopyService()`| None +|||| +|search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Hex +|advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Hex (Table) +|||| +|getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (Used for call) +|call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed +|||| +|clearAssembly()| | `gecko.clearAssembly()`| None +|excecuteAssembly()| | `gecko.excecuteAssembly(assembly)`| None +|persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file diff --git a/examples/launchCustomGame.py b/examples/launchCustomGame.py index 303174e..caa07cf 100644 --- a/examples/launchCustomGame.py +++ b/examples/launchCustomGame.py @@ -23,4 +23,6 @@ else: print(f"The game has not been detected on the WiiU!") -gecko.disconnect() \ No newline at end of file +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/examples/shutdownWiiU.py b/examples/shutdownWiiU.py new file mode 100644 index 0000000..81c3e9d --- /dev/null +++ b/examples/shutdownWiiU.py @@ -0,0 +1,20 @@ + ##################### + # Ignore this # +######################################################## +import os, sys, time +sys.dont_write_bytecode = True +currentdir = os.path.dirname(os.path.realpath(__file__)) +parentdir = os.path.dirname(currentdir) +sys.path.insert(0, parentdir) +######################################################## + +from uGecko import uGecko + +gecko = uGecko("192.168.1.102") +gecko.connect() + +gecko.call(gecko.getSymbol("coreinit.rpl", "OSShutdown"), 1) + +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/uGecko.py b/uGecko.py index be90853..ba3b9c8 100644 --- a/uGecko.py +++ b/uGecko.py @@ -1,25 +1,38 @@ -import socket, struct +import socket, struct, re + +def onlyCharactersIpAdd(ip): + check = re.compile(r'[^0-9.]').search + return not bool(check(ip)) + +def checkip(ip): + pieces = ip.split('.') + if len(pieces) != 4: return False + try: return all(0<=int(p)<256 for p in pieces) + except ValueError: return False class uGecko: def __init__(self, ip): self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) - self.ip = ip # TODO: Make checks + if not onlyCharactersIpAdd(ip): raise BaseException("The entered IP address is not only composed of numbers and dots.") + if not checkip(ip): raise BaseException("The entered IP address does not have a valid structure!") + self.ip = ip self.connected = False def connect(self): - if self.ip == None or self.ip == "": - raise BaseException("No ip address has been entered!") + if self.ip == None or self.ip == "": raise BaseException("No ip address has been entered!") else: - try: - self.socket.connect((str(self.ip), 7331)) - self.connected = True - except: - raise BaseException(f"Unable to connect to {self.ip}!") - + if not self.connected: + try: + self.socket.connect((str(self.ip), 7331)) + self.connected = True + except: raise BaseException(f"Unable to connect to {self.ip}!") + else: raise BaseException("A connection is already in progress!") def disconnect(self): - self.socket.close() # TODO: Make checks - self.connected = False + if self.connected: + self.socket.close() # TODO: Make checks + self.connected = False + else: raise BaseException("No connection is in progress!") def isConnected(self): return self.connected @@ -39,105 +52,144 @@ def validRange(self, address, length): def validAccess(self, address, length, access): if 0x01000000 <= address and address + length <= 0x01800000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False - elif 0x0E000000 <= address and address + length <= 0x10000000: #Depends on game, may be EG 0x0E3 - if access.lower() == "read": return True + elif 0x0E000000 <= address and address + length <= 0x10000000: + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0x10000000 <= address and address + length <= 0x50000000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return True elif 0xE0000000 <= address and address + length <= 0xE4000000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0xE8000000 <= address and address + length <= 0xEA000000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0xF4000000 <= address and address + length <= 0xF6000000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0xF6000000 <= address and address + length <= 0xF6800000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0xF8000000 <= address and address + length <= 0xFB000000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0xFB000000 <= address and address + length <= 0xFB800000: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return False elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: - if access.lower() == "read": return True + if access.lower() == "read" : return True if access.lower() == "write": return True else: return False def poke8(self, address, value, skip = False): - if not skip: - if not self.validRange(address, 1): raise BaseException("Address range not valid") - if not self.validAccess(address, 1, "write"): raise BaseException("Cannot write to address") - self.socket.send(b'\x01') - req = struct.pack(">II", int(address), int(value)) - self.socket.send(req) - return + if self.connected: + if not skip: + if not self.validRange(address, 1): raise BaseException("Address range not valid") + if not self.validAccess(address, 1, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x01') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + else: raise BaseException("No connection is in progress!") def poke16(self, address, value, skip = False): - if not skip: - if not self.validRange(address, 2): raise BaseException("Address range not valid") - if not self.validAccess(address, 2, "write"): raise BaseException("Cannot write to address") - self.socket.send(b'\x02') - req = struct.pack(">II", int(address), int(value)) - self.socket.send(req) - return + if self.connected: + if not skip: + if not self.validRange(address, 2): raise BaseException("Address range not valid") + if not self.validAccess(address, 2, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x02') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + else: raise BaseException("No connection is in progress!") def poke32(self, address, value, skip = False): - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.socket.send(b'\x03') - req = struct.pack(">II", int(address), int(value)) - self.socket.send(req) - return + if self.connected: + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x03') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + else: raise BaseException("No connection is in progress!") def serialPoke(self, addressTable, value, skip = False): - if isinstance(addressTable, list): - for address in addressTable: - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.socket.send(b"\x03") - req = struct.pack(">II", address, value) - self.socket.send(req) - return - else: - raise BaseException("Address is not a list!") + if self.connected: + if isinstance(addressTable, list): + for address in addressTable: + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + self.socket.send(b"\x03") + req = struct.pack(">II", address, value) + self.socket.send(req) + return + else: raise BaseException("Address is not a list!") + else: raise BaseException("No connection is in progress!") + + """ + def upload(self, startAddress, endAddress, value, skip = False): + length = endAddress - startAddress + fullChunk = int(length / 0x400) + lastChunk = length % 0x400 + allChunk = fullChunk + if lastChunk > 0: + allChunk += 1 + #self.socket.send(b'\x41') + #req = struct.pack(">II", startAddress, endAddress) + #self.socket.send(req) + chunk = 0 + newValue = re.findall('........', str(value)) + while chunk * 0x400 < fullChunk: + print(f"{hex(startAddress + chunk * 0x400)} : {newValue[chunk]}") + #chunkReq = struct.pack('>I', value) + # self.socket.send(chunkReq) + #print(value) + chunk += 1 + """ def writeString(self, address, string, skip = False): - if not skip: - if not self.validRange(address, len(string)): raise BaseException("Address range not valid") - if not self.validAccess(address, len(string), "write"): raise BaseException("Cannot write to address") - if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize - if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") - pos = 0 - for x in range(int(len(string) / 4)): - self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0]) - address += 4;pos += 4 - return + if self.connected: + if not skip: + if not self.validRange(address, len(string)): raise BaseException("Address range not valid") + if not self.validAccess(address, len(string), "write"): raise BaseException("Cannot write to address") + if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize + if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") + pos = 0 + for x in range(int(len(string) / 4)): + self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0]) + address += 4;pos += 4 + return + else: raise BaseException("No connection is in progress!") def read(self, address, length, skip = False): - if not skip: - if length == 0: raise BaseException("Reading memory requires a length!") - if not self.validRange(address, length): raise BaseException("Address range not valid") - if not self.validAccess(address, length, "read"): raise BaseException("Cannot read to address") - ret = b'' - if length > 0x400: - for i in range(int(length / 0x400)): - self.socket.send(b'\x04') - req = struct.pack(">II", int(address), int(address + 0x400)) - self.socket.send(req) - if status == b'\xbd': ret += self.socket.recv(length) - elif status == b'\xb0': ret += b'\x00' * length - else: raise BaseException("Something went terribly wrong") - address += 0x400;length -= 0x400 - if length != 0: + if self.connected: + if not skip: + if length == 0: raise BaseException("Reading memory requires a length!") + if not self.validRange(address, length): raise BaseException("Address range not valid") + if not self.validAccess(address, length, "read"): raise BaseException("Cannot read to address") + ret = b'' + if length > 0x400: + for i in range(int(length / 0x400)): + self.socket.send(b'\x04') + req = struct.pack(">II", int(address), int(address + 0x400)) + self.socket.send(req) + if status == b'\xbd': ret += self.socket.recv(length) + elif status == b'\xb0': ret += b'\x00' * length + else: raise BaseException("Something went terribly wrong") + address += 0x400;length -= 0x400 + if length != 0: + self.socket.send(b'\x04') + req = struct.pack(">II", int(address), int(address + length)) + self.socket.send(req) + status = self.socket.recv(1) + if status == b'\xbd': ret += self.socket.recv(length) + elif status == b'\xb0': ret += b'\x00' * length + else: raise BaseException("Something went terribly wrong") + else: self.socket.send(b'\x04') req = struct.pack(">II", int(address), int(address + length)) self.socket.send(req) @@ -145,138 +197,165 @@ def read(self, address, length, skip = False): if status == b'\xbd': ret += self.socket.recv(length) elif status == b'\xb0': ret += b'\x00' * length else: raise BaseException("Something went terribly wrong") - else: - self.socket.send(b'\x04') - req = struct.pack(">II", int(address), int(address + length)) - self.socket.send(req) - status = self.socket.recv(1) - if status == b'\xbd': ret += self.socket.recv(length) - elif status == b'\xb0': ret += b'\x00' * length - else: raise BaseException("Something went terribly wrong") - return ret + return ret + else: raise BaseException("No connection is in progress!") def kernelWrite(self, address, value, skip = False): - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.socket.send(b'\x0B') - req = struct.pack(">II", int(address), int(value)) - self.socket.send(req) - return + if self.connected: + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + self.socket.send(b'\x0B') + req = struct.pack(">II", int(address), int(value)) + self.socket.send(req) + return + else: raise BaseException("No connection is in progress!") def kernelRead(self, address, skip = False): - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "read"): raise BaseException("Cannot read to address") - self.socket.send(b'\x0C') - req = struct.pack(">I", int(address)) - self.socket.send(req) - return struct.unpack(">I", self.socket.recv(4))[0] + if self.connected: + if not skip: + if not self.validRange(address, 4): raise BaseException("Address range not valid") + if not self.validAccess(address, 4, "read"): raise BaseException("Cannot read to address") + self.socket.send(b'\x0C') + req = struct.pack(">I", int(address)) + self.socket.send(req) + return struct.unpack(">I", self.socket.recv(4))[0] + else: raise BaseException("No connection is in progress!") def getServerStatus(self): - self.socket.send(b'\x50') - return int.from_bytes(self.socket.recv(1), "big") + if self.connected: + self.socket.send(b'\x50') + return int.from_bytes(self.socket.recv(1), "big") + else: raise BaseException("No connection is in progress!") def isConsolePaused(self): - self.socket.send(b'\x84') - val = int.from_bytes(self.socket.recv(1), "big") - if val == 1: - return True - else: - return False + if self.connected: + self.socket.send(b'\x84') + val = int.from_bytes(self.socket.recv(1), "big") + if val == 1: return True + else: return False + else: raise BaseException("No connection is in progress!") def pauseConsole(self): - self.socket.send(b'\x82') + if self.connected: self.socket.send(b'\x82') + else: raise BaseException("No connection is in progress!") def resumeConsole(self): - self.socket.send(b'\x83') + if self.connected: self.socket.send(b'\x83') + else: raise BaseException("No connection is in progress!") def getServerVersion(self): - self.socket.send(b'\x99') - return self.socket.recv(16).decode("UTF-8").replace('\n', '') + if self.connected: + self.socket.send(b'\x99') + return self.socket.recv(16).decode("UTF-8").replace('\n', '') + else: raise BaseException("No connection is in progress!") def getOsVersion(self): - self.socket.send(b'\x9A') - return int.from_bytes(self.socket.recv(4), "big") + if self.connected: + self.socket.send(b'\x9A') + return int.from_bytes(self.socket.recv(4), "big") + else: raise BaseException("No connection is in progress!") def getVersionHash(self): - self.socket.send(b'\xE0') - return int.from_bytes(self.socket.recv(4), "big") + if self.connected: + self.socket.send(b'\xE0') + return int.from_bytes(self.socket.recv(4), "big") + else: raise BaseException("No connection is in progress!") def getAccountID(self): - self.socket.send(b'\x57') - return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") + if self.connected: + self.socket.send(b'\x57') + return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") + else: raise BaseException("No connection is in progress!") def getCoreHandlerAddress(self): - self.socket.send(b'\x55') - return hex(int.from_bytes(self.socket.recv(4), "big")) + if self.connected: + self.socket.send(b'\x55') + return hex(int.from_bytes(self.socket.recv(4), "big")) + else: raise BaseException("No connection is in progress!") def getDataBufferSize(self): - self.socket.send(b'\x51') - return int.from_bytes(self.socket.recv(4), "big") + if self.connected: + self.socket.send(b'\x51') + return int.from_bytes(self.socket.recv(4), "big") + else: raise BaseException("No connection is in progress!") def search(self, startAddress, value, length): - self.socket.send(b'\x72') - req = struct.pack(">III", int(startAddress), int(value), int(length)) - self.socket.send(req) - return hex(int.from_bytes(self.socket.recv(4), "big")) - - def advancedSearch(self, start, length, value, kernel, limit, aligned): - self.socket.send(b'\x73') - req_val = struct.pack(">I", int(value)) - search_byte_count = len(req_val) - req = struct.pack(">IIIIII", int(start), int(length), int(kernel), int(limit), int(aligned), int(search_byte_count)) - self.socket.send(req) - self.socket.send(req_val) - count = int.from_bytes(self.socket.recv(4), "big") / 4 - foundOffset = [] - for i in range(int(count)): - foundOffset.append(hex(int.from_bytes(self.socket.recv(4), "big"))) - return foundOffset + if self.connected: + self.socket.send(b'\x72') + req = struct.pack(">III", int(startAddress), int(value), int(length)) + self.socket.send(req) + return hex(int.from_bytes(self.socket.recv(4), "big")) + else: raise BaseException("No connection is in progress!") + + def advancedSearch(self, start, length, value, kernel, limit, aligned = 1): + if self.connected: + self.socket.send(b'\x73') + req_val = struct.pack(">I", int(value)) + search_byte_count = len(req_val) + req = struct.pack(">IIIIII", int(start), int(length), int(kernel), int(limit), int(aligned), int(search_byte_count)) + self.socket.send(req) + self.socket.send(req_val) + count = int.from_bytes(self.socket.recv(4), "big") / 4 + foundOffset = [] + for i in range(int(count)): + foundOffset.append(hex(int.from_bytes(self.socket.recv(4), "big"))) + return foundOffset + else: raise BaseException("No connection is in progress!") def getSymbol(self, rplname, sysname, data = 0): - self.socket.send(b'\x71') - req = struct.pack('>II', 8, 8 + len(rplname) + 1) - req += rplname.encode("UTF-8") + b"\x00" - req += sysname.encode("UTF-8") + b"\x00" - size = struct.pack(">B", len(req)) - data = struct.pack(">B", data) - self.socket.send(size) - self.socket.send(req) - self.socket.send(data) - return self.socket.recv(4) + if self.connected: + self.socket.send(b'\x71') + req = struct.pack('>II', 8, 8 + len(rplname) + 1) + req += rplname.encode("UTF-8") + b"\x00" + req += sysname.encode("UTF-8") + b"\x00" + size = struct.pack(">B", len(req)) + data = struct.pack(">B", data) + self.socket.send(size) + self.socket.send(req) + self.socket.send(data) + return self.socket.recv(4) + else: raise BaseException("No connection is in progress!") def call(self, address, *args): - arguments = list(args) - if len(arguments) <= 8: - while len(arguments) != 8: - arguments.append(0) - address = struct.unpack(">I", address)[0] - req = struct.pack(">I8I", address, *arguments) - self.socket.send(b'\x70') - self.socket.send(req) - return struct.unpack('>I', self.socket.recv(8)[:4])[0] - else: - raise BaseException("Too many arguments!") + if self.connected: + arguments = list(args) + if len(arguments) <= 8: + while len(arguments) != 8: + arguments.append(0) + address = struct.unpack(">I", address)[0] + req = struct.pack(">I8I", address, *arguments) + self.socket.send(b'\x70') + self.socket.send(req) + return struct.unpack('>I', self.socket.recv(8)[:4])[0] + else: + raise BaseException("Too many arguments!") + else: raise BaseException("No connection is in progress!") def getEntryPointAddress(self): - self.socket.send(b'\xB1') - return hex(int.from_bytes(self.socket.recv(4), "big")) + if self.connected: + self.socket.send(b'\xB1') + return hex(int.from_bytes(self.socket.recv(4), "big")) + else: raise BaseException("No connection is in progress!") def runKernelCopyService(self): - self.socket.send(b'\xCD') - return + if self.connected: self.socket.send(b'\xCD') + else: raise BaseException("No connection is in progress!") def clearAssembly(self): - self.socket.send(b'\xE2') - return + if self.connected: self.socket.send(b'\xE2') + else: raise BaseException("No connection is in progress!") def excecuteAssembly(self, assembly): - self.socket.send(b'\x81') - req = assembly.encode('UTF-8') - self.socket.send(req) + if self.connected: + self.socket.send(b'\x81') + req = assembly.encode('UTF-8') + self.socket.send(req) + else: raise BaseException("No connection is in progress!") def persistAssembly(self, assembly): - self.socket.send(b'\xE1') - req = assembly.encode('UTF-8') - self.socket.send(req) \ No newline at end of file + if self.connected: + self.socket.send(b'\xE1') + req = assembly.encode('UTF-8') + self.socket.send(req) + else: raise BaseException("No connection is in progress!") \ No newline at end of file From dd7f1087fe424e6cfa6e0c384e48999ed3d500d7 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 30 Jun 2021 20:20:04 +0200 Subject: [PATCH 04/68] Fix writeString() When the RAM write check was skipped, it was still performed --- uGecko.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/uGecko.py b/uGecko.py index ba3b9c8..0e42c2d 100644 --- a/uGecko.py +++ b/uGecko.py @@ -153,14 +153,11 @@ def upload(self, startAddress, endAddress, value, skip = False): def writeString(self, address, string, skip = False): if self.connected: - if not skip: - if not self.validRange(address, len(string)): raise BaseException("Address range not valid") - if not self.validAccess(address, len(string), "write"): raise BaseException("Cannot write to address") if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") pos = 0 for x in range(int(len(string) / 4)): - self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0]) + self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0], skip) address += 4;pos += 4 return else: raise BaseException("No connection is in progress!") @@ -358,4 +355,4 @@ def persistAssembly(self, assembly): self.socket.send(b'\xE1') req = assembly.encode('UTF-8') self.socket.send(req) - else: raise BaseException("No connection is in progress!") \ No newline at end of file + else: raise BaseException("No connection is in progress!") From bf932c1360d82a958458769f21f856494847b191 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 1 Jul 2021 18:01:53 +0200 Subject: [PATCH 05/68] Fix: Timeout on connection attempt Added a 5 second timeout on connection attempt --- uGecko.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uGecko.py b/uGecko.py index 0e42c2d..9037445 100644 --- a/uGecko.py +++ b/uGecko.py @@ -23,7 +23,9 @@ def connect(self): else: if not self.connected: try: + self.socket.settimeout(5) self.socket.connect((str(self.ip), 7331)) + self.socket.settimeout(None) self.connected = True except: raise BaseException(f"Unable to connect to {self.ip}!") else: raise BaseException("A connection is already in progress!") From b4cf56c095d5d0e56eeed15832378a8391e39797 Mon Sep 17 00:00:00 2001 From: VCoding Date: Sat, 10 Jul 2021 23:33:20 +0200 Subject: [PATCH 06/68] uGecko 1.1 - Adds the possibility to change the time before time out - Added clearString() - Added readString() (may have some bugs) --- DOCUMENTATION.md | 5 ++++- uGecko.py | 41 ++++++++++++++++++----------------------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index b8d3c4b..eac1e4d 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -13,12 +13,15 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x0000)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x00000000)`| None |serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None -|writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None |kernelWrite()| | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |||| |read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Value |kernelRead()| | `gecko.kernelRead(address)`| Value |||| +|writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None +|readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | UTF-8 +|clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None +|||| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean |pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None |resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None diff --git a/uGecko.py b/uGecko.py index 9037445..9434ad0 100644 --- a/uGecko.py +++ b/uGecko.py @@ -18,12 +18,12 @@ def __init__(self, ip): self.ip = ip self.connected = False - def connect(self): + def connect(self, timeout = 5): if self.ip == None or self.ip == "": raise BaseException("No ip address has been entered!") else: if not self.connected: try: - self.socket.settimeout(5) + self.socket.settimeout(timeout) self.socket.connect((str(self.ip), 7331)) self.socket.settimeout(None) self.connected = True @@ -132,27 +132,6 @@ def serialPoke(self, addressTable, value, skip = False): else: raise BaseException("Address is not a list!") else: raise BaseException("No connection is in progress!") - """ - def upload(self, startAddress, endAddress, value, skip = False): - length = endAddress - startAddress - fullChunk = int(length / 0x400) - lastChunk = length % 0x400 - allChunk = fullChunk - if lastChunk > 0: - allChunk += 1 - #self.socket.send(b'\x41') - #req = struct.pack(">II", startAddress, endAddress) - #self.socket.send(req) - chunk = 0 - newValue = re.findall('........', str(value)) - while chunk * 0x400 < fullChunk: - print(f"{hex(startAddress + chunk * 0x400)} : {newValue[chunk]}") - #chunkReq = struct.pack('>I', value) - # self.socket.send(chunkReq) - #print(value) - chunk += 1 - """ - def writeString(self, address, string, skip = False): if self.connected: if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize @@ -164,6 +143,22 @@ def writeString(self, address, string, skip = False): return else: raise BaseException("No connection is in progress!") + def clearString(self, startAddress, endAddress, skip = False): + if self.connected: + length = endAddress - startAddress + i = 0 + while i <= length: + self.poke32(startAddress + i, 0x00000000, skip) + i += 4 + return + else: raise BaseException("No connection is in progress!") + + def readString(self, address, length, skip = False): + if self.connected: + string = self.read(address, length, skip) + return string.decode('UTF-8') + else: raise BaseException("No connection is in progress!") + def read(self, address, length, skip = False): if self.connected: if not skip: From e59ea865c9d58a907720b4d3681c9dfc199035fe Mon Sep 17 00:00:00 2001 From: NessieHax Date: Thu, 29 Jul 2021 15:25:47 +0200 Subject: [PATCH 07/68] Added return types to most functions and changed serialPoke --- uGecko.py | 81 ++++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 46 deletions(-) diff --git a/uGecko.py b/uGecko.py index 9434ad0..46024ec 100644 --- a/uGecko.py +++ b/uGecko.py @@ -16,9 +16,9 @@ def __init__(self, ip): if not onlyCharactersIpAdd(ip): raise BaseException("The entered IP address is not only composed of numbers and dots.") if not checkip(ip): raise BaseException("The entered IP address does not have a valid structure!") self.ip = ip - self.connected = False + self.connected:bool = False - def connect(self, timeout = 5): + def connect(self, timeout = 5)->None: if self.ip == None or self.ip == "": raise BaseException("No ip address has been entered!") else: if not self.connected: @@ -30,16 +30,16 @@ def connect(self, timeout = 5): except: raise BaseException(f"Unable to connect to {self.ip}!") else: raise BaseException("A connection is already in progress!") - def disconnect(self): + def disconnect(self)->None: if self.connected: self.socket.close() # TODO: Make checks self.connected = False else: raise BaseException("No connection is in progress!") - def isConnected(self): + def isConnected(self)->bool: return self.connected - def validRange(self, address, length): + def validRange(self, address, length)->bool: if 0x01000000 <= address and address + length <= 0x01800000: return True elif 0x0E000000 <= address and address + length <= 0x10000000: return True #Depends on game elif 0x10000000 <= address and address + length <= 0x50000000: return True #Doesn't quite go to 5 @@ -52,7 +52,7 @@ def validRange(self, address, length): elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: return True else: return False - def validAccess(self, address, length, access): + def validAccess(self, address, length, access)->bool: if 0x01000000 <= address and address + length <= 0x01800000: if access.lower() == "read" : return True if access.lower() == "write": return False @@ -85,7 +85,7 @@ def validAccess(self, address, length, access): if access.lower() == "write": return True else: return False - def poke8(self, address, value, skip = False): + def poke8(self, address, value, skip = False)->None: if self.connected: if not skip: if not self.validRange(address, 1): raise BaseException("Address range not valid") @@ -96,7 +96,7 @@ def poke8(self, address, value, skip = False): return else: raise BaseException("No connection is in progress!") - def poke16(self, address, value, skip = False): + def poke16(self, address, value, skip = False)->None: if self.connected: if not skip: if not self.validRange(address, 2): raise BaseException("Address range not valid") @@ -107,7 +107,7 @@ def poke16(self, address, value, skip = False): return else: raise BaseException("No connection is in progress!") - def poke32(self, address, value, skip = False): + def poke32(self, address, value, skip = False)->None: if self.connected: if not skip: if not self.validRange(address, 4): raise BaseException("Address range not valid") @@ -118,21 +118,11 @@ def poke32(self, address, value, skip = False): return else: raise BaseException("No connection is in progress!") - def serialPoke(self, addressTable, value, skip = False): - if self.connected: - if isinstance(addressTable, list): - for address in addressTable: - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") - self.socket.send(b"\x03") - req = struct.pack(">II", address, value) - self.socket.send(req) - return - else: raise BaseException("Address is not a list!") - else: raise BaseException("No connection is in progress!") + def serialPoke(self, addressTable:list, value, skip = False)->None: + for address in addressTable: + if type(address)==int: self.poke32(address, value) - def writeString(self, address, string, skip = False): + def writeString(self, address, string, skip = False)->None: if self.connected: if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") @@ -143,7 +133,7 @@ def writeString(self, address, string, skip = False): return else: raise BaseException("No connection is in progress!") - def clearString(self, startAddress, endAddress, skip = False): + def clearString(self, startAddress, endAddress, skip = False)->None: if self.connected: length = endAddress - startAddress i = 0 @@ -153,13 +143,13 @@ def clearString(self, startAddress, endAddress, skip = False): return else: raise BaseException("No connection is in progress!") - def readString(self, address, length, skip = False): + def readString(self, address, length, skip = False)->str: if self.connected: string = self.read(address, length, skip) return string.decode('UTF-8') else: raise BaseException("No connection is in progress!") - def read(self, address, length, skip = False): + def read(self, address, length, skip = False)->bytearray: if self.connected: if not skip: if length == 0: raise BaseException("Reading memory requires a length!") @@ -194,7 +184,7 @@ def read(self, address, length, skip = False): return ret else: raise BaseException("No connection is in progress!") - def kernelWrite(self, address, value, skip = False): + def kernelWrite(self, address, value, skip = False)->None: if self.connected: if not skip: if not self.validRange(address, 4): raise BaseException("Address range not valid") @@ -205,7 +195,7 @@ def kernelWrite(self, address, value, skip = False): return else: raise BaseException("No connection is in progress!") - def kernelRead(self, address, skip = False): + def kernelRead(self, address, skip = False)->int: if self.connected: if not skip: if not self.validRange(address, 4): raise BaseException("Address range not valid") @@ -216,41 +206,40 @@ def kernelRead(self, address, skip = False): return struct.unpack(">I", self.socket.recv(4))[0] else: raise BaseException("No connection is in progress!") - def getServerStatus(self): + def getServerStatus(self)->int: if self.connected: self.socket.send(b'\x50') return int.from_bytes(self.socket.recv(1), "big") else: raise BaseException("No connection is in progress!") - def isConsolePaused(self): + def isConsolePaused(self)->bool: if self.connected: self.socket.send(b'\x84') - val = int.from_bytes(self.socket.recv(1), "big") - if val == 1: return True - else: return False + return int.from_bytes(self.socket.recv(1), "big") + else: raise BaseException("No connection is in progress!") - def pauseConsole(self): + def pauseConsole(self)->None: if self.connected: self.socket.send(b'\x82') else: raise BaseException("No connection is in progress!") - def resumeConsole(self): + def resumeConsole(self)->None: if self.connected: self.socket.send(b'\x83') else: raise BaseException("No connection is in progress!") - def getServerVersion(self): + def getServerVersion(self)->str: if self.connected: self.socket.send(b'\x99') return self.socket.recv(16).decode("UTF-8").replace('\n', '') else: raise BaseException("No connection is in progress!") - def getOsVersion(self): + def getOsVersion(self)->int: if self.connected: self.socket.send(b'\x9A') return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") - def getVersionHash(self): + def getVersionHash(self)->int: if self.connected: self.socket.send(b'\xE0') return int.from_bytes(self.socket.recv(4), "big") @@ -268,7 +257,7 @@ def getCoreHandlerAddress(self): return hex(int.from_bytes(self.socket.recv(4), "big")) else: raise BaseException("No connection is in progress!") - def getDataBufferSize(self): + def getDataBufferSize(self)->int: if self.connected: self.socket.send(b'\x51') return int.from_bytes(self.socket.recv(4), "big") @@ -297,7 +286,7 @@ def advancedSearch(self, start, length, value, kernel, limit, aligned = 1): return foundOffset else: raise BaseException("No connection is in progress!") - def getSymbol(self, rplname, sysname, data = 0): + def getSymbol(self, rplname, sysname, data = 0)->int: if self.connected: self.socket.send(b'\x71') req = struct.pack('>II', 8, 8 + len(rplname) + 1) @@ -326,28 +315,28 @@ def call(self, address, *args): raise BaseException("Too many arguments!") else: raise BaseException("No connection is in progress!") - def getEntryPointAddress(self): + def getEntryPointAddress(self)->int: if self.connected: self.socket.send(b'\xB1') - return hex(int.from_bytes(self.socket.recv(4), "big")) + return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") - def runKernelCopyService(self): + def runKernelCopyService(self)->None: if self.connected: self.socket.send(b'\xCD') else: raise BaseException("No connection is in progress!") - def clearAssembly(self): + def clearAssembly(self)->None: if self.connected: self.socket.send(b'\xE2') else: raise BaseException("No connection is in progress!") - def excecuteAssembly(self, assembly): + def excecuteAssembly(self, assembly)->None: if self.connected: self.socket.send(b'\x81') req = assembly.encode('UTF-8') self.socket.send(req) else: raise BaseException("No connection is in progress!") - def persistAssembly(self, assembly): + def persistAssembly(self, assembly)->None: if self.connected: self.socket.send(b'\xE1') req = assembly.encode('UTF-8') From 99d23d36789abfc60a90375d8a938e8035b7665b Mon Sep 17 00:00:00 2001 From: NessieHax Date: Thu, 29 Jul 2021 16:26:45 +0200 Subject: [PATCH 08/68] Updated function arguments type --- uGecko.py | 75 ++++++++++++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/uGecko.py b/uGecko.py index 46024ec..b4ecedf 100644 --- a/uGecko.py +++ b/uGecko.py @@ -18,7 +18,7 @@ def __init__(self, ip): self.ip = ip self.connected:bool = False - def connect(self, timeout = 5)->None: + def connect(self, timeout:int = 5)->None: if self.ip == None or self.ip == "": raise BaseException("No ip address has been entered!") else: if not self.connected: @@ -35,7 +35,7 @@ def disconnect(self)->None: self.socket.close() # TODO: Make checks self.connected = False else: raise BaseException("No connection is in progress!") - + def isConnected(self)->bool: return self.connected @@ -52,7 +52,7 @@ def validRange(self, address, length)->bool: elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: return True else: return False - def validAccess(self, address, length, access)->bool: + def validAccess(self, address:int, length:int, access:str)->bool: if 0x01000000 <= address and address + length <= 0x01800000: if access.lower() == "read" : return True if access.lower() == "write": return False @@ -85,44 +85,37 @@ def validAccess(self, address, length, access)->bool: if access.lower() == "write": return True else: return False - def poke8(self, address, value, skip = False)->None: - if self.connected: - if not skip: - if not self.validRange(address, 1): raise BaseException("Address range not valid") - if not self.validAccess(address, 1, "write"): raise BaseException("Cannot write to address") + def isValidMemoryArea(self,address:int, lenght:int, should_validate:bool)->bool: + return self.validRange(address, lenght) and self.validAccess(address, lenght, "write") * should_validate + # if not self.validRange(address, lenght): raise BaseException("Address range not valid") + # if not self.validAccess(address, lenght, "write"): raise BaseException("Cannot write to address") + + def poke8(self, address:int, value:int, skip:bool = False)->None: + if self.connected and self.isValidMemoryArea(address, 1, skip): self.socket.send(b'\x01') - req = struct.pack(">II", int(address), int(value)) + req = struct.pack(">II", address, value) self.socket.send(req) - return else: raise BaseException("No connection is in progress!") - def poke16(self, address, value, skip = False)->None: - if self.connected: - if not skip: - if not self.validRange(address, 2): raise BaseException("Address range not valid") - if not self.validAccess(address, 2, "write"): raise BaseException("Cannot write to address") + def poke16(self, address:int, value:int, skip:bool = False)->None: + if self.connected and self.isValidMemoryArea(address, 2, skip): self.socket.send(b'\x02') - req = struct.pack(">II", int(address), int(value)) + req = struct.pack(">II", address, value) self.socket.send(req) - return else: raise BaseException("No connection is in progress!") - def poke32(self, address, value, skip = False)->None: - if self.connected: - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + def poke32(self, address:int, value:int, skip:bool = False)->None: + if self.connected and self.isValidMemoryArea(address, 4, skip): self.socket.send(b'\x03') - req = struct.pack(">II", int(address), int(value)) + req = struct.pack(">II", address, value) self.socket.send(req) - return else: raise BaseException("No connection is in progress!") - def serialPoke(self, addressTable:list, value, skip = False)->None: + def serialPoke(self, addressTable:list, value:int, skip:bool = False)->None: for address in addressTable: - if type(address)==int: self.poke32(address, value) + if type(address)==int: self.poke32(address, value,skip) - def writeString(self, address, string, skip = False)->None: + def writeString(self, address:int, string:str, skip:bool = False)->None: if self.connected: if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") @@ -130,26 +123,24 @@ def writeString(self, address, string, skip = False)->None: for x in range(int(len(string) / 4)): self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0], skip) address += 4;pos += 4 - return else: raise BaseException("No connection is in progress!") - def clearString(self, startAddress, endAddress, skip = False)->None: + def clearString(self, startAddress:int, endAddress:int, skip = False)->None: if self.connected: length = endAddress - startAddress i = 0 while i <= length: self.poke32(startAddress + i, 0x00000000, skip) i += 4 - return else: raise BaseException("No connection is in progress!") - def readString(self, address, length, skip = False)->str: + def readString(self, address:int, length:int, skip:bool = False)->str: if self.connected: string = self.read(address, length, skip) return string.decode('UTF-8') else: raise BaseException("No connection is in progress!") - def read(self, address, length, skip = False)->bytearray: + def read(self, address:int, length:int, skip:bool = False)->bytearray: if self.connected: if not skip: if length == 0: raise BaseException("Reading memory requires a length!") @@ -184,7 +175,7 @@ def read(self, address, length, skip = False)->bytearray: return ret else: raise BaseException("No connection is in progress!") - def kernelWrite(self, address, value, skip = False)->None: + def kernelWrite(self, address:int, value:int, skip:bool = False)->None: if self.connected: if not skip: if not self.validRange(address, 4): raise BaseException("Address range not valid") @@ -192,10 +183,9 @@ def kernelWrite(self, address, value, skip = False)->None: self.socket.send(b'\x0B') req = struct.pack(">II", int(address), int(value)) self.socket.send(req) - return else: raise BaseException("No connection is in progress!") - def kernelRead(self, address, skip = False)->int: + def kernelRead(self, address:int, skip:bool = False)->int: if self.connected: if not skip: if not self.validRange(address, 4): raise BaseException("Address range not valid") @@ -216,7 +206,6 @@ def isConsolePaused(self)->bool: if self.connected: self.socket.send(b'\x84') return int.from_bytes(self.socket.recv(1), "big") - else: raise BaseException("No connection is in progress!") def pauseConsole(self)->None: @@ -263,15 +252,15 @@ def getDataBufferSize(self)->int: return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") - def search(self, startAddress, value, length): + def search(self, startAddress:int, value:int, length:int)->int: if self.connected: self.socket.send(b'\x72') - req = struct.pack(">III", int(startAddress), int(value), int(length)) + req = struct.pack(">III", startAddress, value, length) self.socket.send(req) return hex(int.from_bytes(self.socket.recv(4), "big")) else: raise BaseException("No connection is in progress!") - def advancedSearch(self, start, length, value, kernel, limit, aligned = 1): + def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int, aligned:int = 1)->list: if self.connected: self.socket.send(b'\x73') req_val = struct.pack(">I", int(value)) @@ -286,7 +275,7 @@ def advancedSearch(self, start, length, value, kernel, limit, aligned = 1): return foundOffset else: raise BaseException("No connection is in progress!") - def getSymbol(self, rplname, sysname, data = 0)->int: + def getSymbol(self, rplname:str, sysname:str, data = 0)->int: if self.connected: self.socket.send(b'\x71') req = struct.pack('>II', 8, 8 + len(rplname) + 1) @@ -300,7 +289,7 @@ def getSymbol(self, rplname, sysname, data = 0)->int: return self.socket.recv(4) else: raise BaseException("No connection is in progress!") - def call(self, address, *args): + def call(self, address:int, *args): if self.connected: arguments = list(args) if len(arguments) <= 8: @@ -329,14 +318,14 @@ def clearAssembly(self)->None: if self.connected: self.socket.send(b'\xE2') else: raise BaseException("No connection is in progress!") - def excecuteAssembly(self, assembly)->None: + def excecuteAssembly(self, assembly:str)->None: if self.connected: self.socket.send(b'\x81') req = assembly.encode('UTF-8') self.socket.send(req) else: raise BaseException("No connection is in progress!") - def persistAssembly(self, assembly)->None: + def persistAssembly(self, assembly:str)->None: if self.connected: self.socket.send(b'\xE1') req = assembly.encode('UTF-8') From 956e2bd0111f74b0916a08c46a0107d529fb9029 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Thu, 29 Jul 2021 19:28:35 +0200 Subject: [PATCH 09/68] Fixed isValidMemoryArea --- uGecko.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/uGecko.py b/uGecko.py index b4ecedf..dc23238 100644 --- a/uGecko.py +++ b/uGecko.py @@ -19,16 +19,15 @@ def __init__(self, ip): self.connected:bool = False def connect(self, timeout:int = 5)->None: - if self.ip == None or self.ip == "": raise BaseException("No ip address has been entered!") - else: - if not self.connected: - try: - self.socket.settimeout(timeout) - self.socket.connect((str(self.ip), 7331)) - self.socket.settimeout(None) - self.connected = True - except: raise BaseException(f"Unable to connect to {self.ip}!") - else: raise BaseException("A connection is already in progress!") + if self.ip and self.ip != "" and not self.connected: + try: + self.socket.settimeout(timeout) + self.socket.connect((str(self.ip), 7331)) + self.socket.settimeout(None) + self.connected = True + except: raise BaseException(f"Unable to connect to {self.ip}!") + else: raise BaseException("A connection is already in progress!") + def disconnect(self)->None: if self.connected: @@ -86,9 +85,8 @@ def validAccess(self, address:int, length:int, access:str)->bool: else: return False def isValidMemoryArea(self,address:int, lenght:int, should_validate:bool)->bool: - return self.validRange(address, lenght) and self.validAccess(address, lenght, "write") * should_validate - # if not self.validRange(address, lenght): raise BaseException("Address range not valid") - # if not self.validAccess(address, lenght, "write"): raise BaseException("Cannot write to address") + if should_validate: return self.validRange(address, lenght) and self.validAccess(address, lenght, "write") + return True def poke8(self, address:int, value:int, skip:bool = False)->None: if self.connected and self.isValidMemoryArea(address, 1, skip): @@ -234,16 +232,16 @@ def getVersionHash(self)->int: return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") - def getAccountID(self): + def getAccountID(self)->str: if self.connected: self.socket.send(b'\x57') return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") else: raise BaseException("No connection is in progress!") - def getCoreHandlerAddress(self): + def getCoreHandlerAddress(self)->int: if self.connected: self.socket.send(b'\x55') - return hex(int.from_bytes(self.socket.recv(4), "big")) + return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") def getDataBufferSize(self)->int: @@ -257,7 +255,7 @@ def search(self, startAddress:int, value:int, length:int)->int: self.socket.send(b'\x72') req = struct.pack(">III", startAddress, value, length) self.socket.send(req) - return hex(int.from_bytes(self.socket.recv(4), "big")) + return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int, aligned:int = 1)->list: @@ -271,7 +269,7 @@ def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int count = int.from_bytes(self.socket.recv(4), "big") / 4 foundOffset = [] for i in range(int(count)): - foundOffset.append(hex(int.from_bytes(self.socket.recv(4), "big"))) + foundOffset.append(int.from_bytes(self.socket.recv(4), "big")) return foundOffset else: raise BaseException("No connection is in progress!") From 6330acea65195c83bf0865e72861fa929664b838 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Mon, 2 Aug 2021 23:22:53 +0200 Subject: [PATCH 10/68] Updated Documentation --- DOCUMENTATION.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index eac1e4d..a1a6a48 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -13,10 +13,10 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x0000)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x00000000)`| None |serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None -|kernelWrite()| | `gecko.kernelWrite(0x10000000, 0x00000000)`| None +|kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |||| |read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Value -|kernelRead()| | `gecko.kernelRead(address)`| Value +|kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Value |||| |writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None |readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | UTF-8 @@ -32,16 +32,16 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int |getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String |getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCoreHandlerAddress()`| Hex -|getDataBufferSize()| | `gecko.getDataBufferSize()`| Int -|getEntryPointAddress()| | `gecko.getEntryPointAddress()`| Hex +|getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int +|getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Hex |runKernelCopyService()| | `gecko.runKernelCopyService()`| None |||| |search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Hex |advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Hex (Table) |||| -|getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (Used for call) +|getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) |call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed |||| |clearAssembly()| | `gecko.clearAssembly()`| None -|excecuteAssembly()| | `gecko.excecuteAssembly(assembly)`| None +|excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None |persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file From b8b987e36820b4c0004ea2208333728174088a0a Mon Sep 17 00:00:00 2001 From: NessieHax Date: Mon, 2 Aug 2021 23:50:21 +0200 Subject: [PATCH 11/68] Updated call return size and added getTitleID --- uGecko.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/uGecko.py b/uGecko.py index dc23238..b622653 100644 --- a/uGecko.py +++ b/uGecko.py @@ -184,10 +184,7 @@ def kernelWrite(self, address:int, value:int, skip:bool = False)->None: else: raise BaseException("No connection is in progress!") def kernelRead(self, address:int, skip:bool = False)->int: - if self.connected: - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "read"): raise BaseException("Cannot read to address") + if self.connected and self.isValidMemoryArea(address, 4, skip): self.socket.send(b'\x0C') req = struct.pack(">I", int(address)) self.socket.send(req) @@ -250,6 +247,10 @@ def getDataBufferSize(self)->int: return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") + def getTitleID(self): + function = self.getSymbol("coreinit.rpl", "OSGetTitleID") + return self.call(function) + def search(self, startAddress:int, value:int, length:int)->int: if self.connected: self.socket.send(b'\x72') @@ -297,7 +298,7 @@ def call(self, address:int, *args): req = struct.pack(">I8I", address, *arguments) self.socket.send(b'\x70') self.socket.send(req) - return struct.unpack('>I', self.socket.recv(8)[:4])[0] + return struct.unpack('>Q', self.socket.recv(8))[0] else: raise BaseException("Too many arguments!") else: raise BaseException("No connection is in progress!") From 2b0abc68980aa3321d1eab8e7e76d0d23e45d832 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Mon, 2 Aug 2021 23:53:22 +0200 Subject: [PATCH 12/68] Updated Documentations --- DOCUMENTATION.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index a1a6a48..04f9a03 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -19,7 +19,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Value |||| |writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None -|readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | UTF-8 +|readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) |clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None |||| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean @@ -33,6 +33,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String |getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCoreHandlerAddress()`| Hex |getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int +|getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int |getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Hex |runKernelCopyService()| | `gecko.runKernelCopyService()`| None |||| From 3d2ef1e5ed8dffb21e967b73843f79adb54f9aef Mon Sep 17 00:00:00 2001 From: NessieHax Date: Mon, 2 Aug 2021 23:55:46 +0200 Subject: [PATCH 13/68] Updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e8bcc23..082361f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ testLIb.py +__pycache__ \ No newline at end of file From 6ec6271332cb5a9bd2364fe8b96c615dc94618ca Mon Sep 17 00:00:00 2001 From: NessieHax Date: Mon, 2 Aug 2021 23:56:14 +0200 Subject: [PATCH 14/68] Updated Documentations --- DOCUMENTATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 04f9a03..d344ec8 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -28,7 +28,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |||| |getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) |getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String -|getOsVersion()| Allows to recover the version of the console | `gecko.getOsVersion()`| Int +|getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int |getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int |getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String |getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCoreHandlerAddress()`| Hex From fd31b73e8706401220763ccbb1ef0d6d3f236531 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Tue, 3 Aug 2021 00:02:28 +0200 Subject: [PATCH 15/68] Added return type to getTitleID --- uGecko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uGecko.py b/uGecko.py index b622653..a994186 100644 --- a/uGecko.py +++ b/uGecko.py @@ -247,7 +247,7 @@ def getDataBufferSize(self)->int: return int.from_bytes(self.socket.recv(4), "big") else: raise BaseException("No connection is in progress!") - def getTitleID(self): + def getTitleID(self)->int: function = self.getSymbol("coreinit.rpl", "OSGetTitleID") return self.call(function) From ab1ef0268149f942f94076545fa7956659be17bc Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 3 Aug 2021 18:39:36 +0200 Subject: [PATCH 16/68] Correction of the spelling of the word "length" --- uGecko.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uGecko.py b/uGecko.py index a994186..eb1406d 100644 --- a/uGecko.py +++ b/uGecko.py @@ -84,8 +84,8 @@ def validAccess(self, address:int, length:int, access:str)->bool: if access.lower() == "write": return True else: return False - def isValidMemoryArea(self,address:int, lenght:int, should_validate:bool)->bool: - if should_validate: return self.validRange(address, lenght) and self.validAccess(address, lenght, "write") + def isValidMemoryArea(self,address:int, length:int, should_validate:bool)->bool: + if should_validate: return self.validRange(address, length) and self.validAccess(address, length, "write") return True def poke8(self, address:int, value:int, skip:bool = False)->None: From 945f5ae2f0a5131188c43c68180a172c9889f12c Mon Sep 17 00:00:00 2001 From: VCoding Date: Tue, 3 Aug 2021 19:21:26 +0200 Subject: [PATCH 17/68] Added better error handling Stable version but still under development --- uGecko.py | 105 +++++++++++++++++++++++++++--------------------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/uGecko.py b/uGecko.py index eb1406d..567d449 100644 --- a/uGecko.py +++ b/uGecko.py @@ -1,5 +1,8 @@ import socket, struct, re +class Exception(Exception): + pass + def onlyCharactersIpAdd(ip): check = re.compile(r'[^0-9.]').search return not bool(check(ip)) @@ -13,8 +16,8 @@ def checkip(ip): class uGecko: def __init__(self, ip): self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) - if not onlyCharactersIpAdd(ip): raise BaseException("The entered IP address is not only composed of numbers and dots.") - if not checkip(ip): raise BaseException("The entered IP address does not have a valid structure!") + if not onlyCharactersIpAdd(ip): raise Exception("The entered IP address is not only composed of numbers and dots.") + if not checkip(ip): raise Exception("The entered IP address does not have a valid structure!") self.ip = ip self.connected:bool = False @@ -25,15 +28,15 @@ def connect(self, timeout:int = 5)->None: self.socket.connect((str(self.ip), 7331)) self.socket.settimeout(None) self.connected = True - except: raise BaseException(f"Unable to connect to {self.ip}!") - else: raise BaseException("A connection is already in progress!") + except: raise Exception(f"Unable to connect to {self.ip}!") + else: raise Exception("A connection is already in progress!") def disconnect(self)->None: if self.connected: self.socket.close() # TODO: Make checks self.connected = False - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def isConnected(self)->bool: return self.connected @@ -84,30 +87,32 @@ def validAccess(self, address:int, length:int, access:str)->bool: if access.lower() == "write": return True else: return False - def isValidMemoryArea(self,address:int, length:int, should_validate:bool)->bool: - if should_validate: return self.validRange(address, length) and self.validAccess(address, length, "write") - return True + def isValidMemoryArea(self, address:int, length:int, should_validate:bool, type:str = "write")->bool: + if self.connected: + if should_validate: return self.validRange(address, length) and self.validAccess(address, length, type) + return True + else: raise Exception("No connection is in progress!") def poke8(self, address:int, value:int, skip:bool = False)->None: - if self.connected and self.isValidMemoryArea(address, 1, skip): + if self.isValidMemoryArea(address, 1, skip): self.socket.send(b'\x01') req = struct.pack(">II", address, value) self.socket.send(req) - else: raise BaseException("No connection is in progress!") + else: raise Exception("Invalid ram address!") def poke16(self, address:int, value:int, skip:bool = False)->None: - if self.connected and self.isValidMemoryArea(address, 2, skip): + if self.isValidMemoryArea(address, 2, skip): self.socket.send(b'\x02') req = struct.pack(">II", address, value) self.socket.send(req) - else: raise BaseException("No connection is in progress!") + else: raise Exception("Invalid ram address!") def poke32(self, address:int, value:int, skip:bool = False)->None: - if self.connected and self.isValidMemoryArea(address, 4, skip): + if self.isValidMemoryArea(address, 4, skip): self.socket.send(b'\x03') req = struct.pack(">II", address, value) self.socket.send(req) - else: raise BaseException("No connection is in progress!") + else: raise Exception("Invalid ram address!") def serialPoke(self, addressTable:list, value:int, skip:bool = False)->None: for address in addressTable: @@ -121,7 +126,7 @@ def writeString(self, address:int, string:str, skip:bool = False)->None: for x in range(int(len(string) / 4)): self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0], skip) address += 4;pos += 4 - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def clearString(self, startAddress:int, endAddress:int, skip = False)->None: if self.connected: @@ -130,20 +135,17 @@ def clearString(self, startAddress:int, endAddress:int, skip = False)->None: while i <= length: self.poke32(startAddress + i, 0x00000000, skip) i += 4 - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def readString(self, address:int, length:int, skip:bool = False)->str: if self.connected: string = self.read(address, length, skip) return string.decode('UTF-8') - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def read(self, address:int, length:int, skip:bool = False)->bytearray: - if self.connected: - if not skip: - if length == 0: raise BaseException("Reading memory requires a length!") - if not self.validRange(address, length): raise BaseException("Address range not valid") - if not self.validAccess(address, length, "read"): raise BaseException("Cannot read to address") + if self.isValidMemoryArea(address, length, skip, "read"): + if length == 0: raise Exception("Reading memory requires a length!") ret = b'' if length > 0x400: for i in range(int(length / 0x400)): @@ -152,7 +154,7 @@ def read(self, address:int, length:int, skip:bool = False)->bytearray: self.socket.send(req) if status == b'\xbd': ret += self.socket.recv(length) elif status == b'\xb0': ret += b'\x00' * length - else: raise BaseException("Something went terribly wrong") + else: raise Exception("Something went terribly wrong") address += 0x400;length -= 0x400 if length != 0: self.socket.send(b'\x04') @@ -161,7 +163,7 @@ def read(self, address:int, length:int, skip:bool = False)->bytearray: status = self.socket.recv(1) if status == b'\xbd': ret += self.socket.recv(length) elif status == b'\xb0': ret += b'\x00' * length - else: raise BaseException("Something went terribly wrong") + else: raise Exception("Something went terribly wrong") else: self.socket.send(b'\x04') req = struct.pack(">II", int(address), int(address + length)) @@ -169,83 +171,80 @@ def read(self, address:int, length:int, skip:bool = False)->bytearray: status = self.socket.recv(1) if status == b'\xbd': ret += self.socket.recv(length) elif status == b'\xb0': ret += b'\x00' * length - else: raise BaseException("Something went terribly wrong") + else: raise Exception("Something went terribly wrong") return ret - else: raise BaseException("No connection is in progress!") + else: raise Exception("Invalid ram address!") def kernelWrite(self, address:int, value:int, skip:bool = False)->None: - if self.connected: - if not skip: - if not self.validRange(address, 4): raise BaseException("Address range not valid") - if not self.validAccess(address, 4, "write"): raise BaseException("Cannot write to address") + if self.isValidMemoryArea(address, 4, skip): self.socket.send(b'\x0B') req = struct.pack(">II", int(address), int(value)) self.socket.send(req) - else: raise BaseException("No connection is in progress!") + else: raise Exception("Invalid ram address!") def kernelRead(self, address:int, skip:bool = False)->int: - if self.connected and self.isValidMemoryArea(address, 4, skip): + if self.isValidMemoryArea(address, 4, skip, "read"): self.socket.send(b'\x0C') req = struct.pack(">I", int(address)) self.socket.send(req) return struct.unpack(">I", self.socket.recv(4))[0] - else: raise BaseException("No connection is in progress!") + else: raise Exception("Invalid ram address!") def getServerStatus(self)->int: if self.connected: self.socket.send(b'\x50') return int.from_bytes(self.socket.recv(1), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def isConsolePaused(self)->bool: if self.connected: self.socket.send(b'\x84') return int.from_bytes(self.socket.recv(1), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def pauseConsole(self)->None: if self.connected: self.socket.send(b'\x82') - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def resumeConsole(self)->None: if self.connected: self.socket.send(b'\x83') - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getServerVersion(self)->str: if self.connected: self.socket.send(b'\x99') return self.socket.recv(16).decode("UTF-8").replace('\n', '') - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getOsVersion(self)->int: if self.connected: self.socket.send(b'\x9A') return int.from_bytes(self.socket.recv(4), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getVersionHash(self)->int: if self.connected: self.socket.send(b'\xE0') return int.from_bytes(self.socket.recv(4), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getAccountID(self)->str: if self.connected: self.socket.send(b'\x57') return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getCoreHandlerAddress(self)->int: if self.connected: self.socket.send(b'\x55') return int.from_bytes(self.socket.recv(4), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getDataBufferSize(self)->int: if self.connected: self.socket.send(b'\x51') return int.from_bytes(self.socket.recv(4), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getTitleID(self)->int: function = self.getSymbol("coreinit.rpl", "OSGetTitleID") @@ -257,7 +256,7 @@ def search(self, startAddress:int, value:int, length:int)->int: req = struct.pack(">III", startAddress, value, length) self.socket.send(req) return int.from_bytes(self.socket.recv(4), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int, aligned:int = 1)->list: if self.connected: @@ -272,7 +271,7 @@ def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int for i in range(int(count)): foundOffset.append(int.from_bytes(self.socket.recv(4), "big")) return foundOffset - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def getSymbol(self, rplname:str, sysname:str, data = 0)->int: if self.connected: @@ -286,7 +285,7 @@ def getSymbol(self, rplname:str, sysname:str, data = 0)->int: self.socket.send(req) self.socket.send(data) return self.socket.recv(4) - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def call(self, address:int, *args): if self.connected: @@ -300,33 +299,33 @@ def call(self, address:int, *args): self.socket.send(req) return struct.unpack('>Q', self.socket.recv(8))[0] else: - raise BaseException("Too many arguments!") - else: raise BaseException("No connection is in progress!") + raise Exception("Too many arguments!") + else: raise Exception("No connection is in progress!") def getEntryPointAddress(self)->int: if self.connected: self.socket.send(b'\xB1') return int.from_bytes(self.socket.recv(4), "big") - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def runKernelCopyService(self)->None: if self.connected: self.socket.send(b'\xCD') - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def clearAssembly(self)->None: if self.connected: self.socket.send(b'\xE2') - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def excecuteAssembly(self, assembly:str)->None: if self.connected: self.socket.send(b'\x81') req = assembly.encode('UTF-8') self.socket.send(req) - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") def persistAssembly(self, assembly:str)->None: if self.connected: self.socket.send(b'\xE1') req = assembly.encode('UTF-8') self.socket.send(req) - else: raise BaseException("No connection is in progress!") + else: raise Exception("No connection is in progress!") From 2722d32bfa2b04502ff4da0c4c0dcfb610a5c050 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 3 Aug 2021 19:39:55 +0200 Subject: [PATCH 18/68] uGecko 1.1.2 Fixed a bug when checking the address in the ram --- uGecko.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uGecko.py b/uGecko.py index 567d449..6e183d8 100644 --- a/uGecko.py +++ b/uGecko.py @@ -87,9 +87,9 @@ def validAccess(self, address:int, length:int, access:str)->bool: if access.lower() == "write": return True else: return False - def isValidMemoryArea(self, address:int, length:int, should_validate:bool, type:str = "write")->bool: + def isValidMemoryArea(self, address:int, length:int, skip_verification:bool, type:str = "write")->bool: if self.connected: - if should_validate: return self.validRange(address, length) and self.validAccess(address, length, type) + if not skip_verification: return self.validRange(address, length) and self.validAccess(address, length, type) return True else: raise Exception("No connection is in progress!") From 86a19f45348278f1a25b50da37306b60989d76ff Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 3 Aug 2021 20:04:45 +0200 Subject: [PATCH 19/68] uGecko 1.1.3 Minor modification of the "call" function --- uGecko.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uGecko.py b/uGecko.py index 6e183d8..819dca9 100644 --- a/uGecko.py +++ b/uGecko.py @@ -287,7 +287,7 @@ def getSymbol(self, rplname:str, sysname:str, data = 0)->int: return self.socket.recv(4) else: raise Exception("No connection is in progress!") - def call(self, address:int, *args): + def call(self, address:int, *args, recv:int = 8): if self.connected: arguments = list(args) if len(arguments) <= 8: @@ -297,6 +297,7 @@ def call(self, address:int, *args): req = struct.pack(">I8I", address, *arguments) self.socket.send(b'\x70') self.socket.send(req) + if recv == 4: return struct.unpack('>I', self.socket.recv(4))[0] return struct.unpack('>Q', self.socket.recv(8))[0] else: raise Exception("Too many arguments!") From 736db9ca93e72fda39d998fb69dadefb0594d126 Mon Sep 17 00:00:00 2001 From: VCoding Date: Thu, 5 Aug 2021 19:50:23 +0200 Subject: [PATCH 20/68] uGecko 1.2 (BETA) The following functions have been added: Upload, Dump, AllocateSystemMemory Very slight optimization of the getTitleID function --- uGecko.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/uGecko.py b/uGecko.py index 819dca9..d2d6924 100644 --- a/uGecko.py +++ b/uGecko.py @@ -128,7 +128,7 @@ def writeString(self, address:int, string:str, skip:bool = False)->None: address += 4;pos += 4 else: raise Exception("No connection is in progress!") - def clearString(self, startAddress:int, endAddress:int, skip = False)->None: + def clearString(self, startAddress:int, endAddress:int, skip:bool = False)->None: if self.connected: length = endAddress - startAddress i = 0 @@ -247,8 +247,7 @@ def getDataBufferSize(self)->int: else: raise Exception("No connection is in progress!") def getTitleID(self)->int: - function = self.getSymbol("coreinit.rpl", "OSGetTitleID") - return self.call(function) + return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID")) def search(self, startAddress:int, value:int, length:int)->int: if self.connected: @@ -330,3 +329,24 @@ def persistAssembly(self, assembly:str)->None: req = assembly.encode('UTF-8') self.socket.send(req) else: raise Exception("No connection is in progress!") + + def upload(self, startAddress: int, input: str, skip:bool = False) -> None: + total_chunk = len(input) // 8 + rest_chunk = len(input) % 8 + + i = 0 + while i < total_chunk: + self.poke32(startAddress + i * 4, int(input[i * 8:i * 8 + 8], 16), skip) + i += 1 + + if rest_chunk != 0: + rest = re.findall(".", input[i * 8:i * 8 + 8]) + while len(rest) < 8: + rest.append('0') + self.poke32(startAddress + i * 4, int("".join(rest), 16), skip) + + def dump(self, startAddress: int, endAddress: int, skip:bool = False) -> bytearray: + return self.read(startAddress, endAddress - startAddress, skip) + + def allocateSystemMemory(self, size: int) -> int: + return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, 4, recv = 4) \ No newline at end of file From bd2f0c9ca92bff999ea6ea9a23fead809a487655 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 03:21:08 +0200 Subject: [PATCH 21/68] Fixed Typo --- uGecko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uGecko.py b/uGecko.py index d2d6924..a862846 100644 --- a/uGecko.py +++ b/uGecko.py @@ -234,7 +234,7 @@ def getAccountID(self)->str: return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") else: raise Exception("No connection is in progress!") - def getCoreHandlerAddress(self)->int: + def getCodeHandlerAddress(self)->int: if self.connected: self.socket.send(b'\x55') return int.from_bytes(self.socket.recv(4), "big") From c8977632ef4f6e0263e5b31c628ce04cbbd54bf5 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 04:01:39 +0200 Subject: [PATCH 22/68] Added support for more testing files --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 082361f..021661a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ testLIb.py -__pycache__ \ No newline at end of file +__pycache__ +*@dev.py \ No newline at end of file From c18fab1417658dc2d91316eac54235ddc6d8ba09 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 09:27:00 +0200 Subject: [PATCH 23/68] Refactored read function --- uGecko.py | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/uGecko.py b/uGecko.py index a862846..bc6ea2f 100644 --- a/uGecko.py +++ b/uGecko.py @@ -149,32 +149,25 @@ def read(self, address:int, length:int, skip:bool = False)->bytearray: ret = b'' if length > 0x400: for i in range(int(length / 0x400)): - self.socket.send(b'\x04') - req = struct.pack(">II", int(address), int(address + 0x400)) - self.socket.send(req) - if status == b'\xbd': ret += self.socket.recv(length) - elif status == b'\xb0': ret += b'\x00' * length - else: raise Exception("Something went terribly wrong") + ret += self.__read(address, 0x400) address += 0x400;length -= 0x400 if length != 0: - self.socket.send(b'\x04') - req = struct.pack(">II", int(address), int(address + length)) - self.socket.send(req) - status = self.socket.recv(1) - if status == b'\xbd': ret += self.socket.recv(length) - elif status == b'\xb0': ret += b'\x00' * length - else: raise Exception("Something went terribly wrong") + ret += self.__read(address, length) else: - self.socket.send(b'\x04') - req = struct.pack(">II", int(address), int(address + length)) - self.socket.send(req) - status = self.socket.recv(1) - if status == b'\xbd': ret += self.socket.recv(length) - elif status == b'\xb0': ret += b'\x00' * length - else: raise Exception("Something went terribly wrong") + ret = self.__read(address, length) return ret else: raise Exception("Invalid ram address!") + def __read(self,address:int,length:int)->bytearray: + self.socket.send(b'\x04') + req = struct.pack(">II", int(address), int(address + length)) + self.socket.send(req) + status = self.socket.recv(1) + if status == b'\xbd': ret = self.socket.recv(length) + elif status == b'\xb0': ret = b'\x00' * length + else: raise Exception("Something went terribly wrong") + return ret + def kernelWrite(self, address:int, value:int, skip:bool = False)->None: if self.isValidMemoryArea(address, 4, skip): self.socket.send(b'\x0B') From 81b013c98b7c90e73bd78a53afff45b964707a36 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 10:52:58 +0200 Subject: [PATCH 24/68] Added getSystemInfo and changed upload function --- uGecko.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/uGecko.py b/uGecko.py index bc6ea2f..7c7d56e 100644 --- a/uGecko.py +++ b/uGecko.py @@ -24,10 +24,11 @@ def __init__(self, ip): def connect(self, timeout:int = 5)->None: if self.ip and self.ip != "" and not self.connected: try: - self.socket.settimeout(timeout) + #self.socket.settimeout(timeout) self.socket.connect((str(self.ip), 7331)) - self.socket.settimeout(None) + #self.socket.settimeout(None) self.connected = True + print("Successfully connected!") except: raise Exception(f"Unable to connect to {self.ip}!") else: raise Exception("A connection is already in progress!") @@ -175,7 +176,7 @@ def kernelWrite(self, address:int, value:int, skip:bool = False)->None: self.socket.send(req) else: raise Exception("Invalid ram address!") - def kernelRead(self, address:int, skip:bool = False)->int: + def kernelRead(self, address:int, skip:bool = False)->bytearray: if self.isValidMemoryArea(address, 4, skip, "read"): self.socket.send(b'\x0C') req = struct.pack(">I", int(address)) @@ -241,6 +242,10 @@ def getDataBufferSize(self)->int: def getTitleID(self)->int: return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID")) + + def getSystemInfo(self): + ptr = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) + return ptr def search(self, startAddress:int, value:int, length:int)->int: if self.connected: @@ -323,23 +328,19 @@ def persistAssembly(self, assembly:str)->None: self.socket.send(req) else: raise Exception("No connection is in progress!") - def upload(self, startAddress: int, input: str, skip:bool = False) -> None: - total_chunk = len(input) // 8 - rest_chunk = len(input) % 8 - - i = 0 - while i < total_chunk: - self.poke32(startAddress + i * 4, int(input[i * 8:i * 8 + 8], 16), skip) - i += 1 - - if rest_chunk != 0: - rest = re.findall(".", input[i * 8:i * 8 + 8]) - while len(rest) < 8: - rest.append('0') - self.poke32(startAddress + i * 4, int("".join(rest), 16), skip) + def upload(self, startAddress: int, data: bytes) -> None: + if self.connected: + self.socket.send(b'\x41') + req = struct.pack(">II",startAddress,startAddress+len(data)) + self.socket.send(req) # first let the sever know the length + self.socket.send(data)# then send the data + else: raise Exception("No connection is in progress!") def dump(self, startAddress: int, endAddress: int, skip:bool = False) -> bytearray: return self.read(startAddress, endAddress - startAddress, skip) def allocateSystemMemory(self, size: int) -> int: - return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, 4, recv = 4) \ No newline at end of file + return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, 4, recv = 4) + + def freeSystemMemory(self, address): + return self.function("coreinit.rpl", "OSFreeToSystem", address) \ No newline at end of file From 4a4870af0f1a4d1a9d98e905a393ddbfed4c6863 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 10:53:08 +0200 Subject: [PATCH 25/68] Added getSystemInfo and changed upload function --- uGecko.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uGecko.py b/uGecko.py index 7c7d56e..320a434 100644 --- a/uGecko.py +++ b/uGecko.py @@ -24,9 +24,9 @@ def __init__(self, ip): def connect(self, timeout:int = 5)->None: if self.ip and self.ip != "" and not self.connected: try: - #self.socket.settimeout(timeout) + self.socket.settimeout(timeout) self.socket.connect((str(self.ip), 7331)) - #self.socket.settimeout(None) + self.socket.settimeout(None) self.connected = True print("Successfully connected!") except: raise Exception(f"Unable to connect to {self.ip}!") @@ -176,7 +176,7 @@ def kernelWrite(self, address:int, value:int, skip:bool = False)->None: self.socket.send(req) else: raise Exception("Invalid ram address!") - def kernelRead(self, address:int, skip:bool = False)->bytearray: + def kernelRead(self, address:int, skip:bool = False)->int: if self.isValidMemoryArea(address, 4, skip, "read"): self.socket.send(b'\x0C') req = struct.pack(">I", int(address)) From 131c53deda7a6aaedc16e4d3e427f20282dafd8e Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 11:16:30 +0200 Subject: [PATCH 26/68] Added issues file --- ISSUES.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ISSUES.md diff --git a/ISSUES.md b/ISSUES.md new file mode 100644 index 0000000..7410ff6 --- /dev/null +++ b/ISSUES.md @@ -0,0 +1,2 @@ +# Know Issues +reading from `getSystemInfo`-pointer raises an \"Something went terribly wrong\" Exception \ No newline at end of file From eb2e80ee9fa5496c8cf0777ff18af66bbf9d5457 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 11:51:31 +0200 Subject: [PATCH 27/68] Updated Documentation --- DOCUMENTATION.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index d344ec8..b05f7fb 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -45,4 +45,5 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |||| |clearAssembly()| | `gecko.clearAssembly()`| None |excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None -|persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file +|persistAssembly()| | `gecko.persistAssembly(assembly)`| None +|upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress,data)`| None \ No newline at end of file From d8ae5ef307161490a771047f0df8c9de41471a25 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 11:58:38 +0200 Subject: [PATCH 28/68] Updated Documentation --- DOCUMENTATION.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index b05f7fb..cd996ec 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -2,18 +2,19 @@ This file is intended to explain and show how to use the functions of ___uGecko___. | Name | Description | Example | Return | -|:----: |:-----------: |:-------: | :------: +|:----: |:-----------: |:-------: | :------:| |uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None |||| |connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None -|isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`|Boolean +|isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean |||| -|poke8()|Allows to change the value in the ram|`gecko.poke8(address, 0x00)`| None -|poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x0000)`| None -|poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x00000000)`| None +|poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None +|poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None +|poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None |serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None |kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None +|upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None |||| |read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Value |kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Value @@ -31,19 +32,18 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int |getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int |getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String -|getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCoreHandlerAddress()`| Hex +|getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCodeHandlerAddress()`| Int |getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int |getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int -|getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Hex +|getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int |runKernelCopyService()| | `gecko.runKernelCopyService()`| None |||| -|search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Hex -|advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Hex (Table) +|search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Int +|advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Int Array |||| |getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) |call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed |||| |clearAssembly()| | `gecko.clearAssembly()`| None |excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None -|persistAssembly()| | `gecko.persistAssembly(assembly)`| None -|upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress,data)`| None \ No newline at end of file +|persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file From 680856d6cfca419df98ea9f34675577713737687 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:03:28 +0200 Subject: [PATCH 29/68] Added decoding option to readString --- uGecko.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uGecko.py b/uGecko.py index 320a434..7ae48c8 100644 --- a/uGecko.py +++ b/uGecko.py @@ -138,10 +138,10 @@ def clearString(self, startAddress:int, endAddress:int, skip:bool = False)->None i += 4 else: raise Exception("No connection is in progress!") - def readString(self, address:int, length:int, skip:bool = False)->str: + def readString(self, address:int, length:int, decoding:str = "UTF-8", skip:bool = False)->str: if self.connected: string = self.read(address, length, skip) - return string.decode('UTF-8') + return string.decode(decoding) else: raise Exception("No connection is in progress!") def read(self, address:int, length:int, skip:bool = False)->bytearray: @@ -166,7 +166,7 @@ def __read(self,address:int,length:int)->bytearray: status = self.socket.recv(1) if status == b'\xbd': ret = self.socket.recv(length) elif status == b'\xb0': ret = b'\x00' * length - else: raise Exception("Something went terribly wrong") + else: raise Exception("Something went terribly wrong") return ret def kernelWrite(self, address:int, value:int, skip:bool = False)->None: @@ -243,8 +243,8 @@ def getDataBufferSize(self)->int: def getTitleID(self)->int: return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID")) - def getSystemInfo(self): - ptr = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) + def getSystemInfo(self)->int: + ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) return ptr def search(self, startAddress:int, value:int, length:int)->int: @@ -252,7 +252,7 @@ def search(self, startAddress:int, value:int, length:int)->int: self.socket.send(b'\x72') req = struct.pack(">III", startAddress, value, length) self.socket.send(req) - return int.from_bytes(self.socket.recv(4), "big") + return int.from_bytes(self.socket.recv(4), "big") else: raise Exception("No connection is in progress!") def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int, aligned:int = 1)->list: From a06ca30d84cdd96181308a8d977e053b84260a47 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:03:52 +0200 Subject: [PATCH 30/68] Updated Documentation --- DOCUMENTATION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index cd996ec..0ea0e9f 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -16,8 +16,8 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None |||| -|read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Value -|kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Value +|read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Bytearray +|kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Int |||| |writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None |readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) From 1be308a7615bba21437eec21f7085d18f7d6a6ba Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:08:08 +0200 Subject: [PATCH 31/68] Updated Documentation --- DOCUMENTATION.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 0ea0e9f..d359315 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -4,46 +4,46 @@ This file is intended to explain and show how to use the functions of ___uGecko_ | Name | Description | Example | Return | |:----: |:-----------: |:-------: | :------:| |uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None -|||| +|Base operators| |connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean -|||| +|Write operators| |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None |serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None |kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None -|||| +|Read operators| |read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Bytearray |kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Int -|||| +|String operators| |writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None |readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) |clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None -|||| +|Pause operators| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean |pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None |resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None -|||| +|Get operators| |getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) |getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String |getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int |getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int |getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String -|getCoreHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCodeHandlerAddress()`| Int +|getCodeHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCodeHandlerAddress()`| Int |getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int |getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int |getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int |runKernelCopyService()| | `gecko.runKernelCopyService()`| None -|||| +|Search operators| |search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Int |advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Int Array -|||| +|Function operators| |getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) |call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed -|||| +|Assembly operators| |clearAssembly()| | `gecko.clearAssembly()`| None |excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None |persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file From 311c484ddb3f04a8af18cb746c6980cd19efbeb6 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:08:48 +0200 Subject: [PATCH 32/68] Updated Documentation --- DOCUMENTATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index d359315..999f62d 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -4,7 +4,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ | Name | Description | Example | Return | |:----: |:-----------: |:-------: | :------:| |uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None -|Base operators| +|:Base operators:| |connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean From d432b073d8882c2371152062c81099d2c64e30d0 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:10:55 +0200 Subject: [PATCH 33/68] Updated Documentation --- DOCUMENTATION.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 999f62d..773b4b9 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -4,29 +4,29 @@ This file is intended to explain and show how to use the functions of ___uGecko_ | Name | Description | Example | Return | |:----: |:-----------: |:-------: | :------:| |uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None -|:Base operators:| +|*Base operators*| |connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean -|Write operators| +|*Write operators*| |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None |serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None |kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None -|Read operators| +|*Read operators*| |read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Bytearray |kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Int -|String operators| +|*String operators*| |writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None |readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) |clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None -|Pause operators| +|*Pause operators*| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean |pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None |resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None -|Get operators| +|*Get operators*| |getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) |getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String |getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int @@ -37,13 +37,13 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int |getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int |runKernelCopyService()| | `gecko.runKernelCopyService()`| None -|Search operators| +|*Search operators*| |search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Int |advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Int Array |Function operators| |getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) |call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed -|Assembly operators| +|*Assembly operators*| |clearAssembly()| | `gecko.clearAssembly()`| None |excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None |persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file From cf561e08381fc20f45cb399d334b60b9b392ef6f Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:11:41 +0200 Subject: [PATCH 34/68] Updated Documentation --- DOCUMENTATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 773b4b9..666c0b0 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -8,7 +8,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean -|*Write operators*| +# *Write operators* |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None From a944ea6c29a6517bdb0f4e1c80b0b5e58c775bf9 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:12:19 +0200 Subject: [PATCH 35/68] Updated Documentation --- DOCUMENTATION.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 666c0b0..027b073 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -9,6 +9,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean # *Write operators* +|:----: |:-----------: |:-------: | :------:| |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None From 2871953cb3c291a47e719f2dda675638cf5c5981 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:12:40 +0200 Subject: [PATCH 36/68] Updated Documentation --- DOCUMENTATION.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 027b073..f3e0841 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -9,6 +9,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean # *Write operators* + |:----: |:-----------: |:-------: | :------:| |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None From b3d069006e1d79534996fb192c54c076aabf0421 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:13:42 +0200 Subject: [PATCH 37/68] Updated Documentation --- DOCUMENTATION.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index f3e0841..e13528c 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -4,31 +4,29 @@ This file is intended to explain and show how to use the functions of ___uGecko_ | Name | Description | Example | Return | |:----: |:-----------: |:-------: | :------:| |uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None -|*Base operators*| +|||| |connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None |disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None |isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean -# *Write operators* - -|:----: |:-----------: |:-------: | :------:| +|||| |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None |serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None |kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None -|*Read operators*| +|||| |read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Bytearray |kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Int -|*String operators*| +|||| |writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None |readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) |clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None -|*Pause operators*| +|||| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean |pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None |resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None -|*Get operators*| +|||| |getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) |getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String |getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int @@ -39,13 +37,13 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int |getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int |runKernelCopyService()| | `gecko.runKernelCopyService()`| None -|*Search operators*| +|||| |search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Int |advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Int Array -|Function operators| +|||| |getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) |call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed -|*Assembly operators*| +|||| |clearAssembly()| | `gecko.clearAssembly()`| None |excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None |persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file From 51d293a1221bf4641a7f5b1e066a562a5e029266 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Sat, 7 Aug 2021 12:25:02 +0200 Subject: [PATCH 38/68] Fixed typo --- uGecko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uGecko.py b/uGecko.py index 7ae48c8..5f93a79 100644 --- a/uGecko.py +++ b/uGecko.py @@ -332,7 +332,7 @@ def upload(self, startAddress: int, data: bytes) -> None: if self.connected: self.socket.send(b'\x41') req = struct.pack(">II",startAddress,startAddress+len(data)) - self.socket.send(req) # first let the sever know the length + self.socket.send(req) # first let the server know the length self.socket.send(data)# then send the data else: raise Exception("No connection is in progress!") From 9caac0e381b38ee91e7fe5d7b772975f791436e1 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Fri, 13 Aug 2021 21:53:30 +0200 Subject: [PATCH 39/68] Fix and updated getSystemInfo --- uGecko.py | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/uGecko.py b/uGecko.py index 5f93a79..90eaa90 100644 --- a/uGecko.py +++ b/uGecko.py @@ -31,7 +31,6 @@ def connect(self, timeout:int = 5)->None: print("Successfully connected!") except: raise Exception(f"Unable to connect to {self.ip}!") else: raise Exception("A connection is already in progress!") - def disconnect(self)->None: if self.connected: @@ -161,9 +160,10 @@ def read(self, address:int, length:int, skip:bool = False)->bytearray: def __read(self,address:int,length:int)->bytearray: self.socket.send(b'\x04') - req = struct.pack(">II", int(address), int(address + length)) + req = struct.pack(">II", address, address + length) self.socket.send(req) status = self.socket.recv(1) + print(f"Status : {status}") if status == b'\xbd': ret = self.socket.recv(length) elif status == b'\xb0': ret = b'\x00' * length else: raise Exception("Something went terribly wrong") @@ -243,9 +243,19 @@ def getDataBufferSize(self)->int: def getTitleID(self)->int: return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID")) - def getSystemInfo(self)->int: - ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) - return ptr + def getSystemInfo(self)->dict: + if self.connected: + sysInfo = dict() + ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) + data = self.read(ptr,0x1c) + sysInfo["busClockSpeed"] = int.from_bytes(data[0:4],"big") + sysInfo["coreClockSpeed"] = int.from_bytes(data[4:8],"big") + sysInfo["timeBase"] = int.from_bytes(data[8:0xc],"big") + sysInfo["L2Size"] = [int.from_bytes(data[0xc:0x10],"big"),int.from_bytes(data[0x10:0x14],"big"),int.from_bytes(data[0x14:0x18],"big")] + sysInfo["cpuRatio"] = int.from_bytes(data[0x18:0x1c],"big") + return sysInfo + + raise Exception("No connection is in progress!") def search(self, startAddress:int, value:int, length:int)->int: if self.connected: @@ -294,8 +304,7 @@ def call(self, address:int, *args, recv:int = 8): req = struct.pack(">I8I", address, *arguments) self.socket.send(b'\x70') self.socket.send(req) - if recv == 4: return struct.unpack('>I', self.socket.recv(4))[0] - return struct.unpack('>Q', self.socket.recv(8))[0] + return struct.unpack('>Q', self.socket.recv(8))[0] >> 32*(recv==4) else: raise Exception("Too many arguments!") else: raise Exception("No connection is in progress!") @@ -331,16 +340,19 @@ def persistAssembly(self, assembly:str)->None: def upload(self, startAddress: int, data: bytes) -> None: if self.connected: self.socket.send(b'\x41') - req = struct.pack(">II",startAddress,startAddress+len(data)) + req = struct.pack(">II",startAddress, startAddress+len(data)) self.socket.send(req) # first let the server know the length self.socket.send(data)# then send the data else: raise Exception("No connection is in progress!") def dump(self, startAddress: int, endAddress: int, skip:bool = False) -> bytearray: - return self.read(startAddress, endAddress - startAddress, skip) + if self.connected: return self.read(startAddress, endAddress - startAddress, skip) + raise Exception("No connection is in progress!") - def allocateSystemMemory(self, size: int) -> int: - return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, 4, recv = 4) + def allocateSystemMemory(self, size: int, alignment:int = 1) -> int: + if (self.connected): return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, alignment, recv = 4) + raise Exception("No connection is in progress!") - def freeSystemMemory(self, address): - return self.function("coreinit.rpl", "OSFreeToSystem", address) \ No newline at end of file + def freeSystemMemory(self, address)->None: + if (self.connected): return self.function("coreinit.rpl", "OSFreeToSystem", address) + raise Exception("No connection is in progress!") \ No newline at end of file From a1c81be108644d0a82d6bbfeaab9ef794ada0307 Mon Sep 17 00:00:00 2001 From: NessieHax Date: Fri, 13 Aug 2021 21:53:48 +0200 Subject: [PATCH 40/68] Updated Issues --- ISSUES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ISSUES.md b/ISSUES.md index 7410ff6..268cab5 100644 --- a/ISSUES.md +++ b/ISSUES.md @@ -1,2 +1,2 @@ # Know Issues -reading from `getSystemInfo`-pointer raises an \"Something went terribly wrong\" Exception \ No newline at end of file + -allocateSystemMemory returns null pointer \ No newline at end of file From 6972b74eea4cb74fb7a9e9e428b5be5bc2479a1d Mon Sep 17 00:00:00 2001 From: NessieHax Date: Fri, 13 Aug 2021 21:55:20 +0200 Subject: [PATCH 41/68] Removed debug print --- uGecko.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/uGecko.py b/uGecko.py index 90eaa90..f5d9d9c 100644 --- a/uGecko.py +++ b/uGecko.py @@ -163,7 +163,6 @@ def __read(self,address:int,length:int)->bytearray: req = struct.pack(">II", address, address + length) self.socket.send(req) status = self.socket.recv(1) - print(f"Status : {status}") if status == b'\xbd': ret = self.socket.recv(length) elif status == b'\xb0': ret = b'\x00' * length else: raise Exception("Something went terribly wrong") @@ -254,7 +253,6 @@ def getSystemInfo(self)->dict: sysInfo["L2Size"] = [int.from_bytes(data[0xc:0x10],"big"),int.from_bytes(data[0x10:0x14],"big"),int.from_bytes(data[0x14:0x18],"big")] sysInfo["cpuRatio"] = int.from_bytes(data[0x18:0x1c],"big") return sysInfo - raise Exception("No connection is in progress!") def search(self, startAddress:int, value:int, length:int)->int: From 644a222b6672f4c0c2697c8ee0af6e4fe51ce1dd Mon Sep 17 00:00:00 2001 From: NessieHax Date: Mon, 16 Aug 2021 12:48:19 +0200 Subject: [PATCH 42/68] Made getSystemInfo more readable --- uGecko.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uGecko.py b/uGecko.py index f5d9d9c..ec45005 100644 --- a/uGecko.py +++ b/uGecko.py @@ -246,12 +246,12 @@ def getSystemInfo(self)->dict: if self.connected: sysInfo = dict() ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) - data = self.read(ptr,0x1c) - sysInfo["busClockSpeed"] = int.from_bytes(data[0:4],"big") - sysInfo["coreClockSpeed"] = int.from_bytes(data[4:8],"big") - sysInfo["timeBase"] = int.from_bytes(data[8:0xc],"big") - sysInfo["L2Size"] = [int.from_bytes(data[0xc:0x10],"big"),int.from_bytes(data[0x10:0x14],"big"),int.from_bytes(data[0x14:0x18],"big")] - sysInfo["cpuRatio"] = int.from_bytes(data[0x18:0x1c],"big") + data = struct.unpack(">IIIIIII", self.read(ptr,0x1c)) + sysInfo["busClockSpeed"] = data[0] + sysInfo["coreClockSpeed"] = data[1] + sysInfo["timeBase"] = data[2] + sysInfo["L2Size"] = [data[3],data[4],data[5]] + sysInfo["cpuRatio"] = data[6] return sysInfo raise Exception("No connection is in progress!") From c6e36de30447839f041d6813c3741ef4cc42ff46 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 23 Aug 2021 18:21:42 +0200 Subject: [PATCH 43/68] uGecko 1.2.1 (BETA) Delete the connection message --- uGecko.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/uGecko.py b/uGecko.py index ec45005..40b78fe 100644 --- a/uGecko.py +++ b/uGecko.py @@ -28,7 +28,6 @@ def connect(self, timeout:int = 5)->None: self.socket.connect((str(self.ip), 7331)) self.socket.settimeout(None) self.connected = True - print("Successfully connected!") except: raise Exception(f"Unable to connect to {self.ip}!") else: raise Exception("A connection is already in progress!") @@ -353,4 +352,4 @@ def allocateSystemMemory(self, size: int, alignment:int = 1) -> int: def freeSystemMemory(self, address)->None: if (self.connected): return self.function("coreinit.rpl", "OSFreeToSystem", address) - raise Exception("No connection is in progress!") \ No newline at end of file + raise Exception("No connection is in progress!") From ed69359a1f02d5c6ed2fd4944ceb8c54fb6f6c1a Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 02:49:28 +0200 Subject: [PATCH 44/68] Updated upload function --- uGecko.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/uGecko.py b/uGecko.py index ec45005..0177d85 100644 --- a/uGecko.py +++ b/uGecko.py @@ -335,19 +335,31 @@ def persistAssembly(self, assembly:str)->None: self.socket.send(req) else: raise Exception("No connection is in progress!") + def __upload(self, startAddress: int, data: bytes) -> None: + self.socket.send(b'\x41') + req = struct.pack(">II",startAddress, startAddress+len(data)) + self.socket.send(req) # first let the server know the length + self.socket.send(data)# then send the data + def upload(self, startAddress: int, data: bytes) -> None: if self.connected: - self.socket.send(b'\x41') - req = struct.pack(">II",startAddress, startAddress+len(data)) - self.socket.send(req) # first let the server know the length - self.socket.send(data)# then send the data + length = len(data) + maxLength = self.getDataBufferSize() + if length > maxLength: + pos = 0 + print(f"length over {hex(maxLength)}\nuploading in blocks!") + for i in range(int(length/maxLength)): + self.__upload(startAddress, data[pos:pos+maxLength]) + pos += maxLength; length-=maxLength; startAddress+=maxLength + if length != 0: self.__upload(startAddress, data[pos:pos+length]) + else: self.__upload(startAddress, data) else: raise Exception("No connection is in progress!") def dump(self, startAddress: int, endAddress: int, skip:bool = False) -> bytearray: if self.connected: return self.read(startAddress, endAddress - startAddress, skip) raise Exception("No connection is in progress!") - def allocateSystemMemory(self, size: int, alignment:int = 1) -> int: + def allocateSystemMemory(self, size: int, alignment:int = 4) -> int: if (self.connected): return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, alignment, recv = 4) raise Exception("No connection is in progress!") From a0698bdc697a55c3a6fb877138af9752323ac917 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 03:00:48 +0200 Subject: [PATCH 45/68] Added malloc and free and made call recieve amout 4 by default --- uGecko.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/uGecko.py b/uGecko.py index 0177d85..17edc06 100644 --- a/uGecko.py +++ b/uGecko.py @@ -292,7 +292,7 @@ def getSymbol(self, rplname:str, sysname:str, data = 0)->int: return self.socket.recv(4) else: raise Exception("No connection is in progress!") - def call(self, address:int, *args, recv:int = 8): + def call(self, address:int, *args, recv:int = 4): if self.connected: arguments = list(args) if len(arguments) <= 8: @@ -365,4 +365,17 @@ def allocateSystemMemory(self, size: int, alignment:int = 4) -> int: def freeSystemMemory(self, address)->None: if (self.connected): return self.function("coreinit.rpl", "OSFreeToSystem", address) - raise Exception("No connection is in progress!") \ No newline at end of file + raise Exception("No connection is in progress!") + + def malloc(self, size:int, alignment:int = 4)->int: + if (self.connected): + symbol = self.getSymbol('coreinit.rpl', 'MEMAllocFromDefaultHeapEx', 1) + address = struct.unpack(">I", self.read(symbol, 4))[0] + return self.call(address, size, alignment, recv = 4) + return -1 + + def free(self, address:int)->None: + if (self.connected): + symbol = self.getSymbol("coreinit.rpl", "MEMFreeToDefaultHeap", 1) + addr = struct.unpack(">I", self.read(symbol, 4))[0] + self.call(addr, address) \ No newline at end of file From a0fd0819f657ba402215751ef762764ce570bac4 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 03:42:55 +0200 Subject: [PATCH 46/68] Fix and clean up --- uGecko.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/uGecko.py b/uGecko.py index 17edc06..4fdd76c 100644 --- a/uGecko.py +++ b/uGecko.py @@ -41,7 +41,7 @@ def disconnect(self)->None: def isConnected(self)->bool: return self.connected - def validRange(self, address, length)->bool: + def validRange(self, address:int, length:int)->bool: if 0x01000000 <= address and address + length <= 0x01800000: return True elif 0x0E000000 <= address and address + length <= 0x10000000: return True #Depends on game elif 0x10000000 <= address and address + length <= 0x50000000: return True #Doesn't quite go to 5 @@ -87,9 +87,9 @@ def validAccess(self, address:int, length:int, access:str)->bool: if access.lower() == "write": return True else: return False - def isValidMemoryArea(self, address:int, length:int, skip_verification:bool, type:str = "write")->bool: + def isValidMemoryArea(self, address:int, length:int, skip_verification:bool, mode:str = "write")->bool: if self.connected: - if not skip_verification: return self.validRange(address, length) and self.validAccess(address, length, type) + if not skip_verification: return self.validRange(address, length) and self.validAccess(address, length, mode) return True else: raise Exception("No connection is in progress!") @@ -240,12 +240,12 @@ def getDataBufferSize(self)->int: else: raise Exception("No connection is in progress!") def getTitleID(self)->int: - return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID")) + return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID"),recv=8) def getSystemInfo(self)->dict: if self.connected: sysInfo = dict() - ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo"),recv=4) + ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo")) data = struct.unpack(">IIIIIII", self.read(ptr,0x1c)) sysInfo["busClockSpeed"] = data[0] sysInfo["coreClockSpeed"] = data[1] @@ -289,7 +289,7 @@ def getSymbol(self, rplname:str, sysname:str, data = 0)->int: self.socket.send(size) self.socket.send(req) self.socket.send(data) - return self.socket.recv(4) + return struct.unpack(">I", self.socket.recv(4))[0] else: raise Exception("No connection is in progress!") def call(self, address:int, *args, recv:int = 4): @@ -298,7 +298,7 @@ def call(self, address:int, *args, recv:int = 4): if len(arguments) <= 8: while len(arguments) != 8: arguments.append(0) - address = struct.unpack(">I", address)[0] + # address = struct.unpack(">I", address)[0] req = struct.pack(">I8I", address, *arguments) self.socket.send(b'\x70') self.socket.send(req) @@ -359,23 +359,24 @@ def dump(self, startAddress: int, endAddress: int, skip:bool = False) -> bytearr if self.connected: return self.read(startAddress, endAddress - startAddress, skip) raise Exception("No connection is in progress!") - def allocateSystemMemory(self, size: int, alignment:int = 4) -> int: - if (self.connected): return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, alignment, recv = 4) + def allocateSystemMemory(self, size:int, alignment:int = 4) -> int: + if self.connected: return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, alignment, recv = 4) raise Exception("No connection is in progress!") - def freeSystemMemory(self, address)->None: - if (self.connected): return self.function("coreinit.rpl", "OSFreeToSystem", address) + def freeSystemMemory(self, address:int)->None: + if self.connected: self.function("coreinit.rpl", "OSFreeToSystem", address) raise Exception("No connection is in progress!") def malloc(self, size:int, alignment:int = 4)->int: - if (self.connected): + if self.connected: + print("malloc call") symbol = self.getSymbol('coreinit.rpl', 'MEMAllocFromDefaultHeapEx', 1) address = struct.unpack(">I", self.read(symbol, 4))[0] - return self.call(address, size, alignment, recv = 4) + return self.call(address, size, alignment) return -1 def free(self, address:int)->None: - if (self.connected): + if self.connected: symbol = self.getSymbol("coreinit.rpl", "MEMFreeToDefaultHeap", 1) addr = struct.unpack(">I", self.read(symbol, 4))[0] self.call(addr, address) \ No newline at end of file From d2ce33a4f07326a5675d27122220b6487be1f8ce Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 03:48:22 +0200 Subject: [PATCH 47/68] rm --- EventNames1.txt | 689 ------------------------------------------------ 1 file changed, 689 deletions(-) delete mode 100644 EventNames1.txt diff --git a/EventNames1.txt b/EventNames1.txt deleted file mode 100644 index 95561bf..0000000 --- a/EventNames1.txt +++ /dev/null @@ -1,689 +0,0 @@ -ambient.cave.cave -dig.stone -random.anvil_break -random.anvil_land -step.stone -random.anvil_land -random.anvil_land -step.stone -random.anvil_use -entity.armorstand.break -dig.wood -entity.armorstand.hit -dig.stone -item.armor.equip_chain -item.armor.equip_diamond -item.armor.equip_leather -item.armor.equip_generic -item.armor.equip_gold -item.armor.equip_iron -item.armor.equip_leather -random.bowhit -random.successful_hit -random.bow -mob.bat.idle -mob.bat.death -mob.bat.hurt -mob.bat.takeoff -mob.blaze.breathe -fire.fire -mob.blaze.death -mob.blaze.hit -mob.ghast.fireball -entity.bobber.throw -entity.bobber.retrieve -item.bottle.empty -item.bottle.fill -item.bottle.fill_dragonbreath -block.brewing_stand.brew -item.bucket.empty -item.bucket.empty_lava -item.bucket.fill -item.bucket.fill_lava -item.bucket.fill_fish -item.bucket.empty_fish -mob.cat.meow -mob.cat.hit -mob.cat.hiss -mob.cat.hit -mob.cat.purr -mob.cat.purreow -block.chest.close -random.door_close -block.chest.open -mob.chicken.idle -mob.chicken.hurt -mob.chicken.plop -mob.chicken.hurt -mob.chicken.step -block.chorus_flower.death -block.chorus_flower.grow -mob.endermen.portal -dig.cloth -step.cloth -step.cloth -dig.cloth -step.cloth -random.click -mob.cow.idle -mob.cow.hurt -mob.cow.hurt -entity.cow.milk -mob.cow.step -mob.creeper.death -mob.creeper.hurt -random.fuse -random.click -random.click -random.bow -mob.horse.donkey.idle -mob.horse.donkey.angry -mob.chicken.plop -mob.horse.donkey.death -mob.horse.donkey.hit -random.bow -mob.guardian.elder_idle -mob.guardian.land_idle -mob.guardian.curse -mob.guardian.elder_death -mob.guardian.land_death -mob.guardian.flop -mob.guardian.elder_hit -mob.guardian.land_hit -item.elytra.flying -block.enchantment_table.enchant -block.enderchest.close -block.enderchest.open -mob.enderdragon.growl -mob.enderdragon.end -random.explode -mob.enderdragon.wings -mob.enderdragon.growl -mob.enderdragon.hit -mob.ghast.fireball -entity.endereye.launch -entity.endereye.death -mob.endermen.idle -mob.endermen.death -mob.endermen.hit -mob.enderman.scream -mob.enderman.stare -mob.endermen.portal -mob.silverfish.idle -mob.silverfish.kill -mob.silverfish.hit -mob.silverfish.step -random.bow -random.explode -entity.evocation_fangs.attack -entity.evocation_illager.ambient -entity.evocation_illager.cast_spell -entity.evocation_illager.death -entity.evocation_illager.hurt -entity.evocation_illager.prepare_attack -entity.evocation_illager.prepare_summon -entity.evocation_illager.prepare_wololo -random.bow -random.orb -random.orb -block.fence_gate.close -block.fence_gate.open -mob.ghast.fireball -fireworks.blast -fireworks.blast_far -fireworks.large_blast -fireworks.large_blast_far -fireworks.launch -random.bow -fireworks.twinkle -fireworks.twinkle_far -fire.fire -random.fizz -fire.ignite -block.furnace.fire_crackle -game.hostile.hurt_fall_big -random.fizz -game.player.hit -random.drink -random.eat -random.explode -random.fizz -game.player.hit -game.hostile.hurt_fall_small -random.splash -liquid.swim -mob.ghast.moan -mob.ghast.death -mob.ghast.scream -mob.ghast.scream -mob.ghast.fireball -mob.ghast.charge -random.glass -step.stone -step.stone -dig.stone -step.stone -dig.grass -step.grass -step.grass -dig.grass -step.grass -dig.gravel -step.gravel -step.gravel -dig.gravel -step.gravel -entity.guardian.idle -mob.guardian.land_idle -mob.guardian.attack -mob.guardian.death -mob.guardian.land_death -mob.guardian.flop -mob.guardian.hit -mob.guardian.land_hit -item.hoe.till -mob.horse.idle -mob.horse.angry -mob.horse.armor -mob.horse.breathe -mob.horse.death -entity.horse.eat -mob.horse.gallop -mob.horse.hit -mob.horse.jump -mob.horse.land -mob.horse.leather -mob.horse.soft -mob.horse.wood -game.hostile.hurt_fall_big -game.hostile.die -game.player.hit -game.hostile.hurt_fall_small -game.hostile.swim_splash -game.hostile.swim -entity.husk.idle -entity.husk.death -entity.husk.hurt -entity.husk.step -entity.husk.convert -entity.illusion_illager.ambient -entity.evocation_illager.cast_spell -entity.illusion_illager.death -entity.illusion_illager.hurt -entity.illusion_illager.mirror_move -entity.illusion_illager.prepare_blindness -entity.illusion_illager.prepare_mirror -mob.irongolem.throw -mob.irongolem.death -mob.irongolem.hit -mob.irongolem.walk -block.iron_door.close -block.iron_door.open -block.iron_trapdoor.close -block.iron_trapdoor.open -entity.itemframe.additem -entity.itemframe.break -entity.itemframe.place -entity.itemframe.removeitem -entity.itemframe.rotateitem -random.break -random.pop -random.pop -dig.wood -step.ladder -step.ladder -dig.wood -step.ladder -liquid.lava -random.fizz -liquid.lavapop -entity.leashknot.break -entity.leashknot.place -random.click -random.explode -ambient.weather.thunder -random.bow -entity.llama.ambient -entity.llama.angry -mob.chicken.plop -entity.llama.death -entity.llama.eat -entity.llama.hurt -entity.llama.spit -entity.llama.step -entity.llama.swag -mob.slime.big -mob.slime.big -mob.magmacube.jump -mob.magmacube.big -dig.stone -step.stone -step.stone -dig.stone -random.click -random.click -step.stone -minecart.inside -minecart.base -mob.sheep.shear -mob.horse.donkey.idle -mob.chicken.plop -mob.horse.donkey.death -mob.horse.donkey.hit -NULL -NULL -note.bassattack -note.harp -note.hat -note.pling -note.snare -entity.painting.break -entity.painting.place -entity.parrot.ambient -entity.parrot.death -entity.parrot.eat -entity.parrot.fly -entity.parrot.hurt -mob.blaze.breathe -random.fuse -mob.guardian.land_idle -mob.enderdragon.growl -mob.endermen.idle -mob.silverfish.idle -entity.evocation_illager.ambient -mob.ghast.moan -entity.husk.idle -entity.illusion_illager.ambient -mob.magmacube.big -entity.polarbear.idle -entity.shulker.ambient -mob.silverfish.idle -mob.skeleton.idle -mob.slime.big -mob.spider.idle -entity.stray.idle -entity.vex.idle -entity.vindication_illager.ambient -entity.witch.idle -mob.wither.idle -mob.wither_skeleton.idle -mob.wolf.bark -mob.zombie.idle -mob.zombiepig.idle -mob.zombie_villager.idle -entity.parrot.step -mob.pig.idle -mob.pig.death -mob.pig.idle -mob.horse.leather -mob.pig.step -tile.piston.in -tile.piston.out -entity.player.attack.crit -entity.player.attack.knockback -entity.player.attack.weak -entity.player.attack.strong -entity.player.attack.sweep -entity.player.attack.weak -game.hostile.hurt_fall_big -random.breath -random.burp -game.player.hit -game.player.hit -random.levelup -game.hostile.hurt_fall_small -liquid.splash -liquid.heavy_splash -liquid.swim -NULL -NULL -entity.polarbear.idle -entity.polarbear.babyidle -entity.polarbear.death -entity.polarbear.hurt -entity.polarbear.step -entity.polarbear.warning -portal.portal -portal.travel -portal.trigger -entity.rabbit.idle -entity.rabbit.attack -mob.rabbit.death -entity.rabbit.hurt -entity.rabbit.hop -NULL -NULL -NULL -NULL -NULL -NULL -NULL -NULL -NULL -NULL -where_are_we_now -NULL -random.fizz -dig.sand -step.sand -step.sand -dig.sand -step.sand -mob.sheep.idle -mob.sheep.idle -mob.sheep.idle -mob.sheep.shear -mob.sheep.step -item.shield.block -random.break -item.shovel.flatten -entity.shulker.ambient -block.shulker_box.close -block.shulker_box.open -entity.shulker_bullet.hit -entity.shulker_bullet.hit -entity.shulker.close -entity.shulker.death -entity.shulker.hurt -entity.shulker.hurt_closed -entity.shulker.open -entity.shulker.shoot -mob.endermen.portal -mob.silverfish.idle -mob.silverfish.kill -mob.silverfish.hit -mob.silverfish.step -mob.skeleton.idle -mob.skeleton.death -mob.horse.skeleton.idle -mob.horse.skeleton.death -mob.horse.skeleton.hit -mob.horse.skeleton.water.gallop -mob.horse.skeleton.water.idle -mob.horse.skeleton.water.jump -mob.horse.skeleton.water.soft -mob.skeleton.hurt -random.bow -mob.skeleton.step -mob.slime.attack -mob.slime.big -mob.slime.big -mob.slime.small -mob.slime.small -mob.slime.big -mob.slime.big -mob.slime.small -mob.slime.big -mob.slime.small -mob.slime.small -mob.slime.small -mob.magmacube.small -mob.slime.small -mob.slime.small -mob.slime.small -mob.slime.small -random.bow -entity.snowman.ambient -entity.snowman.death -entity.snowman.hurt -random.bow -dig.snow -step.snow -step.snow -dig.snow -step.snow -mob.spider.idle -mob.spider.death -mob.spider.idle -mob.spider.step -random.glass -random.bow -entity.squid.idle -entity.squid.death -entity.squid.hurt -entity.squid.squirt -dig.stone -random.click -random.click -step.stone -step.stone -dig.stone -random.click -random.click -step.stone -entity.stray.idle -entity.stray.death -entity.stray.hurt -entity.stray.step -enchant.thorns.hit -random.fuse -item.totem.use -random.click -random.click -random.click -random.bowhit -random.click -entity.vex.idle -entity.vex.charge -entity.vex.death -entity.vex.hurt -mob.villager.idle -mob.villager.death -mob.villager.hit -mob.villager.no -mob.villager.haggle -mob.villager.yes -entity.vindication_illager.ambient -entity.vindication_illager.death -entity.vindication_illager.hurt -block.waterlily.place -liquid.water -ambient.weather.rain -ambient.weather.rain -entity.witch.idle -entity.witch.death -entity.witch.drink -entity.witch.hurt -entity.witch.throw -mob.wither.idle -mob.zombie.woodbreak -mob.wither.death -mob.wither.hurt -mob.wither.shoot -mob.wither_skeleton.idle -mob.wither_skeleton.death -mob.wither_skeleton.hurt -mob.wither_skeleton.step -mob.wither.spawn -mob.wolf.bark -mob.wolf.death -mob.wolf.growl -mob.wolf.howl -mob.wolf.hurt -mob.wolf.panting -mob.wolf.shake -mob.wolf.step -mob.wolf.whine -block.wooden_door.close -block.wooden_door.open -block.wooden_trapdoor.close -block.wooden_trapdoor.open -dig.wood -random.click -random.click -step.wood -step.wood -dig.wood -random.click -random.click -step.wood -mob.zombie.idle -mob.zombie.wood -mob.zombie.metal -mob.zombie.woodbreak -mob.zombie.death -mob.horse.zombie.idle -mob.horse.zombie.death -mob.horse.zombie.hit -mob.zombie.hurt -mob.zombie.infect -mob.zombiepig.idle -mob.zombiepig.angry -mob.zombiepig.death -mob.zombiepig.hurt -mob.zombie.step -mob.zombie_villager.idle -mob.zombie.unfect -mob.zombie.remedy -mob.zombie_villager.death -mob.zombie_villager.hurt -mob.zombie.step -MG01.showdown -MG01.celebration -MG01.chest -MG01.death -MG01.grace -MG01.gracezero -MG01.lobby -MG01.lobbyaccent -MG01.lobbyzero -MG01.gamestart -MG01.startcountdown -MG02.showdown -MG02.gamestart -MG02.gameend -MG02.death -MG02.startcountdown -MG02.falling -MG03.death -MG03.checkpoint -MG03.boost -MG03.bestTime -MG03.finishLine -MG03.finishLineBestScore -MG03.finishLineBestTime -MG03.finishLine1st -MG03.finishLine1stBestScore -MG03.finishLine1stBestTime -MG03.finishLine2nd -MG03.finishLine2ndBestScore -MG03.finishLine2ndBestTime -MG03.finishLine3rd -MG03.finishLine3rdBestScore -MG03.finishLine3rdBestTime -MG03.thermalBoost -MG03.winner -MG03.winnerAnnounce -MG03.bestScore -MG03.redAlertLoop -MG03.farAlertSolo -MG03.emeraldPointTick -MG03.emeraldPointToka -MG03.goldPointTick -MG03.goldPointTok -MG03.diamondPoint -MG03.respawn -MG03.countdownZero -MG03.fallBig -MG03.fallSmall -MG03.hit -block.note.xylophone -block.note.bell -block.note.chime -block.note.flute -block.note.guitar -entity.boat.paddle_land -entity.boat.paddle_water -entity.bobber.retrieve -block.end_portal_frame.fill -block.end_portal.spawn -entity.player.hurt_drown -entity.player.hurt_on_fire -NULL -NULL -craftfail -NULL -NULL -NULL -random.explode -random.splash -random.splash -random.splash -random.splash -random.splash -random.splash -random.splash -random.splash -block.conduit.activate -block.conduit.ambient -block.conduit.attack -block.conduit.deactivate -block.conduit.short -block.beacon.activate -block.beacon.ambient -block.beacon.power -block.beacon.deactivate -block.pumpkin.carve -entity.fish.flop -entity.fish.hurt -entity.fish.swim -entity.pufferfish.blow_out -entity.pufferfish.blow_up -entity.pufferfish.death -entity.pufferfish.flop -entity.pufferfish.hurt -entity.pufferfish.sting -item.trident.ground_impact -item.trident.pierce -item.trident.return -item.trident.riptide1 -item.trident.riptide2 -item.trident.riptide3 -item.trident.throw -item.trident.thunder -mob.dolphin.attack -mob.dolphin.blowhole -mob.dolphin.death -mob.dolphin.eat -mob.dolphin.hurt -mob.dolphin.idle -mob.dolphin.idle_water -mob.dolphin.jump -mob.dolphin.play -mob.dolphin.splash -mob.dolphin.swim -mob.drowned.convert -mob.drowned.death -mob.drowned.hurt -mob.drowned.idle -mob.drowned.step -mob.drowned.water.death -mob.drowned.water.hurt -mob.drowned.water.idle -mob.phantom.bite -mob.phantom.death -mob.phantom.flap -mob.phantom.hurt -mob.phantom.idle -mob.phantom.swoop -mob.turtle.armor -mob.turtle.death -mob.turtle.idle -mob.turtle.hurt -mob.turtle.walk -mob.turtle.swim.swim -mob.turtle.egg.drop_egg -mob.turtle.egg.egg_break -mob.turtle.egg.egg_crack -mob.turtle.egg.jump_egg -mob.turtle.baby.death -mob.turtle.baby.egg_hatched -mob.turtle.baby.hurt -mob.turtle.baby.shamble -ambient.underwater.enter -ambient.underwater.exit -block.bubble_column.bubble -block.bubble_column.upwards_ambient -block.bubble_column.upwards_inside -block.bubble_column.whirlpool_ambient -block.bubble_column.whirlpool_inside \ No newline at end of file From 21eef8bdd8f3154ba37eff8f8d837ab73b288e77 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 03:50:33 +0200 Subject: [PATCH 48/68] removed debug print --- uGecko.py | 1 - 1 file changed, 1 deletion(-) diff --git a/uGecko.py b/uGecko.py index 7f075be..a5ecaf5 100644 --- a/uGecko.py +++ b/uGecko.py @@ -368,7 +368,6 @@ def freeSystemMemory(self, address:int)->None: def malloc(self, size:int, alignment:int = 4)->int: if self.connected: - print("malloc call") symbol = self.getSymbol('coreinit.rpl', 'MEMAllocFromDefaultHeapEx', 1) address = struct.unpack(">I", self.read(symbol, 4))[0] return self.call(address, size, alignment) From 9f5e2d60e52edf80defecb4024a2a9e63730268b Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 03:55:37 +0200 Subject: [PATCH 49/68] Updated Docs --- DOCUMENTATION.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index e13528c..9780fd6 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -23,6 +23,9 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) |clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None |||| +| malloc | Allocates given size | `gecko.malloc(0x100)` | Int +| free | frees given size | `gecko.free(address)` | None +|||| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean |pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None |resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None From 0940ffdf17e2e7db7e25442f3bb4fc11fde7b40b Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 1 Sep 2021 04:00:17 +0200 Subject: [PATCH 50/68] Updated Docs --- DOCUMENTATION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 9780fd6..f7db4ec 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -24,7 +24,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None |||| | malloc | Allocates given size | `gecko.malloc(0x100)` | Int -| free | frees given size | `gecko.free(address)` | None +| free | frees given address | `gecko.free(address)` | None |||| |isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean |pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None @@ -35,7 +35,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int |getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int |getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String -|getCodeHandlerAddress()| Allows you to get the address of the core handler. | `gecko.getCodeHandlerAddress()`| Int +|getCodeHandlerAddress()| Allows you to get the address of the code handler. | `gecko.getCodeHandlerAddress()`| Int |getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int |getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int |getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int From deb37492fa4384daad5ab5aad8f9563da2bffc23 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Sep 2021 22:29:14 +0200 Subject: [PATCH 51/68] Added a condition to display the debug line in the upload function --- uGecko.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uGecko.py b/uGecko.py index a5ecaf5..40a28a2 100644 --- a/uGecko.py +++ b/uGecko.py @@ -340,13 +340,13 @@ def __upload(self, startAddress: int, data: bytes) -> None: self.socket.send(req) # first let the server know the length self.socket.send(data)# then send the data - def upload(self, startAddress: int, data: bytes) -> None: + def upload(self, startAddress: int, data: bytes, debug_print:bool = False) -> None: if self.connected: length = len(data) maxLength = self.getDataBufferSize() if length > maxLength: pos = 0 - print(f"length over {hex(maxLength)}\nuploading in blocks!") + if debug_print: print(f"length over {hex(maxLength)}\nuploading in blocks!") for i in range(int(length/maxLength)): self.__upload(startAddress, data[pos:pos+maxLength]) pos += maxLength; length-=maxLength; startAddress+=maxLength @@ -377,4 +377,4 @@ def free(self, address:int)->None: if self.connected: symbol = self.getSymbol("coreinit.rpl", "MEMFreeToDefaultHeap", 1) addr = struct.unpack(">I", self.read(symbol, 4))[0] - self.call(addr, address) \ No newline at end of file + self.call(addr, address) From 67a209bc784fd57417442a1bf7e96eedf15cf227 Mon Sep 17 00:00:00 2001 From: VCoding Date: Tue, 21 Dec 2021 11:54:54 +0100 Subject: [PATCH 52/68] Beta 1.3 Total modification of the project structure Migration to a pypi compatible structure Modification of some functions Modification of the examples And more... --- .gitignore | 4 +- DOCUMENTATION.md | 52 ----- LICENSE | 3 +- README.md | 10 +- examples/getSystemInfo.py | 8 +- examples/getWiiuVersion.py | 15 +- examples/launchCustomGame.py | 14 +- examples/launchWiiuMenu.py | 20 -- examples/pauseConsole.py | 15 +- examples/readKern.py | 14 +- examples/shutdownWiiU.py | 20 -- examples/shutdownWiiu.py | 10 + requirements.txt | 0 setup.py | 41 ++++ tests/tests.py | 56 ++++++ uGecko.py | 380 ----------------------------------- ugecko/__init__.py | 12 ++ ugecko/enums/Commands.py | 47 +++++ ugecko/uGecko.py | 345 +++++++++++++++++++++++++++++++ ugecko/utils/Errors.py | 9 + ugecko/utils/Memory.py | 53 +++++ ugecko/utils/Verification.py | 9 + 22 files changed, 604 insertions(+), 533 deletions(-) delete mode 100644 DOCUMENTATION.md delete mode 100644 examples/launchWiiuMenu.py delete mode 100644 examples/shutdownWiiU.py create mode 100644 examples/shutdownWiiu.py create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 tests/tests.py delete mode 100644 uGecko.py create mode 100644 ugecko/__init__.py create mode 100644 ugecko/enums/Commands.py create mode 100644 ugecko/uGecko.py create mode 100644 ugecko/utils/Errors.py create mode 100644 ugecko/utils/Memory.py create mode 100644 ugecko/utils/Verification.py diff --git a/.gitignore b/.gitignore index 021661a..328f834 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ testLIb.py __pycache__ -*@dev.py \ No newline at end of file +*@dev.py +.venv +.venv3.8 diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md deleted file mode 100644 index f7db4ec..0000000 --- a/DOCUMENTATION.md +++ /dev/null @@ -1,52 +0,0 @@ -# Documentation / uGecko -This file is intended to explain and show how to use the functions of ___uGecko___. - -| Name | Description | Example | Return | -|:----: |:-----------: |:-------: | :------:| -|uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None -|||| -|connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None -|disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None -|isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean -|||| -|poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None -|poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None -|poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None -|serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None -|kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None -|upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None -|||| -|read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Bytearray -|kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Int -|||| -|writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None -|readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) -|clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None -|||| -| malloc | Allocates given size | `gecko.malloc(0x100)` | Int -| free | frees given address | `gecko.free(address)` | None -|||| -|isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean -|pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None -|resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None -|||| -|getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) -|getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String -|getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int -|getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int -|getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String -|getCodeHandlerAddress()| Allows you to get the address of the code handler. | `gecko.getCodeHandlerAddress()`| Int -|getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int -|getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int -|getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int -|runKernelCopyService()| | `gecko.runKernelCopyService()`| None -|||| -|search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Int -|advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Int Array -|||| -|getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) -|call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed -|||| -|clearAssembly()| | `gecko.clearAssembly()`| None -|excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None -|persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file diff --git a/LICENSE b/LICENSE index 399e8d9..c30cdc6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 wiiudev +Copyright (c) 2015-present wiiudev, 2021-present VCoding Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README.md b/README.md index b961a03..5f8017b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # uGecko Python library for use with TCPGecko. Requires kernel exploit to use. -All the library is contained in the file named uGecko.py (WARNING: Only tested on Python 3.8). You can find examples in the folder `examples`. +All the library is contained in the file named uGecko.py (*WARNING: Tested on Python 3.8 to 3.9*). You can find examples in the folder `examples`. # Credits -**NWPlayer123, wj44, and wiiudev** for `pyGecko`
-**Chadderz and Marionumber1** for `TCPGecko codehandler`
-**BullyWiiPlaza** for the current version of `TCPGecko`
-**VCoding** for this modified version of `pyGecko`, specially designed for the `TCPGecko version` of **BullyWiiPlaza**. +**NWPlayer123, wj44, and wiiudev** for [`pyGecko`](https://github.com/wiiudev/pyGecko)
+**Chadderz and Marionumber1** for [`TCPGecko codehandler`](https://github.com/wiiudev/pyGecko/tree/master/codehandler)
+**BullyWiiPlaza** for the current version of [`TCPGecko`](https://github.com/BullyWiiPlaza/tcpgecko/)
+**VCoding** for this modified version of `pyGecko`, specially designed for the [`TCPGecko version`](https://github.com/BullyWiiPlaza/tcpgecko/) of **BullyWiiPlaza**. \ No newline at end of file diff --git a/examples/getSystemInfo.py b/examples/getSystemInfo.py index 1953a31..adfa73a 100644 --- a/examples/getSystemInfo.py +++ b/examples/getSystemInfo.py @@ -1,11 +1,11 @@ -from uGecko import uGecko +from ugecko import uGecko -gecko = uGecko("192.168.1.102") +gecko = uGecko("192.168.1.57") gecko.connect() -info = gecko.getSystemInfo() +info = gecko.getSystemInformation() print(f""" -busClockSpeed\t:{info["busClockSpeed"]} +busClockSpeed\t: {info["busClockSpeed"]} coreClockSpeed\t: {info["coreClockSpeed"]} timeBase\t: {info["timeBase"]} L2Size\t: {info["L2Size"]} diff --git a/examples/getWiiuVersion.py b/examples/getWiiuVersion.py index 66a4539..e86c715 100644 --- a/examples/getWiiuVersion.py +++ b/examples/getWiiuVersion.py @@ -1,20 +1,9 @@ - ##################### - # Ignore this # -######################################################## -import os, sys -sys.dont_write_bytecode = True -currentdir = os.path.dirname(os.path.realpath(__file__)) -parentdir = os.path.dirname(currentdir) -sys.path.insert(0, parentdir) -######################################################## +from ugecko import uGecko -from uGecko import uGecko - -gecko = uGecko("192.168.1.102") +gecko = uGecko("192.168.1.57") gecko.connect() # 550 -> 5.5.X - print(gecko.getOsVersion()) gecko.disconnect() diff --git a/examples/launchCustomGame.py b/examples/launchCustomGame.py index 6d90fb3..4475620 100644 --- a/examples/launchCustomGame.py +++ b/examples/launchCustomGame.py @@ -1,16 +1,6 @@ - ##################### - # Ignore this # -######################################################## -import os, sys -sys.dont_write_bytecode = True -currentdir = os.path.dirname(os.path.realpath(__file__)) -parentdir = os.path.dirname(currentdir) -sys.path.insert(0, parentdir) -######################################################## +from ugecko import uGecko -from uGecko import uGecko - -gecko = uGecko("192.168.1.102") +gecko = uGecko("192.168.1.57") gecko.connect() titleID = 0x0005000010176A00 # Splatoon EUR diff --git a/examples/launchWiiuMenu.py b/examples/launchWiiuMenu.py deleted file mode 100644 index 16c4f6e..0000000 --- a/examples/launchWiiuMenu.py +++ /dev/null @@ -1,20 +0,0 @@ - ##################### - # Ignore this # -######################################################## -import os, sys -sys.dont_write_bytecode = True -currentdir = os.path.dirname(os.path.realpath(__file__)) -parentdir = os.path.dirname(currentdir) -sys.path.insert(0, parentdir) -######################################################## - -from uGecko import uGecko - -gecko = uGecko("192.168.1.102") -gecko.connect() - -gecko.call(gecko.getSymbol("sysapp.rpl", "SYSLaunchMenu")) - -gecko.disconnect() - -print("Done.") \ No newline at end of file diff --git a/examples/pauseConsole.py b/examples/pauseConsole.py index 3335701..d05594a 100644 --- a/examples/pauseConsole.py +++ b/examples/pauseConsole.py @@ -1,16 +1,7 @@ - ##################### - # Ignore this # -######################################################## -import os, sys, time -sys.dont_write_bytecode = True -currentdir = os.path.dirname(os.path.realpath(__file__)) -parentdir = os.path.dirname(currentdir) -sys.path.insert(0, parentdir) -######################################################## +import time +from ugecko import uGecko -from uGecko import uGecko - -gecko = uGecko("192.168.1.102") +gecko = uGecko("192.168.1.57") gecko.connect() gecko.pauseConsole() diff --git a/examples/readKern.py b/examples/readKern.py index e191324..2e4aee3 100644 --- a/examples/readKern.py +++ b/examples/readKern.py @@ -1,16 +1,6 @@ - ##################### - # Ignore this # -######################################################## -import os, sys -sys.dont_write_bytecode = True -currentdir = os.path.dirname(os.path.realpath(__file__)) -parentdir = os.path.dirname(currentdir) -sys.path.insert(0, parentdir) -######################################################## +from ugecko import uGecko -from uGecko import uGecko - -gecko = uGecko("192.168.1.102") +gecko = uGecko("192.168.1.57") gecko.connect() print(gecko.kernelRead(0x10000000)) diff --git a/examples/shutdownWiiU.py b/examples/shutdownWiiU.py deleted file mode 100644 index 81c3e9d..0000000 --- a/examples/shutdownWiiU.py +++ /dev/null @@ -1,20 +0,0 @@ - ##################### - # Ignore this # -######################################################## -import os, sys, time -sys.dont_write_bytecode = True -currentdir = os.path.dirname(os.path.realpath(__file__)) -parentdir = os.path.dirname(currentdir) -sys.path.insert(0, parentdir) -######################################################## - -from uGecko import uGecko - -gecko = uGecko("192.168.1.102") -gecko.connect() - -gecko.call(gecko.getSymbol("coreinit.rpl", "OSShutdown"), 1) - -gecko.disconnect() - -print("Done.") \ No newline at end of file diff --git a/examples/shutdownWiiu.py b/examples/shutdownWiiu.py new file mode 100644 index 0000000..95eef90 --- /dev/null +++ b/examples/shutdownWiiu.py @@ -0,0 +1,10 @@ +from ugecko import uGecko + +gecko = uGecko("192.168.1.57") +gecko.connect() + +gecko.call(gecko.getSymbol("coreinit.rpl", "OSShutdown"), 1) + +gecko.disconnect() + +print("Done.") \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e8d9536 --- /dev/null +++ b/setup.py @@ -0,0 +1,41 @@ +from setuptools import setup + +requirements = [] +with open('requirements.txt') as f: + requirements = f.read().splitlines() + +readme = "" +with open('README.md', 'r') as f: + readme = f.read() + +packages = [ + "ugecko", + "ugecko.enums", + "ugecko.utils", +] + +setup( + name = "ugecko", + author = "WiiuDev, VCoding", + url = "https://github.com/vincent-coding/uGecko", + project_urls = { + "Source Code": "https://github.com/vincent-coding/uGecko", + "Documentation": "https://github.com/vincent-coding/uGecko/docs", + "Issue Tracker": "https://github.com/vincent-coding/uGecko/issues" + }, + version = "1.3.0", + packages = packages, + license = "MIT", + description = "Python library for use with TCPGecko. Requires kernel exploit to use.", + long_description = readme, + long_description_content_type = "text/markdown", + install_requires = requirements, + python_requires = ">=3.8.0", + classifiers=[ + "Intended Audience :: Developers", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9" + ] +) \ No newline at end of file diff --git a/tests/tests.py b/tests/tests.py new file mode 100644 index 0000000..368c29f --- /dev/null +++ b/tests/tests.py @@ -0,0 +1,56 @@ +from ugecko import uGecko + +import time + +gecko = uGecko("192.168.1.57") +#print(gecko.isConnected()) +gecko.connect() + +""" +print(gecko.isConnected()) +print(gecko.getWiiuIp()) +""" + +#gecko.seriaPoke((0x105DD0A8, 0x105DD2A8), 0x00000000) + +#gecko.writeString(0x121F0C94, "Hello World!" + "\x00") +#gecko.clearString(0x121F0C94, 0x121F0C94 + 32) + +#print(hex(int.from_bytes(gecko.read(0x105DD0A8, 4), "big"))) + +#gecko.kernelWrite(0x105DD2A8, 0x3F800000) + +#print(hex(gecko.kernelRead(0x105DD2A8))) + +""" +print(gecko.isConsolePaused()) +time.sleep(5) +gecko.pauseConsole() +print(gecko.isConsolePaused()) +time.sleep(5) +gecko.resumeConsole() +print(gecko.isConsolePaused()) +""" + +""" +print(gecko.getServerStatus()) +print(gecko.getServerVersion()) +print(gecko.getOsVersion()) +print(gecko.getVersionHash()) +print(gecko.getAccountID()) +print(gecko.getCodeHandlerAddress()) +print(gecko.getDataBufferSize()) +""" + +#gecko.getTitleID() + +#print(gecko.getSystemInformation()) + +""" +print(gecko.search(0x12000000, 0x13000000 - 0x12000000, 0x3F800000)) +print(gecko.advancedSearch(0x12000000, 0x13000000 - 0x12000000, 0x3F800000, 0, 100000, 1)) +""" + +print(gecko.getEntryPointAddress()) + +gecko.disconnect() \ No newline at end of file diff --git a/uGecko.py b/uGecko.py deleted file mode 100644 index 40a28a2..0000000 --- a/uGecko.py +++ /dev/null @@ -1,380 +0,0 @@ -import socket, struct, re - -class Exception(Exception): - pass - -def onlyCharactersIpAdd(ip): - check = re.compile(r'[^0-9.]').search - return not bool(check(ip)) - -def checkip(ip): - pieces = ip.split('.') - if len(pieces) != 4: return False - try: return all(0<=int(p)<256 for p in pieces) - except ValueError: return False - -class uGecko: - def __init__(self, ip): - self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) - if not onlyCharactersIpAdd(ip): raise Exception("The entered IP address is not only composed of numbers and dots.") - if not checkip(ip): raise Exception("The entered IP address does not have a valid structure!") - self.ip = ip - self.connected:bool = False - - def connect(self, timeout:int = 5)->None: - if self.ip and self.ip != "" and not self.connected: - try: - self.socket.settimeout(timeout) - self.socket.connect((str(self.ip), 7331)) - self.socket.settimeout(None) - self.connected = True - except: raise Exception(f"Unable to connect to {self.ip}!") - else: raise Exception("A connection is already in progress!") - - def disconnect(self)->None: - if self.connected: - self.socket.close() # TODO: Make checks - self.connected = False - else: raise Exception("No connection is in progress!") - - def isConnected(self)->bool: - return self.connected - - def validRange(self, address:int, length:int)->bool: - if 0x01000000 <= address and address + length <= 0x01800000: return True - elif 0x0E000000 <= address and address + length <= 0x10000000: return True #Depends on game - elif 0x10000000 <= address and address + length <= 0x50000000: return True #Doesn't quite go to 5 - elif 0xE0000000 <= address and address + length <= 0xE4000000: return True - elif 0xE8000000 <= address and address + length <= 0xEA000000: return True - elif 0xF4000000 <= address and address + length <= 0xF6000000: return True - elif 0xF6000000 <= address and address + length <= 0xF6800000: return True - elif 0xF8000000 <= address and address + length <= 0xFB000000: return True - elif 0xFB000000 <= address and address + length <= 0xFB800000: return True - elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: return True - else: return False - - def validAccess(self, address:int, length:int, access:str)->bool: - if 0x01000000 <= address and address + length <= 0x01800000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0x0E000000 <= address and address + length <= 0x10000000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0x10000000 <= address and address + length <= 0x50000000: - if access.lower() == "read" : return True - if access.lower() == "write": return True - elif 0xE0000000 <= address and address + length <= 0xE4000000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0xE8000000 <= address and address + length <= 0xEA000000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0xF4000000 <= address and address + length <= 0xF6000000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0xF6000000 <= address and address + length <= 0xF6800000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0xF8000000 <= address and address + length <= 0xFB000000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0xFB000000 <= address and address + length <= 0xFB800000: - if access.lower() == "read" : return True - if access.lower() == "write": return False - elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: - if access.lower() == "read" : return True - if access.lower() == "write": return True - else: return False - - def isValidMemoryArea(self, address:int, length:int, skip_verification:bool, mode:str = "write")->bool: - if self.connected: - if not skip_verification: return self.validRange(address, length) and self.validAccess(address, length, mode) - return True - else: raise Exception("No connection is in progress!") - - def poke8(self, address:int, value:int, skip:bool = False)->None: - if self.isValidMemoryArea(address, 1, skip): - self.socket.send(b'\x01') - req = struct.pack(">II", address, value) - self.socket.send(req) - else: raise Exception("Invalid ram address!") - - def poke16(self, address:int, value:int, skip:bool = False)->None: - if self.isValidMemoryArea(address, 2, skip): - self.socket.send(b'\x02') - req = struct.pack(">II", address, value) - self.socket.send(req) - else: raise Exception("Invalid ram address!") - - def poke32(self, address:int, value:int, skip:bool = False)->None: - if self.isValidMemoryArea(address, 4, skip): - self.socket.send(b'\x03') - req = struct.pack(">II", address, value) - self.socket.send(req) - else: raise Exception("Invalid ram address!") - - def serialPoke(self, addressTable:list, value:int, skip:bool = False)->None: - for address in addressTable: - if type(address)==int: self.poke32(address, value,skip) - - def writeString(self, address:int, string:str, skip:bool = False)->None: - if self.connected: - if type(string) != bytes: string = bytes(string, "UTF-8") #Sanitize - if len(string) % 4: string += bytes((4 - (len(string) % 4)) * b"\x00") - pos = 0 - for x in range(int(len(string) / 4)): - self.poke32(address, struct.unpack(">I", string[pos:pos + 4])[0], skip) - address += 4;pos += 4 - else: raise Exception("No connection is in progress!") - - def clearString(self, startAddress:int, endAddress:int, skip:bool = False)->None: - if self.connected: - length = endAddress - startAddress - i = 0 - while i <= length: - self.poke32(startAddress + i, 0x00000000, skip) - i += 4 - else: raise Exception("No connection is in progress!") - - def readString(self, address:int, length:int, decoding:str = "UTF-8", skip:bool = False)->str: - if self.connected: - string = self.read(address, length, skip) - return string.decode(decoding) - else: raise Exception("No connection is in progress!") - - def read(self, address:int, length:int, skip:bool = False)->bytearray: - if self.isValidMemoryArea(address, length, skip, "read"): - if length == 0: raise Exception("Reading memory requires a length!") - ret = b'' - if length > 0x400: - for i in range(int(length / 0x400)): - ret += self.__read(address, 0x400) - address += 0x400;length -= 0x400 - if length != 0: - ret += self.__read(address, length) - else: - ret = self.__read(address, length) - return ret - else: raise Exception("Invalid ram address!") - - def __read(self,address:int,length:int)->bytearray: - self.socket.send(b'\x04') - req = struct.pack(">II", address, address + length) - self.socket.send(req) - status = self.socket.recv(1) - if status == b'\xbd': ret = self.socket.recv(length) - elif status == b'\xb0': ret = b'\x00' * length - else: raise Exception("Something went terribly wrong") - return ret - - def kernelWrite(self, address:int, value:int, skip:bool = False)->None: - if self.isValidMemoryArea(address, 4, skip): - self.socket.send(b'\x0B') - req = struct.pack(">II", int(address), int(value)) - self.socket.send(req) - else: raise Exception("Invalid ram address!") - - def kernelRead(self, address:int, skip:bool = False)->int: - if self.isValidMemoryArea(address, 4, skip, "read"): - self.socket.send(b'\x0C') - req = struct.pack(">I", int(address)) - self.socket.send(req) - return struct.unpack(">I", self.socket.recv(4))[0] - else: raise Exception("Invalid ram address!") - - def getServerStatus(self)->int: - if self.connected: - self.socket.send(b'\x50') - return int.from_bytes(self.socket.recv(1), "big") - else: raise Exception("No connection is in progress!") - - def isConsolePaused(self)->bool: - if self.connected: - self.socket.send(b'\x84') - return int.from_bytes(self.socket.recv(1), "big") - else: raise Exception("No connection is in progress!") - - def pauseConsole(self)->None: - if self.connected: self.socket.send(b'\x82') - else: raise Exception("No connection is in progress!") - - def resumeConsole(self)->None: - if self.connected: self.socket.send(b'\x83') - else: raise Exception("No connection is in progress!") - - def getServerVersion(self)->str: - if self.connected: - self.socket.send(b'\x99') - return self.socket.recv(16).decode("UTF-8").replace('\n', '') - else: raise Exception("No connection is in progress!") - - def getOsVersion(self)->int: - if self.connected: - self.socket.send(b'\x9A') - return int.from_bytes(self.socket.recv(4), "big") - else: raise Exception("No connection is in progress!") - - def getVersionHash(self)->int: - if self.connected: - self.socket.send(b'\xE0') - return int.from_bytes(self.socket.recv(4), "big") - else: raise Exception("No connection is in progress!") - - def getAccountID(self)->str: - if self.connected: - self.socket.send(b'\x57') - return hex(int.from_bytes(self.socket.recv(4), "big")).replace("0x", "") - else: raise Exception("No connection is in progress!") - - def getCodeHandlerAddress(self)->int: - if self.connected: - self.socket.send(b'\x55') - return int.from_bytes(self.socket.recv(4), "big") - else: raise Exception("No connection is in progress!") - - def getDataBufferSize(self)->int: - if self.connected: - self.socket.send(b'\x51') - return int.from_bytes(self.socket.recv(4), "big") - else: raise Exception("No connection is in progress!") - - def getTitleID(self)->int: - return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID"),recv=8) - - def getSystemInfo(self)->dict: - if self.connected: - sysInfo = dict() - ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo")) - data = struct.unpack(">IIIIIII", self.read(ptr,0x1c)) - sysInfo["busClockSpeed"] = data[0] - sysInfo["coreClockSpeed"] = data[1] - sysInfo["timeBase"] = data[2] - sysInfo["L2Size"] = [data[3],data[4],data[5]] - sysInfo["cpuRatio"] = data[6] - return sysInfo - raise Exception("No connection is in progress!") - - def search(self, startAddress:int, value:int, length:int)->int: - if self.connected: - self.socket.send(b'\x72') - req = struct.pack(">III", startAddress, value, length) - self.socket.send(req) - return int.from_bytes(self.socket.recv(4), "big") - else: raise Exception("No connection is in progress!") - - def advancedSearch(self, start:int, length:int, value:int, kernel:int, limit:int, aligned:int = 1)->list: - if self.connected: - self.socket.send(b'\x73') - req_val = struct.pack(">I", int(value)) - search_byte_count = len(req_val) - req = struct.pack(">IIIIII", int(start), int(length), int(kernel), int(limit), int(aligned), int(search_byte_count)) - self.socket.send(req) - self.socket.send(req_val) - count = int.from_bytes(self.socket.recv(4), "big") / 4 - foundOffset = [] - for i in range(int(count)): - foundOffset.append(int.from_bytes(self.socket.recv(4), "big")) - return foundOffset - else: raise Exception("No connection is in progress!") - - def getSymbol(self, rplname:str, sysname:str, data = 0)->int: - if self.connected: - self.socket.send(b'\x71') - req = struct.pack('>II', 8, 8 + len(rplname) + 1) - req += rplname.encode("UTF-8") + b"\x00" - req += sysname.encode("UTF-8") + b"\x00" - size = struct.pack(">B", len(req)) - data = struct.pack(">B", data) - self.socket.send(size) - self.socket.send(req) - self.socket.send(data) - return struct.unpack(">I", self.socket.recv(4))[0] - else: raise Exception("No connection is in progress!") - - def call(self, address:int, *args, recv:int = 4): - if self.connected: - arguments = list(args) - if len(arguments) <= 8: - while len(arguments) != 8: - arguments.append(0) - # address = struct.unpack(">I", address)[0] - req = struct.pack(">I8I", address, *arguments) - self.socket.send(b'\x70') - self.socket.send(req) - return struct.unpack('>Q', self.socket.recv(8))[0] >> 32*(recv==4) - else: - raise Exception("Too many arguments!") - else: raise Exception("No connection is in progress!") - - def getEntryPointAddress(self)->int: - if self.connected: - self.socket.send(b'\xB1') - return int.from_bytes(self.socket.recv(4), "big") - else: raise Exception("No connection is in progress!") - - def runKernelCopyService(self)->None: - if self.connected: self.socket.send(b'\xCD') - else: raise Exception("No connection is in progress!") - - def clearAssembly(self)->None: - if self.connected: self.socket.send(b'\xE2') - else: raise Exception("No connection is in progress!") - - def excecuteAssembly(self, assembly:str)->None: - if self.connected: - self.socket.send(b'\x81') - req = assembly.encode('UTF-8') - self.socket.send(req) - else: raise Exception("No connection is in progress!") - - def persistAssembly(self, assembly:str)->None: - if self.connected: - self.socket.send(b'\xE1') - req = assembly.encode('UTF-8') - self.socket.send(req) - else: raise Exception("No connection is in progress!") - - def __upload(self, startAddress: int, data: bytes) -> None: - self.socket.send(b'\x41') - req = struct.pack(">II",startAddress, startAddress+len(data)) - self.socket.send(req) # first let the server know the length - self.socket.send(data)# then send the data - - def upload(self, startAddress: int, data: bytes, debug_print:bool = False) -> None: - if self.connected: - length = len(data) - maxLength = self.getDataBufferSize() - if length > maxLength: - pos = 0 - if debug_print: print(f"length over {hex(maxLength)}\nuploading in blocks!") - for i in range(int(length/maxLength)): - self.__upload(startAddress, data[pos:pos+maxLength]) - pos += maxLength; length-=maxLength; startAddress+=maxLength - if length != 0: self.__upload(startAddress, data[pos:pos+length]) - else: self.__upload(startAddress, data) - else: raise Exception("No connection is in progress!") - - def dump(self, startAddress: int, endAddress: int, skip:bool = False) -> bytearray: - if self.connected: return self.read(startAddress, endAddress - startAddress, skip) - raise Exception("No connection is in progress!") - - def allocateSystemMemory(self, size:int, alignment:int = 4) -> int: - if self.connected: return self.call(self.getSymbol('coreinit.rpl', 'OSAllocFromSystem'), size, alignment, recv = 4) - raise Exception("No connection is in progress!") - - def freeSystemMemory(self, address:int)->None: - if self.connected: self.function("coreinit.rpl", "OSFreeToSystem", address) - raise Exception("No connection is in progress!") - - def malloc(self, size:int, alignment:int = 4)->int: - if self.connected: - symbol = self.getSymbol('coreinit.rpl', 'MEMAllocFromDefaultHeapEx', 1) - address = struct.unpack(">I", self.read(symbol, 4))[0] - return self.call(address, size, alignment) - return -1 - - def free(self, address:int)->None: - if self.connected: - symbol = self.getSymbol("coreinit.rpl", "MEMFreeToDefaultHeap", 1) - addr = struct.unpack(">I", self.read(symbol, 4))[0] - self.call(addr, address) diff --git a/ugecko/__init__.py b/ugecko/__init__.py new file mode 100644 index 0000000..0f3a557 --- /dev/null +++ b/ugecko/__init__.py @@ -0,0 +1,12 @@ +""" + uGecko +Python library for use with TCPGecko. +""" + +__title__ = "ugecko" +__author__ = "WiiuDev, VCoding" +__license__ = "MIT" +__copyright__ = "Copyright 2015-present wiiudev, 2021-present VCoding" +__version__ = "1.3.0" + +from .uGecko import * \ No newline at end of file diff --git a/ugecko/enums/Commands.py b/ugecko/enums/Commands.py new file mode 100644 index 0000000..684a4a9 --- /dev/null +++ b/ugecko/enums/Commands.py @@ -0,0 +1,47 @@ +from enum import Enum + +class Commands(Enum): + POKE_8 = b'\x01' + POKE_16 = b'\x02' + POKE_32 = b'\x03' + READ_MEMORY = b'\x04' + READ_MEMORY_KERNEL = b'\x05' + VALIDATE_ADDRESS_RANGE = b'\x06' + MEMORY_DISASSEMBLE = b'\x08' + # READ_MEMORY_COMPRESSED = b'\x09' -> Obsolete + KERNEL_WRITE = b'\x0B' + KERNEL_READ = b'\x0C' + #TAKE_SCREENSHOT = b'\x0D' -> + UPLOAD_MEMORY = b'\x41' + SERVER_STATUS = b'\x50' + GET_DATA_BUFFER_SIZE = b'\x51' + READ_FILE = b'\x52' + READ_DIRECTORY = b'\x53' + REPLACE_FILE = b'\x54' + GET_CODE_HANDLER_ADDRESS = b'\x55' + READ_THREADS = b'\x56' + ACCOUNT_IDENTIFIER = b'\x57' + # WRITE_SCREEN = b'\x58' -> Exception DSI + FOLLOW_POINTER = b'\x60' + REMOTE_PROCEDURE_CALL = b'\x70' + GET_SYMBOL = b'\x71' + MEMORY_SEARCH = b'\x72' + ADVANCED_MEMORY_SEARCH = b'\x73' + EXECUTE_ASSEMBLY = b'\x81' + PAUSE_CONSOLE = b'\x82' + RESUME_CONSOLE = b'\x83' + IS_CONSOLE_PAUSED = b'\x84' + GET_SERVER_VERSION = b'\x99' + GET_OS_VERSION = b'\x9A' + SET_DATA_BREAKPOINT = b'\xA0' + SET_INSTRUCTION_BREAKPOINT = b'\xA2' + TOGGLE_BREAKPOINT = b'\xA5' + REMOVE_ALL_BREAKPOINT = b'\xA6' + POKE_REGISTERS = b'\xA7' + GET_STACK_TRACE = b'\xA8' + GET_ENTRY_POINT_ADDRESS = b'\xB1' + RUN_KERNEL_COPY_SERVICE = b'\xCD' + IOSU_HAX_READ_FILE = b'\xD0' + GET_VERSION_HASH = b'\xE0' + PERSIST_ASSEMBLY = b'\xE1' + CLEAR_ASSEMBLY = b'\xE2' diff --git a/ugecko/uGecko.py b/ugecko/uGecko.py new file mode 100644 index 0000000..c0fc4b7 --- /dev/null +++ b/ugecko/uGecko.py @@ -0,0 +1,345 @@ +import socket, struct +from typing import Union + +from .enums.Commands import Commands + +from .utils.Errors import * +from .utils.Memory import Memory +from .utils.Verification import IP_Verification + +class uGecko: + """Python library for use with TCPGecko. Requires kernel exploit to use.""" + + def __init__(self, ip: str, port: int = 7331, debug_mode: bool = False) -> None: + self.__socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) + if not IP_Verification(ip): raise InvalidIpAddressException("The IP address given is not valid!") + self.__ip = ip + self.__port = port + self.__connected = False + self.__debug_mode = debug_mode + + def setDebugMode(self, debug_mode: bool) -> None: + self.__debug_mode = debug_mode + + def getDebugMode(self) -> bool: + return self.__debug_mode + + def connect(self, timeout: int = 5) -> None: + if self.__ip and self.__ip != "": + if not self.__connected: + try: + if self.__debug_mode: print(f"Connecting to {self.__ip}:{self.__port}...") + self.__socket.settimeout(timeout) + self.__socket.connect((str(self.__ip), int(self.__port))) + self.__connected = True + if self.__debug_mode: print("Connected!") + except: raise ConnectionErrorException(f"Unable to connect to {self.__ip} !") + else: raise ConnectionIsAlreadyInProgressException(f"A connection to {self.__ip} is already in progress!") + else: raise NoIpEnteredException("No IP address has been specified to connect!") + + def disconnect(self): + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.close() + self.__connected = False + + def isConnected(self) -> bool: + return self.__connected + + def getWiiuIp(self) -> str: + return f"{str(self.__ip)}:{str(self.__port)}" if self.__ip else -1 + + def poke8(self, address: int, value: int, skip_verification: bool = False) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(address, 1, skip_verification): raise InvalidMemoryAreaException("The address given is not valid!") + + self.__socket.send(Commands.POKE_8.value) + self.__socket.send(struct.pack(">II", address, value)) + + def poke16(self, address: int, value: int, skip_verification: bool = False) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(address, 4, skip_verification): raise InvalidMemoryAreaException("The address given is not valid!") + + self.__socket.send(Commands.POKE_16.value) + self.__socket.send(struct.pack(">II", address, value)) + + def poke32(self, address: int, value: int, skip_verification: bool = False) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(address, 8, skip_verification): raise InvalidMemoryAreaException("The address given is not valid!") + + self.__socket.send(Commands.POKE_32.value) + self.__socket.send(struct.pack(">II", address, value)) + + def seriaPoke(self, address_list: Union[list, tuple], value: int, skip_verification: bool = False) -> None: + for address in address_list: + self.poke32(address, value, skip_verification) + + def writeString(self, address: int, string: Union[str, bytes], skip_verification: bool = False): + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + if type(string) != bytes: string = bytes(string, "UTF-8") + if len(string) % 4: string += b"\x00" * (4 - len(string) % 4) + position = 0 + for i in range(int(len(string) / 4)): + self.poke32(address + position, struct.unpack(">I", string[position:position + 4])[0], skip_verification) + position += 4 + + def clearString(self, start_address: int, end_address: int, skip_verification: bool = False) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + length = end_address - start_address ; position = 0 + while position <= length: + self.poke32(start_address + position, 0x00000000, skip_verification) + position += 4 + + def readString(self, address: int, length: int, charset: str = "UTF-8", skip_verification: bool = False) -> str: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + string = self.read(address, length, skip_verification) + return string.decode(charset) + + def read(self, address: int, length: int = 4, skip_verification: bool = False) -> bytearray: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(address, length, skip_verification, "read"): raise InvalidMemoryAreaException("The address given is not valid!") + + if length == 0: raise InvalidLengthException("The length given is not valid!") + ret = b'' + + if length > 0x400: + for i in range(int(length / 0x400)): + ret += self.__read(address + i * 0x400, 0x400) + address += 0x400 ; length -= 0x400 + + if length != 0: + ret += self.__read(address, length) + else: + ret = self.__read(address, length) + + return ret + + def __read(self, address: int, length: int) -> bytearray: + self.__socket.send(Commands.READ_MEMORY.value) + self.__socket.send(struct.pack(">II", address, address + length)) + + status = self.__socket.recv(1) + if status == b'\xbd': + ret = self.__socket.recv(length) + elif status == b'\xb0': + ret = b'\x00' * length + else: + raise ReadMemoryException("Unable to read memory!") + + return ret + + def kernelWrite(self, address: int, value: int, skip_verification: bool = False) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(address, 4, skip_verification): raise InvalidMemoryAreaException("The address given is not valid!") + + self.__socket.send(Commands.KERNEL_WRITE.value) + self.__socket.send(struct.pack(">II", address, value)) + + def kernelRead(self, address: int, skip_verification: bool = False) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(address, 4, skip_verification, "read"): raise InvalidMemoryAreaException("The address given is not valid!") + + self.__socket.send(Commands.KERNEL_READ.value) + self.__socket.send(struct.pack(">I", address)) + + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def getServerStatus(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.SERVER_STATUS.value) + return int.from_bytes(self.__socket.recv(1), byteorder="big") + + def isConsolePaused(self) -> bool: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.IS_CONSOLE_PAUSED.value) + return bool(int.from_bytes(self.__socket.recv(1), byteorder="big")) + + def pauseConsole(self) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.PAUSE_CONSOLE.value) + + def resumeConsole(self) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.RESUME_CONSOLE.value) + + def getServerVersion(self) -> str: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.GET_SERVER_VERSION.value) + return self.__socket.recv(16).decode("UTF-8").replace("\n", "") + + def getOsVersion(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.GET_OS_VERSION.value) + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def getVersionHash(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.GET_VERSION_HASH.value) + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def getAccountID(self) -> str: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.ACCOUNT_IDENTIFIER.value) + return hex(int.from_bytes(self.__socket.recv(4), byteorder="big")).replace("0x", "") + + def getCodeHandlerAddress(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.GET_CODE_HANDLER_ADDRESS.value) + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def getDataBufferSize(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.GET_DATA_BUFFER_SIZE.value) + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def getTitleID(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + return self.call(self.getSymbol("coreinit.rpl", "OSGetTitleID"), recv = 8) + + def getSystemInformation(self) -> dict: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + ptr:int = self.call(self.getSymbol("coreinit.rpl", "OSGetSystemInfo")) + data = struct.unpack(">IIIIIII", self.read(ptr, 0x1c)) + + sysInformation = dict() + sysInformation["busClockSpeed"] = data[0] + sysInformation["coreClockSpeed"] = data[1] + sysInformation["timeBase"] = data[2] + sysInformation["L2Size"] = [data[3], data[4], data[5]] + sysInformation["cpuRatio"] = data[6] + + return sysInformation + + def getSymbol(self, rpl_name: str, symbol_name: str, data = 0) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + self.__socket.send(Commands.GET_SYMBOL.value) + + req = struct.pack(">II", 8, 8 + len(rpl_name) + 1) + req += rpl_name.encode("UTF-8") + b'\x00' + req += symbol_name.encode("UTF-8") + b'\x00' + + size = struct.pack(">B", len(req)) + data = struct.pack(">B", data) + + self.__socket.send(size) + self.__socket.send(req) + self.__socket.send(data) + + return struct.unpack(">I", self.__socket.recv(4))[0] + + def call(self, address: int, *args, recv: int = 4): + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + arguments = list(args) + if len(arguments) <= 8: + while len(arguments) != 8: + arguments.append(0) + + req = struct.pack(">I8I", address, *arguments) + self.__socket.send(Commands.REMOTE_PROCEDURE_CALL.value) + self.__socket.send(req) + + return struct.unpack('>Q', self.__socket.recv(8))[0] >> 32 * (recv == 4) + else: raise TooManyArgumentsException("Too many arguments!") + + def search(self, start_address: int, length: int, value: int, skip_verification: bool = False) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(start_address, length, skip_verification, "read"): raise InvalidMemoryAreaException("Invalid memory area!") + + self.__socket.send(Commands.MEMORY_SEARCH.value) + self.__socket.send(struct.pack(">III", start_address, value, length)) + + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def advancedSearch(self, start_address: int, length: int, value: int, kernel: int, limit: int, aligned: int = 1, skip_verification: bool = False) -> list[int]: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + if not Memory.isValidMemoryArea(start_address, length, skip_verification, "read"): raise InvalidMemoryAreaException("Invalid memory area!") + + self.__socket.send(Commands.ADVANCED_MEMORY_SEARCH.value) + + req_val = struct.pack(">I", value) + search_byte_count = len(req_val) + + req = struct.pack(">IIIIII", start_address, length, kernel, limit, aligned, search_byte_count) + self.__socket.send(req) + self.__socket.send(req_val) + + count = int.from_bytes(self.__socket.recv(4), byteorder="big") / 4 + foundOffsets = list() + for i in range(int(count)): + foundOffsets.append(int.from_bytes(self.__socket.recv(4), byteorder="big")) + return foundOffsets + + def getEntryPointAddress(self) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + self.__socket.send(Commands.GET_ENTRY_POINT_ADDRESS.value) + return int.from_bytes(self.__socket.recv(4), byteorder="big") + + def runKernelCopyService(self) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.RUN_KERNEL_COPY_SERVICE.value) + + def clearAssembly(self) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.CLEAR_ASSEMBLY.value) + + def executeAssembly(self, assembly: str) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.EXECUTE_ASSEMBLY.value) + self.__socket.send(assembly.encode("UTF-8")) + + def persistAssembly(self, assembly: str) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.__socket.send(Commands.PERSIST_ASSEMBLY.value) + self.__socket.send(assembly.encode("UTF-8")) + + def dump(self, start_address: int, end_address: int, skip_verification: bool = False) -> bytearray: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + return self.read(start_address, end_address - start_address, skip_verification) + + def allocateSystemMemory(self, size: int, alignment: int = 4) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + return self.call(self.getSymbol("coreinit.rpl", "OSAllocFromSystem"), size, alignment, recv = 4) + + def freeSystemMemory(self, address: int) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + self.call(self.getSymbol("coreinit.rpl", "OSFreeToSystem"), address) + + def malloc(self, size: int, alignment: int = 4) -> int: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + symbol = self.getSymbol("coreinit.rpl", "MEMAllocFromDefaultHeapEx", 1) + address = struct.unpack(">I", self.read(symbol, 4))[0] + return self.call(address, size, alignment) + + def free(self, address: int) -> None: + if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") + + symbol = self.getSymbol("coreinit.rpl", "MEMFreeToDefaultHeap", 1) + addr = struct.unpack(">I", self.read(symbol, 4))[0] + self.call(addr, address) + + def __upload(self, startAddress: int, data: bytes) -> None: + self.__socket.send(b'\x41') + req = struct.pack(">II",startAddress, startAddress+len(data)) + self.__socket.send(req) # first let the server know the length + self.__socket.send(data) # then send the data + + def upload(self, startAddress: int, data: bytes, debug_print:bool = False) -> None: + if self.connected: + length = len(data) + maxLength = self.getDataBufferSize() + if length > maxLength: + pos = 0 + if debug_print: print(f"length over {hex(maxLength)}\nuploading in blocks!") + for i in range(int(length/maxLength)): + self.__upload(startAddress, data[pos:pos+maxLength]) + pos += maxLength; length-=maxLength; startAddress+=maxLength + if length != 0: self.__upload(startAddress, data[pos:pos+length]) + else: self.__upload(startAddress, data) + else: raise Exception("No connection is in progress!") \ No newline at end of file diff --git a/ugecko/utils/Errors.py b/ugecko/utils/Errors.py new file mode 100644 index 0000000..8733b0e --- /dev/null +++ b/ugecko/utils/Errors.py @@ -0,0 +1,9 @@ +class NoIpEnteredException(Exception): pass +class InvalidIpAddressException(Exception): pass +class ConnectionIsAlreadyInProgressException(Exception): pass +class ConnectionIsNotInProgressException(Exception): pass +class ConnectionErrorException(Exception): pass +class InvalidMemoryAreaException(Exception): pass +class InvalidLengthException(Exception): pass +class ReadMemoryException(Exception): pass +class TooManyArgumentsException(Exception): pass \ No newline at end of file diff --git a/ugecko/utils/Memory.py b/ugecko/utils/Memory.py new file mode 100644 index 0000000..ef57b04 --- /dev/null +++ b/ugecko/utils/Memory.py @@ -0,0 +1,53 @@ + +class Memory: + def validRange(address: int, length: int) -> bool: + if 0x01000000 <= address and address + length <= 0x01800000: return True + elif 0x0E000000 <= address and address + length <= 0x10000000: return True + elif 0x10000000 <= address and address + length <= 0x50000000: return True + elif 0xE0000000 <= address and address + length <= 0xE4000000: return True + elif 0xE8000000 <= address and address + length <= 0xEA000000: return True + elif 0xF4000000 <= address and address + length <= 0xF6000000: return True + elif 0xF6000000 <= address and address + length <= 0xF6800000: return True + elif 0xF8000000 <= address and address + length <= 0xFB000000: return True + elif 0xFB000000 <= address and address + length <= 0xFB800000: return True + elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: return True + else: return False + + def validAccess(address: int, length: int, access: str) -> bool: + if 0x01000000 <= address and address + length <= 0x01800000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0x0E000000 <= address and address + length <= 0x10000000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0x10000000 <= address and address + length <= 0x50000000: + if access.lower() == "read" : return True + if access.lower() == "write": return True + elif 0xE0000000 <= address and address + length <= 0xE4000000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0xE8000000 <= address and address + length <= 0xEA000000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0xF4000000 <= address and address + length <= 0xF6000000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0xF6000000 <= address and address + length <= 0xF6800000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0xF8000000 <= address and address + length <= 0xFB000000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0xFB000000 <= address and address + length <= 0xFB800000: + if access.lower() == "read" : return True + if access.lower() == "write": return False + elif 0xFFFE0000 <= address and address + length <= 0xFFFFFFFF: + if access.lower() == "read" : return True + if access.lower() == "write": return True + else: return False + + def isValidMemoryArea(address: int, length: int, skip_verification: bool = False, mode: str = "write") -> bool: + if not skip_verification: + if not Memory.validRange(address, length): return False + if not Memory.validAccess(address, length, mode): return False + return True \ No newline at end of file diff --git a/ugecko/utils/Verification.py b/ugecko/utils/Verification.py new file mode 100644 index 0000000..3c37b63 --- /dev/null +++ b/ugecko/utils/Verification.py @@ -0,0 +1,9 @@ +import re + +def IP_Verification(ip: str) -> bool: + if not bool(re.compile(r'[^0-9.]').search(ip)): + ip_split = ip.split('.') + if len(ip_split) != 4: return False + try: return all(0 <= int(p) < 256 for p in ip_split) + except ValueError: return False + else: return False \ No newline at end of file From 6af290f173888257012fc72e725e396bee1e7627 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 12:06:58 +0100 Subject: [PATCH 53/68] Add files via upload --- docs/DOCUMENTATION.md | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 docs/DOCUMENTATION.md diff --git a/docs/DOCUMENTATION.md b/docs/DOCUMENTATION.md new file mode 100644 index 0000000..f7db4ec --- /dev/null +++ b/docs/DOCUMENTATION.md @@ -0,0 +1,52 @@ +# Documentation / uGecko +This file is intended to explain and show how to use the functions of ___uGecko___. + +| Name | Description | Example | Return | +|:----: |:-----------: |:-------: | :------:| +|uGecko| Used to initialize uGecko | `gecko = uGecko("192.168.1.102")` | None +|||| +|connect()|Allows you to connect to the WiiU.| `gecko.connect()`| None +|disconnect()|Allows you to disconnect to the WiiU.| `gecko.disconnect()`| None +|isConnected()|Allows to know if a connection is in progress or not.| `gecko.isConnected()`| Boolean +|||| +|poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None +|poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None +|poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None +|serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None +|kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None +|upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None +|||| +|read()| Allows to know what is the value of an address | `gecko.read(address, length)` | Bytearray +|kernelRead()| Reads a value to memory with Kernel Privileges | `gecko.kernelRead(address)`| Int +|||| +|writeString()| Allows you to write text in the ram | `gecko.writeString(address, "Hello World!")` | None +|readString() | Allows to read a string in the ram | `gecko.readString(address, length)` | String(UTF-8) +|clearString()| Allows you to delete text written in the ram | `gecko.clearString(startAddress, endAddress)` | None +|||| +| malloc | Allocates given size | `gecko.malloc(0x100)` | Int +| free | frees given address | `gecko.free(address)` | None +|||| +|isConsolePaused()|Allows to know if the console is paused or not|`gecko.isConsolePaused()`| Boolean +|pauseConsole()| Allows you to pause the console | `gecko.pauseConsole()` | None +|resumeConsole()| Allows you to resume the console | `gecko.resumeConsole()`| None +|||| +|getServerStatus()| Allows to know the status of the server | `gecko.getServerStatus()`| Int (0 or 1) +|getServerVersion()| Get the server version (TCPGecko version) | `gecko.getServerVersion()`| String +|getOsVersion()| Allows to get the version of the console | `gecko.getOsVersion()`| Int +|getVersionHash()| Allows to get the hash of the version | `gecko.getVersionHash()`| Int +|getAccountID()| Allows you to retrieve the identifier of the account currently connected to the console. | `gecko.getAccountID()`| String +|getCodeHandlerAddress()| Allows you to get the address of the code handler. | `gecko.getCodeHandlerAddress()`| Int +|getDataBufferSize()| return the Max size of the DataBuffer | `gecko.getDataBufferSize()`| Int +|getTitleID()| returns the current app titleID | `gecko.getTitleID()`| Int +|getEntryPointAddress()| returns the Entry point of the currently running app | `gecko.getEntryPointAddress()`| Int +|runKernelCopyService()| | `gecko.runKernelCopyService()`| None +|||| +|search()| Allows you to do a very simple search | `gecko.search(startAddress, value, length)`| Int +|advancedSearch()| Allows you to do more advanced searches. | `gecko.advancedSearch(start, length, value, kernel, limit, aligned = 1)`| Int Array +|||| +|getSymbol()| Allows you to get the address of a function on the console | `gecko.getSymbol(rplname, sysname, data = 0)`| Int (function pointer/function address) +|call()| Allows to execute functions on the console. Often used with getSymbol (see example) | `gecko.call(address, *args)`| It all depends on the function executed +|||| +|clearAssembly()| | `gecko.clearAssembly()`| None +|excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None +|persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file From 4ebd530f9c007aa6a752bbf526f5a750a0283064 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 12:07:37 +0100 Subject: [PATCH 54/68] Rename DOCUMENTATION.md to README.md --- docs/{DOCUMENTATION.md => README.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/{DOCUMENTATION.md => README.md} (98%) diff --git a/docs/DOCUMENTATION.md b/docs/README.md similarity index 98% rename from docs/DOCUMENTATION.md rename to docs/README.md index f7db4ec..5314f63 100644 --- a/docs/DOCUMENTATION.md +++ b/docs/README.md @@ -49,4 +49,4 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |||| |clearAssembly()| | `gecko.clearAssembly()`| None |excecuteAssembly()| executes parsed assembly | `gecko.excecuteAssembly(assembly)`| None -|persistAssembly()| | `gecko.persistAssembly(assembly)`| None \ No newline at end of file +|persistAssembly()| | `gecko.persistAssembly(assembly)`| None From 20d843e687ba417df8974906897e6ad4399bcc16 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 12:07:53 +0100 Subject: [PATCH 55/68] Update setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e8d9536..c83e9c2 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ url = "https://github.com/vincent-coding/uGecko", project_urls = { "Source Code": "https://github.com/vincent-coding/uGecko", - "Documentation": "https://github.com/vincent-coding/uGecko/docs", + "Documentation": "https://github.com/vincent-coding/uGecko/tree/master/docs", "Issue Tracker": "https://github.com/vincent-coding/uGecko/issues" }, version = "1.3.0", @@ -38,4 +38,4 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" ] -) \ No newline at end of file +) From 73d4af0fbb137e25b7f05458795e5092d4ca18b0 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 12:18:02 +0100 Subject: [PATCH 56/68] Update setup.py --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index c83e9c2..9d021d0 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,10 @@ from setuptools import setup requirements = [] +""" with open('requirements.txt') as f: requirements = f.read().splitlines() +""" readme = "" with open('README.md', 'r') as f: From 9aa4d95bf18310c8b77b5488dcac5e2d2204847a Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 12:31:20 +0100 Subject: [PATCH 57/68] Update uGecko.py --- ugecko/uGecko.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ugecko/uGecko.py b/ugecko/uGecko.py index c0fc4b7..e5db328 100644 --- a/ugecko/uGecko.py +++ b/ugecko/uGecko.py @@ -255,7 +255,7 @@ def search(self, start_address: int, length: int, value: int, skip_verification: return int.from_bytes(self.__socket.recv(4), byteorder="big") - def advancedSearch(self, start_address: int, length: int, value: int, kernel: int, limit: int, aligned: int = 1, skip_verification: bool = False) -> list[int]: + def advancedSearch(self, start_address: int, length: int, value: int, kernel: int, limit: int, aligned: int = 1, skip_verification: bool = False) -> list: if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") if not Memory.isValidMemoryArea(start_address, length, skip_verification, "read"): raise InvalidMemoryAreaException("Invalid memory area!") @@ -342,4 +342,4 @@ def upload(self, startAddress: int, data: bytes, debug_print:bool = False) -> No pos += maxLength; length-=maxLength; startAddress+=maxLength if length != 0: self.__upload(startAddress, data[pos:pos+length]) else: self.__upload(startAddress, data) - else: raise Exception("No connection is in progress!") \ No newline at end of file + else: raise Exception("No connection is in progress!") From 1ca2840cf6e048c8a15d5e79695b5ca333c78c97 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 12:38:52 +0100 Subject: [PATCH 58/68] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9d021d0..7871150 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ "Documentation": "https://github.com/vincent-coding/uGecko/tree/master/docs", "Issue Tracker": "https://github.com/vincent-coding/uGecko/issues" }, - version = "1.3.0", + version = "1.3.1", packages = packages, license = "MIT", description = "Python library for use with TCPGecko. Requires kernel exploit to use.", From c1720c91a34ddde1405e4bf0a2549907a1fd81ae Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 21 Dec 2021 16:58:13 +0100 Subject: [PATCH 59/68] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f8017b..3f8a53f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # uGecko Python library for use with TCPGecko. Requires kernel exploit to use. -All the library is contained in the file named uGecko.py (*WARNING: Tested on Python 3.8 to 3.9*). You can find examples in the folder `examples`. +(*WARNING: Tested on Python 3.8 to 3.9*).
+You can find examples in the folder `examples`. # Credits **NWPlayer123, wj44, and wiiudev** for [`pyGecko`](https://github.com/wiiudev/pyGecko)
**Chadderz and Marionumber1** for [`TCPGecko codehandler`](https://github.com/wiiudev/pyGecko/tree/master/codehandler)
**BullyWiiPlaza** for the current version of [`TCPGecko`](https://github.com/BullyWiiPlaza/tcpgecko/)
-**VCoding** for this modified version of `pyGecko`, specially designed for the [`TCPGecko version`](https://github.com/BullyWiiPlaza/tcpgecko/) of **BullyWiiPlaza**. \ No newline at end of file +**VCoding** for this modified version of `pyGecko`, specially designed for the [`TCPGecko version`](https://github.com/BullyWiiPlaza/tcpgecko/) of **BullyWiiPlaza**. From 0f3d16e7d20055ad13e20dec0337e3cca1787490 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 31 Dec 2021 12:13:19 +0100 Subject: [PATCH 60/68] uGecko 1.3.2 Fixed a crash when using the upload function --- setup.py | 2 +- ugecko/__init__.py | 2 +- ugecko/uGecko.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 7871150..77985f0 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ "Documentation": "https://github.com/vincent-coding/uGecko/tree/master/docs", "Issue Tracker": "https://github.com/vincent-coding/uGecko/issues" }, - version = "1.3.1", + version = "1.3.2", packages = packages, license = "MIT", description = "Python library for use with TCPGecko. Requires kernel exploit to use.", diff --git a/ugecko/__init__.py b/ugecko/__init__.py index 0f3a557..129401f 100644 --- a/ugecko/__init__.py +++ b/ugecko/__init__.py @@ -7,6 +7,6 @@ __author__ = "WiiuDev, VCoding" __license__ = "MIT" __copyright__ = "Copyright 2015-present wiiudev, 2021-present VCoding" -__version__ = "1.3.0" +__version__ = "1.3.2" from .uGecko import * \ No newline at end of file diff --git a/ugecko/uGecko.py b/ugecko/uGecko.py index e5db328..a0526cc 100644 --- a/ugecko/uGecko.py +++ b/ugecko/uGecko.py @@ -325,13 +325,13 @@ def free(self, address: int) -> None: self.call(addr, address) def __upload(self, startAddress: int, data: bytes) -> None: - self.__socket.send(b'\x41') + self.__socket.send(Commands.UPLOAD_MEMORY.value) req = struct.pack(">II",startAddress, startAddress+len(data)) self.__socket.send(req) # first let the server know the length self.__socket.send(data) # then send the data def upload(self, startAddress: int, data: bytes, debug_print:bool = False) -> None: - if self.connected: + if self.__connected: length = len(data) maxLength = self.getDataBufferSize() if length > maxLength: @@ -342,4 +342,4 @@ def upload(self, startAddress: int, data: bytes, debug_print:bool = False) -> No pos += maxLength; length-=maxLength; startAddress+=maxLength if length != 0: self.__upload(startAddress, data[pos:pos+length]) else: self.__upload(startAddress, data) - else: raise Exception("No connection is in progress!") + else: raise ConnectionIsNotInProgressException("No connection is in progress!") From af1b3d2334fa03db45cdac6d23dff971ce0b5eac Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 12:22:35 +0200 Subject: [PATCH 61/68] Fixed the "call" function that was crashing --- ugecko/uGecko.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ugecko/uGecko.py b/ugecko/uGecko.py index a0526cc..efbffff 100644 --- a/ugecko/uGecko.py +++ b/ugecko/uGecko.py @@ -231,7 +231,7 @@ def getSymbol(self, rpl_name: str, symbol_name: str, data = 0) -> int: return struct.unpack(">I", self.__socket.recv(4))[0] - def call(self, address: int, *args, recv: int = 4): + def call(self, address, *args, recv: int = 4): if not self.__connected: raise ConnectionIsNotInProgressException("No connection is in progress!") arguments = list(args) @@ -239,6 +239,7 @@ def call(self, address: int, *args, recv: int = 4): while len(arguments) != 8: arguments.append(0) + address = struct.unpack(">I", address)[0] req = struct.pack(">I8I", address, *arguments) self.__socket.send(Commands.REMOTE_PROCEDURE_CALL.value) self.__socket.send(req) From 5a8ac6cf3651f137cc439eedbab04850958293a5 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 12:25:14 +0200 Subject: [PATCH 62/68] Correction of a mistake Fixed a typo in the name of the "serialPoke" function --- ugecko/uGecko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ugecko/uGecko.py b/ugecko/uGecko.py index efbffff..46a40ee 100644 --- a/ugecko/uGecko.py +++ b/ugecko/uGecko.py @@ -69,7 +69,7 @@ def poke32(self, address: int, value: int, skip_verification: bool = False) -> N self.__socket.send(Commands.POKE_32.value) self.__socket.send(struct.pack(">II", address, value)) - def seriaPoke(self, address_list: Union[list, tuple], value: int, skip_verification: bool = False) -> None: + def serialPoke(self, address_list: Union[list, tuple], value: int, skip_verification: bool = False) -> None: for address in address_list: self.poke32(address, value, skip_verification) From bdfa2f15004f230aa5bbd27edee4b0b276ce2b35 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 12:26:14 +0200 Subject: [PATCH 63/68] Update __init__.py --- ugecko/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ugecko/__init__.py b/ugecko/__init__.py index 129401f..d7fce51 100644 --- a/ugecko/__init__.py +++ b/ugecko/__init__.py @@ -7,6 +7,6 @@ __author__ = "WiiuDev, VCoding" __license__ = "MIT" __copyright__ = "Copyright 2015-present wiiudev, 2021-present VCoding" -__version__ = "1.3.2" +__version__ = "1.3.3" -from .uGecko import * \ No newline at end of file +from .uGecko import * From 030dd65a3e6843f59f678522ecac46fd8c93ba64 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 12:26:32 +0200 Subject: [PATCH 64/68] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 77985f0..e2b3988 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ "Documentation": "https://github.com/vincent-coding/uGecko/tree/master/docs", "Issue Tracker": "https://github.com/vincent-coding/uGecko/issues" }, - version = "1.3.2", + version = "1.3.3", packages = packages, license = "MIT", description = "Python library for use with TCPGecko. Requires kernel exploit to use.", From 7436fe5a0324aacbb6826ac2099c3e36683380c5 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 13:25:36 +0200 Subject: [PATCH 65/68] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 3f8a53f..b8a44e6 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,20 @@ Python library for use with TCPGecko. Requires kernel exploit to use. (*WARNING: Tested on Python 3.8 to 3.9*).
You can find examples in the folder `examples`. +# Install +To install it you just have to do: +``` +python3 -m pip install uGecko +``` +But if you want to have all the functionality and those in advance, **it is recommended to run these commands**: +``` +git clone https://github.com/vincent-coding/uGecko && cd uGecko +``` +and +``` +python3 setup.py install +``` + # Credits **NWPlayer123, wj44, and wiiudev** for [`pyGecko`](https://github.com/wiiudev/pyGecko)
From 0cbd8c7aa910c3e1dd43b80a7c59966ab78a5e70 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 13:35:53 +0200 Subject: [PATCH 66/68] Create __init__.py --- ugecko/utils/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ugecko/utils/__init__.py diff --git a/ugecko/utils/__init__.py b/ugecko/utils/__init__.py new file mode 100644 index 0000000..c74050f --- /dev/null +++ b/ugecko/utils/__init__.py @@ -0,0 +1,4 @@ +""" + uGecko +Python library for use with TCPGecko. +""" From 83b79d8f7f2a87d28fcda4343cf194988a1da582 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 13:36:08 +0200 Subject: [PATCH 67/68] Create __init__.py --- ugecko/enums/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ugecko/enums/__init__.py diff --git a/ugecko/enums/__init__.py b/ugecko/enums/__init__.py new file mode 100644 index 0000000..c74050f --- /dev/null +++ b/ugecko/enums/__init__.py @@ -0,0 +1,4 @@ +""" + uGecko +Python library for use with TCPGecko. +""" From 07e3d63d5062e2f15d1f46956f559f53175e27a2 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 8 May 2022 17:22:58 +0200 Subject: [PATCH 68/68] Update README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 5314f63..1a70e44 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ This file is intended to explain and show how to use the functions of ___uGecko_ |poke8() |Allows to change the value in the ram|`gecko.poke8(address, 0x12)`| None |poke16()|Allows to change the value in the ram|`gecko.poke16(address, 0x1234)`| None |poke32()|Allows to change the value in the ram|`gecko.poke32(address, 0x12345678)`| None -|serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.poke32(addressTable, 0x3F800000)`| None +|serialPoke()|Allows to write a specific value on several addresses of the ram.|`gecko.serialPoke(addressTable, 0x3F800000)`| None |kernelWrite()| Writes a value to memory with Kernel Privileges | `gecko.kernelWrite(0x10000000, 0x00000000)`| None |upload()| lets u upload any amount of bytes into the specified memory address | `gecko.upload(startAddress, data)`| None ||||