Add HMP sections

This commit is contained in:
2Shirt 2021-04-30 03:26:45 -06:00
parent bdbed4622e
commit f706a48f60
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
3 changed files with 23 additions and 3 deletions

View file

@ -75,7 +75,7 @@ BASE_MENUS = {
),
'Malware Cleanup': (
MenuEntry('BleachBit', 'auto_bleachbit'),
MenuEntry('HitmanPro', placeholder_function),
MenuEntry('HitmanPro', 'auto_hitmanpro'),
MenuEntry('KVRT', placeholder_function),
MenuEntry('Windows Defender', placeholder_function),
MenuEntry('Reboot', 'auto_reboot'),

View file

@ -30,7 +30,7 @@ SOURCES = {
'FastCopy': 'https://ftp.vector.co.jp/73/10/2323/FastCopy392_installer.exe',
'FurMark': 'https://geeks3d.com/dl/get/569',
'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/3740966/ublock_origin-1.34.0-an+fx.xpi',
'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe',
'HitmanPro': 'https://dl.surfright.nl/HitmanPro.exe',
'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe',
'HWiNFO': 'https://files1.majorgeeks.com/c8a055180587599139f8f454712dcc618cd1740e/systeminfo/hwi_702.zip',
'Intel SSD Toolbox': r'https://downloadmirror.intel.com/28593/eng/Intel%20SSD%20Toolbox%20-%20v3.5.9.exe',

View file

@ -1,4 +1,5 @@
"""WizardKit: Repairs - Windows"""
# pylint: disable=too-many-lines
# vim: sts=2 sw=2 ts=2
import atexit
@ -14,7 +15,7 @@ from subprocess import CalledProcessError, DEVNULL
from wk.cfg.main import KIT_NAME_FULL
from wk.exe import get_procs, run_program, popen_program, wait_for_procs
from wk.io import delete_folder, rename_item
from wk.kit.tools import get_tool_path, run_tool
from wk.kit.tools import ARCH, get_tool_path, run_tool
from wk.log import format_log_path, update_log_path
from wk.os.win import (
reg_delete_value,
@ -617,6 +618,12 @@ def auto_enable_regback(group, name):
save_settings(group, name, result=result)
def auto_hitmanpro(group, name):
"""Run HitmanPro scan."""
result = TRY_PRINT.run('HitmanPro...', run_hitmanpro, msg_good='DONE')
save_settings(group, name, result=result)
def auto_reboot(group, name):
"""Reboot the system."""
save_settings(group, name, done=True, failed=False, message='DONE')
@ -740,6 +747,7 @@ def run_bleachbit(cleaners, preview=True):
*cleaners,
)
log_path = format_log_path(log_name='BleachBit', timestamp=True, tool=True)
log_path.parent.mkdir(parents=True, exist_ok=True)
proc = run_tool('BleachBit', 'bleachbit_console', *cmd_args, cbin=True)
# Save logs
@ -747,6 +755,18 @@ def run_bleachbit(cleaners, preview=True):
log_path.with_suffix('.err').write_text(proc.stderr)
def run_hitmanpro():
"""Run HitmanPro scan."""
log_path = format_log_path(log_name='HitmanPro', timestamp=True, tool=True)
log_path = log_path.with_suffix('.xml')
log_path.parent.mkdir(parents=True, exist_ok=True)
cmd_args = ['/scanonly', f'/log={log_path}']
run_tool(
'HitmanPro', f'HitmanPro{"64" if ARCH=="64" else ""}',
*cmd_args, download=True,
)
def run_rkill():
"""Run RKill scan."""
log_path = format_log_path(log_name='RKill', timestamp=True, tool=True)