완료됨
pwndbg 에러

Python Exception <class 'AttributeError'> partially initialized module 'pwndbg' has no attribute 'lib' (most likely due to a circular import):
이런 에러가 나면서 프로그램을 디버깅할 때 레지스터/스택 등의 정보가 표시되지 않습니다 ㅠㅠ 도와주세요!

#시스템해킹 #툴 #gdb
작성자 정보
더 깊이 있는 답변이 필요할 때
드림핵 팀과 멘토에게 직접 문의해 보세요!
답변 2
avatar
이찬형
Dreamhack CTF S3 Ⅵ - Div2 참여

오류가 발생할 때 해결 방법은

  1. 해당 오류를 구글에 검색해 본다. 검색해 보니 이 블로그가 참고할 만한 것 같습니다. https://acton21.tistory.com/13
  2. pwndbg 설치하는 방법을 구글에 검색해서 재설치해 본다.

등이 있을 것 같습니다.

2023.06.25. 23:34
wy
대표 업적 없음

저의 경우는 gdb 를 실행했을 때 아래와 같은 에러가 먼저 나왔습니다.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
pwndbg: loaded 146 pwndbg commands and 38 shell commands. Type pwndbg [--shell | --all] [filter] for a list.
pwndbg: created $rebase, $ida GDB functions (can be used with print/break)
Traceback (most recent call last):
  File "/root/pwndbg/gdbinit.py", line 66, in <module>
    import pwndbg  # noqa: F401
  File "/root/pwndbg/pwndbg/__init__.py", line 86, in <module>
    config_mod.init_params()
  File "/root/pwndbg/pwndbg/gdblib/config.py", line 159, in init_params
    Parameter(p)
  File "/root/pwndbg/pwndbg/gdblib/config.py", line 45, in __init__
    self.value = param.value
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

그리고 얘기하신 현상과 비슷한 exception 이 발생했구요.

pwndbg> entry
warning: Error disabling address space randomization: Operation not permitted
Python Exception <class 'AttributeError'> module 'pwndbg' has no attribute 'lib': 
Python Exception <class 'AttributeError'> module 'pwndbg' has no attribute 'lib': 
Python Exception <class 'AttributeError'> module 'pwndbg' has no attribute 'lib': 
Python Exception <class 'AttributeError'> module 'pwndbg' has no attribute 'lib': 
Python Exception <class 'AttributeError'> module 'pwndbg' has no attribute 'lib': 

위 모든 증상은 아래 명령 실행 후 없어졌습니다.

export LANG=C.UTF-8

위 현상과 다른 문제일 수 있지만, 저와 같은 상황이 있을까봐 적었습니다.

2023.07.20. 15:04