From: Michael Gernoth Date: Sat, 31 Jan 2009 13:11:10 +0000 (+0100) Subject: compressed main firmware now also gets extracted :-) X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/commitdiff_plain/f1fd0cb05e4ee07857ef2fd32131728739088b7f compressed main firmware now also gets extracted :-) this contains the missing parts of the puzzle --- diff --git a/rsb-lz.c b/rsb-lz.c index e009a4f..b624265 100644 --- a/rsb-lz.c +++ b/rsb-lz.c @@ -766,13 +766,20 @@ void search_lz_sections(unsigned char *fw, int len) for(i = 0; i < len - 4; i++) { if (*((unsigned int*)(fw+i)) == LZ_MAGIC) { j = fw + i - 1; - if (*j != 0x00) - continue; printf("0x%02x: ", i); j--; while (j > fw) { + if (!strncmp("SP3", (char*)j, 3)) { + unsigned char fname[5]; + + bzero(fname, sizeof(fname)); + memcpy(fname, j, 4); + printf("Firmware found: %s", fname); + extract_lz_file(fw + i, fname); + break; + } if (*j == 0x00) { - if ( *(j+1) != '/') { + if ((*(j+1) != '/')) { printf("ignoring...\n"); break; }