mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2024-12-24 19:21:15 +07:00
fix
This commit is contained in:
parent
9298ad049d
commit
20e03f6e65
@ -229,11 +229,11 @@ $ yaourt -S peda
|
||||
- `assemble` -- On the fly assemble and execute instructions using NASM
|
||||
- `assemble`
|
||||
- ```
|
||||
assemble $pc
|
||||
> mov al, 0xb
|
||||
> int 0x80
|
||||
> end
|
||||
```
|
||||
assemble $pc
|
||||
> mov al, 0xb
|
||||
> int 0x80
|
||||
> end
|
||||
```
|
||||
- **`checksec`** -- 检查二进制文件的安全选项
|
||||
- `cmpmem` -- Compare content of a memory region with a file
|
||||
- `cmpmem 0x08049000 0x0804a000 data.mem`
|
||||
@ -425,16 +425,16 @@ $ yaourt -S peda
|
||||
```
|
||||
- 外部脚本
|
||||
- ```
|
||||
# myscript.py
|
||||
def myrun(size):
|
||||
argv = cyclic_pattern(size)
|
||||
peda.execute("set arg %s" % argv)
|
||||
peda.execute("run")
|
||||
```
|
||||
```
|
||||
gdb-peda$ source myscript.py
|
||||
gdb-peda$ python myrun(100)
|
||||
```
|
||||
# myscript.py
|
||||
def myrun(size):
|
||||
argv = cyclic_pattern(size)
|
||||
peda.execute("set arg %s" % argv)
|
||||
peda.execute("run")
|
||||
```
|
||||
```
|
||||
gdb-peda$ source myscript.py
|
||||
gdb-peda$ python myrun(100)
|
||||
```
|
||||
|
||||
下面我们通过一道 CTF 题目来练习一下 PEDA 脚本的编写:[asis-ctf-quals-2014 serial-number re-300](../src/Reverse/2.2_serial_number_300)
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user