From 9f8b7929e09e45e1d0a4192603768b0763cfd879 Mon Sep 17 00:00:00 2001 From: nuoxoxo Date: Tue, 19 Nov 2024 09:07:16 +0000 Subject: [PATCH] show READMEs daily --- README.mdx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.mdx b/README.mdx index 2e308cf..a252d3e 100644 --- a/README.mdx +++ b/README.mdx @@ -721,7 +721,8 @@ Login 0000010: 4442 8344 757b 7f8c 890a DB.Du{.... ``` -Run it +Tryout + ```b > ./level09 token tpmhr @@ -743,23 +744,25 @@ zbd 👈 char = curr - i + 1 ``` Solution + - simple algo +- either p2 in vm: respect the syntax -- p2 in vm: respect the syntax ```b -# VM /tmp/decode.py +# /tmp/decode.py line = open('/home/user/level09/token').read().strip() print 'res/', ''.join(chr(ord(_) - i) for i, _ in enumerate(line)) ``` -- p3 in host: `scp` to host and decode there + +- or p3 in Host: `scp` the token first + ```b line = open(0, 'rb').read().strip() -print('res/', ''.join(chr(_ - i) for i, _ in enumerate(line))) -``` +Pprint('res/', ''.join(chr(_ - i) for i, _ in enumerate(line))) ``` -# HOST +```b > scp -P 4242 level09@$(ifconfig|grep 'inet '|awk 'NR==2 {print $2}'):/home/user/level09/token $(pwd) 25749xKZ8L7DkSCwJkT9dyv6f > chmod 777 token && p3 decode.py < token