hugsy / gef

GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging capabilities for exploit devs & reverse engineers on Linux
https://hugsy.github.io/gef
MIT License
7.01k stars 738 forks source link

[Bug] Non printable chars near colored text! #1138

Closed blue-devil closed 2 months ago

blue-devil commented 2 months ago

GEF+GDB version

gef➤  version
GEF: (Standalone)
Blob Hash(/home/$USER/.gdbinit-gef.py): af6ee583e55f68084d817d401b4400aa03f5ac44
SHA256(/home/$USER/.gdbinit-gef.py): e70ca29853e17a6c982b5cf3a09329e1ff18f2161f4418370d5ab42b8feabb52
GDB: 11.2
GDB-Python: 3.11

Operating System

Ubuntu 16.04

Describe the issue you encountered

Hello; I have a Ubuntu 16.04 guest machine on vmware (my host is Windows 11). I am using Terminator but I have also tested on xfce-terminal I have installed needed nerd, patched and powerline fonts! I am using Hack Nerd Font Mono (I have also tried on Fira Nerde and Meslo Nerd fonts)

I have installed gef stated in the README manually. When I run a binary using gef I have this weird issue:

[ Legend: Modified register | Code | Heap | Stack | String ]
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────── registers ────
$rax   : 0x0000000000401c70  →  <main+0000> push rbp
$rbx   : 0x0               
$rcx   : 0x0               
$rdx   : 0x00007fffffffda48  →  0x00007fffffffded9  →  "XDG_SEAT=seat0"
$rsp   : 0x00007fffffffd900  →  0x00007ffff7ffe168  →  0x0000000000000000

For better Understanding I have included screenshots. (Those squares are actually '\x0001' and '\x0002' bytes)

MORE on that Xubuntu 16 comes with GDB7.11 and python2. So I also have tried gef legacy but the issue is still the same!

Do you read the docs and look at previously closed issues/PRs for similar cases?

No

Architecture impacted

Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.

  1. Bring up an Xubuntu 16.04 image(I am using it on vmware)
  2. install gef manually
  3. run gdb or gdb <binary-name>

Minimalist test case

No response

Additional context= Screenshots

01

02

03

BTW; as you can see in the last screenshot; I have given the command disas main and there is no problem in the colored output :/

hugsy commented 2 months ago

This seems to be coming from your terminal, not GEF. I'd recommand you try another terminal and make sure you're using UTF-8 charset.

blue-devil commented 2 months ago

True! It is not about gef; it is about the version of terminator. On Ubuntu 16.04 it is 0.91. This version does not support lots of things. I have used latest terminator version (v 2.1.4) without problem.

Thanks for your reply

close #1138