WizardKit - v1.8.4 - Stanley Build

Linux
* HW-Diagnostics
  * Reworked osTicket checkbox logic
    * There is now a prompt on the results page to update the checkboxes
    * If you choose yes it will update the HDD & CPU PASS/FAIL & CPU max temp
  * Prime95
    * If CPU temps >= 90°C then the test is marked as FAILED
    * If CPU temps >= 99°C then the test is halted
    * If no sensors are found and the checkboxes are updated, it will use 0°C
  * badblocks & I/O Benchmark tests are run in most scenarios now
    * SMART Self-Test failure will not block these tests
    * SMART C9 / 201 will not block these tests (was seen on several LiteOn SSDs)
    * Only critical NVMe/SMART attributes will prevent these tests from running
  * Added workaround for the Crucial MX500 series of SSDs
    * If this is used it will be shown in the results page and osTicket post
  * Failing NVMe/SMART attributes are individually marked for clarity
  * Fixed 4K partition alignment check (most boot partitions were being falsely flagged)
  * Removed several prompts from the HW-Diagnostic startup
  * Removed prompt to upload for review
* ddrescue-TUI (a.k.a WKClone & WKImage)
  * Journal output is limited to kernel events
    * Avoids a flood of "Updating conky" and "sudo" messages
* Added upload-logs script
  * If you see something weird please run this command to upload to Nextcloud
  * This script asks why you're uploading the logs
* Added CTRL+ALT shortuts to match the Super shortcuts
  * e.g. CTRL+ALT+d to open HW Diagnostics
* Much better input handling - should avoid EOFErrors we've been seeing
* Test-Station names should be included in osTicket posts
* Misc bugfixes

Windows
* Added Windows 10 v1909 support
* d7II
  * Added "Starting d7II..." message to launch script
  * Windows Updates are enabled during the default selections
  * SoftwareDistribution folder is now renamed if it can't be deleted
    * Avoids unnecessary crash/reboot
* System Setup
  * Renamed modes
  * Added Verify option
    * This skips all installation steps and optionally skips opening apps
  * Classic Start is now installed for all non-HW non-Verify modes
  * Google Chrome notifications are disabled by directly editing the Preferences file
    * This avoids having Chrome tell you the browser is "Managed by your organization"
  * Added a permission fix for Windows\Temp
  * Browser backups are no longer compressed
    * This should avoid the major slowdowns seen for Chrome profiles
  * Reduced the amount of Ninite windows opened in some cases
  * Updated ShutUp10 config to avoid breaking Windows Search
  * Added prompt to set the default browser/apps
* Updated tools
* Misc bugfixes
This commit is contained in:
2Shirt 2019-11-30 20:17:13 -07:00
commit d3293526f4
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
33 changed files with 655 additions and 230 deletions

View file

@ -1,5 +1,8 @@
# Wizard Kit: Functions - Browsers # Wizard Kit: Functions - Browsers
import json
import pathlib
from functions.common import * from functions.common import *
from operator import itemgetter from operator import itemgetter
from settings.browsers import * from settings.browsers import *
@ -58,7 +61,7 @@ def archive_all_users():
archive_path += r'\{}.7z'.format(b_k) archive_path += r'\{}.7z'.format(b_k)
cmd = [ cmd = [
global_vars['Tools']['SevenZip'], global_vars['Tools']['SevenZip'],
'a', '-aoa', '-bso0', '-bse0', '-mx=1', 'a', '-aoa', '-bso0', '-bse0', '-mx=0',
archive_path, source_items] archive_path, source_items]
try_and_print(message='{}...'.format(b_k), try_and_print(message='{}...'.format(b_k),
function=run_program, cmd=cmd) function=run_program, cmd=cmd)
@ -74,7 +77,7 @@ def archive_browser(name):
os.makedirs(dest, exist_ok=True) os.makedirs(dest, exist_ok=True)
cmd = [ cmd = [
global_vars['Tools']['SevenZip'], global_vars['Tools']['SevenZip'],
'a', '-aoa', '-bso0', '-bse0', '-mx=1', 'a', '-aoa', '-bso0', '-bse0', '-mx=0',
'-mhe=on', '-p{}'.format(ARCHIVE_PASSWORD), '-mhe=on', '-p{}'.format(ARCHIVE_PASSWORD),
archive, source] archive, source]
run_program(cmd) run_program(cmd)
@ -161,6 +164,36 @@ def clean_mozilla_profile(profile):
f.write('user_pref("{}", {});\n'.format(k, v)) f.write('user_pref("{}", {});\n'.format(k, v))
def disable_chrome_notifications():
"""TODO"""
# Kill running instances
kill_process('chrome.exe')
sleep(1)
kill_process('chrome.exe')
# Update browser_data
scan_for_browsers(silent=True, skip_ie=True)
for profile in browser_data.get('Google Chrome', {}).get('profiles', []):
pref_file = pathlib.Path(f'{profile["path"]}/Preferences')
if pref_file.exists():
pref_data = None
# Read current preferences
with open(pref_file, 'r') as f:
pref_data = json.loads(f.read())
# Set notifications blocks
defaults_key = 'default_content_setting_values'
if defaults_key not in pref_data['profile']:
pref_data['profile'][defaults_key] = {}
pref_data['profile'][defaults_key]['notifications'] = 2
# Write new preferences
with open(pref_file, 'w') as f:
f.write(json.dumps(pref_data, separators=(',', ':')))
def get_browser_details(name): def get_browser_details(name):
"""Get installation and profile details for all supported browsers.""" """Get installation and profile details for all supported browsers."""
browser = SUPPORTED_BROWSERS[name].copy() browser = SUPPORTED_BROWSERS[name].copy()

View file

