diff --git a/run-offline/vim_and_cats/Dockerfile b/run-offline/vim_and_cats/Dockerfile new file mode 100644 index 0000000..edfc130 --- /dev/null +++ b/run-offline/vim_and_cats/Dockerfile @@ -0,0 +1,27 @@ +FROM python:3.9.16-slim-buster + +RUN pip3 install flask +RUN apt update +RUN apt install -y gcc +ENV FLASK_DEBUG=1 + +RUN mkdir /srv/cats +RUN useradd www +RUN echo "p455w0rd_v3ry_57r0n9_f0r_www-d4t4\np455w0rd_v3ry_57r0n9_f0r_www-d4t4" | passwd www +COPY vim_cats.png /srv/cats/vim_cats.png +COPY cats_gifs/* /srv/cats/ +COPY index.html /srv/index.html +COPY .index.html.swp /srv/.index.html.swp +COPY server.py /srv/server.py +RUN chmod 777 /srv/* -R +COPY cat_status.c /opt/cat_status.c +RUN gcc /opt/cat_status.c -o /opt/cat_status +RUN chmod a+rx-w /opt/cat_status +RUN chmod u+s /opt/cat_status +COPY status.txt /opt/status.txt +RUN chmod 444 /opt/status.txt +COPY stage1 /stage1 +COPY stage3 /you-done-this-stage3 +COPY stage4 /root/stage4 +WORKDIR /srv/ +CMD su www -c 'export FLASK_DEBUG=1; python3 -m flask --app server run --host 0.0.0.0' diff --git a/run-offline/vim_and_cats/cat_status.c b/run-offline/vim_and_cats/cat_status.c new file mode 100644 index 0000000..9e7abf8 --- /dev/null +++ b/run-offline/vim_and_cats/cat_status.c @@ -0,0 +1,9 @@ +#include +#include + +int main() { + setuid(0); + setgid(0); + puts("status.txt contains status. Here it is:"); + int result=system("cat status.txt"); +} diff --git a/run-offline/vim_and_cats/cats_gifs/Гифка 5.MP4 b/run-offline/vim_and_cats/cats_gifs/Гифка 5.MP4 new file mode 100644 index 0000000..c03f8a3 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/Гифка 5.MP4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 1.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 1.mp4 new file mode 100644 index 0000000..f79ff1c Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 1.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 10.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 10.mp4 new file mode 100644 index 0000000..603c459 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 10.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 11.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 11.mp4 new file mode 100644 index 0000000..f1722a1 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 11.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 12.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 12.mp4 new file mode 100644 index 0000000..3076652 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 12.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 13.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 13.mp4 new file mode 100644 index 0000000..60525bc Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 13.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 14.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 14.mp4 new file mode 100644 index 0000000..e80e093 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 14.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 15.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 15.mp4 new file mode 100644 index 0000000..e9b4de1 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 15.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 16.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 16.mp4 new file mode 100644 index 0000000..77008a4 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 16.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 17.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 17.mp4 new file mode 100644 index 0000000..931c4e1 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 17.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 18.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 18.mp4 new file mode 100644 index 0000000..58deafa Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 18.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 19.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 19.mp4 new file mode 100644 index 0000000..9eb5397 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 19.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 2.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 2.mp4 new file mode 100644 index 0000000..cd6caf1 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 2.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 20.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 20.mp4 new file mode 100644 index 0000000..9d25d7b Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 20.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 3.MP4 b/run-offline/vim_and_cats/cats_gifs/гифка 3.MP4 new file mode 100644 index 0000000..b5bb6cb Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 3.MP4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 4.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 4.mp4 new file mode 100644 index 0000000..5152dbb Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 4.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 6.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 6.mp4 new file mode 100644 index 0000000..d636540 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 6.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 7.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 7.mp4 new file mode 100644 index 0000000..2804f95 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 7.mp4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 8.MP4 b/run-offline/vim_and_cats/cats_gifs/гифка 8.MP4 new file mode 100644 index 0000000..d3b354e Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 8.MP4 differ diff --git a/run-offline/vim_and_cats/cats_gifs/гифка 9.mp4 b/run-offline/vim_and_cats/cats_gifs/гифка 9.mp4 new file mode 100644 index 0000000..8e53c94 Binary files /dev/null and b/run-offline/vim_and_cats/cats_gifs/гифка 9.mp4 differ diff --git a/run-offline/vim_and_cats/docker-compose.yml b/run-offline/vim_and_cats/docker-compose.yml new file mode 100644 index 0000000..a107bea --- /dev/null +++ b/run-offline/vim_and_cats/docker-compose.yml @@ -0,0 +1,7 @@ +services: + test: + build: . + image: test + container_name: test + ports: + - 5000:5000 diff --git a/run-offline/vim_and_cats/index.html b/run-offline/vim_and_cats/index.html new file mode 100644 index 0000000..173190e --- /dev/null +++ b/run-offline/vim_and_cats/index.html @@ -0,0 +1,53 @@ + + + + + +

VIM and cats site

+ +
+ Press left and right arrows to view all gifs +
+