-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from wroersma/0.1
0.1
- Loading branch information
Showing
19 changed files
with
1,283 additions
and
1,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CTFd multianswer plugin | ||
https://github.com/wroersma/ctfd-multi-answer | ||
|
||
multianswer plugin is developed by (in alphabetical order): | ||
|
||
* Wyatt Roersma ([email protected]) | ||
|
||
To contact the Authors please feel free to email them or join the slack chat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,17 @@ This plugin allows you to create challenges that give players points by awards f | |
Clone multianswer from the dir /CTFd/plugins/ | ||
|
||
|
||
#How to use | ||
Go to challenges to create a challenge | ||
Create a new challenge | ||
- from the drop down select multianswer | ||
|
||
* Please note that the value you select is what will be added for correct answers and reduced from the players score for anything that matches wrong answers | ||
|
||
For correct answers use the the "correct" key | ||
For wrong answers use the "wrong" key | ||
|
||
|
||
#Questions | ||
|
||
If you have any questions please contact Wyatt Roersma([email protected]) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = '0.1' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<label for="create-key-correct" class="control-label">Enter correct Key Data</label> | ||
<input type="text" id="create-key-correct" class="form-control" name="key" value="{{key}}" placeholder="Enter correct key data"> | ||
<input type="text" id="create-value-correct" class="form-control" name="data" value="{{data}}" placeholder="Enter correct point value"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<label for="create-key-wrong" class="control-label">Enter Wrong Key Data</label> | ||
<input type="text" id="create-key-wrong" class="form-control" name="key" value="{{key}}" placeholder="Enter wrong key data"> | ||
<input type="text" id="create-value-wrong" class="form-control" name="data" value="{{data}}" placeholder="Enter wrong point value"> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header text-center"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<h3 class="text-center">Correct Key</h3> | ||
</div> | ||
</div> | ||
</div> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body"> | ||
<form method="POST" action="{{ script_root }}/admin/keys/{{id}}"> | ||
<input type="text" id="key-data" class="form-control" name="key" value="{{key}}" placeholder="Enter correct key data"> | ||
<input type="text" id="key-value" class="form-control" name="pointvalue" value="{{pointvalue}}" placeholder="Enter correct point value"> | ||
<input type="hidden" id="key-type" name="key_type" value="correct"> | ||
<input type="hidden" id="key-id"> | ||
<hr> | ||
<div class="form-group"> | ||
<input type="hidden" value="{{ nonce }}" name="nonce" id="nonce"> | ||
<button id="submit-keys" class="btn btn-success float-right">Update</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header text-center"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<h3 class="text-center">Wrong Key</h3> | ||
</div> | ||
</div> | ||
</div> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body"> | ||
<form method="POST" action="{{ script_root }}/admin/keys/{{id}}"> | ||
<input type="text" id="key-data" class="form-control" name="key" value="{{key}}" placeholder="Enter wrong key data"> | ||
<input type="text" id="key-value" class="form-control" name="data" value="{{data}}" placeholder="Enter wrong point value"> | ||
<input type="hidden" id="key-type" name="key_type" value="wrong"> | ||
<input type="hidden" id="key-id"> | ||
<hr> | ||
<div class="form-group"> | ||
<input type="hidden" value="{{ nonce }}" name="nonce" id="nonce"> | ||
<button id="submit-keys" class="btn btn-success float-right">Update</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<form method="POST" action="{{ script_root }}/admin/chal/new" enctype="multipart/form-data"> | ||
<div class="form-group"> | ||
<label for="name">Name | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="The name of your challenge"></i> | ||
</label> | ||
<input type="text" class="form-control" name="name" placeholder="Enter challenge name"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="category">Category | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="The category of your challenge"></i> | ||
</label> | ||
<input type="text" class="form-control" name="category" placeholder="Enter challenge category"> | ||
</div> | ||
|
||
<ul class="nav nav-tabs" role="tablist" id="new-desc-edit"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" href="#new-desc-write" aria-controls="home" role="tab" data-toggle="tab">Write</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#new-desc-preview" aria-controls="home" role="tab" data-toggle="tab">Preview</a> | ||
</li> | ||
</ul> | ||
|
||
<div class="tab-content"> | ||
<div role="tabpanel" class="tab-pane active" id="new-desc-write"> | ||
<div class="form-group"> | ||
<label for="message-text" class="control-label">Message: | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="Use this to give a brief introduction to your challenge. The description supports HTML and Markdown."></i> | ||
</label> | ||
<textarea id="new-desc-editor" class="form-control" name="description" rows="10"></textarea> | ||
</div> | ||
</div> | ||
<div role="tabpanel" class="tab-pane content" id="new-desc-preview" style="height:234px; overflow-y: scroll;"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="value">Value | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="This is how many points are rewarded for solving this challenge."></i> | ||
</label> | ||
<input type="number" class="form-control" name="value" placeholder="Enter value" required> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label>Flag | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="This is the flag or solution for your challenge. You can choose whether your flag is a static string or a regular expression."></i> | ||
</label> | ||
<input type="text" class="form-control" name="key" placeholder="Enter flag"> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<select class="custom-select" name="key_type[0]"> | ||
<option value="correct">Correct</option> | ||
<option value="wrong">Wrong</option> | ||
</select> | ||
</div> | ||
|
||
<div class="form-check"> | ||
<div class="checkbox"> | ||
<label class="form-check-label"> | ||
<input class="form-check-input" name="hidden" type="checkbox"> | ||
Hide challenge on creation | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-check"> | ||
<div class="checkbox"> | ||
<label class="form-check-label"> | ||
<input class="form-check-input" type="checkbox" id="solve-attempts-checkbox"> | ||
Limit amount of solve attempts | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div id="solve-attempts-input" style="display: none;"> | ||
<label for="max_attempts">Maximum Attempts | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="How many attempts should a user have for this challenge? For unlimited attempts, use the value 0"></i> | ||
</label> | ||
<input class="form-control" id='max_attempts' name='max_attempts' type='number' placeholder="0"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label>Upload Challenge Files | ||
<i class="far fa-question-circle text-muted cursor-help" data-toggle="tooltip" data-placement="right" title="Challenges files are provided to users for download alongside your challenge description"></i> | ||
</label> | ||
<input class="form-control-file" type="file" name="files[]" multiple="multiple"> | ||
<sub class="help-block">Attach multiple files using Control+Click or Cmd+Click.</sub> | ||
</div> | ||
|
||
<input type="hidden" value="{{ nonce }}" name="nonce" id="nonce"> | ||
<input type="hidden" value="multianswer" name="chaltype" id="chaltype"> | ||
|
||
<div class="form-group"> | ||
<button class="btn btn-primary float-right create-challenge-submit" type="submit">Create</button> | ||
</div> | ||
</form> |
Oops, something went wrong.