@ -98,6 +98,24 @@ class WindowsUnsupportedError(Exception):
pass pass
# Backported functions
def input_text(prompt):
"""Get input and avoid EOFErrors, returns str."""
prompt = str(prompt)
response = None
if prompt[-1:] != ' ':
prompt += ' '
while response is None:
try:
response = input(prompt)
except EOFError:
# Ignore and try again
print('', flush=True)
return response
# General functions # General functions
def abort(show_prompt=True): def abort(show_prompt=True):
"""Abort script.""" """Abort script."""
@ -113,7 +131,7 @@ def ask(prompt='Kotaero!'):
answer = None answer = None
prompt = '{} [Y/N]: '.format(prompt) prompt = '{} [Y/N]: '.format(prompt)
while answer is None: while answer is None:
tmp = input(prompt) tmp = input_text(prompt)
if re.search(r'^y(es|)$', tmp, re.IGNORECASE): if re.search(r'^y(es|)$', tmp, re.IGNORECASE):
answer = True answer = True
elif re.search(r'^n(o|ope|)$', tmp, re.IGNORECASE): elif re.search(r'^n(o|ope|)$', tmp, re.IGNORECASE):
@ -145,7 +163,7 @@ def choice(choices, prompt='Kotaero!'):
# Get user's choice # Get user's choice
while answer is None: while answer is None:
tmp = input(prompt) tmp = input_text(prompt)
if re.search(regex, tmp, re.IGNORECASE): if re.search(regex, tmp, re.IGNORECASE):
answer = tmp answer = tmp
@ -264,7 +282,7 @@ def get_simple_string(prompt='Enter string'):
"""Get string from user (restricted character set), returns str.""" """Get string from user (restricted character set), returns str."""
simple_string = None simple_string = None
while simple_string is None: while simple_string is None:
_input = input('{}: '.format(prompt)) _input = input_text('{}: '.format(prompt))
if re.match(r"^(\w|-| |\.|')+$", _input, re.ASCII): if re.match(r"^(\w|-| |\.|')+$", _input, re.ASCII):
simple_string = _input.strip() simple_string = _input.strip()
return simple_string return simple_string
@ -276,7 +294,7 @@ def get_ticket_number():
return None return None
ticket_number = None ticket_number = None
while ticket_number is None: while ticket_number is None:
_input = input('Enter ticket number: ') _input = input_text('Enter ticket number: ')
if re.match(r'^([0-9]+([-_]?\w+|))$', _input): if re.match(r'^([0-9]+([-_]?\w+|))$', _input):
ticket_number = _input ticket_number = _input
out_file = r'{}\TicketNumber'.format(global_vars['LogDir']) out_file = r'{}\TicketNumber'.format(global_vars['LogDir'])
@ -421,7 +439,7 @@ def menu_select(
while (answer.upper() not in valid_answers): while (answer.upper() not in valid_answers):
clear_screen() clear_screen()
print(menu_splash) print(menu_splash)
answer = input('{}: '.format(prompt)) answer = input_text('{}: '.format(prompt))
return answer.upper() return answer.upper()
@ -441,7 +459,7 @@ def pause(prompt='Press Enter to continue... '):
"""Simple pause implementation.""" """Simple pause implementation."""
if prompt[-1] != ' ': if prompt[-1] != ' ':
prompt += ' ' prompt += ' '
input(prompt) input_text(prompt)
def ping(addr='google.com'): def ping(addr='google.com'):

View file

@ -1158,7 +1158,7 @@ def run_ddrescue(state, pass_settings):
# Show systemd journal output # Show systemd journal output
state.panes['Journal'] = tmux_split_window( state.panes['Journal'] = tmux_split_window(
lines=4, vertical=True, lines=4, vertical=True,
command=['sudo', 'journalctl', '-f']) command=['sudo', 'journalctl', '-f', '-k'])
# Fix layout # Fix layout
state.fix_tmux_panes(forced=True) state.fix_tmux_panes(forced=True)
@ -1414,7 +1414,7 @@ def select_path(skip_device=None):
elif path_options[index]['Name'] == 'Enter manually': elif path_options[index]['Name'] == 'Enter manually':
# Manual entry # Manual entry
while not selected_path: while not selected_path:
manual_path = input('Please enter path: ').strip() manual_path = input_text('Please enter path: ').strip()
if manual_path and pathlib.Path(manual_path).is_dir(): if manual_path and pathlib.Path(manual_path).is_dir():
selected_path = DirObj(manual_path) selected_path = DirObj(manual_path)
elif manual_path and pathlib.Path(manual_path).is_file(): elif manual_path and pathlib.Path(manual_path).is_file():

View file

@ -22,6 +22,7 @@ TOP_PANE_TEXT = TOP_PANE_TEXT.format(**COLORS)
# Regex # Regex
REGEX_ERROR_STATUS = re.compile('|'.join(STATUSES['RED'])) REGEX_ERROR_STATUS = re.compile('|'.join(STATUSES['RED']))
REGEX_MX500 = re.compile(r'CT(250|500|1000|2000)MX500SSD(1|4)', re.IGNORECASE)
# Error Classes # Error Classes
@ -39,6 +40,14 @@ class CpuObj():
self.name = self.lscpu.get('Model name', 'Unknown CPU') self.name = self.lscpu.get('Model name', 'Unknown CPU')
self.description = self.name self.description = self.name
def all_tests_passed(self):
"""Check if all tests passed, returns bool."""
return self.tests and all([results.passed for results in self.tests.values()])
def any_test_failed(self):
"""Check if any test failed, returns bool."""
return self.tests and any([results.failed for results in self.tests.values()])
def get_details(self): def get_details(self):
"""Get CPU details from lscpu.""" """Get CPU details from lscpu."""
cmd = ['lscpu', '--json'] cmd = ['lscpu', '--json']
@ -79,6 +88,7 @@ class CpuObj():
class DiskObj(): class DiskObj():
"""Object for tracking disk specific data.""" """Object for tracking disk specific data."""
def __init__(self, disk_path): def __init__(self, disk_path):
self.attributes = {}
self.checkbox = None self.checkbox = None
self.attr_type = 'UNKNOWN' self.attr_type = 'UNKNOWN'
self.disk_ok = True self.disk_ok = True
@ -111,12 +121,27 @@ class DiskObj():
self.get_smart_details() self.get_smart_details()
self.description = '{size} ({tran}) {model} {serial}'.format( self.description = '{size} ({tran}) {model} {serial}'.format(
**self.lsblk) **self.lsblk)
self.update_attributes()
def update_attributes(self):
"""HACK to adjust attribute thresholds for Crucial MX500 SSDs."""
self.attributes = ATTRIBUTES.copy()
if REGEX_MX500.search(self.lsblk['model']):
self.attributes['SMART'][197].update({'Warning': 1, 'Error': 2})
def add_nvme_smart_note(self, note): def add_nvme_smart_note(self, note):
"""Add note that will be included in the NVMe / SMART report.""" """Add note that will be included in the NVMe / SMART report."""
# A dict is used to avoid duplicate notes # A dict is used to avoid duplicate notes
self.nvme_smart_notes[note] = None self.nvme_smart_notes[note] = None
def all_tests_passed(self):
"""Check if all tests passed, returns bool."""
return self.tests and all([results.passed for results in self.tests.values()])
def any_test_failed(self):
"""Check if any test failed, returns bool."""
return self.tests and any([results.failed for results in self.tests.values()])
def calc_io_dd_values(self): def calc_io_dd_values(self):
"""Calcualte I/O benchmark dd values. """Calcualte I/O benchmark dd values.
@ -173,8 +198,8 @@ class DiskObj():
elif self.smart_attributes: elif self.smart_attributes:
poh = self.smart_attributes.get(9, {}).get('raw', -1) poh = self.smart_attributes.get(9, {}).get('raw', -1)
error_thresh = ATTRIBUTES['SMART'][9]['Error'] error_thresh = self.attributes['SMART'][9]['Error']
max_thresh = ATTRIBUTES['SMART'][9]['Maximum'] max_thresh = self.attributes['SMART'][9]['Maximum']
return error_thresh <= poh < max_thresh return error_thresh <= poh < max_thresh
@ -195,23 +220,23 @@ class DiskObj():
elif self.smart_attributes: elif self.smart_attributes:
items = self.smart_attributes.items() items = self.smart_attributes.items()
for k, v in items: for k, v in items:
if k in ATTRIBUTES[attr_type]: if k in self.attributes[attr_type]:
if not ATTRIBUTES[attr_type][k]['Error']: if not self.attributes[attr_type][k]['Error']:
# Informational attribute, skip # Informational attribute, skip
continue continue
if ATTRIBUTES[attr_type][k]['Ignore']: if self.attributes[attr_type][k]['Ignore']:
# Attribute is non-failing, skip # Attribute is non-failing, skip
continue continue
if v['raw'] >= ATTRIBUTES[attr_type][k]['Error']: if v['raw'] >= self.attributes[attr_type][k]['Error']:
if (ATTRIBUTES[attr_type][k]['Maximum'] if (self.attributes[attr_type][k]['Maximum']
and v['raw'] >= ATTRIBUTES[attr_type][k]['Maximum']): and v['raw'] >= self.attributes[attr_type][k]['Maximum']):
# Non-standard value, skip # Non-standard value, skip
continue continue
else: else:
disk_ok = False disk_ok = False
# Disable override if necessary # Disable override if necessary
if ATTRIBUTES[attr_type][k].get('Critical', False): if self.attributes[attr_type][k].get('Critical', False):
self.override_disabled = True self.override_disabled = True
# SMART overall assessment # SMART overall assessment
@ -282,7 +307,7 @@ class DiskObj():
attr_type = 'SMART' attr_type = 'SMART'
items = self.smart_attributes.items() items = self.smart_attributes.items()
for k, v in items: for k, v in items:
if k in ATTRIBUTES[attr_type]: if k in self.attributes[attr_type]:
_note = '' _note = ''
_color = COLORS['GREEN'] _color = COLORS['GREEN']
@ -292,17 +317,23 @@ class DiskObj():
else: else:
_line = ' {i:>3} / {h}: {n:28}'.format( _line = ' {i:>3} / {h}: {n:28}'.format(
i=k, i=k,
h=ATTRIBUTES[attr_type][k]['Hex'], h=self.attributes[attr_type][k]['Hex'],
n=v['name'][:28]) n=v['name'][:28])
# Set color # Set color
for _t, _c in ATTRIBUTE_COLORS: for _t, _c in ATTRIBUTE_COLORS:
if ATTRIBUTES[attr_type][k][_t]: if self.attributes[attr_type][k][_t]:
if v['raw'] >= ATTRIBUTES[attr_type][k][_t]: if v['raw'] >= self.attributes[attr_type][k][_t]:
_color = COLORS[_c] _color = COLORS[_c]
if _t == 'Maximum': if _t == 'Error':
_note = '(failed)'
elif _t == 'Maximum':
_note = '(invalid?)' _note = '(invalid?)'
# 197/C5 warning
if str(k) == '197' and REGEX_MX500.search(self.lsblk['model']):
_note = '(MX500 thresholds)'
# 199/C7 warning # 199/C7 warning
if str(k) == '199' and v['raw'] > 0: if str(k) == '199' and v['raw'] > 0:
_note = '(bad cable?)' _note = '(bad cable?)'
@ -456,7 +487,7 @@ class DiskObj():
# Check partitions # Check partitions
for part in json_data.get('partitiontable', {}).get('partitions', []): for part in json_data.get('partitiontable', {}).get('partitions', []):
aligned = aligned and part.get('start', -1) % 4096 == 0 aligned = aligned and (part.get('start', -1) * self.lsblk['phy-sec']) % 4096 == 0
# Done # Done
return aligned return aligned
@ -465,45 +496,45 @@ class DiskObj():
"""Run safety checks and disable tests if necessary.""" """Run safety checks and disable tests if necessary."""
test_running = False test_running = False
if self.nvme_attributes or self.smart_attributes: if self.nvme_attributes or self.smart_attributes:
disk_ok = self.check_attributes() self.disk_ok = self.check_attributes()
test_running = self.check_smart_self_test(silent) test_running = self.check_smart_self_test(silent)
# Show errors (unless a SMART self-test is running) # Show errors (unless a SMART self-test is running)
if not (silent or test_running): #if not (silent or test_running):
if disk_ok: # if self.disk_ok:
# 199/C7 warning # # 199/C7 warning
if self.smart_attributes.get(199, {}).get('raw', 0) > 0: # if self.smart_attributes.get(199, {}).get('raw', 0) > 0:
print_warning('199/C7 error detected') # print_warning('199/C7 error detected')
print_standard(' (Have you tried swapping the disk cable?)') # print_standard(' (Have you tried swapping the disk cable?)')
else: # else:
# Override? # # Override?
show_report( # show_report(
self.generate_attribute_report(description=True), # self.generate_attribute_report(description=True),
log_report=True) # log_report=True)
print_warning(' {} error(s) detected.'.format(self.attr_type)) # print_warning(' {} error(s) detected.'.format(self.attr_type))
if self.override_disabled: # if self.override_disabled:
print_standard('Tests disabled for this device') # print_standard('Tests disabled for this device')
pause() # pause()
elif not (len(self.tests) == 3 and OVERRIDES_LIMITED): # elif not (len(self.tests) == 3 and OVERRIDES_LIMITED):
if OVERRIDES_FORCED or ask('Run tests on this device anyway?'): # if OVERRIDES_FORCED or ask('Run tests on this device anyway?'):
disk_ok = True # self.disk_ok = True
if 'NVMe / SMART' in self.tests: # if 'NVMe / SMART' in self.tests:
self.disable_test('NVMe / SMART', 'OVERRIDE') # self.disable_test('NVMe / SMART', 'OVERRIDE')
if not self.nvme_attributes and self.smart_attributes: # if not self.nvme_attributes and self.smart_attributes:
# Re-enable for SMART short-tests # # Re-enable for SMART short-tests
self.tests['NVMe / SMART'].disabled = False # self.tests['NVMe / SMART'].disabled = False
print_standard(' ') # print_standard(' ')
else: else:
# No NVMe/SMART details # No NVMe/SMART details
self.disable_test('NVMe / SMART', 'N/A') self.disable_test('NVMe / SMART', 'N/A')
if silent: #if silent:
disk_ok = OVERRIDES_FORCED # self.disk_ok = OVERRIDES_FORCED
else: #else:
show_report( # show_report(
self.generate_attribute_report(description=True), # self.generate_attribute_report(description=True),
log_report=True) # log_report=True)
disk_ok = OVERRIDES_FORCED or ask('Run tests on this device anyway?') # self.disk_ok = OVERRIDES_FORCED or ask('Run tests on this device anyway?')
print_standard(' ') # print_standard(' ')
# Disable tests if necessary (statuses won't be overwritten) # Disable tests if necessary (statuses won't be overwritten)
if test_running: if test_running:
@ -512,7 +543,8 @@ class DiskObj():
self.disable_test('NVMe / SMART', 'Denied') self.disable_test('NVMe / SMART', 'Denied')
for t in ['badblocks', 'I/O Benchmark']: for t in ['badblocks', 'I/O Benchmark']:
self.disable_test(t, 'Denied') self.disable_test(t, 'Denied')
elif not disk_ok: elif self.override_disabled:
# Critical disk error, disable all tests
self.disable_test('NVMe / SMART', 'FAIL', test_failed=True) self.disable_test('NVMe / SMART', 'FAIL', test_failed=True)
for t in ['badblocks', 'I/O Benchmark']: for t in ['badblocks', 'I/O Benchmark']:
self.disable_test(t, 'Denied') self.disable_test(t, 'Denied')
@ -1227,11 +1259,9 @@ def run_hw_tests(state):
v['Objects'][-1].update_status('N/A') v['Objects'][-1].update_status('N/A')
if k == TESTS_CPU[-1]: if k == TESTS_CPU[-1]:
# Last CPU test run, post CPU results # Last CPU test run, post CPU results
cpu_failed = False color_code = 'Diags'
for test in state.cpu.tests.values(): if state.cpu.any_test_failed():
cpu_failed = cpu_failed or test.failed color_code = 'Diags FAIL'
cpu_failed = cpu_failed or not test.passed
color_code = 'Diags FAIL' if cpu_failed else 'Diags'
state.ost.post_device_results( state.ost.post_device_results(
state.cpu, state.ticket_id, state.ticket_name, color_code) state.cpu, state.ticket_id, state.ticket_name, color_code)
# Recheck attributes # Recheck attributes
@ -1270,31 +1300,11 @@ def run_hw_tests(state):
for disk in state.disks: for disk in state.disks:
# Set color code # Set color code
color_code = 'Diags' color_code = 'Diags'
for test in disk.tests.values(): if disk.any_test_failed():
if test.disabled: color_code = 'Diags FAIL'
continue
if test.failed or not (test.passed or 'N/A' in test.status):
color_code = 'Diags FAIL'
state.ost.post_device_results( state.ost.post_device_results(
disk, state.ticket_id, state.ticket_name, color_code) disk, state.ticket_id, state.ticket_name, color_code)
# Check if disk checkbox needs updating
all_disks_passed = True
disk_failures = False
for disk in state.disks:
if disk.checkbox is None:
# Aborted/Unknown/etc
all_disks_passed = False
else:
all_disks_passed = all_disks_passed and disk.checkbox
disk_failures = disk_failures or not disk.checkbox
# Update checkbox if necessary
if disk_failures:
state.ost.set_disk_failed(state.ticket_id)
elif all_disks_passed:
state.ost.set_disk_passed(state.ticket_id)
# Spacer # Spacer
print_standard(' ') print_standard(' ')
@ -1303,19 +1313,46 @@ def run_hw_tests(state):
print_warning('Errors encountered posting results to osTicket.') print_warning('Errors encountered posting results to osTicket.')
print_standard(' ') print_standard(' ')
# Upload for review # Do we need to update checkboxes?
if (ENABLED_UPLOAD_DATA all_disks_passed = state.disks and all([disk.all_tests_passed() for disk in state.disks])
and DEBUG_MODE all_disk_tests_enabled = all(
and ask('Upload results for review?')): [state.tests[name]['Enabled'] for name in TESTS_DISK])
try_and_print( any_disk_failures = state.disks and any([disk.any_test_failed() for disk in state.disks])
message='Saving debug reports...', cpu_failed = state.cpu.any_test_failed()
function=save_debug_reports, cpu_passed = state.cpu.all_tests_passed()
state=state, global_vars=global_vars) update_checkboxes = False
try_and_print( if state.ticket_id:
message='Uploading Data...', if state.tests['Prime95']['Enabled']:
function=upload_logdir, update_checkboxes = True
global_vars=global_vars, elif any_disk_failures:
reason='Review') update_checkboxes = True
elif all_disk_tests_enabled and all_disks_passed:
update_checkboxes = True
# Ask to update checkboxes
if update_checkboxes and ask('Update checkboxes using above results?'):
# CPU checkboxes
if state.tests['Prime95']['Enabled']:
cpu_max_temp = get_cpu_max_temp(state.cpu.tests['Prime95'].sensor_data)
cpu_max_temp = f'{cpu_max_temp:2.0f}'
if cpu_failed:
state.ost.set_cpu_failed(state.ticket_id)
elif cpu_passed:
state.ost.set_cpu_passed(state.ticket_id)
state.ost.set_cpu_max_temp(state.ticket_id, temp=cpu_max_temp)
# Disk checkboxes
if any_disk_failures:
state.ost.set_disk_failed(state.ticket_id)
elif all_disk_tests_enabled and all_disks_passed:
state.ost.set_disk_passed(state.ticket_id)
# Export debug data
try:
save_debug_reports(state=state, global_vars=global_vars)
except Exception:
# WHY?
pass
# Done # Done
sleep(1) sleep(1)
@ -1536,6 +1573,11 @@ def run_mprime_test(state, test):
print_log('Starting Prime95') print_log('Starting Prime95')
test.abort_msg = 'If running too hot, press CTRL+c to abort the test' test.abort_msg = 'If running too hot, press CTRL+c to abort the test'
run_program(['apple-fans', 'max'], check=False) run_program(['apple-fans', 'max'], check=False)
run_program('touch /tmp/prime.status'.split(), check=False)
with open('/tmp/prime.status', 'w') as f:
f.write(f'{COLORS["YELLOW"]}{test.abort_msg}{COLORS["CLEAR"]}\n')
clear_screen()
countdown_proc = popen_program('tail -f /tmp/prime.status'.split())
tmux_update_pane( tmux_update_pane(
state.panes['Prime95'], state.panes['Prime95'],
command=['hw-diags-prime95', global_vars['TmpDir']], command=['hw-diags-prime95', global_vars['TmpDir']],
@ -1543,7 +1585,7 @@ def run_mprime_test(state, test):
time_limit = MPRIME_LIMIT * 60 time_limit = MPRIME_LIMIT * 60
try: try:
for i in range(time_limit): for i in range(time_limit):
clear_screen() #clear_screen()
sec_left = (time_limit - i) % 60 sec_left = (time_limit - i) % 60
min_left = int( (time_limit - i) / 60) min_left = int( (time_limit - i) / 60)
_status_str = 'Running Prime95 (' _status_str = 'Running Prime95 ('
@ -1555,8 +1597,10 @@ def run_mprime_test(state, test):
sec_left, sec_left,
's' if sec_left != 1 else '') 's' if sec_left != 1 else '')
# Not using print wrappers to avoid flooding the log # Not using print wrappers to avoid flooding the log
print(_status_str) #print(_status_str)
print('{YELLOW}{msg}{CLEAR}'.format(msg=test.abort_msg, **COLORS)) #print('{YELLOW}{msg}{CLEAR}'.format(msg=test.abort_msg, **COLORS))
with open('/tmp/prime.status', 'a') as f:
f.write(f'\r{_status_str}')
update_sensor_data(test.sensor_data, THERMAL_LIMIT) update_sensor_data(test.sensor_data, THERMAL_LIMIT)
# Wait # Wait
@ -1567,9 +1611,7 @@ def run_mprime_test(state, test):
if isinstance(err, KeyboardInterrupt): if isinstance(err, KeyboardInterrupt):
test.update_status('Aborted') test.update_status('Aborted')
elif isinstance(err, ThermalLimitReachedError): elif isinstance(err, ThermalLimitReachedError):
test.failed = True
test.thermal_abort = True test.thermal_abort = True
test.update_status('FAIL')
update_progress_pane(state) update_progress_pane(state)
# Restart live monitor # Restart live monitor
@ -1581,6 +1623,14 @@ def run_mprime_test(state, test):
run_program(['killall', '-s', 'INT', 'mprime'], check=False) run_program(['killall', '-s', 'INT', 'mprime'], check=False)
sleep(1) sleep(1)
tmux_kill_pane(state.panes.pop('Prime95', None)) tmux_kill_pane(state.panes.pop('Prime95', None))
countdown_proc.kill()
# Check max temp
cpu_max_temp = get_cpu_max_temp(test.sensor_data)
if cpu_max_temp >= THERMAL_FAIL:
test.failed = True
test.update_status('FAIL')
update_progress_pane(state)
# Get cooldown temp # Get cooldown temp
run_program(['apple-fans', 'auto'], check=False) run_program(['apple-fans', 'auto'], check=False)
@ -1679,6 +1729,11 @@ def run_mprime_test(state, test):
' {RED}CPU reached temperature limit of {temp}°C{CLEAR}'.format( ' {RED}CPU reached temperature limit of {temp}°C{CLEAR}'.format(
temp=THERMAL_LIMIT, temp=THERMAL_LIMIT,
**COLORS)) **COLORS))
elif cpu_max_temp >= THERMAL_FAIL:
test.report.append(
' {RED}CPU reached failing temperature of {temp}°C{CLEAR}'.format(
temp=THERMAL_FAIL,
**COLORS))
# Done # Done
update_progress_pane(state) update_progress_pane(state)
@ -1749,18 +1804,19 @@ def run_nvme_smart_tests(state, test, update_mode=False):
# have exceeded the Error threshold. This overrules an override. # have exceeded the Error threshold. This overrules an override.
test.failed = True test.failed = True
test.update_status('FAIL') test.update_status('FAIL')
elif dev.is_aging():
test.failed = True
test.update_status('FAIL')
else: else:
# This dev lacks both NVMe and SMART data. This test should've been # This dev lacks both NVMe and SMART data. This test should've been
# disabled during the safety_check(). # disabled during the safety_check().
pass pass
# Disable other disk tests if necessary # Disable other disk tests if necessary
if test.failed and not update_mode: if not dev.disk_ok and dev.override_disabled:
# Only block other tests if critical attributes have failed
for t in ['badblocks', 'I/O Benchmark']: for t in ['badblocks', 'I/O Benchmark']:
dev.disable_test(t, 'Denied') dev.disable_test(t, 'Denied')
if dev.is_aging() and not update_mode:
test.failed = True
test.update_status('FAIL')
# Done # Done
update_progress_pane(state) update_progress_pane(state)

