Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 960 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 960 Bytes

Library of sample vulnerable APIs

Run locally

  1. 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
  2. Install dependencies pip3 install -r requirements.txt
  3. Go to settings.py file and change value of HOST from db to localhost
  4. Run migrate python3 manage.py migrate
  5. Start API server python3 manage.py runserver 0.0.0.0:80
  6. 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/'
  7. Verify by going to http://localhost/api/college/network-info

Run using Docker

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/'