summaryrefslogtreecommitdiffstats
path: root/iv/oc_challs/ov/makefile
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-10-14 16:46:20 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-10-14 16:46:20 +0200
commit65929200e4f62298d15996a9b3bd234b30dffaff (patch)
tree8469255e064d24b25f4bb6cd5c226bc0309b2f64 /iv/oc_challs/ov/makefile
parentšola (diff)
downloadr-65929200e4f62298d15996a9b3bd234b30dffaff.tar
r-65929200e4f62298d15996a9b3bd234b30dffaff.tar.gz
r-65929200e4f62298d15996a9b3bd234b30dffaff.tar.bz2
r-65929200e4f62298d15996a9b3bd234b30dffaff.tar.lz
r-65929200e4f62298d15996a9b3bd234b30dffaff.tar.xz
r-65929200e4f62298d15996a9b3bd234b30dffaff.tar.zst
r-65929200e4f62298d15996a9b3bd234b30dffaff.zip
Diffstat (limited to 'iv/oc_challs/ov/makefile')
-rw-r--r--iv/oc_challs/ov/makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/iv/oc_challs/ov/makefile b/iv/oc_challs/ov/makefile
new file mode 100644
index 0000000..f3690f4
--- /dev/null
+++ b/iv/oc_challs/ov/makefile
@@ -0,0 +1,21 @@
+default: 1bitvm.tar.gz run
+
+server.out: 1bitvm server.asm
+ 1bitvm/asm.py -d server.asm 2>&1 > asm.log
+
+server.asm: server.php index.html hi.html
+ ./server.php > $@
+
+run: server.out
+ socat TCP6-LISTEN:6844,fork,reuseaddr 'exec:1bitvm/main.py server.out'
+
+1bitvm:
+ git clone https://ass.si/git/adrian/1bitvm
+
+clean:
+ rm -fr `cat .gitignore`
+
+1bitvm.tar.gz: server.out docker-compose.yml Dockerfile
+ f=`grep -o cnctf{.*} docker-compose.yml` && sed -i s/$$f/cnctf{placeholder}/ docker-compose.yml && cd .. && tar --exclude *README.md --exclude *challenge.yml --exclude *1bitvm.tar.gz -zc `rev <<<$$OLDPWD | cut -d/ -f1 | rev` | sponge $$OLDPWD/1bitvm.tar.gz; cd $$OLDPWD; sed -i s/cnctf{placeholder}/$$f/ docker-compose.yml
+
+.PHONY: default clean run