Skip to content

NioZow/thehackerlibrary

Repository files navigation

TheHackerLibrary

TheHackerLibrary is a free, not sponsored library of hacking learning resources. The goal is to reference security posts so that it is easy for anyone to just dig dive into a topic without buying courses.

Showcase

Self-hosting

This project is live here, however you can easily self-host it too using docker.

The first step is to clone the git repository:

git clone https://github.com/niozow/thehackerlibrary.git
cd thehackerlibrary

Then copy the .env.example and change environment variable :

cp .env.example .env
cat .env
POSTGRES_USER="thehackerlibrary"
POSTGRES_PASSWORD="thehackerlibrary"
POSTGRES_DB="thehackerlibrary"
AUTH_URL="http://localhost:3000"
AUTH_SECRET=""
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""
  • AUTH_SECRET : Generate it using openssl rand -base64 32
  • AUTH_GITHUB_ID and AUTH_GITHUB_SECRET can be set by creating a new github OAuth app from the settings.
  • AUTH_URL must be the URL of the website.
  • POSTGRES_* should be information related to the postgres database.

Then you can launch the app using docker :

docker compose up -d

The database will be empty and uninitialised, you can use the following from thehackerlibrary.py to upload data and initialise it:

thehackerlibrary import ./data/

Contributing

All referenced posts are stored in the ./data directory in forms of YAML files. You can edit those YAML files to contribute to the project. However, as editing the YAML directly is tedious because of references, I suggest you edit those using thehackerlibrary.py. You can then make a Pull Request to contribute.

About

A library for hackers

Resources

License

Stars

Watchers

Forks

Languages