OpenToAllCTF / pwnvm

Setup for a pwning VM
60 stars 19 forks source link

Wrong encoding causes pwndbg to crash #6

Open Corb3nik opened 7 years ago

Corb3nik commented 7 years ago

With a fresh installation of pwnvm :

  1. Run the /home/vagrant/tools/pwndbg/setup.sh script.
  2. Remove Voltron from ~/.gdbinit
  3. Open gdb

I obtain the following error message :

➜  ~ gdb
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
******
Your encoding (ISO-8859-1) is different than UTF-8. pwndbg might not work properly.
You might try launching gdb with:
    LC_ALL=en_US.UTF-8 PYTHONIOENCODING=UTF-8 gdb
Make sure that en_US.UTF-8 is activated in /etc/locale.gen and you called locale-gen
******
Traceback (most recent call last):
  File "/home/vagrant/tools/pwndbg/gdbinit.py", line 36, in <module>
    import pwndbg # isort:skip
  File "/home/vagrant/tools/pwndbg/pwndbg/__init__.py", line 15, in <module>

Running gdb with LC_ALL=en_US.UTF-8 PYTHONIOENCODING=UTF-8 gdb fixes the issue.

Is there a reason for using ISO-8859-1 instead of UTF-8 by default? If not, I'll suggest a fix in a PR.

dreyes15 commented 5 years ago

This appears to still be an issue. Is there a fix by any chance?

Grazfather commented 5 years ago

Try this: https://github.com/OpenToAllCTF/pwnvm/pull/7