From 6e429129171d0c22f0c283b686b0f8d4ead6715e Mon Sep 17 00:00:00 2001 From: Zaraki Date: Fri, 4 Oct 2019 16:41:48 +0200 Subject: [PATCH] fix: training-brute level update --- levels/web/training-brute/Dockerfile | 2 -- levels/web/training-brute/Makefile | 6 ------ levels/web/training-brute/docker-compose.yml | 11 +++++++---- levels/web/training-brute/front/Dockerfile | 3 +++ levels/web/training-brute/front/on-init | 3 +++ .../web/training-brute/{ => front}/www/design.css | 0 .../web/training-brute/{ => front}/www/index.php | 0 .../training-brute/{ => front}/www/source_0.txt | 0 .../training-brute/{ => front}/www/source_1.txt | 0 .../training-brute/{ => front}/www/source_2.txt | 0 levels/web/training-brute/level.yml | 14 -------------- levels/web/training-brute/php.ini | 1 - levels/web/training-brute/scripts/patch_level | 6 ------ 13 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 levels/web/training-brute/Dockerfile delete mode 100644 levels/web/training-brute/Makefile create mode 100644 levels/web/training-brute/front/Dockerfile create mode 100644 levels/web/training-brute/front/on-init rename levels/web/training-brute/{ => front}/www/design.css (100%) rename levels/web/training-brute/{ => front}/www/index.php (100%) rename levels/web/training-brute/{ => front}/www/source_0.txt (100%) rename levels/web/training-brute/{ => front}/www/source_1.txt (100%) rename levels/web/training-brute/{ => front}/www/source_2.txt (100%) delete mode 100644 levels/web/training-brute/level.yml delete mode 100644 levels/web/training-brute/php.ini delete mode 100755 levels/web/training-brute/scripts/patch_level diff --git a/levels/web/training-brute/Dockerfile b/levels/web/training-brute/Dockerfile deleted file mode 100644 index 22bb2aeb6..000000000 --- a/levels/web/training-brute/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM pathwar/apache-php:onbuild -MAINTAINER Pathwar Team (@pathwar_net) diff --git a/levels/web/training-brute/Makefile b/levels/web/training-brute/Makefile deleted file mode 100644 index 28cb08576..000000000 --- a/levels/web/training-brute/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -## Core (https://github.com/pathwar/core) -all: pathwar-level.mk -pathwar-level.mk: - wget -qO - https://raw.githubusercontent.com/pathwar/core/master/mk/install.sh | bash --include pathwar-level.mk -## Here you can add custom commands and overrides diff --git a/levels/web/training-brute/docker-compose.yml b/levels/web/training-brute/docker-compose.yml index 533c678dd..36b7e384c 100644 --- a/levels/web/training-brute/docker-compose.yml +++ b/levels/web/training-brute/docker-compose.yml @@ -1,4 +1,7 @@ -example: - build: . - ports: - - 80 +version: '3.7' + +services: + front: + build: front + ports: + - 80 diff --git a/levels/web/training-brute/front/Dockerfile b/levels/web/training-brute/front/Dockerfile new file mode 100644 index 000000000..028a7879b --- /dev/null +++ b/levels/web/training-brute/front/Dockerfile @@ -0,0 +1,3 @@ +FROM php:7.3-apache +COPY www/ /var/www/html/ +COPY on-init /pathwar-hooks/ diff --git a/levels/web/training-brute/front/on-init b/levels/web/training-brute/front/on-init new file mode 100644 index 000000000..716a6d446 --- /dev/null +++ b/levels/web/training-brute/front/on-init @@ -0,0 +1,3 @@ +#!/bin/sh -e + +sed -i "s/{passhphrase}/$(pwctl passphrase 0)/g" /var/www/html/index.php \ No newline at end of file diff --git a/levels/web/training-brute/www/design.css b/levels/web/training-brute/front/www/design.css similarity index 100% rename from levels/web/training-brute/www/design.css rename to levels/web/training-brute/front/www/design.css diff --git a/levels/web/training-brute/www/index.php b/levels/web/training-brute/front/www/index.php similarity index 100% rename from levels/web/training-brute/www/index.php rename to levels/web/training-brute/front/www/index.php diff --git a/levels/web/training-brute/www/source_0.txt b/levels/web/training-brute/front/www/source_0.txt similarity index 100% rename from levels/web/training-brute/www/source_0.txt rename to levels/web/training-brute/front/www/source_0.txt diff --git a/levels/web/training-brute/www/source_1.txt b/levels/web/training-brute/front/www/source_1.txt similarity index 100% rename from levels/web/training-brute/www/source_1.txt rename to levels/web/training-brute/front/www/source_1.txt diff --git a/levels/web/training-brute/www/source_2.txt b/levels/web/training-brute/front/www/source_2.txt similarity index 100% rename from levels/web/training-brute/www/source_2.txt rename to levels/web/training-brute/front/www/source_2.txt diff --git a/levels/web/training-brute/level.yml b/levels/web/training-brute/level.yml deleted file mode 100644 index 688ae5279..000000000 --- a/levels/web/training-brute/level.yml +++ /dev/null @@ -1,14 +0,0 @@ -level: - name: Level training bruteforce - version: 1.0 - author: Pathwar team - passphrases: 1 - description: This level will teach you how to bruteforce. - rootable: false - cpu_shares: 1/10 - memory_limit: 16M - tags: - - tutorial - - include - redump: 600 - lang: en diff --git a/levels/web/training-brute/php.ini b/levels/web/training-brute/php.ini deleted file mode 100644 index 8b1378917..000000000 --- a/levels/web/training-brute/php.ini +++ /dev/null @@ -1 +0,0 @@ - diff --git a/levels/web/training-brute/scripts/patch_level b/levels/web/training-brute/scripts/patch_level deleted file mode 100755 index ba90fede5..000000000 --- a/levels/web/training-brute/scripts/patch_level +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -. /pathwar/scripts/functions.sh - -sed -i "s/{passphrase}/$(get_passphrase 0)/" /var/www/html/index.php -