1 Star 0 Fork 1

levi2016/H1ve

forked from 孤木成林/H1ve 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
export.py 654 Bytes
Copy Edit Raw Blame History
0akarma authored 2019-12-01 21:56 . v1.0.0-dev First commit test
from CTFd import create_app
from CTFd.utils import config
from CTFd.utils.exports import export_ctf
import datetime
import sys
import shutil
app = create_app()
with app.app_context():
backup = export_ctf()
if len(sys.argv) > 1:
with open(sys.argv[1], 'wb') as target:
shutil.copyfileobj(backup, target)
else:
ctf_name = config.ctf_name()
day = datetime.datetime.now().strftime("%Y-%m-%d")
full_name = "{}.{}.zip".format(ctf_name, day)
with open(full_name, 'wb') as target:
shutil.copyfileobj(backup, target)
print("Exported {filename}".format(filename=full_name))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/null_570_2396/H1ve.git
git@gitee.com:null_570_2396/H1ve.git
null_570_2396
H1ve
H1ve
master

Search

0d507c66 1850385 C8b1a773 1850385