mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 09:38:28 +08:00
新增proot和android识别
This commit is contained in:
parent
30d4986214
commit
3146467477
27
ShellList/change-libc-path.py
Normal file
27
ShellList/change-libc-path.py
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
import os
|
||||
import sys
|
||||
import binascii
|
||||
def Replace(fileName: str):
|
||||
with open(f"{fileName}", "rb") as file:
|
||||
data = file.read()
|
||||
|
||||
data = data.replace(bytes("/lib64/ld-linux-x86-64.so.2".encode()),
|
||||
bytes("/data/data/com.termux/gfdgd".encode())) # 替换与被替换需要保证字符数量相同
|
||||
with open(f"{fileName}", "wb") as file:
|
||||
file.write(data)
|
||||
|
||||
longest = 0
|
||||
def Find(path: str):
|
||||
global longest
|
||||
for i in os.listdir(path):
|
||||
newpath = f"{path}/{i}"
|
||||
if (len(newpath) > longest):
|
||||
longest = len(newpath)
|
||||
print(f"\r{newpath}" + " " * (longest - len(newpath)), end="")
|
||||
if (os.path.isfile(newpath)):
|
||||
Replace(newpath)
|
||||
if (os.path.isdir(newpath)):
|
||||
Find(newpath)
|
||||
|
||||
Find(sys.argv[1])
|
Loading…
Reference in New Issue
Block a user