View file

@ -1,5 +1,6 @@
# Wizard Kit: Functions - osTicket # Wizard Kit: Functions - osTicket
import atexit
import mysql.connector as mariadb import mysql.connector as mariadb
from functions.data import * from functions.data import *
@ -50,7 +51,11 @@ class osTicket():
# Only open tunnel if one doesn't exist # Only open tunnel if one doesn't exist
if self.tunnel_proc is None or self.tunnel_proc.poll() is not None: if self.tunnel_proc is None or self.tunnel_proc.poll() is not None:
if self.tunnel_proc:
# Unregister previous terminate
atexit.unregister(self.tunnel_proc.terminate)
self.tunnel_proc = popen_program(cmd) self.tunnel_proc = popen_program(cmd)
atexit.register(self.tunnel_proc.terminate)
# Connect to database # Connect to database
for x in range(5): for x in range(5):
@ -434,7 +439,7 @@ class osTicket():
# Main loop # Main loop
while ticket_number is None: while ticket_number is None:
print_standard(' ') print_standard(' ')
_ticket_id = input('Enter ticket number (or leave blank to disable): ') _ticket_id = input_text('Enter ticket number (or leave blank to disable): ')
_ticket_id = _ticket_id.strip() _ticket_id = _ticket_id.strip()
# No ticket ID entered # No ticket ID entered
@ -544,6 +549,36 @@ class osTicket():
# Done # Done
self.disconnect() self.disconnect()
def set_cpu_failed(self, ticket_id):
"""Mark cpu as failed in osTicket."""
self.set_flag(
ticket_id,
OSTICKET['CPU Flag']['Name'],
OSTICKET['CPU Flag']['Fail'])
def set_cpu_passed(self, ticket_id):
"""Mark cpu as passed in osTicket."""
current_value = self.get_flag(ticket_id, OSTICKET['CPU Flag']['Name'])
# Bail early?
if current_value == OSTICKET['CPU Flag']['Fail']:
print_warning('Not replacing osTicket cpu checkbox FAILED value')
return
# Current value != FAILED, set to passed
self.set_flag(
ticket_id,
OSTICKET['CPU Flag']['Name'],
OSTICKET['CPU Flag']['Pass'])
def set_cpu_max_temp(self, ticket_id, temp):
"""Set CPU temp string in osTicket."""
self.set_flag(
ticket_id,
OSTICKET['CPU Temp']['Name'],
temp,
)
def set_disk_failed(self, ticket_id): def set_disk_failed(self, ticket_id):
"""Mark disk as failed in osTicket.""" """Mark disk as failed in osTicket."""
self.set_flag( self.set_flag(
@ -598,7 +633,9 @@ def get_hostname():
"""Get hostname, returns str.""" """Get hostname, returns str."""
cmd = ['hostnamectl', '--static'] cmd = ['hostnamectl', '--static']
result = run_program(cmd, check=False, encoding='utf-8', errors='ignore') result = run_program(cmd, check=False, encoding='utf-8', errors='ignore')
return result.stdout.strip() result = result.stdout.strip()
result = result.replace('.1201.com', '')
return result
def pad_with_dots(s, pad_right=False): def pad_with_dots(s, pad_right=False):

View file

@ -101,6 +101,22 @@ def get_colored_temp_str(temp):
**COLORS) **COLORS)
def get_cpu_max_temp(sensor_data):
"""get max temp"""
max_temp = 0.0
# Check all CPU Temps
for section, adapters in sensor_data.items():
if not section.startswith('CPU'):
continue
for sources in adapters.values():
for source_data in sources.values():
max_temp = max(max_temp, source_data.get('Max', 0))
# Done
return max_temp
def get_raw_sensor_data(): def get_raw_sensor_data():
"""Read sensor data and return dict.""" """Read sensor data and return dict."""
json_data = {} json_data = {}

