We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1af87d commit c5065d9Copy full SHA for c5065d9
infrastructure/kctf/base/challenge-skeleton/healthcheck/exploit/doit.py
@@ -1,10 +1,6 @@
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
-# without this pwntools throws an error
5
-import curses
6
-curses.setupterm('xterm-256color')
7
-
8
from pwn import *
9
10
exit(0)
infrastructure/kctf/base/challenge-skeleton/healthcheck/exploit/run.sh
@@ -7,10 +7,12 @@ PERIOD=30
while true; do
source /config/env
- if timeout "${TIMEOUT}" /exploit/doit.py; then
11
- echo 'ok' > /tmp/healthz
+ echo -n "[$(date)] "
+ if timeout "${TIMEOUT}" /exploit/doit.py NOTERM; then
12
+ echo 'ok' | tee /tmp/healthz
13
else
- echo 'err' > /tmp/healthz
14
+ echo -n "$? "
15
+ echo 'err' | tee /tmp/healthz
16
fi
17
sleep "${PERIOD}"
18
done
0 commit comments