Skip to content

[pull] main from ProbiusOfficial:main #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2,062 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2062 commits
Select commit Hold shift + click to select a range
15f09ee
Automatically update
ProbiusOfficial Mar 14, 2025
42e08fc
Automatically update
ProbiusOfficial Mar 14, 2025
b801875
Automatically update
ProbiusOfficial Mar 14, 2025
7a7c740
Automatically update
ProbiusOfficial Mar 15, 2025
10d26a8
Automatically update
ProbiusOfficial Mar 15, 2025
e3f5506
Automatically update
ProbiusOfficial Mar 15, 2025
89b010c
Automatically update
ProbiusOfficial Mar 15, 2025
0ac8e66
Automatically update
ProbiusOfficial Mar 15, 2025
fdd6d11
Automatically update
ProbiusOfficial Mar 15, 2025
9bdb78d
Automatically update
ProbiusOfficial Mar 15, 2025
4f8a36e
Automatically update
ProbiusOfficial Mar 15, 2025
69d6ef1
Automatically update
ProbiusOfficial Mar 16, 2025
1ba90c7
Automatically update
ProbiusOfficial Mar 16, 2025
052f434
Automatically update
ProbiusOfficial Mar 16, 2025
1afda53
Automatically update
ProbiusOfficial Mar 16, 2025
567a2c1
Automatically update
ProbiusOfficial Mar 16, 2025
2939ac0
Automatically update
ProbiusOfficial Mar 16, 2025
7d4e0fe
Automatically update
ProbiusOfficial Mar 17, 2025
7d868be
Automatically update
ProbiusOfficial Mar 18, 2025
747e1f5
Automatically update
ProbiusOfficial Mar 18, 2025
d54a2e0
Automatically update
ProbiusOfficial Mar 19, 2025
f209edb
Automatically update
ProbiusOfficial Mar 19, 2025
a6403b8
Automatically update
ProbiusOfficial Mar 19, 2025
e5e3272
Automatically update
ProbiusOfficial Mar 19, 2025
00dfa55
Update Encode.md
rt265 Mar 20, 2025
6390644
Update Encode.md
rt265 Mar 20, 2025
1f59a98
Merge pull request #143 from rt265/main
shenghuo2 Mar 20, 2025
e7a41d1
Automatically update
ProbiusOfficial Mar 20, 2025
cc8038e
Automatically update
ProbiusOfficial Mar 20, 2025
b7ef22d
Automatically update
ProbiusOfficial Mar 20, 2025
fe2f7a4
Automatically update
ProbiusOfficial Mar 20, 2025
b7370e9
Automatically update
ProbiusOfficial Mar 20, 2025
0685f31
Automatically update
ProbiusOfficial Mar 20, 2025
7fc478f
Automatically update
ProbiusOfficial Mar 21, 2025
8fe3cba
Automatically update
ProbiusOfficial Mar 21, 2025
e42808b
Automatically update
ProbiusOfficial Mar 21, 2025
ca540cf
fix
ProbiusOfficial Mar 21, 2025
9076775
Automatically update
ProbiusOfficial Mar 21, 2025
2ef6346
Automatically update
ProbiusOfficial Mar 21, 2025
ca0fed6
Automatically update
ProbiusOfficial Mar 21, 2025
aba2472
Automatically update
ProbiusOfficial Mar 21, 2025
0fa4a46
Automatically update
ProbiusOfficial Mar 21, 2025
fecda0e
Automatically update
ProbiusOfficial Mar 21, 2025
0c2e152
Automatically update
ProbiusOfficial Mar 22, 2025
5745ae9
Automatically update
ProbiusOfficial Mar 22, 2025
86fd1e6
Automatically update
ProbiusOfficial Mar 22, 2025
744be56
Update ghdeploy.yml
ProbiusOfficial Mar 22, 2025
45f7443
Automatically update
ProbiusOfficial Mar 22, 2025
3a50214
Automatically update
ProbiusOfficial Mar 22, 2025
1e9181f
Automatically update
ProbiusOfficial Mar 22, 2025
e274e57
Automatically update
ProbiusOfficial Mar 23, 2025
b755ea7
Automatically update
ProbiusOfficial Mar 23, 2025
34952fb
Automatically update
ProbiusOfficial Mar 23, 2025
a1c0ca7
Automatically update
ProbiusOfficial Mar 23, 2025
0579b2a
Automatically update
ProbiusOfficial Mar 23, 2025
aed5f8e
Automatically update
ProbiusOfficial Mar 23, 2025
abc10b9
Automatically update
ProbiusOfficial Mar 23, 2025
4dade8b
Automatically update
ProbiusOfficial Mar 23, 2025
f46f148
Automatically update
ProbiusOfficial Mar 24, 2025
83472ac
Automatically update
ProbiusOfficial Mar 25, 2025
a7a84d0
Automatically update
ProbiusOfficial Mar 25, 2025
46834d3
Automatically update
ProbiusOfficial Mar 25, 2025
81d268d
Automatically update
ProbiusOfficial Mar 25, 2025
91585ff
Automatically update
ProbiusOfficial Mar 26, 2025
4d87967
Automatically update
ProbiusOfficial Mar 26, 2025
58f6368
Automatically update
ProbiusOfficial Mar 26, 2025
ba5352f
Automatically update
ProbiusOfficial Mar 26, 2025
07dfdda
Automatically update
ProbiusOfficial Mar 26, 2025
d6e072b
Automatically update
ProbiusOfficial Mar 26, 2025
5b00145
Automatically update
ProbiusOfficial Mar 26, 2025
b958ab4
Automatically update
ProbiusOfficial Mar 27, 2025
ff11682
Automatically update
ProbiusOfficial Mar 27, 2025
8e6c223
Automatically update
ProbiusOfficial Mar 28, 2025
56ffa3b
Automatically update
ProbiusOfficial Mar 28, 2025
274353c
Automatically update
ProbiusOfficial Mar 28, 2025
ac09b8c
Automatically update
ProbiusOfficial Mar 28, 2025
69870b2
Automatically update
ProbiusOfficial Mar 28, 2025
b9a4f87
Automatically update
ProbiusOfficial Mar 28, 2025
1ccffed
Automatically update
ProbiusOfficial Mar 28, 2025
76d8b40
Automatically update
ProbiusOfficial Mar 28, 2025
a3a5a25
Automatically update
ProbiusOfficial Mar 28, 2025
cca07cb
Automatically update
ProbiusOfficial Mar 28, 2025
a618bd7
Automatically update
ProbiusOfficial Mar 29, 2025
9cb5f41
Automatically update
ProbiusOfficial Mar 29, 2025
3f343bc
Automatically update
ProbiusOfficial Mar 29, 2025
a7cca03
Automatically update
ProbiusOfficial Mar 29, 2025
c3f9eec
Automatically update
ProbiusOfficial Mar 29, 2025
fc57947
Automatically update
ProbiusOfficial Mar 29, 2025
3dbcc89
Automatically update
ProbiusOfficial Mar 29, 2025
8b8c720
Automatically update
ProbiusOfficial Mar 29, 2025
a5c4e08
Automatically update
ProbiusOfficial Mar 29, 2025
949029d
Automatically update
ProbiusOfficial Mar 30, 2025
2329dd4
Automatically update
ProbiusOfficial Mar 30, 2025
4f8d0a3
Automatically update
ProbiusOfficial Mar 30, 2025
312b0df
Automatically update
ProbiusOfficial Mar 30, 2025
54d078d
Automatically update
ProbiusOfficial Mar 30, 2025
18a7977
Automatically update
ProbiusOfficial Mar 30, 2025
72400cf
Automatically update
ProbiusOfficial Mar 30, 2025
2206c98
Automatically update
ProbiusOfficial Mar 30, 2025
8fa2fd8
Automatically update
ProbiusOfficial Mar 30, 2025
9957319
Automatically update
ProbiusOfficial Mar 30, 2025
14e48a4
Automatically update
ProbiusOfficial Mar 30, 2025
b4c8a8c
Automatically update
ProbiusOfficial Mar 30, 2025
4b7e946
Automatically update
ProbiusOfficial Mar 31, 2025
c16ca3e
Automatically update
ProbiusOfficial Mar 31, 2025
846e567
Automatically update
ProbiusOfficial Apr 1, 2025
a60f570
Automatically update
ProbiusOfficial Apr 1, 2025
b43fd61
Automatically update
ProbiusOfficial Apr 1, 2025
a6a971e
Automatically update
ProbiusOfficial Apr 1, 2025
f578df2
Automatically update
ProbiusOfficial Apr 2, 2025
469287b
Automatically update
ProbiusOfficial Apr 2, 2025
44b67e7
Automatically update
ProbiusOfficial Apr 2, 2025
5aa517a
Automatically update
ProbiusOfficial Apr 2, 2025
304eef1
Automatically update
ProbiusOfficial Apr 3, 2025
256c021
Automatically update
ProbiusOfficial Apr 3, 2025
9b754cf
Automatically update
ProbiusOfficial Apr 3, 2025
8e7cf86
Automatically update
ProbiusOfficial Apr 4, 2025
08b32ba
Automatically update
ProbiusOfficial Apr 4, 2025
de4c4b2
Automatically update
ProbiusOfficial Apr 4, 2025
2c10c9e
Automatically update
ProbiusOfficial Apr 4, 2025
4489e41
Automatically update
ProbiusOfficial Apr 5, 2025
0044f94
Automatically update
ProbiusOfficial Apr 5, 2025
665410e
Automatically update
ProbiusOfficial Apr 5, 2025
ee4af80
Automatically update
ProbiusOfficial Apr 5, 2025
d50c339
Automatically update
ProbiusOfficial Apr 5, 2025
b516379
Automatically update
ProbiusOfficial Apr 5, 2025
989b4b1
Automatically update
ProbiusOfficial Apr 5, 2025
0f093ab
Automatically update
ProbiusOfficial Apr 6, 2025
feec548
Automatically update
ProbiusOfficial Apr 6, 2025
c58ea66
Automatically update
ProbiusOfficial Apr 6, 2025
779f8cd
Automatically update
ProbiusOfficial Apr 6, 2025
1325ee6
Automatically update
ProbiusOfficial Apr 6, 2025
43f75cf
Automatically update
ProbiusOfficial Apr 6, 2025
9cbdfb8
Automatically update
ProbiusOfficial Apr 6, 2025
52ab619
Automatically update
ProbiusOfficial Apr 6, 2025
3c99a84
Automatically update
ProbiusOfficial Apr 6, 2025
57fd53b
Automatically update
ProbiusOfficial Apr 7, 2025
26cff24
Automatically update
ProbiusOfficial Apr 7, 2025
7466f33
Automatically update
ProbiusOfficial Apr 7, 2025
eb8dea7
Automatically update
ProbiusOfficial Apr 7, 2025
ba0cb43
Automatically update
ProbiusOfficial Apr 7, 2025
f31076f
Automatically update
ProbiusOfficial Apr 7, 2025
4634724
Automatically update
ProbiusOfficial Apr 7, 2025
0f16100
Automatically update
ProbiusOfficial Apr 8, 2025
f2a1165
Automatically update
ProbiusOfficial Apr 8, 2025
fed8287
Automatically update
ProbiusOfficial Apr 8, 2025
3146596
Automatically update
ProbiusOfficial Apr 9, 2025
b826aed
Automatically update
ProbiusOfficial Apr 9, 2025
19fac3e
Automatically update
ProbiusOfficial Apr 9, 2025
83789ba
Automatically update
ProbiusOfficial Apr 10, 2025
ab8f3e4
Automatically update
ProbiusOfficial Apr 10, 2025
089448f
Automatically update
ProbiusOfficial Apr 10, 2025
74719a6
Automatically update
ProbiusOfficial Apr 10, 2025
075c5b8
Automatically update
ProbiusOfficial Apr 11, 2025
4532908
Automatically update
ProbiusOfficial Apr 11, 2025
e45a3b6
Automatically update
ProbiusOfficial Apr 12, 2025
2feab20
Automatically update
ProbiusOfficial Apr 12, 2025
f4cead2
Automatically update
ProbiusOfficial Apr 12, 2025
ee8ce9d
Automatically update
ProbiusOfficial Apr 12, 2025
ea02509
Automatically update
ProbiusOfficial Apr 12, 2025
4157aa1
Automatically update
ProbiusOfficial Apr 12, 2025
e92a4a1
Automatically update
ProbiusOfficial Apr 12, 2025
7367d36
Automatically update
ProbiusOfficial Apr 12, 2025
14c11db
Automatically update
ProbiusOfficial Apr 12, 2025
10c5b08
Automatically update
ProbiusOfficial Apr 12, 2025
da7eddf
Automatically update
ProbiusOfficial Apr 12, 2025
f0c3576
Automatically update
ProbiusOfficial Apr 13, 2025
c3a46c3
Automatically update
ProbiusOfficial Apr 13, 2025
eee24e4
Automatically update
ProbiusOfficial Apr 13, 2025
0f859ab
Automatically update
ProbiusOfficial Apr 13, 2025
7324bbb
Automatically update
ProbiusOfficial Apr 13, 2025
be2e215
Automatically update
ProbiusOfficial Apr 13, 2025
968be4f
Automatically update
ProbiusOfficial Apr 13, 2025
0f48bb0
Automatically update
ProbiusOfficial Apr 13, 2025
064cefc
Automatically update
ProbiusOfficial Apr 14, 2025
e8cbdb9
Automatically update
ProbiusOfficial Apr 14, 2025
723018e
Automatically update
ProbiusOfficial Apr 14, 2025
54d34be
Automatically update
ProbiusOfficial Apr 14, 2025
63e716b
Automatically update
ProbiusOfficial Apr 14, 2025
e84a766
Automatically update
ProbiusOfficial Apr 15, 2025
424c3b3
Automatically update
ProbiusOfficial Apr 15, 2025
efdadbe
Automatically update
ProbiusOfficial Apr 15, 2025
12104c5
Automatically update
ProbiusOfficial Apr 16, 2025
1ef7bf2
Automatically update
ProbiusOfficial Apr 16, 2025
eec5e0f
Automatically update
ProbiusOfficial Apr 16, 2025
69bb46f
Automatically update
ProbiusOfficial Apr 16, 2025
8e15a89
Automatically update
ProbiusOfficial Apr 17, 2025
7895321
Automatically update
ProbiusOfficial Apr 18, 2025
32055b4
Automatically update
ProbiusOfficial Apr 18, 2025
136be35
Automatically update
ProbiusOfficial Apr 18, 2025
016dece
Automatically update
ProbiusOfficial Apr 18, 2025
c18cea6
Automatically update
ProbiusOfficial Apr 18, 2025
ec61080
Automatically update
ProbiusOfficial Apr 19, 2025
9ae7aa4
Automatically update
ProbiusOfficial Apr 19, 2025
7429a0b
Automatically update
ProbiusOfficial Apr 20, 2025
f8e913f
Automatically update
ProbiusOfficial Apr 20, 2025
62111fa
Automatically update
ProbiusOfficial Apr 20, 2025
6db0afd
Automatically update
ProbiusOfficial Apr 20, 2025
1852429
Automatically update
ProbiusOfficial Apr 20, 2025
6012154
Automatically update
ProbiusOfficial Apr 20, 2025
823a3e1
Automatically update
ProbiusOfficial Apr 20, 2025
db06dff
Automatically update
ProbiusOfficial Apr 20, 2025
02d9c58
Automatically update
ProbiusOfficial Apr 20, 2025
e9d5a67
Automatically update
ProbiusOfficial Apr 21, 2025
590570b
chore: 修复 PHP 基础文档中的拼写错误和格式问题
shenghuo2 Apr 21, 2025
a4e50e5
Automatically update
ProbiusOfficial Apr 21, 2025
e1b1624
Automatically update
ProbiusOfficial Apr 21, 2025
c89c768
Automatically update
ProbiusOfficial Apr 21, 2025
e3c28c4
Automatically update
ProbiusOfficial Apr 22, 2025
9b537c2
Automatically update
ProbiusOfficial Apr 22, 2025
8eb2dbd
Automatically update
ProbiusOfficial Apr 23, 2025
7cfe351
Automatically update
ProbiusOfficial Apr 25, 2025
eff4de7
Automatically update
ProbiusOfficial Apr 25, 2025
40e4375
Automatically update
ProbiusOfficial Apr 25, 2025
b2b3509
Automatically update
ProbiusOfficial Apr 25, 2025
02bea5b
Automatically update
ProbiusOfficial Apr 25, 2025
7c3de10
Automatically update
ProbiusOfficial Apr 26, 2025
c084f92
Automatically update
ProbiusOfficial Apr 26, 2025
75927bd
Automatically update
ProbiusOfficial Apr 26, 2025
75021f4
Automatically update
ProbiusOfficial Apr 27, 2025
f0d0bc1
Automatically update
ProbiusOfficial Apr 27, 2025
8b39073
Automatically update
ProbiusOfficial Apr 27, 2025
84c6622
Automatically update
ProbiusOfficial Apr 27, 2025
3482302
Automatically update
ProbiusOfficial Apr 27, 2025
0695286
Automatically update
ProbiusOfficial Apr 27, 2025
d39984a
Automatically update
ProbiusOfficial Apr 28, 2025
26c9d66
Automatically update
ProbiusOfficial Apr 28, 2025
2daaafc
Automatically update
ProbiusOfficial Apr 28, 2025
5605732
Automatically update
ProbiusOfficial Apr 29, 2025
a807018
Automatically update
ProbiusOfficial Apr 29, 2025
24a7b18
Automatically update
ProbiusOfficial Apr 29, 2025
9d8d5ee
Automatically update
ProbiusOfficial Apr 29, 2025
88d8513
Automatically update
ProbiusOfficial Apr 29, 2025
c3df230
Automatically update
ProbiusOfficial Apr 30, 2025
422734c
Automatically update
ProbiusOfficial Apr 30, 2025
40302a9
Automatically update
ProbiusOfficial Apr 30, 2025
6974a13
Automatically update
ProbiusOfficial May 1, 2025
55149b9
Automatically update
ProbiusOfficial May 1, 2025
b5742c2
Automatically update
ProbiusOfficial May 1, 2025
4b9ebf8
Automatically update
ProbiusOfficial May 2, 2025
36665e2
Automatically update
ProbiusOfficial May 2, 2025
ba788ad
Automatically update
ProbiusOfficial May 2, 2025
35b70dc
Automatically update
ProbiusOfficial May 2, 2025
8a1767e
Automatically update
ProbiusOfficial May 2, 2025
c7fa9e9
Automatically update
ProbiusOfficial May 2, 2025
2c74bdd
Automatically update
ProbiusOfficial May 3, 2025
5547314
Automatically update
ProbiusOfficial May 3, 2025
696e907
Automatically update
ProbiusOfficial May 3, 2025
c305ff5
Automatically update
ProbiusOfficial May 3, 2025
23fbaa7
Automatically update
ProbiusOfficial May 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 9 additions & 5 deletions .github/workflows/ghdeploy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Deploy to Github Pages and Automatically update
name: Deploy to GitHub Pages and Automatically update
on:
push:
branches:
- master
- main
schedule:
- cron: "0 0/2 * * *"
- cron: "0 */6 * * *"
repository_dispatch:
types: [Hello-CTFTime]

