更新pmapi

This commit is contained in:
cxykevin 2024-02-25 19:15:35 +08:00
parent a3f144d992
commit 7e272eac92
2 changed files with 16 additions and 3 deletions

View File

@ -17,7 +17,9 @@ PYTHON = "python"
DISK = "{disk}"
################################
is_linux:bool = False
is_linux: bool = False
mount_point = ""
def find_disk():
if platform.system() == 'Linux':
@ -150,7 +152,18 @@ if not os.path.exists(DISK+"/PEinjector/package"):
os.mkdir(DISK+"/PEinjector/package")
for i in os.listdir("package"):
if os.path.exists(DISK+"/PEinjector/package/"+i):
# 已知shutil在删除 .git 时会出现权限问题
# 当出现问题时尝试使用系统命令
try:
shutil.rmtree(DISK+"/PEinjector/package/"+i)
except: # 降级命令
if platform.system() == "Windows":
retr = os.system(
"RMDIR /S /Q "+(DISK+"/PEinjector/package/"+i).replace("/", "\\"))
else:
retr = os.system(
"rm -rf "+(DISK+"/PEinjector/package/"+i))
shutil.copytree("package/"+i, DISK+"/PEinjector/package/"+i)
if is_linux:

@ -1 +1 @@
Subproject commit 4605410a84aa4ff6a20d2dfba0ec7d1c83467441
Subproject commit 04b581687f815d4f2eb8815f8e0a565928987060