From 298e27445edbad06c5a8b7bc5f9097f0353693e8 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Tue, 4 Aug 2015 20:43:32 +1000 Subject: Fixed bug with ptunxor and added lookup 0xe5 Signed-off-by: Damien Zammit --- ptfformat.h | 9 +++++++-- ptunxor.cc | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ptfformat.h b/ptfformat.h index c33aa8a..8c31793 100644 --- a/ptfformat.h +++ b/ptfformat.h @@ -43,7 +43,7 @@ static const unsigned char ptflutseenwild[256] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, }; @@ -832,7 +832,12 @@ static const unsigned char ptflut[256][64] = { 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, }, /*e4 */ {}, -/*e5 */ {}, +/*e5 */ { + 1, 1, 3, 3, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 1, 1, + 3, 3, 1, 1, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 3, + 1, 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 1, 1, 3, + 3, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 1, 1, 3, 3, 1, + }, /*e6 */ {}, /*e7 */ { 3, 3, 1, 1, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 3, 1, diff --git a/ptunxor.cc b/ptunxor.cc index 5d70366..b541037 100644 --- a/ptunxor.cc +++ b/ptunxor.cc @@ -40,11 +40,13 @@ int main(int argc, char** argv) { for (i = 0; i < ptf.len; i++) { printf("%c", ptf.ptfunxored[i]); } + break; case 0x80: fprintf(stderr, "Success! easy two\n"); for (i = 0; i < ptf.len; i++) { printf("%c", ptf.ptfunxored[i]); } + break; case 0x40: case 0xc0: li = ptf.c1; -- cgit v1.2.3