Skip to content

Commit

Permalink
Update README.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoxoxo authored Nov 19, 2024
1 parent 3354c12 commit 2aec0e0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions level09/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2aec0e0

Please sign in to comment.