更新pmapi
This commit is contained in:
parent
a3f144d992
commit
7e272eac92
|
@ -17,7 +17,9 @@ PYTHON = "python"
|
||||||
DISK = "{disk}"
|
DISK = "{disk}"
|
||||||
################################
|
################################
|
||||||
|
|
||||||
is_linux:bool = False
|
is_linux: bool = False
|
||||||
|
mount_point = ""
|
||||||
|
|
||||||
|
|
||||||
def find_disk():
|
def find_disk():
|
||||||
if platform.system() == 'Linux':
|
if platform.system() == 'Linux':
|
||||||
|
@ -150,7 +152,18 @@ if not os.path.exists(DISK+"/PEinjector/package"):
|
||||||
os.mkdir(DISK+"/PEinjector/package")
|
os.mkdir(DISK+"/PEinjector/package")
|
||||||
for i in os.listdir("package"):
|
for i in os.listdir("package"):
|
||||||
if os.path.exists(DISK+"/PEinjector/package/"+i):
|
if os.path.exists(DISK+"/PEinjector/package/"+i):
|
||||||
shutil.rmtree(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)
|
shutil.copytree("package/"+i, DISK+"/PEinjector/package/"+i)
|
||||||
|
|
||||||
if is_linux:
|
if is_linux:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4605410a84aa4ff6a20d2dfba0ec7d1c83467441
|
Subproject commit 04b581687f815d4f2eb8815f8e0a565928987060
|
Loading…
Reference in New Issue