Skip to content

Commit

Permalink
m*ctf
Browse files Browse the repository at this point in the history
  • Loading branch information
Kochanac committed Oct 3, 2020
1 parent 3309697 commit 7e9f2cd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ copy request to one of tasks json (RMB -> "copy request headers" in firefox) and
* innoctf

* forkbomb (forkbomb.ru)

* m_star_ctf (mctf.online)

34 changes: 34 additions & 0 deletions board_configs/m_star_ctf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import json
import re

def getInfo():
return {
"task_id_in_url": None,
"url_to_files": "/{filename}",
"http?": False,
"custom_ids": False
}

def parse_task(data, **kwargs):
try:
data = json.loads(data)["data"][kwargs.get("id")]
except IndexError:
print("Fine.")
return {}

task = {
"Title": data['name'],
"Category": data['category'],
"Description": data['description'],
"Files": data['file_set'],
"Tags": list(),
"Solved": data["already_solved"],
"Value": data['score']/5
}
for i in range(len(task["Files"])):
task["Files"][i] = task["Files"][i]["content"]

return task

def get_meta(base, HEADERS):
return {}

0 comments on commit 7e9f2cd

Please sign in to comment.