diff --git a/README.md b/README.md index b2e62f531..ddb40655c 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Does most things that PEDA does. Doesn't do things that PEDA does that [pwntool Also has a basic windbg compat layer for e.g. `dd`, `eb`, `da`, `dps`. Now you can even [`eb eip 90`](https://twitter.com/ebeip90)! +For most standard function calls, it knows how many arguments there are and can print out the function call args. + ## Screenshots Here's a screenshot of `pwndbg` working on an aarch64 binary running under `qemu-user`. diff --git a/pwndbg/stdio.py b/pwndbg/stdio.py index 522d75794..a8e36bd8b 100644 --- a/pwndbg/stdio.py +++ b/pwndbg/stdio.py @@ -1,7 +1,10 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- """ Provides functionality to circumvent GDB's hooks on sys.stdin and sys.stdout which prevent output from appearing on-screen inside of certain event handlers. """ +import codecs import io import os import sys @@ -22,7 +25,7 @@ def get(fd, mode): return io.TextIOWrapper(file, **kw) else: - return open(fd, mode=mode) + return codecs.open(fd, mode, 'utf-8') class Stdio(object):