From 20e03f6e653205edbc893e259c4b2a192a2c6a2f Mon Sep 17 00:00:00 2001 From: firmianay Date: Fri, 8 Sep 2017 13:11:57 +0800 Subject: [PATCH] fix --- doc/2.2_gdb&peda.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/2.2_gdb&peda.md b/doc/2.2_gdb&peda.md index 9a88996..3b7ca16 100644 --- a/doc/2.2_gdb&peda.md +++ b/doc/2.2_gdb&peda.md @@ -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) ```