Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[MASI] A PHP website to attack during a CTF.

Notifications You must be signed in to change notification settings

HunteRoi/pale-emploi-website

Repository files navigation

Pale Emploi Webiste

A PHP website with vulnerabilities to find in the context of a CTF at the Henallux.

Getting started

Prerequisites

To run the website, you need the following software:

Installation

  1. First, clone the repository.
git clone <repository-url>
  1. Then create a file named .env in the root folder of the project there with the following content:
MYSQL_ROOT_PASSWORD=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_PORT=
APACHE_PORT=
  1. Next step is to go into the src folder and create a file named config.ini with the following content:
db_host=
db_user=
db_password=
db_name=test
db_port=3306

There you are! Installation is ready to be used.

Development

For development, it is recommended to use the following command to run the website:

docker-compose up -d

Production

For production, it is recommended to use the following command to run the database:

docker-compose -f docker-compose.prod.yml up -d

You will also need to copy the content of the src folder into your web server folder (e.g. /var/www/html).

Structure

The website is divided in 3 parts:

  • database: contains the database and repositories to populate it
  • classes: contains the business objects
  • handlers: contains the handlers for the user actions (login, logout, register, etc.) - they are called by the pages and use the repositories and the business objects
  • pages: contains the pages of the website
  • partials: contains the reusable components of the website

The pages are architectured as follow:

The reusable components are architectured as follow:

About

[MASI] A PHP website to attack during a CTF.

Topics

Resources

Stars

Watchers

Forks