permissions:
contents: write
Expand All @@ -23,8 +25,10 @@ jobs:
with:
python-version: 3.9

- name: Install libxml2 and libxslt
run: sudo apt-get install -y libxml2-dev libxslt-dev
- name: Install libxml2-dev and libxslt-dev
run: |
sudo apt-get update
sudo apt-get install -y libxml2-dev libxslt-dev --fix-missing

- name: Install dependencies
run: pip install -r requirements.txt
Expand All @@ -38,7 +42,7 @@ jobs:
- name: Check for changes
id: check_changes
run: |
git add docs/AR/friends.md
git add docs/hc-archive/friends.md
if [ -n "$(git status --porcelain)" ]; then
echo "CHANGES=true" >> $GITHUB_ENV
fi
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ site
.vscode
doc
.DS_Store
EX
EX
docs/hc-reverse/change.py

# pdm
.pdm-python
pdm.lock
pyproject.toml
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"semi": false
}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM python:3.9.0-alpine

ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --upgrade pip
RUN apk add --no-cache build-base

WORKDIR /Hello-CTF
COPY mkdocs.yml ./mkdocs.yml
Expand Down
2 changes: 0 additions & 2 deletions Ex/实验.md

This file was deleted.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div align="center">
<img src="./images/struc.png">
</div>
<a href="http://ctf.probius.xyz/"> <img src="https://badgen.net/badge/Mkdocs/%E5%9C%A8%E7%BA%BF%E9%98%85%E8%AF%BB?icon=chrome&color=black"></a>
<a href="http://hello-ctf.com/"> <img src="https://badgen.net/badge/Mkdocs/%E5%9C%A8%E7%BA%BF%E9%98%85%E8%AF%BB?icon=chrome&color=black"></a>
<a href="https://github.com/ProbiusOfficial/Hello-CTF"> <img src="https://badgen.net/github/stars/ProbiusOfficial/Hello-CTF?icon=github&color=black"></a>
<a href="https://github.com/ProbiusOfficial/Hello-CTF"> <img src="https://badgen.net/github/forks/ProbiusOfficial/Hello-CTF?icon=github&color=black"></a>
<a href="https://github.com/ProbiusOfficial/Hello-CTF/blob/main/LICENSE"> <img src="https://badgen.net/badge/license/GPLv3/"></a>
Expand All @@ -14,13 +14,13 @@



