From 2aec0e0a12b316964a88d8f749f3d6e779e5540b Mon Sep 17 00:00:00 2001 From: "nuo.o" <49533950+nuoxoxo@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:04:20 +0100 Subject: [PATCH] Update README.mdx --- level09/README.mdx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/level09/README.mdx b/level09/README.mdx index a9f0740..b4538a1 100644 --- a/level09/README.mdx +++ b/level09/README.mdx @@ -37,17 +37,23 @@ zbd 👈 char = curr - i + 1 ``` -Simple algo +Solution +- simple algo -- p2: respect the syntax, write script in `vm/tmp/` +- p2 in vm: respect the syntax ```b +# VM /tmp/decode.py + line = open('/home/user/level09/token').read().strip() print 'res/', ''.join(chr(ord(_) - i) for i, _ in enumerate(line)) ``` -- p3: `scp` to host and decode there +- p3 in host: `scp` to host and decode there ```b line = open(0, 'rb').read().strip() print('res/', ''.join(chr(_ - i) for i, _ in enumerate(line))) +``` +``` +# HOST > scp -P 4242 level09@$(ifconfig|grep 'inet '|awk 'NR==2 {print $2}'):/home/user/level09/token $(pwd) 25749xKZ8L7DkSCwJkT9dyv6f