View file

@ -75,6 +75,13 @@ def config_explorer_user(setup_mode='All'):
write_registry_settings(settings_explorer_user, all_users=False) write_registry_settings(settings_explorer_user, all_users=False)
def config_power_plans(name='Balanced'):
"""Meta function to backup, restore defaults, and set the power plan."""
backup_power_plans()
reset_power_plans()
set_power_plan(name)
def config_windows_updates(): def config_windows_updates():
"""Configure Windows updates.""" """Configure Windows updates."""
write_registry_settings(SETTINGS_WINDOWS_UPDATES, all_users=True) write_registry_settings(SETTINGS_WINDOWS_UPDATES, all_users=True)
@ -140,6 +147,24 @@ def enable_system_restore():
run_program(cmd) run_program(cmd)
def open_default_apps():
"""TODO"""
run_program(['start', '', 'ms-settings:defaultapps'], shell=True, check=False)
def reset_power_plans():
"""Reset power plans to default settings."""
cmd = ['powercfg', '-RestoreDefaultSchemes']
run_program(cmd)
def set_power_plan(name='Balanced'):
"""Set power plan by name."""
guid = POWER_PLAN_GUIDS[name]
cmd = ['powercfg', '-SetActive', guid]
run_program(cmd)
def update_clock(): def update_clock():
"""Set Timezone and sync clock.""" """Set Timezone and sync clock."""
run_program(['tzutil', '/s', WINDOWS_TIME_ZONE], check=False) run_program(['tzutil', '/s', WINDOWS_TIME_ZONE], check=False)
@ -336,13 +361,14 @@ def install_ninite_bundle(
# Main selections # Main selections
main_selections = [] main_selections = []
if base: if base and standard:
main_selections.append('base-standard')
elif base:
main_selections.append('base') main_selections.append('base')
if standard: elif standard:
if global_vars['OS']['Version'] in ('8', '8.1', '10'): main_selections.append('standard')
main_selections.append('standard') if global_vars['OS']['Version'] not in ('8', '8.1', '10'):
else: main_selections = [f'{s}7' for s in main_selections]
main_selections.append('standard7')
if main_selections: if main_selections:
# Only run if base and/or standard are enabled # Only run if base and/or standard are enabled
cmd = r'{}\Installers\Extras\Bundles\{}.exe'.format( cmd = r'{}\Installers\Extras\Bundles\{}.exe'.format(
@ -437,6 +463,17 @@ def drive_is_rotational(drive):
return is_rotational return is_rotational
def fix_windows_temp_dir():
"""TODO"""
user_perms = [
'Users:(CI)(X,WD,AD)',
'Administrators:(OI)(CI)(F)',
]
for u_p in user_perms:
cmd = ['icacls', r'C:\Windows\Temp', '/grant:r', u_p, '/T']
run_program(cmd)
def open_device_manager(): def open_device_manager():
popen_program(['mmc', 'devmgmt.msc']) popen_program(['mmc', 'devmgmt.msc'])

View file

@ -143,6 +143,8 @@ def tmux_split_window(
def tmux_switch_client(target_session=None): def tmux_switch_client(target_session=None):
"""Switch to target tmux session, or previous if none specified.""" """Switch to target tmux session, or previous if none specified."""
# DEPRECATED - Do nothing
return
cmd = ['tmux', 'switch-client'] cmd = ['tmux', 'switch-client']
if target_session: if target_session:
cmd.extend(['-t', target_session]) cmd.extend(['-t', target_session])

View file

@ -1,5 +1,7 @@
# Wizard Kit: Functions - Windows updates # Wizard Kit: Functions - Windows updates
import pathlib
from functions.common import * from functions.common import *
@ -63,7 +65,11 @@ def disable_windows_updates():
indent=indent, width=width, indent=indent, width=width,
function=delete_folder, folder_path=folder_path) function=delete_folder, folder_path=folder_path)
if not result['CS']: if not result['CS']:
raise GenericError('Failed to remove folder {}'.format(folder_path)) try:
new_path = pathlib.path(folder_path).with_suffix('.bak')
os.rename(folder_path, new_path)
except OSError:
raise GenericError('Failed to remove folder {}'.format(folder_path))
def enable_service(service_name, start_type='auto'): def enable_service(service_name, start_type='auto'):

View file

@ -32,6 +32,9 @@ function launch_in_tmux() {
if [[ -n "${TMUX:-}" ]]; then if [[ -n "${TMUX:-}" ]]; then
# Running inside TMUX, switch to session # Running inside TMUX, switch to session
tmux switch-client -t "$SESSION_NAME" tmux switch-client -t "$SESSION_NAME"
if ! jobs %% >/dev/null 2>&1; then
exit 0
fi
else else
# Running outside TMUX, attach to session # Running outside TMUX, attach to session
tmux attach-session -t "$SESSION_NAME" tmux attach-session -t "$SESSION_NAME"

View file

@ -75,7 +75,7 @@ IO_VARS = {
ATTRIBUTES = { ATTRIBUTES = {
'NVMe': { 'NVMe': {
'critical_warning': {'Critical': True, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, }, 'critical_warning': {'Critical': True, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, },
'media_errors': {'Critical': True, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, }, 'media_errors': {'Critical': False, 'Ignore': False, 'Warning': None, 'Error': 1, 'Maximum': None, },
'power_on_hours': {'Critical': False, 'Ignore': True, 'Warning': 17532, 'Error': 26298, 'Maximum': 122724,}, 'power_on_hours': {'Critical': False, 'Ignore': True, 'Warning': 17532, 'Error': 26298, 'Maximum': 122724,},
'unsafe_shutdowns': {'Critical': False, 'Ignore': True, 'Warning': 1, 'Error': None, 'Maximum': None, }, 'unsafe_shutdowns': {'Critical': False, 'Ignore': True, 'Warning': 1, 'Error': None, 'Maximum': None, },
}, },
@ -104,6 +104,7 @@ KEY_SMART = 'ata_smart_attributes'
# Tests: Prime95 # Tests: Prime95
MPRIME_LIMIT = 7 # of minutes to run Prime95 MPRIME_LIMIT = 7 # of minutes to run Prime95
THERMAL_FAIL = 90 # Fail temperature in Celsius
THERMAL_LIMIT = 99 # Abort temperature in Celsius THERMAL_LIMIT = 99 # Abort temperature in Celsius

View file

@ -35,6 +35,8 @@ LAUNCHERS = {
r'echo.', r'echo.',
r'echo Press Enter to Launch d7II...', r'echo Press Enter to Launch d7II...',
r'pause>nul', r'pause>nul',
r'echo.'
r'echo Starting d7II...'
r'goto DefineLaunch', r'goto DefineLaunch',
r'', r'',
r':: Pre-d7II Errors', r':: Pre-d7II Errors',

View file

@ -7,6 +7,14 @@ OSTICKET = {
'Diags': '2', 'Diags': '2',
'Diags FAIL': '3', 'Diags FAIL': '3',
}, },
'CPU Flag': {
'Name': 'zTemps',
'Pass': 1,
'Fail': 2,
},
'CPU Temp': {
'Name': 'zMaxTemp',
},
'Database': { 'Database': {
'Name': 'osticket', 'Name': 'osticket',
'User': 'wizardkit', 'User': 'wizardkit',

View file

@ -27,10 +27,6 @@ MOZILLA_FIREFOX_UBO_PATH = r'{}\{}\ublock_origin.xpi'.format(
os.environ.get('PROGRAMFILES'), os.environ.get('PROGRAMFILES'),
r'Mozilla Firefox\distribution\extensions') r'Mozilla Firefox\distribution\extensions')
SETTINGS_GOOGLE_CHROME = { SETTINGS_GOOGLE_CHROME = {
r'Software\Policies\Google\Chrome': {
'DWORD Items': {'DefaultNotificationsSetting': 2},
# 1: Allow, 2: Don't allow, 3: Ask
},
r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': { r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': {
'SZ Items': { 'SZ Items': {
'update_url': 'https://clients2.google.com/service/update2/crx'}, 'update_url': 'https://clients2.google.com/service/update2/crx'},
@ -210,6 +206,13 @@ LIBREOFFICE_XCU_DATA = '''<?xml version="1.0" encoding="UTF-8"?>
</oor:items> </oor:items>
''' '''
# Power Plans
POWER_PLAN_GUIDS = {
'Power': 'a1841308-3541-4fab-bc81-f71556f20b4a',
'Balanced': '381b4222-f694-41f0-9685-ff5bb260df2e',
'High Performance': '8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c',
}
# Registry # Registry
SETTINGS_REGBACK = { SETTINGS_REGBACK = {
# Enable RegBack # Enable RegBack

View file

@ -3,12 +3,12 @@
# vim: sts=2 sw=2 ts=2 tw=0 # vim: sts=2 sw=2 ts=2 tw=0
SOURCE_URLS = { SOURCE_URLS = {
'Adobe Reader DC': 'https://ardownload2.adobe.com/pub/adobe/reader/win/AcrobatDC/1901220034/AcroRdrDC1901220034_en_US.exe', 'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1902120049/AcroRdrDC1902120049_en_US.exe',
'AdwCleaner': 'https://downloads.malwarebytes.com/file/adwcleaner', 'AdwCleaner': 'https://downloads.malwarebytes.com/file/adwcleaner',
'AIDA64': 'http://download.aida64.com/aida64engineer600.zip', 'AIDA64': 'http://download.aida64.com/aida64engineer610.zip',
'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip', 'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.35.0/aria2-1.35.0-win-32bit-build1.zip',
'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip', 'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip',
'BleachBit': 'https://download.bleachbit.org/BleachBit-2.2-portable.zip', 'BleachBit': 'https://www.bleachbit.org/download/file/t?file=BleachBit-3.0-portable.zip',
'BlueScreenView32': 'http://www.nirsoft.net/utils/bluescreenview.zip', 'BlueScreenView32': 'http://www.nirsoft.net/utils/bluescreenview.zip',
'BlueScreenView64': 'http://www.nirsoft.net/utils/bluescreenview-x64.zip', 'BlueScreenView64': 'http://www.nirsoft.net/utils/bluescreenview-x64.zip',
'Caffeine': 'http://www.zhornsoftware.co.uk/caffeine/caffeine.zip', 'Caffeine': 'http://www.zhornsoftware.co.uk/caffeine/caffeine.zip',
@ -21,21 +21,21 @@ SOURCE_URLS = {
'ESET Online Scanner': 'https://download.eset.com/com/eset/tools/online_scanner/latest/esetonlinescanner_enu.exe', 'ESET Online Scanner': 'https://download.eset.com/com/eset/tools/online_scanner/latest/esetonlinescanner_enu.exe',
'Everything32': 'https://www.voidtools.com/Everything-1.4.1.935.x86.en-US.zip', 'Everything32': 'https://www.voidtools.com/Everything-1.4.1.935.x86.en-US.zip',
'Everything64': 'https://www.voidtools.com/Everything-1.4.1.935.x64.en-US.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.935.x64.en-US.zip',
'FastCopy': 'http://ftp.vector.co.jp/71/78/2323/FastCopy382_installer.exe', 'FastCopy': 'http://ftp.vector.co.jp/72/08/2323/FastCopy385_installer.exe',
'FurMark': 'https://geeks3d.com/dl/get/569', 'FurMark': 'https://geeks3d.com/dl/get/569',
'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/3027669/ublock_origin-1.20.0-an+fx.xpi', 'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/3428595/ublock_origin-1.23.0-an+fx.xpi',
'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe', 'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe',
'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe', 'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe',
'HWiNFO': 'http://files2.majorgeeks.com/8742c668ee52f7cbe5181d609ff800f3a37492c5/systeminfo/hwi_608.zip', 'HWiNFO': 'http://files2.majorgeeks.com/e4b5a2b01ee1b51b2d17a165855b43c142d822c4/systeminfo/hwi_614.zip',
'Intel SSD Toolbox': r'https://downloadmirror.intel.com/28593/eng/Intel%20SSD%20Toolbox%20-%20v3.5.9.exe', 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/28593/eng/Intel%20SSD%20Toolbox%20-%20v3.5.9.exe',
'IOBit_Uninstaller': r'https://portableapps.com/redirect/?a=IObitUninstallerPortable&s=s&d=pa&f=IObitUninstallerPortable_7.5.0.7.paf.exe', 'IOBit_Uninstaller': r'https://portableapps.com/redirect/?a=IObitUninstallerPortable&s=s&d=pa&f=IObitUninstallerPortable_7.5.0.7.paf.exe',
'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe',
'LibreOffice': 'https://download.documentfoundation.org/libreoffice/stable/6.2.5/win/x86_64/LibreOffice_6.2.5_Win_x64.msi', 'LibreOffice': 'https://download.documentfoundation.org/libreoffice/stable/6.3.3/win/x86_64/LibreOffice_6.3.3_Win_x64.msi',
'Linux Reader': 'https://www.diskinternals.com/download/Linux_Reader.exe', 'Linux Reader': 'https://www.diskinternals.com/download/Linux_Reader.exe',
'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe', 'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe',
'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip', 'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip',
'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip', 'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip',
'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.7.1/npp.7.7.1.bin.minimalist.7z', 'NotepadPlusPlus': 'http://download.notepad-plus-plus.org/repository/7.x/7.8.1/npp.7.8.1.bin.minimalist.7z',
'Office Deployment Tool': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_11617-33601.exe', 'Office Deployment Tool': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_11617-33601.exe',
'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip', 'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip',
'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip', 'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip',
@ -47,12 +47,12 @@ SOURCE_URLS = {
'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe', 'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe',
'smartmontools': 'https://738-105252244-gh.circle-artifacts.com/0/builds/smartmontools-win32-setup-7.1-r4934.exe', 'smartmontools': 'https://738-105252244-gh.circle-artifacts.com/0/builds/smartmontools-win32-setup-7.1-r4934.exe',
'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe', 'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe',
'TestDisk': 'https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip', 'TestDisk': 'https://www.cgsecurity.org/testdisk-7.2-WIP.win.zip',
'wimlib32': 'https://wimlib.net/downloads/wimlib-1.13.1-windows-i686-bin.zip', 'wimlib32': 'https://wimlib.net/downloads/wimlib-1.13.1-windows-i686-bin.zip',
'wimlib64': 'https://wimlib.net/downloads/wimlib-1.13.1-windows-x86_64-bin.zip', 'wimlib64': 'https://wimlib.net/downloads/wimlib-1.13.1-windows-x86_64-bin.zip',
'WinAIO Repair': 'http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip', 'WinAIO Repair': 'http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip',
'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip', 'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip',
'WizTree': 'https://antibody-software.com/files/wiztree_3_29_portable.zip', 'WizTree': 'https://antibody-software.com/files/wiztree_3_30_portable.zip',
'XMPlay 7z': 'https://support.xmplay.com/files/16/xmp-7z.zip?v=800962', 'XMPlay 7z': 'https://support.xmplay.com/files/16/xmp-7z.zip?v=800962',
'XMPlay Game': 'https://support.xmplay.com/files/12/xmp-gme.zip?v=515637', 'XMPlay Game': 'https://support.xmplay.com/files/12/xmp-gme.zip?v=515637',
'XMPlay RAR': 'https://support.xmplay.com/files/16/xmp-rar.zip?v=409646', 'XMPlay RAR': 'https://support.xmplay.com/files/16/xmp-rar.zip?v=409646',
@ -85,10 +85,11 @@ NINITE_REGEX = {
} }
NINITE_SOURCES = { NINITE_SOURCES = {
'Bundles': { 'Bundles': {
'base.exe': '.net4.7.2-7zip-vlc', 'base.exe': '.net4.8-7zip-classicstart-vlc',
'base-standard.exe': '.net4.7.2-7zip-chrome-classicstart-firefox-sumatrapdf-vlc', 'base7.exe': '.net4.8-7zip-vlc',
'base-standard7.exe': '.net4.7.2-7zip-chrome-firefox-sumatrapdf-vlc', 'base-standard.exe': '.net4.8-7zip-chrome-classicstart-firefox-sumatrapdf-vlc',
'standard.exe': 'chrome-classicstart-firefox-sumatrapdf', 'base-standard7.exe': '.net4.8-7zip-chrome-firefox-sumatrapdf-vlc',
'standard.exe': 'chrome-firefox-sumatrapdf',
'standard7.exe': 'chrome-firefox-sumatrapdf', 'standard7.exe': 'chrome-firefox-sumatrapdf',
}, },
'Audio-Video': { 'Audio-Video': {
@ -167,7 +168,7 @@ NINITE_SOURCES = {
}, },
'Runtimes': { 'Runtimes': {
'Adobe Air.exe': 'air', 'Adobe Air.exe': 'air',
'dotNET.exe': '.net4.7.2', 'dotNET.exe': '.net4.8',
'Shockwave.exe': 'shockwave', 'Shockwave.exe': 'shockwave',
'Silverlight.exe': 'silverlight', 'Silverlight.exe': 'silverlight',
}, },

View file

@ -205,6 +205,7 @@ WINDOWS_BUILDS = {
'18358': ('10', None, '19H1', None, 'preview build'), '18358': ('10', None, '19H1', None, 'preview build'),
'18361': ('10', None, '19H1', None, 'preview build'), '18361': ('10', None, '19H1', None, 'preview build'),
'18362': ('10', 'v1903', '19H1', 'May 2019 Update', None), '18362': ('10', 'v1903', '19H1', 'May 2019 Update', None),
'18363': ('10', 'v1909', '19H2', 'November 2019 Update', None),
'18836': ('10', None, '20H1', None, 'preview build'), '18836': ('10', None, '20H1', None, 'preview build'),
'18841': ('10', None, '20H1', None, 'preview build'), '18841': ('10', None, '20H1', None, 'preview build'),
'18845': ('10', None, '20H1', None, 'preview build'), '18845': ('10', None, '20H1', None, 'preview build'),

View file

@ -3,6 +3,7 @@
# vim: sts=2 sw=2 ts=2 # vim: sts=2 sw=2 ts=2
import os import os
import pathlib
import sys import sys
# Init # Init
@ -47,86 +48,92 @@ OTHER_RESULTS = {
SETUP_ACTIONS = OrderedDict({ SETUP_ACTIONS = OrderedDict({
# Install software # Install software
'Installing Programs': {'Info': True}, 'Installing Programs': {'Info': True},
'VCR': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_vcredists, 'Just run': True,}, 'VCR': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_vcredists, 'Just run': True,},
'ESET NOD32 AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_eset_nod32_av, 'If answer': 'ESET', 'KWArgs': {'msp': False},}, 'ESET NOD32 AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_eset_nod32_av, 'If answer': 'ESET', 'KWArgs': {'msp': False},},
'LibreOffice': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_libreoffice, 'LibreOffice': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_libreoffice,
'If answer': 'LibreOffice', 'KWArgs': {'quickstart': False, 'register_mso_types': True, 'use_mso_formats': True, 'vcredist': False}, 'If answer': 'LibreOffice', 'KWArgs': {'quickstart': False, 'register_mso_types': True, 'use_mso_formats': True, 'vcredist': False},
}, },
'Ninite bundle': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_ninite_bundle, 'KWArgs': {'cs': 'STARTED'},}, 'Ninite bundle': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_ninite_bundle, 'KWArgs': {'cs': 'STARTED'},},
# Browsers # Browsers
'Scanning for browsers': {'Info': True}, 'Scanning for browsers': {'Info': True},
'Scan': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': scan_for_browsers, 'Just run': True, 'KWArgs': {'skip_ie': True},}, 'Scan': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': scan_for_browsers, 'Just run': True, 'KWArgs': {'skip_ie': True},},
'Backing up browsers': {'Info': True}, 'Backing up browsers': {'Info': True},
'Backup browsers': {'New': False, 'Dat': True, 'Cur': True, 'HW': False, 'Function': backup_browsers, 'Just run': True,}, 'Backup browsers': {'New': False, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': backup_browsers, 'Just run': True,},
# Install extensions # Install extensions
'Installing Extensions': {'Info': True}, 'Installing Extensions': {'Info': True},
'Classic Shell skin': {'New': True, 'Dat': True, 'Cur': False, 'HW': False, 'Function': install_classicstart_skin, 'Win10 only': True,}, 'Classic Shell skin': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_classicstart_skin, 'Win10 only': True,},
'Chrome extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_chrome_extensions,}, 'Chrome extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_chrome_extensions,},
'Firefox extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_firefox_extensions,}, 'Firefox extensions': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_firefox_extensions,},
# Set Default Apps
'Set Default Apps': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': open_default_apps, 'Win10 only': True,
'Pause': 'Please set default browser, and other apps as needed',},
# Configure software' # Configure software'
'Configuring Programs': {'Info': True}, 'Configuring Programs': {'Info': True},
'Browser add-ons': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': install_adblock, 'Just run': True, 'Browser add-ons': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': install_adblock, 'Just run': True,
'Pause': 'Please enable uBlock Origin for all browsers', 'Pause': 'Please enable uBlock Origin for all browsers',
}, },
'Classic Start': {'New': True, 'Dat': True, 'Cur': False, 'HW': False, 'Function': config_classicstart, 'Win10 only': True,}, 'Chrome Notifications': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': disable_chrome_notifications,},
'Config Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': config_windows_updates, 'Win10 only': True,}, 'Classic Start': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_classicstart, 'Win10 only': True,},
'Enable System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_system_restore,}, 'Config Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': config_windows_updates, 'Win10 only': True,},
'Create System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': create_system_restore_point,}, 'Enable System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_system_restore,},
'Disable Fast Startup': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': disable_fast_startup, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, 'Create System Restore': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': create_system_restore_point,},
'Disable telemetry': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': disable_windows_telemetry, 'Win10 only': True,}, 'Disable Fast Startup': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': disable_fast_startup, 'If answer': 'Fast-Hiber', 'Win10 only': True,},
'Enable BSoD mini dumps': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_mini_dumps,}, 'Disable telemetry': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': disable_windows_telemetry, 'Win10 only': True,},
'Enable Hibernation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,}, 'Enable BSoD mini dumps': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_mini_dumps,},
'Enable RegBack': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_regback, 'Win10 only': True,}, 'Enable Hibernation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': enable_hibernation, 'If answer': 'Fast-Hiber', 'Win10 only': True,},
'Enable Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': enable_windows_updates, 'KWArgs': {'silent': True},}, 'Enable RegBack': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_regback, 'Win10 only': True,},
'Explorer (system)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': config_explorer_system, 'Win10 only': True,}, 'Enable Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': enable_windows_updates, 'KWArgs': {'silent': True},},
'Explorer (user)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': config_explorer_user, 'Win10 only': True,}, 'Explorer (system)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_explorer_system, 'Win10 only': True,},
'Restart Explorer': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': restart_explorer,}, 'Explorer (user)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_explorer_user, 'Win10 only': True,},
'Update Clock': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': update_clock,}, 'Restart Explorer': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': restart_explorer,},
'Power Plans': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': config_power_plans, 'KWArgs': {'name': 'Balanced'},},
'Update Clock': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': update_clock,},
'Windows\\Temp Fix': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': fix_windows_temp_dir,},
# Cleanup # Cleanup
'Cleaning up': {'Info': True}, 'Cleaning up': {'Info': True},
'AdwCleaner': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_adwcleaner,}, 'AdwCleaner': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_adwcleaner,},
'd7II': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_d7ii,}, 'd7II': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_d7ii,},
'Desktop': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_desktop,}, 'Desktop': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_desktop,},
'Emsisoft s2cmd': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_emsisoft,}, 'Emsisoft s2cmd': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_emsisoft,},
'Registry Backup(s)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': cleanup_regbackups,}, 'Registry Backup(s)': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': cleanup_regbackups,},
'Restore default UAC': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': restore_default_uac,}, 'Restore default UAC': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': restore_default_uac,},
'KIT_NAME_FULL': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': delete_empty_folders,}, 'KIT_NAME_FULL': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': delete_empty_folders,},
# System Info # System Info
'Exporting system info': {'Info': True}, 'Exporting system info': {'Info': True},
'AIDA64 Report': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': run_aida64,}, 'AIDA64 Report': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': run_aida64,},
'File listing': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': backup_file_list,}, 'File listing': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': backup_file_list,},
'Power plans': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': backup_power_plans,}, 'Product Keys': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': run_produkey,},
'Product Keys': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': run_produkey,}, 'Registry': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': backup_registry,},
'Registry': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': backup_registry,},
# Show Summary # Show Summary
'Summary': {'Info': True}, 'Summary': {'Info': True},
'Operating System': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_os_name, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},}, 'Operating System': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_os_name, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
'Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_os_activation, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},}, 'Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_os_activation, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
'BIOS Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': activate_with_bios, 'If not activated': True,}, 'BIOS Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': activate_with_bios, 'If not activated': True,},
'Secure Boot': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': check_secure_boot_status, 'KWArgs': {'show_alert': False},}, 'Secure Boot': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': check_secure_boot_status, 'KWArgs': {'show_alert': False},},
'Installed RAM': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_installed_ram, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},}, 'Installed RAM': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_installed_ram, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
'Temp size': {'New': False, 'Dat': False, 'Cur': True, 'HW': False, 'Function': show_temp_files_size, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},}, 'Temp size': {'New': False, 'Dat': False, 'Cur': True, 'HW': False, 'Verf': False, 'Function': show_temp_files_size, 'KWArgs': {'ns': 'UNKNOWN', 'silent_function': False},},
'Show free space': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': show_free_space, 'Just run': True,}, 'Show free space': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': show_free_space, 'Just run': True,},
'Installed AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': get_installed_antivirus, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},}, 'Installed AV': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': get_installed_antivirus, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},},
'Installed Office': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': get_installed_office, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},}, 'Installed Office': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': get_installed_office, 'KWArgs': {'ns': 'UNKNOWN', 'print_return': True},},
'Partitions 4K aligned': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': check_4k_alignment, 'KWArgs': {'cs': 'TRUE', 'ns': 'FALSE'},}, 'Partitions 4K aligned': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': True, 'Function': check_4k_alignment, 'KWArgs': {'cs': 'TRUE', 'ns': 'FALSE'},},
# Open things # Open things
'Opening Programs': {'Info': True}, 'Opening Programs': {'Info': True},
'Device Manager': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': open_device_manager, 'KWArgs': {'cs': 'STARTED'},}, 'Device Manager': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': open_device_manager, 'KWArgs': {'cs': 'STARTED'},},
'HWiNFO sensors': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': run_hwinfo_sensors, 'KWArgs': {'cs': 'STARTED'},}, 'HWiNFO sensors': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': run_hwinfo_sensors, 'KWArgs': {'cs': 'STARTED'},},
'Snappy': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': open_snappy_driver_origin, 'KWArgs': {'cs': 'STARTED'},}, 'Snappy': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': open_snappy_driver_origin, 'KWArgs': {'cs': 'STARTED'},},
'Speed test': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': open_speedtest, 'KWArgs': {'cs': 'STARTED'},}, #'Speed test': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': open_speedtest, 'KWArgs': {'cs': 'STARTED'},},
'Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': open_windows_updates, 'KWArgs': {'cs': 'STARTED'},}, 'Windows Updates': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': open_windows_updates, 'KWArgs': {'cs': 'STARTED'},},
'Windows Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Function': open_windows_activation, 'If not activated': True, 'KWArgs': {'cs': 'STARTED'},}, 'Windows Activation': {'New': True, 'Dat': True, 'Cur': True, 'HW': False, 'Verf': False, 'Function': open_windows_activation, 'If not activated': True, 'KWArgs': {'cs': 'STARTED'},},
'Sleep': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': sleep, 'Just run': True, 'KWArgs': {'seconds': 3},}, 'Sleep': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': sleep, 'Just run': True, 'KWArgs': {'seconds': 3},},
'XMPlay': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Function': run_xmplay, 'KWArgs': {'cs': 'STARTED'},}, 'XMPlay': {'New': True, 'Dat': True, 'Cur': True, 'HW': True, 'Verf': False, 'Function': run_xmplay, 'KWArgs': {'cs': 'STARTED'},},
}) })
SETUP_ACTION_KEYS = ( SETUP_ACTION_KEYS = (
'Function', 'Function',
@ -287,10 +294,11 @@ def get_mode():
"""Get mode via menu_select, returns str.""" """Get mode via menu_select, returns str."""
setup_mode = None setup_mode = None
mode_options = [ mode_options = [
{'Name': 'New', 'Display Name': 'New / Clean install (no data)'}, {'Name': 'New', 'Display Name': 'Clean install (no data)'},
{'Name': 'Dat', 'Display Name': 'Clean install with data migration'}, {'Name': 'Dat', 'Display Name': 'Clean install (with data)'},
{'Name': 'Cur', 'Display Name': 'Original OS (post-d7II or overinstall)'}, {'Name': 'Cur', 'Display Name': 'Original OS (post-repairs)'},
{'Name': 'HW', 'Display Name': 'Hardware service (i.e. no software work)'}, {'Name': 'HW', 'Display Name': 'Hardware service'},
{'Name': 'Verf', 'Display Name': 'Verify (no changes)'},
] ]
actions = [ actions = [
{'Name': 'Quit', 'Letter': 'Q'}, {'Name': 'Quit', 'Letter': 'Q'},
@ -381,10 +389,47 @@ def main():
# Ignoring exceptions since we just want to show the popup # Ignoring exceptions since we just want to show the popup
pass pass
# Eject ODD
try:
run_nircmd('cdrom', 'open')
except Exception:
pass
# Verf step
if setup_mode == 'Verf' and ask('Open programs (Activation, Device Manager, etc...)? '):
open_all_the_things()
# Done # Done
pause('Press Enter to exit... ') pause('Press Enter to exit... ')
def open_all_the_things():
"""TODO"""
open_device_manager()
run_hwinfo_sensors()
open_snappy_driver_origin()
open_speedtest()
open_windows_updates()
if not windows_is_activated():
open_windows_activation()
sleep(3)
run_xmplay()
if setup_mode == 'Dat':
# System needs full AV scan
print_standard('Please run a full virus scan before continuing')
eset_path = pathlib.Path(
f'{os.environ.get("PROGRAMFILES", "")}/ESET/ESET Security/ecmds.exe')
if eset_path.exists():
popen_program([eset_path, '/launch'])
else:
try:
run_kvrt()
except Exception:
# Meh
pass
pause('Press Enter to exit...')
if __name__ == '__main__': if __name__ == '__main__':
try: try:
main() main()

48
.bin/Scripts/upload-logs Executable file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env python
# vim: sts=2 sw=2 ts=2
"""Wizard Kit: Upload Logs"""
import os
import sys
# Init
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
from functions.hw_diags import *
init_global_vars(silent=True)
# Functions
def main():
"""Upload logs for review."""
lines = []
# Instructions
print_success(f'{KIT_NAME_FULL}: Upload Logs')
print('')
print('Please state the reason for the review.')
print_info(' End note with an empty line.')
print('')
# Get reason note
while True:
text = input_text('> ')
if not text:
break
lines.append(text)
with open(f'{global_vars["LogDir"]}/__reason__.txt', 'a') as f:
f.write('\n'.join(lines))
# Compress and upload logs
result = try_and_print(
message='Uploading logs...',
function=upload_logdir,
indent=0,
global_vars=global_vars,
reason='Review',
)
if not result['CS']:
raise SystemExit(1)
if __name__ == '__main__':
main()

View file

@ -7,12 +7,12 @@ pushd "%~dp0"
:: Credit to SS64.com Code taken from http://ss64.com/nt/syntax-getdate.html :: Credit to SS64.com Code taken from http://ss64.com/nt/syntax-getdate.html
:: Use WMIC to retrieve date and time in ISO 8601 format. :: Use WMIC to retrieve date and time in ISO 8601 format.
for /f "skip=1 tokens=1-6" %%G in ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do ( for /f "skip=1 tokens=1-6" %%G in ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do (
if "%%~L"=="" goto s_done if "%%~L"=="" goto s_done
set _yyyy=%%L set _yyyy=%%L
set _mm=00%%J set _mm=00%%J
set _dd=00%%G set _dd=00%%G
set _hour=00%%H set _hour=00%%H
set _minute=00%%I set _minute=00%%I
) )
:s_done :s_done
:: Pad digits with leading zeros :: Pad digits with leading zeros
@ -24,10 +24,11 @@ set iso_date=%_yyyy%-%_mm%-%_dd%
rem Get uninstaller path from registry rem Get uninstaller path from registry
set "uninstaller=" set "uninstaller="
set "altuninstaller=%PROGRAMFILES%\Malwarebytes\Anti-Malware\mbuns.exe"
for /f usebackq^ tokens^=2^ delims^=^" %%s in ( for /f usebackq^ tokens^=2^ delims^=^" %%s in (
`reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1" /v UninstallString` `reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1" /v UninstallString`
) do ( ) do (
set "uninstaller=%%s" set "uninstaller=%%s"
) )
rem Copy logs to 1201 folder rem Copy logs to 1201 folder
@ -36,28 +37,35 @@ robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\LOGS" "%SYSTEMDRIVE%\1201\Lo
robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\ScanResults" "%SYSTEMDRIVE%\1201\Logs\%iso_date%\Tools\MBAM" >nul robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\ScanResults" "%SYSTEMDRIVE%\1201\Logs\%iso_date%\Tools\MBAM" >nul
if exist "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" ( if exist "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" (
rem Keep MBAM rem Keep MBAM
echo Previous Malwarebytes installation detected. echo Previous Malwarebytes installation detected.
) else ( ) else (
rem Move Quarantine to 1201 folder rem Move Quarantine to 1201 folder
move "%PROGRAMDATA%\Malwarebytes\Malwarebytes Anti-Malware\Quarantine" "%SYSTEMDRIVE%\1201\Quarantine\MBAM_%iso_date%_%_hour%%_minute%" move "%PROGRAMDATA%\Malwarebytes\Malwarebytes Anti-Malware\Quarantine" "%SYSTEMDRIVE%\1201\Quarantine\MBAM_%iso_date%_%_hour%%_minute%"
rem Remove MBAM rem Remove MBAM
echo No previous Malwarebytes installation detected. echo No previous Malwarebytes installation detected.
if exist "%uninstaller%" ( if exist "%uninstaller%" (
echo "Uninstalling Malwarebytes..." echo "Uninstalling Malwarebytes..."
start "" /wait "%uninstaller%" /VERYSILENT /NORESTART /LOG start "" /wait "%uninstaller%" /VERYSILENT /NORESTART /LOG
) else ( goto Done
color 4e )
echo "Malwarebytes installation not found." if exist "%altuninstaller%" (
echo "" rem MBAM 4.x workaround
echo "Press any key to exit... " echo "Uninstalling Malwarebytes..."
pause >nul start "" /wait "%altuninstaller%" /Uninstall /VERYSILENT /NORESTART /LOG
) goto Done
)
color 4e
echo "Malwarebytes installation not found."
echo ""
echo "Press any key to exit... "
pause >nul
) )
:Done
rem Remove marker rem Remove marker
del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" 2>nul
popd popd
endlocal endlocal

View file

@ -832,6 +832,7 @@ WizardKit User Checklist=1
WizardKit System Checklist=1 WizardKit System Checklist=1
WizardKit Browser Reset=0 WizardKit Browser Reset=0
Malwarebytes Download=1 Malwarebytes Download=1
Enable Windows Updates=1
[Repair2] [Repair2]
49=0 49=0
48=0 48=0

View file

@ -1 +1 @@
Malwarebytes Download|Malwarebytes Install|Malwarebytes Scan|Malwarebytes Uninstall|AdwCleaner (Updated)|IObit Uninstaller|Bitdefender Rootkit Remover| Malwarebytes Download|Malwarebytes Install|Malwarebytes Scan|Malwarebytes Uninstall|AdwCleaner (Updated)|IObit Uninstaller|Enable Windows Updates|Bitdefender Rootkit Remover|

View file

@ -12,7 +12,7 @@
# get any feedback about the import. # get any feedback about the import.
# #
# We are always happy to answer any questions you may have! # We are always happy to answer any questions you may have!
# (c) 2015-2018 O&O Software GmbH, Berlin. https://www.oo-software.com/ # Copyright © O&O Software GmbH https://www.oo-software.com/
############################################################################ ############################################################################
P001 + P001 +
@ -58,7 +58,10 @@ S010 -
E001 + E001 +
E002 - E002 -
E003 - E003 -
E008 -
E007 - E007 -
E010 -
E009 -
E004 - E004 -
E005 - E005 -
E006 - E006 -
@ -113,12 +116,15 @@ S014 +
S011 - S011 -
K001 - K001 -
K002 + K002 +
K005 -
M001 + M001 +
M002 + M002 +
M003 +
M004 + M004 +
M005 + M005 +
M003 -
M012 - M012 -
M013 - M013 -
M014 - M014 -
M015 +
M016 -
N001 - N001 -

View file

@ -1 +1,7 @@
ServerAliveInterval 120 ServerAliveInterval 120
Host *
LogLevel=quiet
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null

View file

@ -1 +0,0 @@
osticket.1201.com,165.227.31.131 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWOfJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4=

View file

@ -9,6 +9,8 @@
# #
# Please see http://i3wm.org/docs/userguide.html for a complete reference! # Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $alt Mod1
set $ctrl Control
set $mod Mod4 set $mod Mod4
# Configure border style <normal|1pixel|pixel xx|none|pixel> # Configure border style <normal|1pixel|pixel xx|none|pixel>
@ -24,8 +26,8 @@ bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- #decreas
bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle # mute sound bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle # mute sound
# alt+tab navi # alt+tab navi
bindsym Mod1+Tab workspace next bindsym $alt+Tab workspace next
bindsym Mod1+Shift+Tab workspace prev bindsym $alt+Shift+Tab workspace prev
# change borders # change borders
bindsym $mod+u border none bindsym $mod+u border none
@ -57,7 +59,7 @@ bindsym $mod+Return exec i3-sensible-terminal
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
bindsym $mod+q kill bindsym $mod+q kill
bindsym Mod1+F4 kill bindsym $alt+F4 kill
# start dmenu (a program launcher) # start dmenu (a program launcher)
#bindsym $mod+Shift+d exec dmenu_run #bindsym $mod+Shift+d exec dmenu_run
@ -66,8 +68,18 @@ bindsym Mod1+F4 kill
# installed. # installed.
#bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop #bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+r exec "rofi -combi-modi window,drun,run -show combi -modi combi" bindsym $mod+r exec "rofi -combi-modi window,drun,run -show combi -modi combi"
bindsym $ctrl+$alt+r exec "rofi -combi-modi window,drun,run -show combi -modi combi"
# misc app shortcuts # misc app shortcuts
bindsym $ctrl+$alt+c exec "urxvt -title 'WKClone (ddrescue-tui)' -e ddrescue-tui clone"
bindsym $ctrl+$alt+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
bindsym $ctrl+$alt+f exec "thunar ~"
bindsym $ctrl+$alt+i exec "hardinfo"
bindsym $ctrl+$alt+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes gui"
bindsym $ctrl+$alt+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags --quick"
bindsym $ctrl+$alt+t exec "urxvt"
bindsym $ctrl+$alt+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors"
bindsym $ctrl+$alt+w exec "firefox"
bindsym $mod+c exec "urxvt -title 'WKClone (ddrescue-tui)' -e ddrescue-tui clone" bindsym $mod+c exec "urxvt -title 'WKClone (ddrescue-tui)' -e ddrescue-tui clone"
bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags" bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
bindsym $mod+f exec "thunar ~" bindsym $mod+f exec "thunar ~"
@ -240,6 +252,7 @@ mode "resize" {
bindsym $mod+Shift+r mode "resize" bindsym $mod+Shift+r mode "resize"
# "System" menu # "System" menu
bindsym $ctrl+$alt+x mode "$mode_system"
bindsym $mod+x mode "$mode_system" bindsym $mod+x mode "$mode_system"
set $mode_system (l)ock, (e)xit, (r)eboot, (s)hutdown, (c)onfig, (i)3 set $mode_system (l)ock, (e)xit, (r)eboot, (s)hutdown, (c)onfig, (i)3
mode "$mode_system" { mode "$mode_system" {

View file

@ -297,6 +297,61 @@
<menu>root-menu</menu> <menu>root-menu</menu>
</action> </action>
</keybind> </keybind>
<keybind key="C-A-c">
<action name="Execute">
<command>urxvt -title "WKClone (ddrescue-tui)" -e ddrescue-tui clone</command>
</action>
</keybind>
<keybind key="C-A-d">
<action name="Execute">
<command>urxvt -title "Hardware Diagnostics" -e hw-diags</command>
</action>
</keybind>
<keybind key="C-A-f">
<action name="Execute">
<command>thunar</command>
</action>
</keybind>
<keybind key="C-A-i">
<action name="Execute">
<command>hardinfo</command>
</action>
</keybind>
<keybind key="C-A-m">
<action name="Execute">
<command>urxvt -title "Mount all Volumes" -e mount-all-volumes gui</command>
</action>
</keybind>
<keybind key="C-A-r">
<action name="Execute">
<command>rofi -combi-modi window,drun,run -show combi -modi combi</command>
</action>
</keybind>
<keybind key="C-A-s">
<action name="Execute">
<command>urxvt -title "Hardware Diagnostics" -e hw-diags --quick</command>
</action>
</keybind>
<keybind key="C-A-t">
<action name="Execute">
<command>urxvt</command>
</action>
</keybind>
<keybind key="C-A-v">
<action name="Execute">
<command>urxvt -title "Hardware Sensors" -e watch -c -n1 -t hw-sensors</command>
</action>
</keybind>
<keybind key="C-A-w">
<action name="Execute">
<command>firefox</command>
</action>
</keybind>
<keybind key="C-A-x">
<action name="Execute">
<command>oblogout</command>
</action>
</keybind>
<keybind key="W-c"> <keybind key="W-c">
<action name="Execute"> <action name="Execute">
<command>urxvt -title "WKClone (ddrescue-tui)" -e ddrescue-tui clone</command> <command>urxvt -title "WKClone (ddrescue-tui)" -e ddrescue-tui clone</command>

View file

@ -9,28 +9,39 @@ chntpw
cmatrix cmatrix
colordiff colordiff
cpio cpio
cryptsetup
curl curl
device-mapper
diffutils
dmidecode dmidecode
dos2unix dos2unix
e2fsprogs e2fsprogs
hexedit hexedit
hfsprogs hfsprogs
htop htop
inetutils
iwd iwd
jfsutils
ldmtool ldmtool
ldns ldns
less
lha lha
libewf libewf
linux-firmware linux-firmware
lm_sensors lm_sensors
lvm2
lzip lzip
man-db
man-pages
mariadb-clients mariadb-clients
mdadm mdadm
mediainfo mediainfo
mprime mprime
nano
ncdu ncdu
networkmanager networkmanager
p7zip p7zip
perl
progsreiserfs progsreiserfs
python python
python-docopt python-docopt
@ -44,9 +55,13 @@ rfkill
rng-tools rng-tools
rxvt-unicode-terminfo rxvt-unicode-terminfo
smartmontools-svn smartmontools-svn
smbclient
speedtest-cli speedtest-cli
sysfsutils
systemd-sysvcompat
terminus-font terminus-font
testdisk-wip testdisk-wip
texinfo
tmux tmux
tree tree
udevil udevil
@ -55,9 +70,14 @@ ufw
unarj unarj
unrar unrar
unzip unzip
usbutils
util-linux util-linux
vi
vim vim
wd719x-firmware wd719x-firmware
which
wimlib wimlib
xfsprogs
xz
zip zip
zsh zsh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB