Skip to content

Commit

Permalink
Merge branch 'hustsec_backup' into hustsec_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
wumingzhilian committed May 15, 2024
2 parents 3493df5 + 61f92a5 commit f7879c7
Show file tree
Hide file tree
Showing 8 changed files with 16,303 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,20 @@ docker kill pwncollege/dojo
docker rm pwncollege/dojo
git pull
docker build -t pwncollege/dojo "$DOJO_PATH"
docker run --privileged -d -v "${DOJO_PATH}:/opt/pwn.college:shared" -p 22222:22 -p 8880:80 -p 44443:443 --name dojo pwncollege/dojo
docker run --privileged -d -v "${DOJO_PATH}:/opt/pwn.college:shared" -p 22:22 -p 80:80 -p 443:443 --name dojo pwncollege/dojo
```

This will cause downtime when the dojo is rebuilding.

Some changes _can_ be applied without a complete restart, however this is not guaranteed.

If you really know what you're doing (the changes that you're pulling in are just to `ctfd`), you can do the following:
If you really know what you're doing (the changes that you're pulling in are just to `ctfd`), inside the `pwncollege/dojo` container you can do the following:

```sh
docker exec dojo dojo update
dojo update
```

Note that `docker exec dojo dojo update` is not guaranteed to be successful and should only be used if you fully understand each commit/change that you are updating.
Note that `dojo update` is not guaranteed to be successful and should only be used if you fully understand each commit/change that you are updating.

## Customization

Expand Down
3 changes: 3 additions & 0 deletions dojo_plugin/pages/dojos.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def listing():
"Advanced": [],
"Topics": [],
"Courses": [],
"Archive":[],
"More Material": [],
}
for dojo in Dojos.viewable(user=user):
Expand All @@ -49,6 +50,8 @@ def listing():
typed_dojos["Advanced"].append(dojo)
elif dojo.type == "topic":
typed_dojos["Topics"].append(dojo)
elif dojo.type == "archive":
typed_dojos["Archive"].append(dojo)
elif dojo.type == "course":
typed_dojos["Courses"].append(dojo)
elif dojo.type == "hidden":
Expand Down
8,443 changes: 8,443 additions & 0 deletions dojo_theme/static/img/dojo/Coal_Badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,846 changes: 7,846 additions & 0 deletions dojo_theme/static/img/dojo/Forest_Badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dojo_theme/templates/dojo.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ <h2 class="row">道馆排名</h2>
{% endblock %}

{% block scripts %}
<script defer onload="loadScoreboard(30, 1);" src="{{ url_for('views.themes', path='js/dojo/scoreboard.js') }}"></script>
<script defer onload="loadScoreboard(0, 1);" src="{{ url_for('views.themes', path='js/dojo/scoreboard.js') }}"></script>
<script defer src="{{ url_for('views.themes', path='js/dojo/copy.js') }}"></script>
{% endblock %}
2 changes: 1 addition & 1 deletion dojo_theme/templates/dojo_error.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ <h4 class="card-title">{{ module.name or module.id }}</h4>
{% endblock %}

{% block scripts %}
<script defer onload="loadScoreboard(30, 1);" src="{{ url_for('views.themes', path='js/dojo/scoreboard.js') }}"></script>
<script defer onload="loadScoreboard(0, 1);" src="{{ url_for('views.themes', path='js/dojo/scoreboard.js') }}"></script>
<script defer src="{{ url_for('views.themes', path='js/dojo/copy.js') }}"></script>
{% endblock %}
4 changes: 4 additions & 0 deletions dojo_theme/templates/dojos.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ <h2>高级篇</h2>
{% elif type == "Course" %}
<h2>课程</h2>
<p>我们在平台上提供了众多课程,包含软件安全。</p>
{% elif type == "Archive" %}
<h2>归档</h2>
<p>历史课程</p>
{% endif %}
<ul class="card-list">
{% for dojo in dojos %}
Expand All @@ -51,6 +54,7 @@ <h2>课程</h2>
</ul>
<br>
{% endfor %}

{% endblock %}

{% block scripts %}
Expand Down
2 changes: 1 addition & 1 deletion dojo_theme/templates/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ <h2>模块排名</h2>
{% block scripts %}

<script defer src="{{ url_for('views.themes', path='js/dojo/challenges.js') }}"></script>
<script defer onload="loadScoreboard(30, 1);" src="{{ url_for('views.themes', path='js/dojo/scoreboard.js') }}"></script>
<script defer onload="loadScoreboard(0, 1);" src="{{ url_for('views.themes', path='js/dojo/scoreboard.js') }}"></script>
{% endblock %}

0 comments on commit f7879c7

Please sign in to comment.