Fix up online application
This commit is contained in:
parent
b3a9598718
commit
8740323430
@ -73,7 +73,7 @@ def getModlist(path):
|
||||
|
||||
def addFiles(path):
|
||||
if dummyMode: return
|
||||
if target["type"] == "offline":
|
||||
if target["type"] in ["offline","online"]:
|
||||
for root,dirs,files in os.walk(path):
|
||||
for file in dirs:
|
||||
ffile = p(root,file)
|
||||
@ -116,7 +116,7 @@ def readyFile(path):
|
||||
|
||||
def renameFile(path,newpath):
|
||||
if dummyMode: return
|
||||
if target["type"] == "offline":
|
||||
if target["type"] in ["offline","online"]:
|
||||
os.rename(filePath(path),filePath(newpath))
|
||||
|
||||
if target["type"] == "wim":
|
||||
@ -128,7 +128,7 @@ def renameFile(path,newpath):
|
||||
|
||||
def removeFile(path):
|
||||
if dummyMode: return
|
||||
if target["type"] == "offline":
|
||||
if target["type"] in ["offline","online"]:
|
||||
os.remove(filePath(path))
|
||||
|
||||
if target["type"] == "wim":
|
||||
@ -139,7 +139,7 @@ def removeFile(path):
|
||||
],check=True)
|
||||
|
||||
def fileExists(path):
|
||||
if target["type"] == "offline":
|
||||
if target["type"] in ["offline","online"]:
|
||||
return os.path.isfile(filePath(path))
|
||||
|
||||
# This is super super super dirty and dumb, fix this somehow
|
||||
@ -232,6 +232,15 @@ def regQueryKeys(rp):
|
||||
output = subprocess.check_output(["reg","query",rp,"/f","*","/k"]).decode("utf-8","ignore")
|
||||
output = output.split("\r\n")
|
||||
output = output[1:-2]
|
||||
if target["type"] == "online":
|
||||
length = len(output)
|
||||
index = 0
|
||||
while index < length:
|
||||
for path in target["regmap"]:
|
||||
if output[index].startswith(target["regmap"][path]):
|
||||
output[index] = output[index].replace(target["regmap"][path],path,1)
|
||||
break
|
||||
index += 1
|
||||
return output
|
||||
|
||||
def applyRegmap(rp):
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Disable Tamper Protection
|
||||
opusnt.runReg(["add",opusnt.regTmpPath + "software\\Microsoft\\Windows Defender\\Features","/v","TamperProtection","/t","REG_DWORD","/d","0x00000004","/f"])
|
||||
if opusnt.target["type"] != "online":
|
||||
opusnt.runReg(["add",opusnt.regTmpPath + "software\\Microsoft\\Windows Defender\\Features","/v","TamperProtection","/t","REG_DWORD","/d","0x00000004","/f"])
|
||||
|
||||
# Disable real time protection
|
||||
opusnt.runReg(["add",opusnt.regTmpPath + "software\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection","/v","DisableRealtimeMonitoring","/t","REG_DWORD","/d","0x00000001","/f"])
|
||||
|
Loading…
Reference in New Issue
Block a user