-
[Pwn] WSL2 gdb attatch / Windows Terminal로 화면 분할Notepad/Pwnable 2025. 3. 31. 14:22
pwntools로 디버깅 할 때 새로 열리는 창을 windows terminal로 분할하게 하는 방법
from pwn import * p = process("") gdb.attach(p) pause() p.interactive()
이렇게 코드내에서 gdb.attach를 사용할 때 windows 티미널로 분할하는 방법입니다.
vi ~/.pwn.conf
[context] terminal = ["/mnt/c/Windows/system32/cmd.exe", "/c", "start", "wt.exe", "-w", "0", "split-pane", "-d", ".", "wsl.exe", "-d", "Ubuntu", "bash", "-c"]
이렇게 써주면 gdt.attach() 할 때 WIndows Terminal을 통해 자동으로 창 분할이 됩니다.
ALT + 방향키를 통해 이동할 수 있습니다.
ALT + SHIFT + 방향키 : 창 크기 조절
'Notepad > Pwnable' 카테고리의 다른 글
[Pwnable] pwntools로 libc 연결 (0) 2021.11.25 [Pwnable] jmp, call 차이 (RTL chaning할 때 RET) (2) 2021.11.03 [Pwnable] stdin, stodout offset (pwntools) (0) 2021.10.25 [Pwnable] Generate prompt in Reverse shell with python (0) 2021.08.19 [Pwnable] Generate shellcode with gdb-peda (0) 2021.08.18