VIM plugin that helps to use pwntools quickly and easily.
vim-pwn detects python exploit scripts whose file extension is .pwn
$ vi test.pwn
vim-pwn also detects a python exploit script when the filename is exploit.py
or # exploit
is written in the last line of the python script even though the
file extension is .py
.
vim-pwn generates a template:
from pwn import *
# r = remote('X', X)
r = process([''])
, and cursor is automatically set to the argument of process
call.
If you don't want this template, put a following line to your .vimrc
:
let g:pwn_template = 0
- <leader>r : Execute the script (you can come back with
fg
command after finishing the execution) - <leader>b : Put
gdb.attach(r)
to the current line - <leader>p : Put
pause()
to the current line - <leader>s : Put
r.send()
to the next line, and set cursor to the argument - <leader>e : Put
res = r.recv()
to the next line, and set cursor to the argument - <leader>a : Put
res = r.recvuntil()
to the next line, and set cursor to the argument - <leader>g : Put
gdb.attach(r, ''' ''')
to the next line, and set cursor to the script argument - <leader>m : Comment the current line
- <leader>i : Find an assigned variable from the current line (e.g.
var
fromvar = 1234
), and putprint (var)
to the next line
In-Progress