New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

juice-shop-ctf-cli

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

juice-shop-ctf-cli

Command line client to generate INSERT statements for CTFd with the OWASP Juice Shop challenges

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
139
increased by57.95%
Maintainers
1
Weekly downloads
 
Created
Source

Juice Shop Logo OWASP Juice Shop CTF OWASP Labs GitHub release Twitter Follow

Build Status Coverage Status Dependency Status npm npm

The NPM package juice-shop-ctf-cli published from this repository lets you create a list of INSERT statements for the CTFd database that will populate the platform for a Capture the Flag event using OWASP Juice Shop.

Example of CLI usage

Installation

npm i -g juice-shop-ctf-cli

Usage

Open a command line and run:

juice-shop-ctf

Then simply follow the instructions of the command line tool. Finally, apply the generated insert-ctfd-challenges.sql following the steps described in the next section.

Setting up CTFd and populating its database
  1. Setup Docker host and Docker compose.

  2. Follow steps 2-4 from the CTFd Docker setup to download the source code, create containers and start them.

  3. After running docker-compose up from previous step, you should be able to browse to your CTFd instance UI (<<docker host IP>>:8000 by default) and create an admin user and CTF name.

  4. Once you have done this, run docker-compose down or use Ctrl-C to shut down CTFd. Note: Unlike a usual Docker container, data will persist even afterwards.

  5. Add the following section to the docker-compose.yml file and then run docker-compose up again:

    ports:
      - "3306:3306"
    
  6. You can then use your favourite MySQL client to connect to the CTFd database (default credentials are root with no password) and run the INSERT statement you created.

  7. When that is done, browse back to your CTFd instance UI and check everything has worked correctly.

  8. If everything has worked, do another docker-compose down, remove the ports section you added to docker-compose.yml and then do docker-compose up again and you are ready to go!

Alternative approach without node.js

  1. Download the GenerateCTFdInserts.html file.
  2. Open that file in your local browser and follow the instructions inside.

Troubleshooting Gitter

If you need help with the application setup please check the Troubleshooting section below or post your specific problem or question in the official Gitter Chat.

  • If using Docker Toolbox on Windows make sure that you also enable port forwarding for all required ports from Host 127.0.0.1:XXXX to 0.0.0.0:XXXX for TCP in the default VM's network adapter in VirtualBox. For CTFd you need ports 8000 permanantly and 3306 during setup.

Contributing GitHub contributors HuBoard

Found a bug? Got an idea for enhancement? Improvement for cheating prevention?

Feel free to create an issue or post your ideas in the chat! Pull requests are also highly welcome - please refer to CONTRIBUTING.md for details.

Donations

PayPal PayPal

PayPal donations via above button go to the OWASP Foundations and are earmarked for "Juice Shop". This is the preferred way to support the project.

Others

Flattr Gratipay

Bitcoin Dash Ether

Contributors

Ordered by date of first contribution. Auto-generated on Wed, 01 Feb 2017 20:01:35 GMT.

Licensing license

This program is free software: you can redistribute it and/or modify it under the terms of the MIT license. OWASP Juice Shop and any contributions are Copyright © by Bjoern Kimminich 2016-2017.

Juice Shop Logo

Keywords

FAQs

Package last updated on 22 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc