Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
a9b57ad3ad
6 changed files with 61 additions and 8 deletions
|
|
@ -132,7 +132,6 @@ LAUNCHERS = {
|
||||||
r' /logfile=%log_dir%\Tools\FastCopy.log'
|
r' /logfile=%log_dir%\Tools\FastCopy.log'
|
||||||
r' /acl'
|
r' /acl'
|
||||||
r' /cmd=noexist_only'
|
r' /cmd=noexist_only'
|
||||||
r' /utf8'
|
|
||||||
r' /skip_empty_dir'
|
r' /skip_empty_dir'
|
||||||
r' /linkdest'
|
r' /linkdest'
|
||||||
r' /exclude='
|
r' /exclude='
|
||||||
|
|
@ -181,7 +180,6 @@ LAUNCHERS = {
|
||||||
r' /logfile=%log_dir%\Tools\FastCopy.log'
|
r' /logfile=%log_dir%\Tools\FastCopy.log'
|
||||||
r' /acl'
|
r' /acl'
|
||||||
r' /cmd=noexist_only'
|
r' /cmd=noexist_only'
|
||||||
r' /utf8'
|
|
||||||
r' /skip_empty_dir'
|
r' /skip_empty_dir'
|
||||||
r' /linkdest'
|
r' /linkdest'
|
||||||
r' /exclude='
|
r' /exclude='
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from subprocess import CalledProcessError, DEVNULL
|
from subprocess import CalledProcessError, DEVNULL
|
||||||
|
from xml.dom.minidom import parse as xml_parse
|
||||||
|
|
||||||
from wk.cfg.main import KIT_NAME_FULL, KIT_NAME_SHORT, WINDOWS_TIME_ZONE
|
from wk.cfg.main import KIT_NAME_FULL, KIT_NAME_SHORT, WINDOWS_TIME_ZONE
|
||||||
from wk.cfg.repairs import (
|
from wk.cfg.repairs import (
|
||||||
|
|
@ -97,6 +98,7 @@ GPUPDATE_SUCCESS_STRINGS = (
|
||||||
)
|
)
|
||||||
IN_CONEMU = 'ConEmuPID' in os.environ
|
IN_CONEMU = 'ConEmuPID' in os.environ
|
||||||
MENU_PRESETS = Menu()
|
MENU_PRESETS = Menu()
|
||||||
|
PROGRAMDATA = os.environ.get('{ALLUSERSPROFILE}', r'C:\ProgramData')
|
||||||
PROGRAMFILES_32 = os.environ.get(
|
PROGRAMFILES_32 = os.environ.get(
|
||||||
'PROGRAMFILES(X86)', os.environ.get(
|
'PROGRAMFILES(X86)', os.environ.get(
|
||||||
'PROGRAMFILES', r'C:\Program Files (x86)',
|
'PROGRAMFILES', r'C:\Program Files (x86)',
|
||||||
|
|
@ -1138,6 +1140,47 @@ def install_mbam():
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def log_kvrt_results(log_path, report_path):
|
||||||
|
"""Parse KVRT report and log results in plain text."""
|
||||||
|
log_text = ''
|
||||||
|
report_file = None
|
||||||
|
|
||||||
|
# Get latest KVRT report
|
||||||
|
for item in reversed(sorted(report_path.iterdir())):
|
||||||
|
if item.name.startswith('report'):
|
||||||
|
report_file = item
|
||||||
|
break
|
||||||
|
if not report_file:
|
||||||
|
log_path.write_text('Failed to find KVRT report.', encoding='utf-8')
|
||||||
|
return
|
||||||
|
|
||||||
|
# Parse report
|
||||||
|
dom_document = xml_parse(str(report_file))
|
||||||
|
block_elements = dom_document.getElementsByTagName('Block0')
|
||||||
|
if not block_elements:
|
||||||
|
log_path.write_text('Failed to parse KVRT report.', encoding='utf-8')
|
||||||
|
return
|
||||||
|
attributes = block_elements[0].attributes
|
||||||
|
events = block_elements[0].getElementsByTagName('*')
|
||||||
|
|
||||||
|
# Log summary
|
||||||
|
for key, value in attributes.items():
|
||||||
|
log_text += f'{key+":":<14} {value}\n'
|
||||||
|
|
||||||
|
# Log quarantined items
|
||||||
|
quarantined_items = []
|
||||||
|
for event in events:
|
||||||
|
if not event.getAttribute('Action') == 'Quarantined':
|
||||||
|
continue
|
||||||
|
quarantined_items.append(event.getAttribute('Object'))
|
||||||
|
if quarantined_items:
|
||||||
|
log_text += '\nQuarantined Items:\n'
|
||||||
|
log_text += '\n'.join(quarantined_items)
|
||||||
|
|
||||||
|
# Done
|
||||||
|
log_path.write_text(log_text, encoding='utf-8')
|
||||||
|
|
||||||
|
|
||||||
def run_adwcleaner():
|
def run_adwcleaner():
|
||||||
"""Run AdwCleaner."""
|
"""Run AdwCleaner."""
|
||||||
settings_path = get_tool_path('AdwCleaner', 'AdwCleaner', check=False)
|
settings_path = get_tool_path('AdwCleaner', 'AdwCleaner', check=False)
|
||||||
|
|
@ -1217,12 +1260,18 @@ def run_kvrt():
|
||||||
log_path.parent.mkdir(parents=True, exist_ok=True)
|
log_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
quarantine_path = set_quarantine_path('KVRT')
|
quarantine_path = set_quarantine_path('KVRT')
|
||||||
quarantine_path.mkdir(parents=True, exist_ok=True)
|
quarantine_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
report_path = quarantine_path.joinpath('Reports')
|
||||||
|
report_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
scan_list = log_path.with_suffix('.lst')
|
||||||
|
scan_list.write_text(
|
||||||
|
f'{PROGRAMDATA}\n{SYSTEMDRIVE}\\Users', encoding='utf-8',
|
||||||
|
)
|
||||||
cmd_args = (
|
cmd_args = (
|
||||||
'-accepteula',
|
'-accepteula',
|
||||||
'-d', str(quarantine_path),
|
'-d', str(quarantine_path),
|
||||||
'-dontencrypt', '-fixednames',
|
'-dontencrypt', '-fixednames',
|
||||||
'-processlevel', '1',
|
'-processlevel', '1',
|
||||||
'-custom', SYSTEMDRIVE,
|
'-customlist', str(scan_list),
|
||||||
'-silent', '-adinsilent',
|
'-silent', '-adinsilent',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -1239,6 +1288,7 @@ def run_kvrt():
|
||||||
sleep(5)
|
sleep(5)
|
||||||
set_proc_priority('KVRT', 'HIGH', exact=False)
|
set_proc_priority('KVRT', 'HIGH', exact=False)
|
||||||
wait_for_procs('KVRT.exe')
|
wait_for_procs('KVRT.exe')
|
||||||
|
log_kvrt_results(log_path, report_path)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Run in background
|
# Run in background
|
||||||
|
|
@ -1249,7 +1299,7 @@ def run_kvrt():
|
||||||
sleep(5)
|
sleep(5)
|
||||||
set_proc_priority('KVRT', 'HIGH', exact=False)
|
set_proc_priority('KVRT', 'HIGH', exact=False)
|
||||||
proc.wait()
|
proc.wait()
|
||||||
log_path.write_text(proc.stdout, encoding='utf-8')
|
log_kvrt_results(log_path, report_path)
|
||||||
|
|
||||||
|
|
||||||
def run_mbam():
|
def run_mbam():
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ iwgtk
|
||||||
mariadb-connector-c
|
mariadb-connector-c
|
||||||
memtest86-efi
|
memtest86-efi
|
||||||
mprime-bin
|
mprime-bin
|
||||||
|
opensuperclone-git
|
||||||
pipes.sh
|
pipes.sh
|
||||||
python-mariadb-connector
|
python-mariadb-connector
|
||||||
python-smbus2
|
python-smbus2
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ ddrescue
|
||||||
ddrescueview-bin
|
ddrescueview-bin
|
||||||
device-mapper
|
device-mapper
|
||||||
diffutils
|
diffutils
|
||||||
|
dkms
|
||||||
dmidecode
|
dmidecode
|
||||||
dmraid
|
dmraid
|
||||||
dos2unix
|
dos2unix
|
||||||
|
|
@ -85,6 +86,7 @@ numlockx
|
||||||
nvme-cli
|
nvme-cli
|
||||||
openbox
|
openbox
|
||||||
openssh
|
openssh
|
||||||
|
opensuperclone-git
|
||||||
otf-font-awesome-4
|
otf-font-awesome-4
|
||||||
p7zip
|
p7zip
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ syslinux
|
||||||
tigervnc
|
tigervnc
|
||||||
wpa_supplicant
|
wpa_supplicant
|
||||||
|
|
||||||
# hardinfo-gtk3
|
# hardinfo-gtk3 / opensuperclone-git
|
||||||
cmake
|
cmake
|
||||||
|
|
||||||
# iwgtk
|
# iwgtk
|
||||||
|
|
@ -25,9 +25,6 @@ scdoc
|
||||||
# python-mariadb-connector
|
# python-mariadb-connector
|
||||||
mariadb-connector-c
|
mariadb-connector-c
|
||||||
|
|
||||||
# opensuperclone-git
|
|
||||||
libusb-compat
|
|
||||||
|
|
||||||
# smartmontools-svn
|
# smartmontools-svn
|
||||||
subversion
|
subversion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=OSCViewer
|
||||||
|
Comment=OpenSuperClone viewer
|
||||||
|
Exec=oscviewer
|
||||||
|
Type=Application
|
||||||
Loading…
Reference in a new issue