Clone project.
- git clone https://github.com/trirpi/hkjl-metapeen
- cd hkjl-metapeen
Create virtual evironment.
- virtualenv -p python3 metapeen
- source metapeen/bin/activate
Install dependencies.
- pip install -r requirements.txt
Set mode to development or production. (if you don't do this, it will default to development)
- export FLASK_CONFIG=development
Create database and admin.
- python manage.py setup
Start Flask.
- python run.py
ht = {
'username': 'fgt123',
'hts_password': 'okeisgoed'
}
There are two main parts:
- The website (hkjl-metapeen/peen)
- The crawler (hkjl-metapeen/crawler)
The website has an index page where all the scores are listed. And there is an admin interface. The scores are fetched from a sqlite db (this can become redis or something other later). The db has 3 tables:
- Hacker: users with there scores and usernames of ctf sites
- User: an admin user (or maybe more then one)
- Account: account of hackers (specific site, current score, specific username)
Currently shows exactly what is in the db.
Currently lists all hackers
/api/user/<id>
returns user
/api/users
returns list of all users
This updates all the scores of the users. Should be ran by cron every hour or so. I am working on this.
More info: https://pad.hackenkunjeleren.nl/p/hkjl-metapeen-clone