Skip to content

Commit

Permalink
add a pty for kctf vrp
Browse files Browse the repository at this point in the history
  • Loading branch information
sroettger committed Mar 29, 2021
1 parent 5dcf4a3 commit 99537d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vrp/level1/challenge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ CMD kctf_setup && \
kctf_drop_privs \
socat \
TCP-LISTEN:1337,reuseaddr,fork \
EXEC:"kctf_pow nsjail --config /home/user/nsjail.cfg -- /home/user/chal"
EXEC:"kctf_pow nsjail --config /home/user/nsjail.cfg -- /home/user/chal",pty,stderr,setsid,sigint,sane
1 change: 1 addition & 0 deletions vrp/level1/challenge/nsjail.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rlimit_as_type: HARD
rlimit_nofile_type: HARD
rlimit_nproc_type: HARD
rlimit_cpu: 30
skip_setsid: true
max_cpus: 1
mount: [
{
Expand Down
2 changes: 1 addition & 1 deletion vrp/level1/healthcheck/doit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def handle_pow(r):
p = pwnlib.tubes.process.process(['kctf_bypass_pow', challenge])
solution = p.readall().strip()
r.sendline(solution)
print(r.recvuntil(b'Correct\n'))
print(r.recvuntil(b'Correct'))

r = pwnlib.tubes.remote.remote('127.0.0.1', 1337)
print(r.recvuntil('== proof-of-work: '))
Expand Down

0 comments on commit 99537d5

Please sign in to comment.