Skip to content

Commit

Permalink
Update readme, added gitignore and vagrant file :shipit:
Browse files Browse the repository at this point in the history
  • Loading branch information
jhenson committed Apr 27, 2017
1 parent 05158b4 commit fb4d72d
Show file tree
Hide file tree
Showing 3 changed files with 242 additions and 40 deletions.
122 changes: 122 additions & 0 deletions .gitignore
@@ -0,0 +1,122 @@

# Created by https://www.gitignore.io/api/linux,python,vagrant

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

### Vagrant ###
.vagrant/

# End of https://www.gitignore.io/api/linux,python,vagrant
82 changes: 42 additions & 40 deletions README.rst
Expand Up @@ -3,14 +3,17 @@ HBCTF

.. image:: https://travis-ci.org/osteth/HBCTF.svg?branch=master
:target: https://travis-ci.org/osteth/HBCTF

.. image:: https://coveralls.io/repos/github/osteth/HBCTF/badge.svg
:target: https://coveralls.io/github/osteth/HBCTF

A hybrid CTF game, combining a dev-ops service hack and patch, jeopardy style flags, and an explorable battfield were players go head to head to control strategic network nodes.
A hybrid CTF game, combining a dev-ops service hack and patch, jeopardy style flags, and an explorable battfield were players go head to head to control strategic network nodes.

.. image:: http://www.hackbama.com/wp-content/uploads/2017/03/Hackbama_Logo-enc-400x400.png

.. contents:: **Table of Contents**
:backlinks: none

Quick start
-------------------------

Expand All @@ -19,8 +22,8 @@ a virtual environment. Clone the repo.

.. code-block:: console
git clone https://github.com/mapbox/HBCTF myproject
cd HBCTF
git clone https://github.com/osteth/HBCTF myproject
cd myproject
Then install in locally editable (``-e``) mode and run the tests.

Expand All @@ -43,54 +46,53 @@ Finally, give the command line game control program a try.
Services API explaination
Services API explaination
--------

# Checkin --> Token Decryption --> ScoreTokentSubmit

## Checkin
Player checks into the game server and submits to the server the ip address and port their service is running on. The server responds out to the player with key and an encrypted score token that the player can decrypt and submit to recieve points.
# Player Actions
* Checkin with IP and port they are running their service on.
* Accept tokens and dectypts them
* Submit decrypted tokens back to the server decrypted.
# Server Actions
* Recieve checkin information and store it in DB.
* Pass out tokens every 5 minuts.
* Recieve decrypted tokens and register scores.

## ScoreTokentSubmit
Player submits the decrypted token back to the server to gain their points.

# CLI options
## Start
Starts the api server
### -flags
-p Specify a port for the service to run on.

## Stop
stops the API server

## Status
displays the server
Checkin --> Token Decryption --> ScoreTokentSubmit

Checkin
------
Player checks into the game server and submits to the server the ip address and port their service is running on. The server responds out to the player with key and an encrypted score token that the player can decrypt and submit to recieve points.

* Player Actions
* Checkin with IP and port they are running their service on.
* Accept tokens and dectypts them
* Submit decrypted tokens back to the server decrypted.
* Server Actions
* Recieve checkin information and store it in DB.
* Pass out tokens every 5 minuts.
* Recieve decrypted tokens and register scores.

ScoreTokentSubmit
--------
Player submits the decrypted token back to the server to gain their points.
* CLI options
* Start, Starts the api server
* -flags
* -p Specify a port for the service to run on.
* Stop, Stops the API server
* Status, displays the server

Dev Roadmap
---
-----
* Services API -> unit tests -> documentation.
* Game Control CLI -> unit tests -> documentation.
* Expad API for jeopardy stype flags -> unit tests -> documentation.
* Jeopardy style scoreboard -> unit tests -> recustomization pipeline-> documentation.
* Expand API for battleground features -> unit tests -> documentation.
* Build battleground VM's -> Network VM's -> Seutup High Value Nodes and hook them to API -> Recustomization Pipeline -> documentation.

Dev Notes:
---
------
To help prevent uncustomized forks of HBCTF from being uploaded to PyPI,
I've configured the setup's upload command to dry run. Make sure to remove
this configuration from
`setup.cfg <https://docs.python.org/2/install/index.html#inst-config-syntax>`__
when you customize HBCTF.
logging
isatty
colrama
progressbar (progressbar2)


* logging
* isatty
* colrama
* progressbar (progressbar2)

78 changes: 78 additions & 0 deletions Vagrantfile
@@ -0,0 +1,78 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "bento/ubuntu-16.04"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080

#API Game
config.vm.network "forwarded_port", guest: 5001, host: 5001

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get install -y python3-pip
cd /vagrant/
sudo pip3 install -e .[tests]
SHELL
end

0 comments on commit fb4d72d

Please sign in to comment.