-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig-anticheat.py
More file actions
38 lines (28 loc) · 1.01 KB
/
config-anticheat.py
File metadata and controls
38 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from utils import *
import zipfile, shutil
script_license()
def extract_zipfile():
download("https://qcymc.cloud/f/zmEI4/temp.zip", "temp.zip")
zip = zipfile.ZipFile("temp.zip")
zip.extractall(os.path.join(os.getcwd(), "temp"))
def apply_config():
c = set(os.listdir("temp"))
for p in os.listdir(os.path.join(os.getcwd(), "plugins")):
if os.path.isdir(os.path.join(os.getcwd(), "plugins", p)) and (p in c):
shutil.rmtree(os.path.join(os.getcwd(), "plugins", p))
shutil.move(os.path.join(os.getcwd(), "temp", p), os.path.join(os.getcwd(), "plugins"))
print(f"成功应用配置{p}")
@handler("plugins/ViaBackwards/config.yml")
def config_via(via):
via["handle-pings-as-inv-acknowledgements"] = True
if __name__ == "__main__":
print("导出/下载配置")
extract_zipfile()
print("导出完成")
print("应用配置")
apply_config()
config_via()
print("应用完毕")
shutil.rmtree("temp")
os.remove("temp.zip")
exit_()