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