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 16, 2024
1 parent 8670cd3 commit 60f34cb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions level02/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
> scp -P 4242 level02@$(ifconfig|grep 'inet '|awk 'NR==2 {print $2}'):/home/user/level02/level02.pcap $(pwd)
```

- try inspecting the `.pcap`
- ❌ inspect the `.pcap`

```b
### Host
Expand All @@ -25,7 +25,7 @@
> xxd level02.pcap | cut -d ' ' -f2-9 | tr -d ' '
```

- use _Wireshark_
- use _Wireshark_
- _Analyze - Follow - TCP Stream_
- copy _`TCP Stream`_ to text

Expand Down Expand Up @@ -54,15 +54,21 @@
000000CD 0d .
```

- `7f` - DE
- `0d` - CR

```py
infile = [[n[-2], n[-1]] for n in [_.split() for _ in open(0).read().split('\n') if len(_.split()) == 3]]
res = ''
for i, line in enumerate(infile):
print('line/', line, 'i/', i)
l, r = line
if l == '7f': res = res[:-1]
elif r != '.': res += r
else: assert(l == '0d')
x, c = line
if x == '7f':
res = res[:-1]
elif c != '.':
res += c
else:
assert(x == '0d')
print('res/', res)

# ft_waNDReL0L
Expand Down

0 comments on commit 60f34cb

Please sign in to comment.