cleanup
This commit is contained in:
12
2026/kalmar/misc/git-hoarder/handout/Dockerfile
Normal file
12
2026/kalmar/misc/git-hoarder/handout/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM archlinux:latest
|
||||
|
||||
RUN pacman --noconfirm -Sy socat python3 git
|
||||
|
||||
RUN mkdir /app
|
||||
COPY clone.py /app/clone.py
|
||||
COPY ./flag.txt /app/flag.txt
|
||||
RUN useradd -m -k user:user user
|
||||
USER user
|
||||
WORKDIR /tmp
|
||||
|
||||
CMD socat TCP-LISTEN:1337,reuseaddr,fork EXEC:"python3 /app/clone.py",stderr
|
||||
4
2026/kalmar/misc/git-hoarder/handout/clone.py
Normal file
4
2026/kalmar/misc/git-hoarder/handout/clone.py
Normal file
@@ -0,0 +1,4 @@
|
||||
import subprocess
|
||||
git_url = input('Git url to clone > ')
|
||||
subprocess.run(["git", "clone", git_url], capture_output=False)
|
||||
print('Done cloning!')
|
||||
5
2026/kalmar/misc/git-hoarder/handout/compose.yml
Normal file
5
2026/kalmar/misc/git-hoarder/handout/compose.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
githoarder:
|
||||
build: .
|
||||
ports:
|
||||
- 1444:1337
|
||||
1
2026/kalmar/misc/git-hoarder/handout/flag.txt
Normal file
1
2026/kalmar/misc/git-hoarder/handout/flag.txt
Normal file
@@ -0,0 +1 @@
|
||||
kalmar{test_flag}
|
||||
Reference in New Issue
Block a user