From 77f3458d7101a348e52264d96d97ac89cfdf253b Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Fri, 9 Mar 2018 14:30:22 -0700 Subject: [PATCH 01/20] Expanded openbox-patched dependencies --- .linux_items/packages/dependencies | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.linux_items/packages/dependencies b/.linux_items/packages/dependencies index 7b6da316..edf99bb6 100644 --- a/.linux_items/packages/dependencies +++ b/.linux_items/packages/dependencies @@ -5,9 +5,16 @@ curl dos2unix git hwloc +imlib2 lhasa libbsd libewf +librsvg +libsm +libxcursor +libxinerama +libxml2 +libxrandr ntfs-3g openssh p7zip @@ -15,5 +22,6 @@ pango progsreiserfs refind-efi rsync +startup-notification subversion syslinux From b0802001187fd796efdc61bc5318a8b0d095b9be Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Thu, 15 Mar 2018 14:30:46 -0600 Subject: [PATCH 02/20] Fix issue #21 --- .bin/Scripts/functions/hw_diags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index ac9d5a26..8f15fbdb 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -437,7 +437,7 @@ def scan_disks(): else: # Skip WizardKit devices wk_label = '{}_LINUX'.format(KIT_NAME_SHORT) - if wk_label not in [c.get('label', '') for c in d['children']]: + if wk_label not in [c.get('label', '') for c in d.get('children', [])]: devs[d['name']] = {'lsblk': d} TESTS['NVMe/SMART']['Status'][d['name']] = 'Pending' TESTS['badblocks']['Status'][d['name']] = 'Pending' From 8e22aa22b036f35e5187e1c01281351f71491921 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Thu, 15 Mar 2018 15:28:54 -0600 Subject: [PATCH 03/20] Fix issue #22 --- .bin/Scripts/functions/info.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/info.py b/.bin/Scripts/functions/info.py index 066ebbd7..fa3ceab6 100644 --- a/.bin/Scripts/functions/info.py +++ b/.bin/Scripts/functions/info.py @@ -97,7 +97,7 @@ def backup_registry(): def get_folder_size(path): """Get (human-readable) size of folder passed, returns str.""" size = 'Unknown' - cmd = [global_vars['Tools']['Du'], '-nobanner', '-q', path] + cmd = [global_vars['Tools']['Du'], '-c', '-nobanner', '-q', path] try: out = run_program(cmd) except FileNotFoundError: @@ -107,10 +107,13 @@ def get_folder_size(path): # Failed to get folder size pass else: - size = out.stdout.decode().splitlines()[4] - size = re.sub(r'Size:\s+([\d,]+)\sbytes$', r'\1', size) - size = size.replace(',', '') - size = human_readable_size(size) + try: + size = out.stdout.decode().split(',')[-2] + except IndexError: + # Failed to parse csv data + pass + else: + size = human_readable_size(size) return size def get_installed_office(): @@ -442,6 +445,11 @@ def show_user_data_summary(indent=8, width=32): users = [u for u in users if u['Active']] get_user_folder_sizes(users) for user in users: + if ('Size' not in user['Profile'] + and not any(user['Shell Folders']) + and not any(user['Extra Folders'])): + # Skip empty users + continue print_success('{indent}User: {user}'.format( indent = ' '*int(indent/2), user = user['Name'])) From 4b0dde6efe0f22f4baa746ee71d625912f55523e Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 15 Apr 2018 10:11:03 -0600 Subject: [PATCH 04/20] Re-add keyboard test to HW diag menu * Fix issue #25 --- .bin/Scripts/functions/hw_diags.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 8f15fbdb..e1dc4a42 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -80,6 +80,7 @@ def menu_diags(*args): ] actions = [ {'Letter': 'A', 'Name': 'Audio test'}, + {'Letter': 'K', 'Name': 'Keyboard test'}, {'Letter': 'N', 'Name': 'Network test'}, {'Letter': 'M', 'Name': 'Screen Saver - Matrix', 'CRLF': True}, {'Letter': 'P', 'Name': 'Screen Saver - Pipes'}, @@ -119,6 +120,8 @@ def menu_diags(*args): elif selection == 'A': run_program(['hw-diags-audio'], check=False, pipe=False) pause('Press Enter to return to main menu... ') + elif selection == 'K': + run_program(['xev', '-event', 'keyboard'], check=False, pipe=False) elif selection == 'N': run_program(['hw-diags-network'], check=False, pipe=False) pause('Press Enter to return to main menu... ') From c7c23bc7a1187397432761c57a94800e701205ef Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 15 Apr 2018 19:19:03 -0600 Subject: [PATCH 05/20] Open speedtest at the end of the User Checklist * Fix issue #24 --- .bin/Scripts/user_checklist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index fd7e3418..72697af7 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -72,6 +72,9 @@ if __name__ == '__main__': else: if not answer_config_browsers: print_warning(' Skipped') + + # Run speedtest + popen_program(['start', '', 'https://fast.com'], shell=True) # Done print_standard('\nDone.') From a7079d4eae79a691e47e4330fbb750a877c6244c Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 15 Apr 2018 20:49:47 -0600 Subject: [PATCH 06/20] Added GPT/PMBR support to build-ufd * Defaults to GPT/PMBR * (Hopefully) fixes #20 * Can still build MBR (Legacy) with the --use-mbr flag --- .bin/Scripts/build-ufd | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/build-ufd b/.bin/Scripts/build-ufd index f1db1286..6aff7024 100755 --- a/.bin/Scripts/build-ufd +++ b/.bin/Scripts/build-ufd @@ -153,6 +153,7 @@ function help () { ADVANCED: -d --debug Enable debug mode -v --verbose Enable verbose mode + -M --use-mbr Use real MBR instead of GPT w/ Protective MBR -F --force Bypass all confirmation messages. USE WITH EXTREME CAUTION! EOF @@ -378,6 +379,11 @@ if [[ "${arg_F:?}" == 1 ]]; then else SILENT="False" fi +if [[ "${arg_M:?}" == 1 ]]; then + USE_MBR="True" +else + USE_MBR="False" +fi if [[ "${arg_h:?}" == 1 ]]; then help "${__usage_example}" @@ -499,6 +505,9 @@ echo "Extra Dir: ${EXTRA_DIR:-(Not Specified)}" echo "" echo -e "${BLUE}Destination${CLEAR}" lsblk -n -o NAME,LABEL,SIZE,MODEL,SERIAL "${DEST_DEV}" +if [[ "${USE_MBR}" == "True" ]]; then + echo -e "${YELLOW}Formatting using legacy MBR${CLEAR}" +fi echo "" # Ask before starting job @@ -523,8 +532,15 @@ tmux split-window -dl 10 tail -f "${LOG_FILE}" # Format echo "Formatting drive..." -parted "${DEST_DEV}" -s -- mklabel msdos mkpart primary fat32 1MiB -1s >> "${LOG_FILE}" 2>&1 -parted "${DEST_DEV}" set 1 boot on >> "${LOG_FILE}" 2>&1 +if [[ "${USE_MBR}" == "True" ]]; then + parted "${DEST_DEV}" --script -- mklabel msdos mkpart primary fat32 4MiB -1s >> "${LOG_FILE}" 2>&1 + parted "${DEST_DEV}" set 1 boot on >> "${LOG_FILE}" 2>&1 +else + parted "${DEST_DEV}" --script -- mklabel gpt mkpart primary fat32 4MiB -4MiB >> "${LOG_FILE}" 2>&1 + parted "${DEST_DEV}" set 1 legacy_boot on >> "${LOG_FILE}" 2>&1 + #parted "${DEST_DEV}" disk_set pmbr_boot on >> "${LOG_FILE}" 2>&1 + # pmbr_boot breaks detection on some UEFI MOBOs +fi mkfs.vfat -F 32 -n "${UFD_LABEL}" "${DEST_PAR}" >> "${LOG_FILE}" 2>&1 # Mount sources and dest @@ -563,7 +579,11 @@ rmdir /mnt/Dest >> "${LOG_FILE}" 2>&1 sync echo "Installing Syslinux MBR..." -dd bs=440 count=1 if=/usr/lib/syslinux/bios/mbr.bin of=${DEST_DEV} >> "${LOG_FILE}" 2>&1 +if [[ "${USE_MBR}" == "True" ]]; then + dd bs=440 count=1 if=/usr/lib/syslinux/bios/mbr.bin of=${DEST_DEV} >> "${LOG_FILE}" 2>&1 +else + dd bs=440 count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=${DEST_DEV} >> "${LOG_FILE}" 2>&1 +fi sync # Cleanup From e55dbeeb23d141018495be083173788b828f8a50 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 02:53:48 -0600 Subject: [PATCH 07/20] Add dd drive I/O Benchmark test * All tests: runs if SMART=CS/OVERRIDE & BADBLOCKS=CS * All drive tests: runs if SMART=CS/OVERRIDE & BADBLOCKS=CS * I/O tests are readonly, blocksize=4M, and limited to 16 Gb * Fix issue #23 --- .bin/Scripts/functions/hw_diags.py | 114 +++++++++++++++++++++++++++-- .bin/Scripts/hw-diags-iobenchmark | 18 +++++ 2 files changed, 124 insertions(+), 8 deletions(-) create mode 100644 .bin/Scripts/hw-diags-iobenchmark diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index e1dc4a42..fa0e7209 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -39,6 +39,11 @@ TESTS = { 'Results': {}, 'Status': {}, }, + 'iobenchmark': { + 'Enabled': False, + 'Results': {}, + 'Status': {}, + }, } def get_smart_details(dev): @@ -66,15 +71,17 @@ def menu_diags(*args): """Main HW-Diagnostic menu.""" diag_modes = [ {'Name': 'All tests', - 'Tests': ['Prime95', 'NVMe/SMART', 'badblocks']}, + 'Tests': ['Prime95', 'NVMe/SMART', 'badblocks', 'iobenchmark']}, {'Name': 'Prime95', 'Tests': ['Prime95']}, - {'Name': 'NVMe/SMART & badblocks', - 'Tests': ['NVMe/SMART', 'badblocks']}, + {'Name': 'All drive tests', + 'Tests': ['NVMe/SMART', 'badblocks', 'iobenchmark']}, {'Name': 'NVMe/SMART', 'Tests': ['NVMe/SMART']}, {'Name': 'badblocks', 'Tests': ['badblocks']}, + {'Name': 'I/O Benchmark', + 'Tests': ['iobenchmark']}, {'Name': 'Quick drive test', 'Tests': ['Quick', 'NVMe/SMART']}, ] @@ -197,6 +204,75 @@ def run_badblocks(): run_program('tmux kill-pane -a'.split(), check=False) pass +def run_iobenchmark(): + """Run a read-only test for all detected disks.""" + aborted = False + clear_screen() + print_log('\nStart I/O Benchmark test(s)\n') + progress_file = '{}/iobenchmark_progress.out'.format(global_vars['LogDir']) + update_progress() + + # Set Window layout and start test + run_program('tmux split-window -dhl 15 watch -c -n1 -t cat {}'.format( + TESTS['Progress Out']).split()) + + # Show disk details + for name, dev in sorted(TESTS['iobenchmark']['Devices'].items()): + show_disk_details(dev) + print_standard(' ') + update_progress() + + # Run + print_standard('Running benchmark test(s):') + for name, dev in sorted(TESTS['iobenchmark']['Devices'].items()): + cur_status = TESTS['iobenchmark']['Status'][name] + nvme_smart_status = TESTS['NVMe/SMART']['Status'].get(name, None) + bb_status = TESTS['badblocks']['Status'].get(name, None) + if cur_status == 'Denied': + # Skip denied disks + continue + if nvme_smart_status == 'NS': + TESTS['iobenchmark']['Status'][name] = 'Skipped' + elif bb_status in ['NS', 'Skipped']: + TESTS['iobenchmark']['Status'][name] = 'Skipped' + else: + # (SMART tests not run or CS/OVERRIDE) + # AND (BADBLOCKS tests not run or CS) + TESTS['iobenchmark']['Status'][name] = 'Working' + update_progress() + print_standard(' /dev/{:11} '.format(name+'...'), end='', flush=True) + run_program('tmux split-window -dl 5 {} {} {}'.format( + 'hw-diags-iobenchmark', + '/dev/{}'.format(name), + progress_file).split()) + wait_for_process('dd') + print_standard('Done', timestamp=False) + + # Check results + with open(progress_file, 'r') as f: + text = f.read() + io_stats = text.replace('\r', '\n').split('\n') + try: + io_stats = [re.sub(r'.*\s+(\d+) MB/s\s*$', r'\1', stat) + for stat in io_stats if 'MB/s' in stat] + io_stats = [int(x) for x in io_stats] + TESTS['iobenchmark']['Results'][name] = 'Read speed: {:0.0f} MB/s (Min: {}, Max: {})'.format( + sum(io_stats) / len(io_stats), + min(io_stats), + max(io_stats)) + TESTS['iobenchmark']['Status'][name] = 'CS' + except: + TESTS['iobenchmark']['Status'][name] = 'NS' + + # Move temp file + shutil.move(progress_file, '{}/iobenchmark-{}.log'.format( + global_vars['LogDir'], name)) + update_progress() + + # Done + run_program('tmux kill-pane -a'.split(), check=False) + pass + def run_mprime(): """Run Prime95 for MPRIME_LIMIT minutes while showing the temps.""" aborted = False @@ -389,12 +465,12 @@ def run_tests(tests): print_log('Starting Hardware Diagnostics') print_log('\nRunning tests: {}'.format(', '.join(tests))) # Enable selected tests - for t in ['Prime95', 'NVMe/SMART', 'badblocks']: + for t in ['Prime95', 'NVMe/SMART', 'badblocks', 'iobenchmark']: TESTS[t]['Enabled'] = t in tests TESTS['NVMe/SMART']['Quick'] = 'Quick' in tests # Initialize - if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled']: + if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: scan_disks() update_progress() @@ -410,6 +486,8 @@ def run_tests(tests): run_nvme_smart() if TESTS['badblocks']['Enabled']: run_badblocks() + if TESTS['iobenchmark']['Enabled']: + run_iobenchmark() # Show results show_results() @@ -437,6 +515,7 @@ def scan_disks(): devs[d['name']] = {'lsblk': d} TESTS['NVMe/SMART']['Status'][d['name']] = 'Pending' TESTS['badblocks']['Status'][d['name']] = 'Pending' + TESTS['iobenchmark']['Status'][d['name']] = 'Pending' else: # Skip WizardKit devices wk_label = '{}_LINUX'.format(KIT_NAME_SHORT) @@ -444,6 +523,7 @@ def scan_disks(): devs[d['name']] = {'lsblk': d} TESTS['NVMe/SMART']['Status'][d['name']] = 'Pending' TESTS['badblocks']['Status'][d['name']] = 'Pending' + TESTS['iobenchmark']['Status'][d['name']] = 'Pending' for dev, data in devs.items(): # Get SMART attributes @@ -483,7 +563,7 @@ def scan_disks(): data['SMART Support'] = False # Ask for manual overrides if necessary - if not data['Quick Health OK'] and TESTS['badblocks']['Enabled']: + if not data['Quick Health OK'] and (TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']): show_disk_details(data) print_warning("WARNING: Health can't be confirmed for: {}".format( '/dev/{}'.format(dev))) @@ -494,10 +574,12 @@ def scan_disks(): else: TESTS['NVMe/SMART']['Status'][dev_name] = 'NS' TESTS['badblocks']['Status'][dev_name] = 'Denied' + TESTS['iobenchmark']['Status'][dev_name] = 'Denied' print_standard(' ') # In case there's more than one "OVERRIDE" disk TESTS['NVMe/SMART']['Devices'] = devs TESTS['badblocks']['Devices'] = devs + TESTS['iobenchmark']['Devices'] = devs def show_disk_details(dev): """Display disk details.""" @@ -616,8 +698,8 @@ def show_results(): print(' {}'.format(line.strip())) print_standard(' ') - # NVMe/SMART / badblocks - if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled']: + # NVMe/SMART / badblocks / iobenchmark + if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: print_success('Disks:') for name, dev in sorted(TESTS['NVMe/SMART']['Devices'].items()): show_disk_details(dev) @@ -635,6 +717,12 @@ def show_results(): print_standard(' {}'.format(line)) else: print_error(' {}'.format(line)) + io_status = TESTS['iobenchmark']['Status'].get(name, None) + if (TESTS['iobenchmark']['Enabled'] + and io_status not in ['Denied', 'OVERRIDE', 'Skipped']): + print_info('Benchmark:') + result = TESTS['iobenchmark']['Results'].get(name, '') + print_standard(' {}'.format(result)) print_standard(' ') # Done @@ -676,6 +764,16 @@ def update_progress(): s_color = get_status_color(status), status = status, **COLORS)) + if TESTS['iobenchmark']['Enabled']: + output.append(' ') + output.append('{BLUE}I/O Benchmark{CLEAR}'.format(**COLORS)) + for dev, status in sorted(TESTS['iobenchmark']['Status'].items()): + output.append('{dev}{s_color}{status:>{pad}}{CLEAR}'.format( + dev = dev, + pad = 15-len(dev), + s_color = get_status_color(status), + status = status, + **COLORS)) # Add line-endings output = ['{}\n'.format(line) for line in output] diff --git a/.bin/Scripts/hw-diags-iobenchmark b/.bin/Scripts/hw-diags-iobenchmark new file mode 100644 index 00000000..7d1f69d8 --- /dev/null +++ b/.bin/Scripts/hw-diags-iobenchmark @@ -0,0 +1,18 @@ +#!/bin/bash +# +## Wizard Kit: HW Diagnostics - Benchmarks + +function usage { + echo "Usage: ${0} device log-file" + echo " e.g. ${0} /dev/sda /tmp/tmp.XXXXXXX/benchmarks.log" +} + +# Bail early +if [ ! -b "${1}" ]; then + usage + exit 1 +fi + +# Run Benchmarks +echo 3 | sudo tee -a /proc/sys/vm/drop_caches >/dev/null 2>&1 +sudo dd bs=4M count=4096 if="${1}" of=/dev/null status=progress 2>&1 | tee -a "${2}" From 71885212e8760b6f0685a0484e4a46b4465f46a9 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 08:47:34 -0600 Subject: [PATCH 08/20] Tool version bumps --- .bin/Scripts/build_kit.ps1 | 2 +- .bin/Scripts/build_pe.ps1 | 6 +++--- .bin/Scripts/settings/sources.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.bin/Scripts/build_kit.ps1 b/.bin/Scripts/build_kit.ps1 index 0fe123c5..4d456ef5 100644 --- a/.bin/Scripts/build_kit.ps1 +++ b/.bin/Scripts/build_kit.ps1 @@ -86,7 +86,7 @@ if ($MyInvocation.InvocationName -ne ".") { DownloadFile -Path $Path -Name "ConEmuPack.7z" -Url $Url # Notepad++ - $Url = "https://notepad-plus-plus.org/repository/7.x/7.5.5/npp.7.5.5.bin.minimalist.7z" + $Url = "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z" DownloadFile -Path $Path -Name "npp.7z" -Url $Url # Python diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index 80fce4f0..a49d2c65 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -141,15 +141,15 @@ if ($MyInvocation.InvocationName -ne ".") { @("fastcopy64.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip"), @("fastcopy32.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip"), # HWiNFO - @("hwinfo.zip", "http://app.oldfoss.com:81/download/HWiNFO/hwi_574.zip"), + @("hwinfo.zip", "http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip"), # Killer Network Drivers @( "killerinf.zip", ("http://www.killernetworking.com"+(FindDynamicUrl "http://www.killernetworking.com/driver-downloads/item/killer-drivers-inf" "Download Killer-Ethernet").replace('&', '&')) ), # Notepad++ - @("npp_amd64.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.5/npp.7.5.5.bin.minimalist.x64.7z"), - @("npp_x86.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.5/npp.7.5.5.bin.minimalist.7z"), + @("npp_amd64.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.x64.7z"), + @("npp_x86.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z"), # NT Password Editor @("ntpwed.zip", "http://cdslow.org.ru/files/ntpwedit/ntpwed07.zip"), # Prime95 diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 2e3a7566..5702cb4d 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -1,7 +1,7 @@ # Wizard Kit: Settings - Sources SOURCE_URLS = { - 'AIDA64': 'http://download.aida64.com/aida64engineer595.zip', + 'AIDA64': 'http://download.aida64.com/aida64engineer597.exe', 'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120035/AcroRdrDC1801120035_en_US.exe', 'AdwCleaner': 'https://toolslib.net/downloads/finish/1-adwcleaner/', 'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip', @@ -17,13 +17,13 @@ SOURCE_URLS = { 'FastCopy32': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip', 'FastCopy64': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip', 'Firefox uBO': 'https://addons.cdn.mozilla.net/user-media/addons/607454/ublock_origin-1.15.10-an+fx.xpi?filehash=sha256%3A30b258803fd6cd988c5ba479f2f6ff5b4e9b40110c81e3421a6867b20ec718a6', - 'HWiNFO': 'http://app.oldfoss.com:81/download/HWiNFO/hwi_574.zip', + 'HWiNFO': 'http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip', 'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe', 'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe', 'IOBit_Uninstaller': 'https://portableapps.com/redirect/?a=IObitUninstallerPortable&t=http%3A%2F%2Fdownloads.portableapps.com%2Fportableapps%2Fiobituninstallerportable%2FIObitUninstallerPortable_7.3.0.13.paf.exe', - 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27527/eng/Intel%20SSD%20Toolbox%20-%20v3.5.1.exe', + 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27656/eng/Intel%20SSD%20Toolbox%20-%20v3.5.2.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', - 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.5/npp.7.5.5.bin.minimalist.7z', + 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z', 'Office Deployment Tool 2013': 'https://download.microsoft.com/download/6/2/3/6230F7A2-D8A9-478B-AC5C-57091B632FCF/officedeploymenttool_x86_4827-1000.exe', 'Office Deployment Tool 2016': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_8529.3600.exe', 'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip', From d7111b0e416935d4e2523b4071350e73c4756826 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 08:50:59 -0600 Subject: [PATCH 09/20] Readding noto-fonts --- .linux_items/packages/live | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.linux_items/packages/live b/.linux_items/packages/live index be997510..f59d9d02 100644 --- a/.linux_items/packages/live +++ b/.linux_items/packages/live @@ -47,6 +47,8 @@ mupdf ncdu network-manager-applet networkmanager +noto-fonts +noto-fonts-cjk nvme-cli oblogout openbox-patched From d893a80f0376dbc7a0ff4710b8bc2776d2cd3b69 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 09:42:03 -0600 Subject: [PATCH 10/20] PyPI moved --- .bin/Scripts/build_kit.ps1 | 4 ++-- .bin/Scripts/build_pe.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/build_kit.ps1 b/.bin/Scripts/build_kit.ps1 index 4d456ef5..778c6bb8 100644 --- a/.bin/Scripts/build_kit.ps1 +++ b/.bin/Scripts/build_kit.ps1 @@ -96,7 +96,7 @@ if ($MyInvocation.InvocationName -ne ".") { DownloadFile -Path $Path -Name "python64.zip" -Url $Url # Python: psutil - $DownloadPage = "https://pypi.python.org/pypi/psutil" + $DownloadPage = "https://pypi.org/project/psutil/" $RegEx = "href=.*-cp36-cp36m-win32.whl" $Url = FindDynamicUrl $DownloadPage $RegEx DownloadFile -Path $Path -Name "psutil32.whl" -Url $Url @@ -107,7 +107,7 @@ if ($MyInvocation.InvocationName -ne ".") { # Python: requests & dependancies $RegEx = "href=.*.py3-none-any.whl" foreach ($Module in @("chardet", "certifi", "idna", "urllib3", "requests")) { - $DownloadPage = "https://pypi.python.org/pypi/$Module" + $DownloadPage = "https://pypi.org/project/$Module/" $Name = "$Module.whl" $Url = FindDynamicUrl -SourcePage $DownloadPage -RegEx $RegEx DownloadFile -Path $Path -Name $Name -Url $Url diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index a49d2c65..459141c0 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -164,11 +164,11 @@ if ($MyInvocation.InvocationName -ne ".") { # Python: psutil @( "psutil64.whl", - (FindDynamicUrl "https://pypi.python.org/pypi/psutil" "href=.*-cp36-cp36m-win_amd64.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win_amd64.whl") ), @( "psutil32.whl", - (FindDynamicUrl "https://pypi.python.org/pypi/psutil" "href=.*-cp36-cp36m-win32.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win32.whl") ), # Q-Dir @("qdir64.zip", "https://www.softwareok.com/Download/Q-Dir_Portable_x64.zip"), From ae18668a72ec708501355de015f3a67e602c5ba0 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 09:42:37 -0600 Subject: [PATCH 11/20] Type in AIDA64 URL --- .bin/Scripts/settings/sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 5702cb4d..2dddc86c 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -1,7 +1,7 @@ # Wizard Kit: Settings - Sources SOURCE_URLS = { - 'AIDA64': 'http://download.aida64.com/aida64engineer597.exe', + 'AIDA64': 'http://download.aida64.com/aida64engineer597.zip', 'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120035/AcroRdrDC1801120035_en_US.exe', 'AdwCleaner': 'https://toolslib.net/downloads/finish/1-adwcleaner/', 'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip', From 9ddfaab8bcb86651743afdab2c3c184fb41e3fb1 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 09:48:05 -0600 Subject: [PATCH 12/20] inxi moved to AUR --- .linux_items/packages/aur | 1 + 1 file changed, 1 insertion(+) diff --git a/.linux_items/packages/aur b/.linux_items/packages/aur index c2178d63..09982dd6 100644 --- a/.linux_items/packages/aur +++ b/.linux_items/packages/aur @@ -2,6 +2,7 @@ aic94xx-firmware bash-pipes hfsprogs i3lock-fancy-git +inxi mprime nvme-cli openbox-patched From c18d86d8c5dbf2800952d4389fbf345a2ace50ae Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 10:07:15 -0600 Subject: [PATCH 13/20] Q-Dir filename changed --- .bin/Scripts/build_pe.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index 459141c0..a040a207 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -451,6 +451,7 @@ if ($MyInvocation.InvocationName -ne ".") { "x", "$Temp\qdir64.zip", "-o$Build\bin\amd64", "-aoa", "-bso0", "-bse0", "-bsp0") Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait + Move-Item "$Build\bin\amd64\Q-Dir\Q-Dir_x64.exe" "$Build\bin\amd64\Q-Dir\Q-Dir.exe" -Force $ArgumentList = @( "x", "$Temp\qdir32.zip", "-o$Build\bin\x86", "-aoa", "-bso0", "-bse0", "-bsp0") From d1f4944a095ce0b01947016562409a1122538780 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 10:07:51 -0600 Subject: [PATCH 14/20] Changed linux std user name to tech * Prevent build failure when ${KIT_NAME_SHORT} starts with a digit --- Build Linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build Linux b/Build Linux index 26e70919..3a50b9af 100755 --- a/Build Linux +++ b/Build Linux @@ -147,7 +147,7 @@ function run_elevated() { function update_live_env() { hostname="$(echo "${KIT_NAME_SHORT}-linux" | tr "[:upper:]" "[:lower:]")" - username="$(echo "${KIT_NAME_SHORT}tech" | tr "[:upper:]" "[:lower:]")" + username="tech" label="${KIT_NAME_SHORT}_LINUX" # Boot config (legacy) From c7eb3921fdb0dc2dd89c7c8172c5e386e015de4f Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 10:47:57 -0600 Subject: [PATCH 15/20] Fix Linux graphics issue * Using safer backend for compton * Removed xf86-video-intel * See https://wiki.archlinux.org/index.php/Intel_graphics#Installation --- .linux_items/include/airootfs/etc/skel/.xinitrc | 2 +- .linux_items/packages/live | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index ccca956a..b5460671 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -6,7 +6,7 @@ xset s off xset -dpms eval $(ssh-agent) export SSH_AUTH_SOCK -compton & +compton --backend xrender & sleep 1s conky -d nm-applet & diff --git a/.linux_items/packages/live b/.linux_items/packages/live index f59d9d02..0bf86276 100644 --- a/.linux_items/packages/live +++ b/.linux_items/packages/live @@ -92,7 +92,6 @@ wimlib xf86-input-libinput xf86-video-amdgpu xf86-video-fbdev -xf86-video-intel xf86-video-nouveau xf86-video-vesa xorg-server From 501191b388ba208f95f4daa3dcfa8478ba1f663b Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 11:37:09 -0600 Subject: [PATCH 16/20] Include hidden items in EXTRA_DIR/ --- .bin/Scripts/build-ufd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/build-ufd b/.bin/Scripts/build-ufd index 6aff7024..06ad45b9 100755 --- a/.bin/Scripts/build-ufd +++ b/.bin/Scripts/build-ufd @@ -565,7 +565,7 @@ rsync ${RSYNC_ARGS} "${MAIN_KIT}/" "/mnt/Dest/${KIT_NAME_FULL}/" >> "${LOG_FILE} if [[ ! -z "${EXTRA_DIR:-}" ]]; then echo "Copying Extra files..." - rsync ${RSYNC_ARGS} "${EXTRA_DIR}"/* /mnt/Dest/ >> "${LOG_FILE}" 2>&1 + rsync ${RSYNC_ARGS} "${EXTRA_DIR}"/ /mnt/Dest/ >> "${LOG_FILE}" 2>&1 fi # Install syslinux From 945c771b6e1f0c778c59dd0afe43781eb75b5855 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 13:01:21 -0600 Subject: [PATCH 17/20] hw-diags-iobenchmark set as executable --- .bin/Scripts/hw-diags-iobenchmark | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .bin/Scripts/hw-diags-iobenchmark diff --git a/.bin/Scripts/hw-diags-iobenchmark b/.bin/Scripts/hw-diags-iobenchmark old mode 100644 new mode 100755 From b5202d364672d08bd16eee0af25a462496bc3ae1 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 13:26:35 -0600 Subject: [PATCH 18/20] Extend I/O Benchmark to test whole dev --- .bin/Scripts/hw-diags-iobenchmark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/hw-diags-iobenchmark b/.bin/Scripts/hw-diags-iobenchmark index 7d1f69d8..6821b1a4 100755 --- a/.bin/Scripts/hw-diags-iobenchmark +++ b/.bin/Scripts/hw-diags-iobenchmark @@ -15,4 +15,4 @@ fi # Run Benchmarks echo 3 | sudo tee -a /proc/sys/vm/drop_caches >/dev/null 2>&1 -sudo dd bs=4M count=4096 if="${1}" of=/dev/null status=progress 2>&1 | tee -a "${2}" +sudo dd bs=4M if="${1}" of=/dev/null status=progress 2>&1 | tee -a "${2}" From 04f7ae2f217f5ad467d23e9b07468dd2c8f7a459 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 16 Apr 2018 14:17:28 -0600 Subject: [PATCH 19/20] Better unit handling during I/O Benchmarks * All results are in MB/s --- .bin/Scripts/functions/common.py | 5 +++-- .bin/Scripts/functions/hw_diags.py | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index 173dd2c8..80e064d9 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -131,9 +131,9 @@ def clear_screen(): def convert_to_bytes(size): """Convert human-readable size str to bytes and return an int.""" size = str(size) - tmp = re.search(r'(\d+)\s+([KMGT]B)', size.upper()) + tmp = re.search(r'(\d+\.?\d*)\s+([KMGT]B)', size.upper()) if tmp: - size = int(tmp.group(1)) + size = float(tmp.group(1)) units = tmp.group(2) if units == 'TB': size *= 1099511627776 @@ -143,6 +143,7 @@ def convert_to_bytes(size): size *= 1048576 elif units == 'KB': size *= 1024 + size = int(size) else: return -1 diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index fa0e7209..5da13e7b 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -46,6 +46,14 @@ TESTS = { }, } +def get_read_rate(s): + """Get read rate in bytes/s from dd progress output.""" + real_rate = None + if re.search(r'[KMGT]B/s', s): + human_rate = re.sub(r'^.*\s+(\d+\.?\d*)\s+(.B)/s\s*$', r'\1 \2', s) + real_rate = convert_to_bytes(human_rate) + return real_rate + def get_smart_details(dev): """Get SMART data for dev if possible, returns dict.""" cmd = 'sudo smartctl --all --json /dev/{}'.format(dev).split() @@ -253,15 +261,15 @@ def run_iobenchmark(): text = f.read() io_stats = text.replace('\r', '\n').split('\n') try: - io_stats = [re.sub(r'.*\s+(\d+) MB/s\s*$', r'\1', stat) - for stat in io_stats if 'MB/s' in stat] - io_stats = [int(x) for x in io_stats] - TESTS['iobenchmark']['Results'][name] = 'Read speed: {:0.0f} MB/s (Min: {}, Max: {})'.format( + io_stats = [get_read_rate(s) for s in io_stats] + io_stats = [float(s/1048576) for s in io_stats if s] + TESTS['iobenchmark']['Results'][name] = 'Read speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( sum(io_stats) / len(io_stats), min(io_stats), max(io_stats)) TESTS['iobenchmark']['Status'][name] = 'CS' except: + # Requires manual testing TESTS['iobenchmark']['Status'][name] = 'NS' # Move temp file @@ -569,7 +577,7 @@ def scan_disks(): '/dev/{}'.format(dev))) dev_name = data['lsblk']['name'] print_standard(' ') - if ask('Run badblocks for this device anyway?'): + if ask('Run tests on this device anyway?'): TESTS['NVMe/SMART']['Status'][dev_name] = 'OVERRIDE' else: TESTS['NVMe/SMART']['Status'][dev_name] = 'NS' From f6d3938ecb46144f4bb28b50d3ccd3a136467e36 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Fri, 20 Apr 2018 10:43:13 -0600 Subject: [PATCH 20/20] Prevent crashes when KIT_NAME_FULL contains spaces --- .bin/Scripts/Copy WizardKit.cmd | 2 +- .bin/Scripts/Launch.cmd | 6 +++--- .bin/Scripts/Launcher_Template.cmd | 2 +- .bin/Scripts/init_client_dir.cmd | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/Copy WizardKit.cmd b/.bin/Scripts/Copy WizardKit.cmd index 00850581..60340710 100644 --- a/.bin/Scripts/Copy WizardKit.cmd +++ b/.bin/Scripts/Copy WizardKit.cmd @@ -15,7 +15,7 @@ rem Set variables using settings\main.py file set "SETTINGS=%bin%\Scripts\settings\main.py" for %%v in (ARCHIVE_PASSWORD KIT_NAME_FULL) do ( set "var=%%v" - for /f "tokens=* usebackq" %%f in (`findstr "!var!=" %SETTINGS%`) do ( + for /f "tokens=* usebackq" %%f in (`findstr "!var!=" "%SETTINGS%"`) do ( set "_v=%%f" set "_v=!_v:*'=!" set "%%v=!_v:~0,-1!" diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index 5d1e1093..2364dcc8 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -22,7 +22,7 @@ rem Set variables using settings\main.py file set "SETTINGS=%bin%\Scripts\settings\main.py" for %%v in (ARCHIVE_PASSWORD KIT_NAME_FULL OFFICE_SERVER_IP QUICKBOOKS_SERVER_IP) do ( set "var=%%v" - for /f "tokens=* usebackq" %%f in (`findstr "!var!=" %SETTINGS%`) do ( + for /f "tokens=* usebackq" %%f in (`findstr "!var!=" "%SETTINGS%"`) do ( set "_v=%%f" set "_v=!_v:*'=!" set "%%v=!_v:~0,-1!" @@ -280,9 +280,9 @@ rem Create VB script mkdir "%bin%\tmp" 2>nul echo Set UAC = CreateObject^("Shell.Application"^) > "%bin%\tmp\Elevate.vbs" if defined L_NCMD ( - echo UAC.ShellExecute "%PYTHON%", "%script%", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs" + echo UAC.ShellExecute "%PYTHON%", """%script%""", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs" ) else ( - echo UAC.ShellExecute "%CON%", "-run %PYTHON% %script% -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" + echo UAC.ShellExecute "%CON%", "-run ""%PYTHON%"" ""%script%"" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" ) rem Run diff --git a/.bin/Scripts/Launcher_Template.cmd b/.bin/Scripts/Launcher_Template.cmd index a4b262e0..90b15482 100644 --- a/.bin/Scripts/Launcher_Template.cmd +++ b/.bin/Scripts/Launcher_Template.cmd @@ -69,7 +69,7 @@ popd :SetTitle rem Sets title using KIT_NAME_FULL from settings\main.py set "SETTINGS=%bin%\Scripts\settings\main.py" -for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_FULL %SETTINGS%`) do ( +for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_FULL "%SETTINGS%"`) do ( set "_v=%%f" set "_v=!_v:*'=!" set "KIT_NAME_FULL=!_v:~0,-1!" diff --git a/.bin/Scripts/init_client_dir.cmd b/.bin/Scripts/init_client_dir.cmd index 86aedb3f..4d73e7ab 100644 --- a/.bin/Scripts/init_client_dir.cmd +++ b/.bin/Scripts/init_client_dir.cmd @@ -27,7 +27,7 @@ set iso_date=%_yyyy%-%_mm%-%_dd% :SetVars set "SETTINGS=%bin%\Scripts\settings\main.py" -for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_SHORT %SETTINGS%`) do ( +for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_SHORT "%SETTINGS%"`) do ( set "_v=%%f" set "_v=!_v:*'=!" set "KIT_NAME_SHORT=!_v:~0,-1!"