Library of sample vulnerable APIs
- Start Postgres db:
docker run --name postgres-container --restart always -v ./data/db:/var/lib/postgresql/data/ -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 postgres:latest
- Install dependencies
pip3 install -r requirements.txt
- Go to settings.py file and change value of
HOST
fromdb
tolocalhost
- Run migrate
python3 manage.py migrate
- Start API server
python3 manage.py runserver 0.0.0.0:80
- Insert data in db. You have to run this command each time you change sampleapidata.json
curl --location --request POST 'http://127.0.0.1:80/api/insert_data/'
- Verify by going to http://localhost/api/college/network-info
docker-compose up -d
docker-compose exec vulservice python manage.py migrate
curl --location --request POST 'http://127.0.0.1:8000/api/insert_data/'