Gallopsled/pwntools — pull request #168 by zachriggle (2014-11-08 20:31:47+00:00)
Title: Add checksec

Implement the relevant functionality of `checksec.sh`.

```sh
$ gcc -Wl,-z,relro,-z,now -Wl,-rpath $PWD ~/c/test.c -pie -fPIC -z execstack
$ upx -o bash /bin/bash
```

```python
from pwn import *
log.info(ELF('a.out').checksec())
log.info(ELF('bash').checksec())
log.info(ELF('/bin/bash').checksec())
```

![](http://i.imgur.com/C1n5THT.png)