文档依靠Mkdocs-material 基于Github-Page 依靠 gh-pages 部署在 [https://ctf.probius.xyz/](https://ctf.probius.xyz/)
文档依靠Mkdocs-material 基于GitHub Pages 依靠 gh-pages 部署在 [https://hello-ctf.com/](https://hello-ctf.com/)

因接入CDN,本站链接变更为:[https://ctf.probius.xyz/](https://ctf.probius.xyz/) ,感谢渊龙Sec安全团队[@AabyssZG](https://github.com/AabyssZG) 曾哥提供的CDN支持~
因接入CDN,本站链接变更为:[https://hello-ctf.com/](https://hello-ctf.com/) ,感谢渊龙Sec安全团队[@AabyssZG](https://github.com/AabyssZG) 曾哥提供的CDN支持~

您可以直接访问该页面[在线阅读](https://ctf.probius.xyz/),如果您想要转载本项目,请带上项目源地址:https://github.com/ProbiusOfficial/Hello-CTF
您可以直接访问该页面[在线阅读](https://hello-ctf.com/),如果您想要转载本项目,请带上项目源地址:https://github.com/ProbiusOfficial/Hello-CTF

如果文档有帮助到你,麻烦点一个:star:支持一下!!
如果文档有帮助到你,麻烦点一个 :star: 支持一下!!

## 关于

Expand All @@ -35,7 +35,7 @@
## 加入我们

本书仍然处于更新阶段,我们还有很多内容需要完善,欢迎您加入我们,一起完善本书,让更多的人了解CTF,参与CTF,享受CTF的乐趣。
您随时可以通过提交 [「 Pr (PullRequest) 」](https://github.com/ProbiusOfficial/Hello-CTF/pulls)来协助我们完成本项目。
您随时可以通过提交 [「 PR (Pull Request) 」](https://github.com/ProbiusOfficial/Hello-CTF/pulls)来协助我们完成本项目。

- 如果您在阅读过程中发现任何 知识点错误,内容模糊,名词拼写错误等等的问题,还请您协助我们进行修改,您可以直接在评论区中提出,也可以直接提交PR。
- 如果您有好的题目,好的题解,好的知识点讲解,或者其他合作意向,也欢迎您联系探姬([By QQ](2293808331))或者开启issue。
Expand Down
41 changes: 32 additions & 9 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import requests
import urllib3
from urllib3.exceptions import InsecureRequestWarning

urllib3.disable_warnings(InsecureRequestWarning)

def download_file(url):
"""从URL下载文件并返回内容"""
response = requests.get(url,verify=False)
response.raise_for_status()
return response.text

def insert_content(original_file, start_marker, end_marker, new_content):
"""在指定的开始和结束标记之间插入新内容"""
with open(original_file, 'r', encoding='utf-8') as file:
content = file.readlines()

Expand All @@ -30,23 +32,44 @@ def insert_content(original_file, start_marker, end_marker, new_content):
file.writelines(content)

def update_files():
"""下载并更新文件"""
# 更新 friends.md 和 index.md
friends_content = download_file("https://raw.githubusercontent.com/ProbiusOfficial/helloCTF-CTFerlink/main/output/friends.md")
with open("docs/AR/friends.md", 'w', encoding='utf-8') as file:
print("downloaded friends.md")
with open("docs/hc-archive/friends.md", 'w', encoding='utf-8') as file:
file.write(friends_content)
with open("docs/AR/index.md", 'w', encoding='utf-8') as file:
with open("docs/hc-archive/index.md", 'w', encoding='utf-8') as file:
file.write(friends_content)
print("updated friends.md and index.md complete")

# 更新 events 相关文件
for filename in ["Now_running.md", "Past_events.md", "Upcoming_events.md"]:
content = download_file(f"https://raw.githubusercontent.com/ProbiusOfficial/Hello-CTFtime/main/Out/{filename}")
with open(f"docs/ET/{filename}", 'w', encoding='utf-8') as file:
print(f"downloaded {filename}")
with open(f"docs/Event/{filename}", 'w', encoding='utf-8') as file:
file.write(content)
print(f"updated events file-{filename} complete")


events_html_content = download_file("https://raw.githubusercontent.com/ProbiusOfficial/Hello-CTFtime/main/Out/index.md")
insert_content("docs/Event/index.md", "<!-- 赛事内容部分_开始 -->", "<!-- 赛事内容部分_结束 -->", events_html_content)
print("updated event-index.md complete")

# 更新 index.md
index_html_content = download_file("https://raw.githubusercontent.com/ProbiusOfficial/Hello-CTFtime/main/Out/home.md")
insert_content("docs/home/index.md", "<!-- 主页赛事展示_开始 -->", "<!-- 主页赛事展示_结束 -->", index_html_content)
print("updated home.md complete")

# update json

# 下载json文件到 docs\Event\json
CN_json_content = download_file("https://raw.githubusercontent.com/ProbiusOfficial/Hello-CTFtime/main/CN.json")
Global_json_content = download_file("https://raw.githubusercontent.com/ProbiusOfficial/Hello-CTFtime/main/Global.json")
print("downloaded json")
with open("docs/Event/json/CN.json", 'w', encoding='utf-8') as file:
file.write(CN_json_content)
with open("docs/Event/json/Global.json", 'w', encoding='utf-8') as file:
file.write(Global_json_content)

# 更新 events.html
events_html_content = download_file("https://raw.githubusercontent.com/ProbiusOfficial/Hello-CTFtime/main/Out/events.html")
insert_content("overrides/partials/events.html", "<!-- 赛事模块前置_开始 -->", "<!-- 赛事模块前置_结束 -->", events_html_content)

if __name__ == "__main__":
update_files()
Loading