본문 바로가기

카테고리 없음

우분투 텍스트파일 색상 바꾸기

user@user-virtual-machine:~/5week_pwn/lib$ python3 tcache_poison.py
[+] Starting local process './tcache_poison': pid 5056
[*] '/home/dreamhack/tcache_poison'
    Arch:     amd64-64-little
    RELRO:    Full RELRO
    Stack:    No canary found
    NX:       NX enabled
    PIE:      No PIE (0x400000)
[*] Switching to interactive mode
 1. Allocate
2. Free
3. Print
4. Edit
$ 1
Size: $ 48
Content: $ dreamhack
1. Allocate
2. Free
3. Print
4. Edit
$ 1
Size: $ 48
[*]Got EOF while reading in interactive
$ 
[*] Process './tcache_poison' stopped with exit code -11 (SIGSEGV) (pid 5056)
[*] Got EOF while sending in interactive

요게 파일

sed -E 's#user@user-virtual-machine#\x1b[32m&\x1b[0m#g; s#~/5week_pwn/lib#\x1b[34m&\x1b[0m#g; s#[+*]#\x1b[34m&\x1b[0m#g; s#5056#\x1b[34m&\x1b[0m#g; s#No canary found#\x1b[31m&\x1b[0m#g; s#Full RELRO#\x1b[32m&\x1b[0m#g; s#NX enabled#\x1b[32m&\x1b[0m#g; s#No PIE \(0x400000\)#\x1b[31m&\x1b[0m#g; s#while#\x1b[31m&\x1b[0m#g; s#([^[:alnum:]]|^)\$#\1\x1b[31m&\x1b[0m#g;' color.txt

이게 명령어 ^^
 

감쪽같지여^^


sed -E 's/\b([1-4]|4043|640x400000|8)\.?\b|\+|\*|\./\x1b[34m&\x1b[0m/g; s/while/\x1b[31m&\x1b[0m/g' color.txt

얘도 갖고있음 좋을듯..