From bbfcc2e3fe70efcc715f6b786663af2a5d9efb6e Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 30 May 2018 17:26:49 -0600 Subject: [PATCH 001/293] Hotfix: Handle size=None in human_readable_size() --- .bin/Scripts/functions/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index f5a2ef95..f677df45 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -234,6 +234,8 @@ def human_readable_size(size, decimals=0): size = int(size) except ValueError: size = convert_to_bytes(size) + except TypeError: + size = -1 # Verify we have a valid size if size < 0: From afef5e905273308effcd242587de09200499a9b0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 14 Jul 2018 19:41:52 -0600 Subject: [PATCH 002/293] Add safe alias for ddrescue --- .linux_items/include/airootfs/etc/skel/.aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index d20b59b3..fab61bb1 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -4,6 +4,7 @@ alias 7z3='7z a -t7z -mx=3' alias 7z5='7z a -t7z -mx=5' alias 7z7='7z a -t7z -mx=7' alias 7z9='7z a -t7z -mx=9' +alias ddrescue='sudo ddrescue --ask --min-read-rate=64k -vvvv' alias diff='colordiff -ur' alias du='du -sch --apparent-size' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' From d57b08ec6f8f5d7b267b547e8de4457061698578 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 14 Jul 2018 21:17:32 -0600 Subject: [PATCH 003/293] Update hw_diags so it can be used by wk-ddrescue --- .bin/Scripts/functions/hw_diags.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 63942ed2..1b61d8ca 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -588,19 +588,21 @@ def scan_disks(): TESTS['NVMe/SMART']['Devices'] = devs TESTS['badblocks']['Devices'] = devs TESTS['iobenchmark']['Devices'] = devs + return devs -def show_disk_details(dev): +def show_disk_details(dev, only_attributes=False): """Display disk details.""" dev_name = dev['lsblk']['name'] - # Device description - print_info('Device: /dev/{}'.format(dev['lsblk']['name'])) - print_standard(' {:>4} ({}) {} {}'.format( - str(dev['lsblk'].get('size', '???b')).strip(), - str(dev['lsblk'].get('tran', '???')).strip().upper().replace( - 'NVME', 'NVMe'), - str(dev['lsblk'].get('model', 'Unknown Model')).strip(), - str(dev['lsblk'].get('serial', 'Unknown Serial')).strip(), - )) + if not only_attributes: + # Device description + print_info('Device: /dev/{}'.format(dev['lsblk']['name'])) + print_standard(' {:>4} ({}) {} {}'.format( + str(dev['lsblk'].get('size', '???b')).strip(), + str(dev['lsblk'].get('tran', '???')).strip().upper().replace( + 'NVME', 'NVMe'), + str(dev['lsblk'].get('model', 'Unknown Model')).strip(), + str(dev['lsblk'].get('serial', 'Unknown Serial')).strip(), + )) # Warnings if dev.get('NVMe Disk', False): From 8b1e19fa4b64c26080cb47e773e8d236d5fb6ea8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 14 Jul 2018 21:19:08 -0600 Subject: [PATCH 004/293] Initial wk-ddrescue menu --- .bin/Scripts/functions/ddrescue.py | 58 ++++++++++++++++++++++++++++++ .bin/Scripts/wk-ddrescue | 32 +++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 .bin/Scripts/functions/ddrescue.py create mode 100755 .bin/Scripts/wk-ddrescue diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py new file mode 100644 index 00000000..00514fe8 --- /dev/null +++ b/.bin/Scripts/functions/ddrescue.py @@ -0,0 +1,58 @@ +# Wizard Kit: Functions - ddrescue + +import json +import re + +from functions.common import * + +# STATIC VARIABLES +USAGE=""" {script_name} clone [source [destination]] + {script_name} image [source [destination]] + (e.g. {script_name} clone /dev/sda /dev/sdb) +""" + +# Functions +def menu_clone(source_path, dest_path): + print_success('GNU ddrescue: Cloning Menu') + pass + +def menu_ddrescue(*args): + """Main ddrescue loop/menu.""" + args = list(args) + script_name = os.path.basename(args.pop(0)) + run_mode = '' + source_path = None + dest_path = None + + # Parse args + try: + run_mode = args.pop(0) + source_path = args.pop(0) + dest_path = args.pop(0) + except IndexError: + # We'll set the missing paths later + pass + + # Show proper menu or exit + if run_mode == 'clone': + menu_clone(source_path, dest_path) + elif run_mode == 'image': + menu_image(source_path, dest_path) + else: + if not re.search(r'(^$|help|-h|\?)', run_mode, re.IGNORECASE): + print_error('Invalid mode.') + show_usage(script_name) + exit_script() + +def menu_image(source_path, dest_path): + print_success('GNU ddrescue: Imaging Menu') + pass + +def show_usage(script_name): + print_info('Usage:') + print_standard(USAGE.format(script_name=script_name)) + +if __name__ == '__main__': + print("This file is not meant to be called directly.") + +# vim: sts=4 sw=4 ts=4 diff --git a/.bin/Scripts/wk-ddrescue b/.bin/Scripts/wk-ddrescue new file mode 100755 index 00000000..28ce6fb7 --- /dev/null +++ b/.bin/Scripts/wk-ddrescue @@ -0,0 +1,32 @@ +#!/bin/python3 +# +## Wizard Kit: TUI for ddrescue cloning and imaging + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.ddrescue import * +from functions.hw_diags import * +init_global_vars() + +if __name__ == '__main__': + try: + # Prep + clear_screen() + + # Show menu + menu_ddrescue(*sys.argv) + + # Done + #print_standard('\nDone.') + #pause("Press Enter to exit...") + exit_script() + except SystemExit: + pass + except: + major_exception() + +# vim: sts=4 sw=4 ts=4 From 667223b3c2a96db74d0868ecdc3af615a12ecb77 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 14 Jul 2018 22:52:18 -0600 Subject: [PATCH 005/293] Check passed source * If it's an image, setup loopback dev * If it's a child block dev, prompt with option to use parent block * Show selected source details --- .bin/Scripts/functions/ddrescue.py | 94 +++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 00514fe8..1acc5e96 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -1,6 +1,7 @@ # Wizard Kit: Functions - ddrescue import json +import pathlib import re from functions.common import * @@ -12,9 +13,99 @@ USAGE=""" {script_name} clone [source [destination]] """ # Functions +def show_device_details(dev_path): + """Display device details on screen.""" + cmd = ( + 'lsblk', '--nodeps', + '--output', 'NAME,TRAN,TYPE,SIZE,VENDOR,MODEL,SERIAL', + dev_path) + result = run_program(cmd) + output = result.stdout.decode().splitlines() + print_info(output.pop(0)) + for line in output: + print_standard(line) + + # Children info + cmd = ('lsblk', '--output', 'NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT', dev_path) + result = run_program(cmd) + output = result.stdout.decode().splitlines() + print_info(output.pop(0)) + for line in output: + print_standard(line) + +def get_device_details(dev_path): + """Get device details via lsblk, returns JSON dict.""" + try: + cmd = ( + 'lsblk', + '--json', + '--output-all', + '--paths', + dev_path) + result = run_program(cmd) + except CalledProcessError: + print_error('Failed to get device details for {}'.format(dev_path)) + abort() + + json_data = json.loads(result.stdout.decode()) + # Just return the first device (there should only be one) + return json_data['blockdevices'][0] + +def setup_loopback_device(source_path): + """Setup a loopback device for source_path, returns dev_path as str.""" + cmd = ( + 'losetup', + '--find', + '--partscan', + '--show', + source_path) + try: + out = run_program(cmd, check=True) + dev_path = out.stdout.decode().strip() + except CalledProcessError: + print_error('Failed to setup loopback device for source.') + abort() + else: + return dev_path + def menu_clone(source_path, dest_path): + """ddrescue cloning menu.""" + source_is_image = False + source_dev_path = None print_success('GNU ddrescue: Cloning Menu') - pass + + # Select source if not preselected + if not source_path: + #TODO menu_select drive + print_warning('Select drive not implemented yet.') + source_path = '' + + # Check source + source_path = os.path.realpath(source_path) + if pathlib.Path(source_path).is_block_device(): + source_dev_path = source_path + elif pathlib.Path(source_path).is_file(): + source_dev_path = setup_loopback_device(source_path) + source_is_image = True + else: + print_error('Invalid source "{}".'.format(source_path)) + abort() + source_details = get_device_details(source_dev_path) + + # Check source type + if source_details['pkname']: + print_warning('Source "{}" is a child device.'.format(source_dev_path)) + if ask('Use parent device "{}" instead?'.format( + source_details['pkname'])): + source_dev_path = source_details['pkname'] + source_details = get_device_details(source_dev_path) + + # Show selection details + if source_is_image: + print_success('Using image file: {}'.format(source_path)) + print_success(' (via loopback device: {})'.format( + source_dev_path)) + show_device_details(source_dev_path) def menu_ddrescue(*args): """Main ddrescue loop/menu.""" @@ -45,6 +136,7 @@ def menu_ddrescue(*args): exit_script() def menu_image(source_path, dest_path): + """ddrescue imaging menu.""" print_success('GNU ddrescue: Imaging Menu') pass From cfbd0ec8f2bf47d263230d0193875cfe54094deb Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 14 Jul 2018 23:45:08 -0600 Subject: [PATCH 006/293] Add device selection menu --- .bin/Scripts/functions/ddrescue.py | 50 +++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 1acc5e96..b811c7ba 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -5,6 +5,7 @@ import pathlib import re from functions.common import * +from operator import itemgetter # STATIC VARIABLES USAGE=""" {script_name} clone [source [destination]] @@ -62,6 +63,7 @@ def setup_loopback_device(source_path): try: out = run_program(cmd, check=True) dev_path = out.stdout.decode().strip() + sleep(1) except CalledProcessError: print_error('Failed to setup loopback device for source.') abort() @@ -76,9 +78,7 @@ def menu_clone(source_path, dest_path): # Select source if not preselected if not source_path: - #TODO menu_select drive - print_warning('Select drive not implemented yet.') - source_path = '' + source_path = select_device('Please select a source device') # Check source source_path = os.path.realpath(source_path) @@ -101,11 +101,13 @@ def menu_clone(source_path, dest_path): source_details = get_device_details(source_dev_path) # Show selection details + print_success('Source device') if source_is_image: - print_success('Using image file: {}'.format(source_path)) - print_success(' (via loopback device: {})'.format( + print_standard('Using image file: {}'.format(source_path)) + print_standard(' (via loopback device: {})'.format( source_dev_path)) show_device_details(source_dev_path) + print_standard(' ') def menu_ddrescue(*args): """Main ddrescue loop/menu.""" @@ -140,6 +142,44 @@ def menu_image(source_path, dest_path): print_success('GNU ddrescue: Imaging Menu') pass +def select_device(title='Which device?'): + """Select block device via a menu, returns dev_path as str.""" + try: + cmd = ( + 'lsblk', + '--json', + '--nodeps', + '--output-all', + '--paths') + result = run_program(cmd) + json_data = json.loads(result.stdout.decode()) + except CalledProcessError: + print_error('Failed to get device details for {}'.format(dev_path)) + abort() + + # Build menu + dev_options = [] + for dev in json_data['blockdevices']: + dev_options.append({ + 'Name': '{name:12} {tran:5} {size:6} {model} {serial}'.format( + name = dev['name'], + tran = dev['tran'] if dev['tran'] else '', + size = dev['size'] if dev['size'] else '', + model = dev['model'] if dev['model'] else '', + serial = dev['serial'] if dev['serial'] else ''), + 'Path': dev['name']}) + dev_options = sorted(dev_options, key=itemgetter('Name')) + actions = [{'Name': 'Quit', 'Letter': 'Q'}] + selection = menu_select( + title = title, + main_entries = dev_options, + action_entries = actions) + + if selection.isnumeric(): + return dev_options[int(selection)-1]['Path'] + elif selection == 'Q': + abort() + def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) From 0c3b90eb630d55c62d01ca967f2646bd87c8d8a7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 15 Jul 2018 00:04:24 -0600 Subject: [PATCH 007/293] Add clone destination sections * Hide source device in dest selection menu --- .bin/Scripts/functions/ddrescue.py | 43 +++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index b811c7ba..c16f2ebb 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -99,7 +99,32 @@ def menu_clone(source_path, dest_path): source_details['pkname'])): source_dev_path = source_details['pkname'] source_details = get_device_details(source_dev_path) + print_standard(' ') + # Select destination if not preselected + if not dest_path: + dest_path = select_device( + 'Please select a destination device', + skip_device=source_details) + + # Check destination + dest_path = os.path.realpath(dest_path) + if pathlib.Path(dest_path).is_block_device(): + dest_dev_path = dest_path + else: + print_error('Invalid destination "{}".'.format(dest_path)) + abort() + dest_details = get_device_details(dest_dev_path) + + # Check destination type + if dest_details['pkname']: + print_warning('Destination "{}" is a child device.'.format(dest_dev_path)) + if ask('Use parent device "{}" instead?'.format( + dest_details['pkname'])): + dest_dev_path = dest_details['pkname'] + dest_details = get_device_details(dest_dev_path) + print_standard(' ') + # Show selection details print_success('Source device') if source_is_image: @@ -108,6 +133,10 @@ def menu_clone(source_path, dest_path): source_dev_path)) show_device_details(source_dev_path) print_standard(' ') + + print_success('Destination device') + show_device_details(dest_dev_path) + print_standard(' ') def menu_ddrescue(*args): """Main ddrescue loop/menu.""" @@ -142,7 +171,7 @@ def menu_image(source_path, dest_path): print_success('GNU ddrescue: Imaging Menu') pass -def select_device(title='Which device?'): +def select_device(title='Which device?', skip_device={}): """Select block device via a menu, returns dev_path as str.""" try: cmd = ( @@ -160,6 +189,13 @@ def select_device(title='Which device?'): # Build menu dev_options = [] for dev in json_data['blockdevices']: + # Skip if dev in skip_device + dev_names = [dev['name'], dev['pkname']] + dev_names = [n for n in dev_names if n] + if skip_device and skip_device.get('name', None) in dev_names: + continue + + # Append non-matching devices dev_options.append({ 'Name': '{name:12} {tran:5} {size:6} {model} {serial}'.format( name = dev['name'], @@ -169,6 +205,11 @@ def select_device(title='Which device?'): serial = dev['serial'] if dev['serial'] else ''), 'Path': dev['name']}) dev_options = sorted(dev_options, key=itemgetter('Name')) + if not dev_options: + print_error('No devices available.') + abort() + + # Show Menu actions = [{'Name': 'Quit', 'Letter': 'Q'}] selection = menu_select( title = title, From b2fc7ea860a33859044936e39562a94d924f34d5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 17:58:29 -0600 Subject: [PATCH 008/293] Renamed script ddrescue-tui, added launcher script Launcher script runs the python script in tmux (same as hw-diags) --- .bin/Scripts/ddrescue-tui | 43 +++++++++++++++++++ .../{wk-ddrescue => ddrescue-tui-menu} | 4 +- .bin/Scripts/hw-diags | 2 +- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100755 .bin/Scripts/ddrescue-tui rename .bin/Scripts/{wk-ddrescue => ddrescue-tui-menu} (87%) diff --git a/.bin/Scripts/ddrescue-tui b/.bin/Scripts/ddrescue-tui new file mode 100755 index 00000000..d83b3a7e --- /dev/null +++ b/.bin/Scripts/ddrescue-tui @@ -0,0 +1,43 @@ +#!/bin/bash +# +## Wizard Kit: ddrescue TUI Launcher + +SESSION_NAME="ddrescue-tui" +WINDOW_NAME="GNU ddrescue TUI" +MENU="ddrescue-tui-menu" + +function ask() { + while :; do + read -p "$1 " -r answer + if echo "$answer" | egrep -iq '^(y|yes|sure)$'; then + return 0 + elif echo "$answer" | egrep -iq '^(n|no|nope)$'; then + return 1 + fi + done +} + +die () { + echo "$0:" "$@" >&2 + exit 1 +} + +# Check for running session +if tmux list-session | grep -q "$SESSION_NAME"; then + echo "WARNING: tmux session $SESSION_NAME already exists." + echo "" + if ask "Kill current session?"; then + tmux kill-session -t "$SESSION_NAME" || \ + die "Failed to kill session: $SESSION_NAME" + else + echo "Aborted." + echo "" + echo -n "Press Enter to exit... " + read -r + exit 0 + fi +fi + +# Start session +tmux new-session -s "$SESSION_NAME" -n "$WINDOW_NAME" "$MENU" $* + diff --git a/.bin/Scripts/wk-ddrescue b/.bin/Scripts/ddrescue-tui-menu similarity index 87% rename from .bin/Scripts/wk-ddrescue rename to .bin/Scripts/ddrescue-tui-menu index 28ce6fb7..ea8c1a55 100755 --- a/.bin/Scripts/wk-ddrescue +++ b/.bin/Scripts/ddrescue-tui-menu @@ -21,8 +21,8 @@ if __name__ == '__main__': menu_ddrescue(*sys.argv) # Done - #print_standard('\nDone.') - #pause("Press Enter to exit...") + print_standard('\nDone.') + pause("Press Enter to exit...") exit_script() except SystemExit: pass diff --git a/.bin/Scripts/hw-diags b/.bin/Scripts/hw-diags index c1d7d3ca..e8d838df 100755 --- a/.bin/Scripts/hw-diags +++ b/.bin/Scripts/hw-diags @@ -24,7 +24,7 @@ die () { # Check for running session if tmux list-session | grep -q "$SESSION_NAME"; then - echo "WARNING: hw-diags tmux session already exists." + echo "WARNING: tmux session $SESSION_NAME already exists." echo "" if ask "Kill current session?"; then tmux kill-session -t "$SESSION_NAME" || \ From e56296d8b07129ebacc2701ec6c622378ea225a8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 18:01:06 -0600 Subject: [PATCH 009/293] Consolidated device selection code * Common code moved to select_device() * Existing select_device() renamed menu_select_device() * Fixed skip_device code * Refactored source/dest vars into dicts * Added confirmation after source/dest are selected --- .bin/Scripts/functions/ddrescue.py | 129 +++++++++++++++-------------- 1 file changed, 69 insertions(+), 60 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index c16f2ebb..ab208c87 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -75,69 +75,35 @@ def menu_clone(source_path, dest_path): source_is_image = False source_dev_path = None print_success('GNU ddrescue: Cloning Menu') - - # Select source if not preselected - if not source_path: - source_path = select_device('Please select a source device') - - # Check source - source_path = os.path.realpath(source_path) - if pathlib.Path(source_path).is_block_device(): - source_dev_path = source_path - elif pathlib.Path(source_path).is_file(): - source_dev_path = setup_loopback_device(source_path) - source_is_image = True - else: - print_error('Invalid source "{}".'.format(source_path)) - abort() - source_details = get_device_details(source_dev_path) - - # Check source type - if source_details['pkname']: - print_warning('Source "{}" is a child device.'.format(source_dev_path)) - if ask('Use parent device "{}" instead?'.format( - source_details['pkname'])): - source_dev_path = source_details['pkname'] - source_details = get_device_details(source_dev_path) - print_standard(' ') - - # Select destination if not preselected - if not dest_path: - dest_path = select_device( - 'Please select a destination device', - skip_device=source_details) - - # Check destination - dest_path = os.path.realpath(dest_path) - if pathlib.Path(dest_path).is_block_device(): - dest_dev_path = dest_path - else: - print_error('Invalid destination "{}".'.format(dest_path)) - abort() - dest_details = get_device_details(dest_dev_path) - - # Check destination type - if dest_details['pkname']: - print_warning('Destination "{}" is a child device.'.format(dest_dev_path)) - if ask('Use parent device "{}" instead?'.format( - dest_details['pkname'])): - dest_dev_path = dest_details['pkname'] - dest_details = get_device_details(dest_dev_path) - print_standard(' ') + + # Set devices + source = select_device('source', source_path) + dest = select_device('destination', dest_path, + skip_device = source['Details'], allow_image_file = False) # Show selection details + clear_screen() print_success('Source device') - if source_is_image: - print_standard('Using image file: {}'.format(source_path)) + if source['Is Image']: + print_standard('Using image file: {}'.format(source['Path'])) print_standard(' (via loopback device: {})'.format( - source_dev_path)) - show_device_details(source_dev_path) + source['Dev Path'])) + show_device_details(source['Dev Path']) print_standard(' ') - print_success('Destination device') - show_device_details(dest_dev_path) + print_success('Destination device ', end='') + print_error('(ALL DATA WILL BE DELETED)', timestamp=False) + show_device_details(dest['Dev Path']) print_standard(' ') + # Confirm + if not ask('Proceed with clone?'): + abort() + + # Build outer panes + clear_screen() + #TODO + def menu_ddrescue(*args): """Main ddrescue loop/menu.""" args = list(args) @@ -171,8 +137,53 @@ def menu_image(source_path, dest_path): print_success('GNU ddrescue: Imaging Menu') pass -def select_device(title='Which device?', skip_device={}): +def select_device(description='device', provided_path=None, + skip_device={}, allow_image_file=True): + """Select device via provided path or menu, return dev as dict.""" + dev = {'Is Image': False} + + # Set path + if provided_path: + dev['Path'] = provided_path + else: + dev['Path'] = menu_select_device( + title='Please select a {}'.format(description), + skip_device=skip_device) + dev['Path'] = os.path.realpath(dev['Path']) + + # Check path + if pathlib.Path(dev['Path']).is_block_device(): + dev['Dev Path'] = dev['Path'] + elif allow_image_file and pathlib.Path(dev['Path']).is_file(): + dev['Dev Path'] = setup_loopback_device(dev['Path']) + dev['Is Image'] = True + else: + print_error('Invalid {} "{}".'.format(description, dev['Path'])) + abort() + + # Get device details + dev['Details'] = get_device_details(dev['Dev Path']) + + # Check for parent device(s) + while dev['Details']['pkname']: + print_warning('{} "{}" is a child device.'.format( + description.title(), dev['Dev Path'])) + if ask('Use parent device "{}" instead?'.format( + dev['Details']['pkname'])): + # Update dev with parent info + dev['Dev Path'] = dev['Details']['pkname'] + dev['Details'] = get_device_details(dev['Dev Path']) + else: + # Leave alone + break + + return dev + +def menu_select_device(title='Which device?', skip_device={}): """Select block device via a menu, returns dev_path as str.""" + skip_names = [ + skip_device.get('name', None), skip_device.get('pkname', None)] + skip_names = [n for n in skip_names if n] try: cmd = ( 'lsblk', @@ -189,10 +200,8 @@ def select_device(title='Which device?', skip_device={}): # Build menu dev_options = [] for dev in json_data['blockdevices']: - # Skip if dev in skip_device - dev_names = [dev['name'], dev['pkname']] - dev_names = [n for n in dev_names if n] - if skip_device and skip_device.get('name', None) in dev_names: + # Skip if dev is in skip_names + if dev['name'] in skip_names or dev['pkname'] in skip_names: continue # Append non-matching devices From b5d8a5503192a4a51c3c24355ac2fe3fff6802a2 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 18:07:12 -0600 Subject: [PATCH 010/293] Reordered functions --- .bin/Scripts/functions/ddrescue.py | 160 ++++++++++++++--------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ab208c87..f834107e 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -14,26 +14,6 @@ USAGE=""" {script_name} clone [source [destination]] """ # Functions -def show_device_details(dev_path): - """Display device details on screen.""" - cmd = ( - 'lsblk', '--nodeps', - '--output', 'NAME,TRAN,TYPE,SIZE,VENDOR,MODEL,SERIAL', - dev_path) - result = run_program(cmd) - output = result.stdout.decode().splitlines() - print_info(output.pop(0)) - for line in output: - print_standard(line) - - # Children info - cmd = ('lsblk', '--output', 'NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT', dev_path) - result = run_program(cmd) - output = result.stdout.decode().splitlines() - print_info(output.pop(0)) - for line in output: - print_standard(line) - def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" try: @@ -52,24 +32,6 @@ def get_device_details(dev_path): # Just return the first device (there should only be one) return json_data['blockdevices'][0] -def setup_loopback_device(source_path): - """Setup a loopback device for source_path, returns dev_path as str.""" - cmd = ( - 'losetup', - '--find', - '--partscan', - '--show', - source_path) - try: - out = run_program(cmd, check=True) - dev_path = out.stdout.decode().strip() - sleep(1) - except CalledProcessError: - print_error('Failed to setup loopback device for source.') - abort() - else: - return dev_path - def menu_clone(source_path, dest_path): """ddrescue cloning menu.""" source_is_image = False @@ -137,48 +99,6 @@ def menu_image(source_path, dest_path): print_success('GNU ddrescue: Imaging Menu') pass -def select_device(description='device', provided_path=None, - skip_device={}, allow_image_file=True): - """Select device via provided path or menu, return dev as dict.""" - dev = {'Is Image': False} - - # Set path - if provided_path: - dev['Path'] = provided_path - else: - dev['Path'] = menu_select_device( - title='Please select a {}'.format(description), - skip_device=skip_device) - dev['Path'] = os.path.realpath(dev['Path']) - - # Check path - if pathlib.Path(dev['Path']).is_block_device(): - dev['Dev Path'] = dev['Path'] - elif allow_image_file and pathlib.Path(dev['Path']).is_file(): - dev['Dev Path'] = setup_loopback_device(dev['Path']) - dev['Is Image'] = True - else: - print_error('Invalid {} "{}".'.format(description, dev['Path'])) - abort() - - # Get device details - dev['Details'] = get_device_details(dev['Dev Path']) - - # Check for parent device(s) - while dev['Details']['pkname']: - print_warning('{} "{}" is a child device.'.format( - description.title(), dev['Dev Path'])) - if ask('Use parent device "{}" instead?'.format( - dev['Details']['pkname'])): - # Update dev with parent info - dev['Dev Path'] = dev['Details']['pkname'] - dev['Details'] = get_device_details(dev['Dev Path']) - else: - # Leave alone - break - - return dev - def menu_select_device(title='Which device?', skip_device={}): """Select block device via a menu, returns dev_path as str.""" skip_names = [ @@ -230,6 +150,86 @@ def menu_select_device(title='Which device?', skip_device={}): elif selection == 'Q': abort() +def select_device(description='device', provided_path=None, + skip_device={}, allow_image_file=True): + """Select device via provided path or menu, return dev as dict.""" + dev = {'Is Image': False} + + # Set path + if provided_path: + dev['Path'] = provided_path + else: + dev['Path'] = menu_select_device( + title='Please select a {}'.format(description), + skip_device=skip_device) + dev['Path'] = os.path.realpath(dev['Path']) + + # Check path + if pathlib.Path(dev['Path']).is_block_device(): + dev['Dev Path'] = dev['Path'] + elif allow_image_file and pathlib.Path(dev['Path']).is_file(): + dev['Dev Path'] = setup_loopback_device(dev['Path']) + dev['Is Image'] = True + else: + print_error('Invalid {} "{}".'.format(description, dev['Path'])) + abort() + + # Get device details + dev['Details'] = get_device_details(dev['Dev Path']) + + # Check for parent device(s) + while dev['Details']['pkname']: + print_warning('{} "{}" is a child device.'.format( + description.title(), dev['Dev Path'])) + if ask('Use parent device "{}" instead?'.format( + dev['Details']['pkname'])): + # Update dev with parent info + dev['Dev Path'] = dev['Details']['pkname'] + dev['Details'] = get_device_details(dev['Dev Path']) + else: + # Leave alone + break + + return dev + +def setup_loopback_device(source_path): + """Setup a loopback device for source_path, returns dev_path as str.""" + cmd = ( + 'losetup', + '--find', + '--partscan', + '--show', + source_path) + try: + out = run_program(cmd, check=True) + dev_path = out.stdout.decode().strip() + sleep(1) + except CalledProcessError: + print_error('Failed to setup loopback device for source.') + abort() + else: + return dev_path + +def show_device_details(dev_path): + """Display device details on screen.""" + cmd = ( + 'lsblk', '--nodeps', + '--output', 'NAME,TRAN,TYPE,SIZE,VENDOR,MODEL,SERIAL', + dev_path) + result = run_program(cmd) + output = result.stdout.decode().splitlines() + print_info(output.pop(0)) + for line in output: + print_standard(line) + + # Children info + cmd = ('lsblk', '--output', 'NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT', dev_path) + result = run_program(cmd) + output = result.stdout.decode().splitlines() + print_info(output.pop(0)) + for line in output: + print_standard(line) + def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) From b1541c0faf2a2b47325f811b9f5636553bd942d3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 18:10:30 -0600 Subject: [PATCH 011/293] Added alias for hexedit --- .linux_items/include/airootfs/etc/skel/.aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index d20b59b3..5a71d2ad 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -7,6 +7,7 @@ alias 7z9='7z a -t7z -mx=9' alias diff='colordiff -ur' alias du='du -sch --apparent-size' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' +alias hexedit='hexedit --color' alias hw-info='sudo hw-info | less -S' alias inxi='echo -e "\e[33mWARNING: inxi is being replaced and will be removed in a future WizardKit release\e[0m"; echo -e " \e[32mReplacements include:\e[0m 'hw-drive-info', 'hw-info', & 'hw-sensors'"; echo ""; inxi' alias less='less -S' From adc12833306d344241cc50fb6f00507769097c0d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 18:17:38 -0600 Subject: [PATCH 012/293] Add pydf and alias df to pydf * Fixes issue #40 --- .linux_items/include/airootfs/etc/pydfrc | 24 +++++++++++++++++++ .../include/airootfs/etc/skel/.aliases | 1 + .linux_items/packages/live_add | 1 + 3 files changed, 26 insertions(+) create mode 100644 .linux_items/include/airootfs/etc/pydfrc diff --git a/.linux_items/include/airootfs/etc/pydfrc b/.linux_items/include/airootfs/etc/pydfrc new file mode 100644 index 00000000..100b1f05 --- /dev/null +++ b/.linux_items/include/airootfs/etc/pydfrc @@ -0,0 +1,24 @@ +normal_colour = 'default' +header_colour = 'blue' +local_fs_colour = 'default' +remote_fs_colour = 'green' +special_fs_colour = 'yellow' +readonly_fs_colour = 'cyan' +filled_fs_colour = 'red' +full_fs_colour = 'on_red', 'green', 'blink' +sizeformat = "-h" +column_separator = ' ' +column_separator_colour = 'none' +stretch_screen = 0.3 +FILL_THRESH = 75.0 +FULL_THRESH = 85.0 +format = [ + ('fs', 10, "l"), ('size', 5, "r"), + ('used', 5, "r"), ('avail', 5, "r"), ('perc', 5, "r"), + ('bar', 0.1, "l"), ('on', 11, "l") + ] +barchar = '#' +bar_fillchar = '.' +hidebinds = True +mountfile = ['/etc/mtab', '/etc/mnttab', '/proc/mounts'] + diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index 5a71d2ad..9e36c7d1 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -4,6 +4,7 @@ alias 7z3='7z a -t7z -mx=3' alias 7z5='7z a -t7z -mx=5' alias 7z7='7z a -t7z -mx=7' alias 7z9='7z a -t7z -mx=9' +alias df='pydf' alias diff='colordiff -ur' alias du='du -sch --apparent-size' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' diff --git a/.linux_items/packages/live_add b/.linux_items/packages/live_add index a297ca05..ade34eb5 100644 --- a/.linux_items/packages/live_add +++ b/.linux_items/packages/live_add @@ -61,6 +61,7 @@ otf-font-awesome-4 p7zip papirus-icon-theme progsreiserfs +pydf python python-psutil python-requests From ae4f2ac680229aa72566df7ad27ea3d8f6f44fcf Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 19:40:29 -0600 Subject: [PATCH 013/293] Added outer panes --- .bin/Scripts/echo-and-hold | 12 +++++++++ .bin/Scripts/functions/ddrescue.py | 40 +++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100755 .bin/Scripts/echo-and-hold diff --git a/.bin/Scripts/echo-and-hold b/.bin/Scripts/echo-and-hold new file mode 100755 index 00000000..97c69830 --- /dev/null +++ b/.bin/Scripts/echo-and-hold @@ -0,0 +1,12 @@ +#!/bin/bash +# +## Wizard Kit: "echo" text to screen and "hold" by waiting for user input + +function usage { + echo "Usage: $(basename "$0") \"text\"" + echo " e.g. $(basename "$0") \"Some text to show\"" +} + +echo -en "$@" && read -r __dont_care +exit 0 + diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index f834107e..f05a00d8 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -3,6 +3,7 @@ import json import pathlib import re +import time from functions.common import * from operator import itemgetter @@ -64,7 +65,35 @@ def menu_clone(source_path, dest_path): # Build outer panes clear_screen() - #TODO + ## Top panes + source_pane = tmux_splitw( + '-bdvl', '2', + '-PF', '#D', + 'echo-and-hold "{BLUE}Source{CLEAR}\n{text}"'.format( + text = source['Display Name'], + **COLORS)) + tmux_splitw( + '-t', source_pane, + '-dhl', '21', + 'echo-and-hold "{BLUE}Started{CLEAR}\n{text}"'.format( + text = time.strftime("%Y-%m-%d %H:%M %Z"), + **COLORS)) + tmux_splitw( + '-t', source_pane, + '-dhp', '50', + 'echo-and-hold "{BLUE}Destination{CLEAR}\n{text}"'.format( + text = dest['Display Name'], + **COLORS)) + ## Side pane + tmux_splitw('-dhl', '21', 'echo-and-hold "Status #TODO"') + pause() + run_program(['tmux', 'kill-window']) + +def tmux_splitw(*args): + """Run tmux split-window command and return output as str.""" + cmd = ['tmux', 'split-window', *args] + result = run_program(cmd) + return result.stdout.decode().strip() def menu_ddrescue(*args): """Main ddrescue loop/menu.""" @@ -190,6 +219,15 @@ def select_device(description='device', provided_path=None, # Leave alone break + # Set display name + if dev['Is Image']: + dev['Display Name'] = '{name} {size} ({image_name})'.format( + image_name = dev['Path'][dev['Path'].rfind('/')+1:], + **dev['Details']) + else: + dev['Display Name'] = '{name} {size} {model}'.format( + **dev['Details']) + return dev def setup_loopback_device(source_path): From 855884ec934b1132854dd400488b45034bc8b573 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 21:01:10 -0600 Subject: [PATCH 014/293] Added initial update_progress() sections * TODO: expand to support Image mode --- .bin/Scripts/functions/ddrescue.py | 118 +++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 16 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index f05a00d8..544ce2a6 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -15,6 +15,10 @@ USAGE=""" {script_name} clone [source [destination]] """ # Functions +def abort_ddrescue_tui(): + run_program(['losetup', '-D']) + abort() + def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" try: @@ -27,7 +31,7 @@ def get_device_details(dev_path): result = run_program(cmd) except CalledProcessError: print_error('Failed to get device details for {}'.format(dev_path)) - abort() + abort_ddrescue_tui() json_data = json.loads(result.stdout.decode()) # Just return the first device (there should only be one) @@ -41,6 +45,10 @@ def menu_clone(source_path, dest_path): # Set devices source = select_device('source', source_path) + source['Type'] = 'Clone' + source['Pass 1'] = 'Pending' + source['Pass 2'] = 'Pending' + source['Pass 3'] = 'Pending' dest = select_device('destination', dest_path, skip_device = source['Details'], allow_image_file = False) @@ -61,7 +69,7 @@ def menu_clone(source_path, dest_path): # Confirm if not ask('Proceed with clone?'): - abort() + abort_ddrescue_tui() # Build outer panes clear_screen() @@ -85,15 +93,18 @@ def menu_clone(source_path, dest_path): text = dest['Display Name'], **COLORS)) ## Side pane - tmux_splitw('-dhl', '21', 'echo-and-hold "Status #TODO"') - pause() - run_program(['tmux', 'kill-window']) + update_progress(source) + tmux_splitw('-dhl', '21', + 'watch', '--color', '--no-title', '--interval', '1', + 'cat', source['Progress Out']) + + # Main menu + menu_main() -def tmux_splitw(*args): - """Run tmux split-window command and return output as str.""" - cmd = ['tmux', 'split-window', *args] - result = run_program(cmd) - return result.stdout.decode().strip() + # Done + run_program(['losetup', '-D']) + run_program(['tmux', 'kill-window']) + exit_script() def menu_ddrescue(*args): """Main ddrescue loop/menu.""" @@ -126,7 +137,13 @@ def menu_ddrescue(*args): def menu_image(source_path, dest_path): """ddrescue imaging menu.""" print_success('GNU ddrescue: Imaging Menu') - pass + +def menu_main(): + print_success('Main Menu') + print_standard(' ') + print_warning('#TODO') + print_standard(' ') + pause('Press Enter to exit...') def menu_select_device(title='Which device?', skip_device={}): """Select block device via a menu, returns dev_path as str.""" @@ -144,7 +161,7 @@ def menu_select_device(title='Which device?', skip_device={}): json_data = json.loads(result.stdout.decode()) except CalledProcessError: print_error('Failed to get device details for {}'.format(dev_path)) - abort() + abort_ddrescue_tui() # Build menu dev_options = [] @@ -165,7 +182,7 @@ def menu_select_device(title='Which device?', skip_device={}): dev_options = sorted(dev_options, key=itemgetter('Name')) if not dev_options: print_error('No devices available.') - abort() + abort_ddrescue_tui() # Show Menu actions = [{'Name': 'Quit', 'Letter': 'Q'}] @@ -177,7 +194,7 @@ def menu_select_device(title='Which device?', skip_device={}): if selection.isnumeric(): return dev_options[int(selection)-1]['Path'] elif selection == 'Q': - abort() + abort_ddrescue_tui() def select_device(description='device', provided_path=None, skip_device={}, allow_image_file=True): @@ -201,7 +218,7 @@ def select_device(description='device', provided_path=None, dev['Is Image'] = True else: print_error('Invalid {} "{}".'.format(description, dev['Path'])) - abort() + abort_ddrescue_tui() # Get device details dev['Details'] = get_device_details(dev['Dev Path']) @@ -244,7 +261,7 @@ def setup_loopback_device(source_path): sleep(1) except CalledProcessError: print_error('Failed to setup loopback device for source.') - abort() + abort_ddrescue_tui() else: return dev_path @@ -272,6 +289,75 @@ def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) +def tmux_splitw(*args): + """Run tmux split-window command and return output as str.""" + cmd = ['tmux', 'split-window', *args] + result = run_program(cmd) + return result.stdout.decode().strip() + +def get_status_color(s, t_success=99, t_warn=90): + """Get color based on status, returns str.""" + color = COLORS['CLEAR'] + p_recovered = -1 + try: + p_recovered = float(s) + except ValueError: + # Status is either in lists below or will default to red + pass + + if s in ('Pending',): + color = COLORS['CLEAR'] + elif s in ('Working',): + color = COLORS['YELLOW'] + elif p_recovered >= t_success: + color = COLORS['GREEN'] + elif p_recovered >= t_warn: + color = COLORS['YELLOW'] + else: + color = COLORS['RED'] + return color + +def update_progress(source): + """Update progress file.""" + if 'Progress Out' not in source: + source['Progress Out'] = '{}/progress.out'.format(global_vars['LogDir']) + output = [] + if source['Type'] == 'Clone': + output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) + else: + output.append(' {BLUE}Imaging Status{CLEAR}'.format(**COLORS)) + output.append('─────────────────────') + + # Main device + if source['Type'] == 'Clone': + output.append('{BLUE}{dev}{CLEAR}'.format( + dev = source['Dev Path'], + **COLORS)) + for x in (1, 2, 3): + p_num = 'Pass {}'.format(x) + s_display = source[p_num] + try: + s_display = float(s_display) + except ValueError: + # Ignore and leave s_display alone + pass + else: + s_display = '{:0.2f} %'.format(s_display) + output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( + p_num = p_num, + s_color = get_status_color(source[p_num]), + s_display = s_display, + **COLORS)) + else: + #TODO + pass + + # Add line-endings + output = ['{}\n'.format(line) for line in output] + + with open(source['Progress Out'], 'w') as f: + f.writelines(output) + if __name__ == '__main__': print("This file is not meant to be called directly.") From 69909fa34cf474f6bb150d273a1f486e914165d4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 21:02:53 -0600 Subject: [PATCH 015/293] Added safety check --- .bin/Scripts/functions/ddrescue.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 544ce2a6..0805ab79 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -70,6 +70,15 @@ def menu_clone(source_path, dest_path): # Confirm if not ask('Proceed with clone?'): abort_ddrescue_tui() + + # Safety check + print_standard('\nSAFETY CHECK') + print_warning('All data will be DELETED from the ' + 'destination device and partition(s) listed above.') + print_warning('This is irreversible and will lead ' + 'to {CLEAR}{RED}DATA LOSS.'.format(**COLORS)) + if not ask('Asking again to confirm, is this correct?'): + abort_ddrescue_tui() # Build outer panes clear_screen() From 552868c26e0b83b90402b36732ab27e626e5f8dd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 22:04:09 -0600 Subject: [PATCH 016/293] Moved safety check into its own function * Will allow better duplication with Image mode --- .bin/Scripts/functions/ddrescue.py | 64 +++++++++++++++--------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 0805ab79..7c869115 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -37,6 +37,28 @@ def get_device_details(dev_path): # Just return the first device (there should only be one) return json_data['blockdevices'][0] +def get_status_color(s, t_success=99, t_warn=90): + """Get color based on status, returns str.""" + color = COLORS['CLEAR'] + p_recovered = -1 + try: + p_recovered = float(s) + except ValueError: + # Status is either in lists below or will default to red + pass + + if s in ('Pending',): + color = COLORS['CLEAR'] + elif s in ('Working',): + color = COLORS['YELLOW'] + elif p_recovered >= t_success: + color = COLORS['GREEN'] + elif p_recovered >= t_warn: + color = COLORS['YELLOW'] + else: + color = COLORS['RED'] + return color + def menu_clone(source_path, dest_path): """ddrescue cloning menu.""" source_is_image = False @@ -70,16 +92,8 @@ def menu_clone(source_path, dest_path): # Confirm if not ask('Proceed with clone?'): abort_ddrescue_tui() + show_safety_check() - # Safety check - print_standard('\nSAFETY CHECK') - print_warning('All data will be DELETED from the ' - 'destination device and partition(s) listed above.') - print_warning('This is irreversible and will lead ' - 'to {CLEAR}{RED}DATA LOSS.'.format(**COLORS)) - if not ask('Asking again to confirm, is this correct?'): - abort_ddrescue_tui() - # Build outer panes clear_screen() ## Top panes @@ -294,6 +308,16 @@ def show_device_details(dev_path): for line in output: print_standard(line) +def show_safety_check(): + """Display safety check message and get confirmation from user.""" + print_standard('\nSAFETY CHECK') + print_warning('All data will be DELETED from the ' + 'destination device and partition(s) listed above.') + print_warning('This is irreversible and will lead ' + 'to {CLEAR}{RED}DATA LOSS.'.format(**COLORS)) + if not ask('Asking again to confirm, is this correct?'): + abort_ddrescue_tui() + def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) @@ -304,28 +328,6 @@ def tmux_splitw(*args): result = run_program(cmd) return result.stdout.decode().strip() -def get_status_color(s, t_success=99, t_warn=90): - """Get color based on status, returns str.""" - color = COLORS['CLEAR'] - p_recovered = -1 - try: - p_recovered = float(s) - except ValueError: - # Status is either in lists below or will default to red - pass - - if s in ('Pending',): - color = COLORS['CLEAR'] - elif s in ('Working',): - color = COLORS['YELLOW'] - elif p_recovered >= t_success: - color = COLORS['GREEN'] - elif p_recovered >= t_warn: - color = COLORS['YELLOW'] - else: - color = COLORS['RED'] - return color - def update_progress(source): """Update progress file.""" if 'Progress Out' not in source: From 6643cf5d252b0c781e90fc5aecad4fde8454387c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 22:08:00 -0600 Subject: [PATCH 017/293] Moved outer pane section to its own function * Will allow better duplication with Image mode --- .bin/Scripts/functions/ddrescue.py | 59 ++++++++++++++++-------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 7c869115..3282ff6f 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -19,6 +19,37 @@ def abort_ddrescue_tui(): run_program(['losetup', '-D']) abort() +def build_outer_panes(source, dest): + """Build top and side panes.""" + clear_screen() + + # Top panes + source_pane = tmux_splitw( + '-bdvl', '2', + '-PF', '#D', + 'echo-and-hold "{BLUE}Source{CLEAR}\n{text}"'.format( + text = source['Display Name'], + **COLORS)) + tmux_splitw( + '-t', source_pane, + '-dhl', '21', + 'echo-and-hold "{BLUE}Started{CLEAR}\n{text}"'.format( + text = time.strftime("%Y-%m-%d %H:%M %Z"), + **COLORS)) + tmux_splitw( + '-t', source_pane, + '-dhp', '50', + 'echo-and-hold "{BLUE}Destination{CLEAR}\n{text}"'.format( + text = dest['Display Name'], + **COLORS)) + + # Side pane + update_progress(source) + tmux_splitw('-dhl', '21', + 'watch', '--color', '--no-title', '--interval', '1', + 'cat', source['Progress Out']) + + def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" try: @@ -94,34 +125,8 @@ def menu_clone(source_path, dest_path): abort_ddrescue_tui() show_safety_check() - # Build outer panes - clear_screen() - ## Top panes - source_pane = tmux_splitw( - '-bdvl', '2', - '-PF', '#D', - 'echo-and-hold "{BLUE}Source{CLEAR}\n{text}"'.format( - text = source['Display Name'], - **COLORS)) - tmux_splitw( - '-t', source_pane, - '-dhl', '21', - 'echo-and-hold "{BLUE}Started{CLEAR}\n{text}"'.format( - text = time.strftime("%Y-%m-%d %H:%M %Z"), - **COLORS)) - tmux_splitw( - '-t', source_pane, - '-dhp', '50', - 'echo-and-hold "{BLUE}Destination{CLEAR}\n{text}"'.format( - text = dest['Display Name'], - **COLORS)) - ## Side pane - update_progress(source) - tmux_splitw('-dhl', '21', - 'watch', '--color', '--no-title', '--interval', '1', - 'cat', source['Progress Out']) - # Main menu + build_outer_panes(source, dest) menu_main() # Done From 9a27afebf7100c6112e4feb016ef1db220e9a088 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 22:19:39 -0600 Subject: [PATCH 018/293] Moved selection details into its own function * Will allow for better duplication in Image mode --- .bin/Scripts/functions/ddrescue.py | 37 +++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 3282ff6f..ae28527a 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -106,20 +106,8 @@ def menu_clone(source_path, dest_path): skip_device = source['Details'], allow_image_file = False) # Show selection details - clear_screen() - print_success('Source device') - if source['Is Image']: - print_standard('Using image file: {}'.format(source['Path'])) - print_standard(' (via loopback device: {})'.format( - source['Dev Path'])) - show_device_details(source['Dev Path']) - print_standard(' ') + show_selection_details(source, dest) - print_success('Destination device ', end='') - print_error('(ALL DATA WILL BE DELETED)', timestamp=False) - show_device_details(dest['Dev Path']) - print_standard(' ') - # Confirm if not ask('Proceed with clone?'): abort_ddrescue_tui() @@ -323,6 +311,29 @@ def show_safety_check(): if not ask('Asking again to confirm, is this correct?'): abort_ddrescue_tui() +def show_selection_details(source, dest): + clear_screen() + + # Source + print_success('Source device') + if source['Is Image']: + print_standard('Using image file: {}'.format(source['Path'])) + print_standard(' (via loopback device: {})'.format( + source['Dev Path'])) + show_device_details(source['Dev Path']) + print_standard(' ') + + # Destination + if source['Type'] == 'Clone': + print_success('Destination device ', end='') + print_error('(ALL DATA WILL BE DELETED)', timestamp=False) + show_device_details(dest['Dev Path']) + else: + dest['Dest Path'] = '/media/SHOP/Cust Name/' + print_success('Destination path') + print_standard(dest['Dest Path']) + print_standard(' ') + def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) From ae7ba9cba40bba29c5099de9b5760d8a0fe942c9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 16 Jul 2018 22:25:13 -0600 Subject: [PATCH 019/293] Fixed typo in mount-raw-image --- .bin/Scripts/mount-raw-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/mount-raw-image b/.bin/Scripts/mount-raw-image index e738c445..6a183859 100755 --- a/.bin/Scripts/mount-raw-image +++ b/.bin/Scripts/mount-raw-image @@ -24,7 +24,7 @@ if [[ -f "${1:-}" ]]; then done else # losetup did not detect partitions, attempt whole image - udevil mount -o to "${LOOPDEV}" || true + udevil mount -o ro "${LOOPDEV}" || true fi else usage From 6eb486c7700ad0229c95b90a6ce2436267d8dfd4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 00:05:47 -0600 Subject: [PATCH 020/293] Extend get_simple_string() to support underscores --- .bin/Scripts/functions/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index f677df45..1aa8cfaa 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -214,11 +214,11 @@ def get_ticket_number(): return ticket_number def get_simple_string(prompt='Enter string'): - """Get string from user (only alphanumeric/space chars) and return as str.""" + """Get string from user (minimal allowed character set) and return as str.""" simple_string = None while simple_string is None: _input = input('{}: '.format(prompt)) - if re.match(r'^(\w|-| )+$', _input, re.ASCII): + if re.match(r'^(\w|-|_| )+$', _input, re.ASCII): simple_string = _input.strip() return simple_string From c37dab58af02e7575c65e6df757932338d1e3006 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 00:06:43 -0600 Subject: [PATCH 021/293] Updated mount_all_volumes(), now mount_volumes() * Now allows mounting R/W * Can restrict to a specific device's volume(s) * Added more data to the returned report --- .bin/Scripts/functions/data.py | 17 ++++++++++++++--- .bin/Scripts/mount-all-volumes | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index ad4fe4f1..340dc529 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -187,7 +187,7 @@ def get_mounted_volumes(): mounted_volumes.extend(item.get('children', [])) return {item['source']: item for item in mounted_volumes} -def mount_all_volumes(): +def mount_volumes(all_devices=True, device_path=None, read_write=False): """Mount all detected filesystems.""" report = {} @@ -195,6 +195,9 @@ def mount_all_volumes(): cmd = [ 'lsblk', '-J', '-p', '-o', 'NAME,FSTYPE,LABEL,UUID,PARTTYPE,TYPE,SIZE'] + if not all_devices and device_path: + # Only mount volumes for specific device + cmd.append(device_path) result = run_program(cmd) json_data = json.loads(result.stdout.decode()) devs = json_data.get('blockdevices', []) @@ -233,8 +236,11 @@ def mount_all_volumes(): vol_data['show_data']['warning'] = True else: # Mount volume + cmd = ['udevil', 'mount', + '-o', 'rw' if read_write else 'ro', + vol_path] try: - run_program(['udevil', 'mount', '-o', 'ro', vol_path]) + run_program(cmd) except subprocess.CalledProcessError: vol_data['show_data']['data'] = 'Failed to mount' vol_data['show_data']['error'] = True @@ -242,11 +248,16 @@ def mount_all_volumes(): mounted_volumes = get_mounted_volumes() # Format pretty result string - if vol_data['show_data']['data'] != 'Failed to mount': + if vol_data['show_data']['data'] == 'Failed to mount': + vol_data['mount_point'] = None + else: size_used = human_readable_size( mounted_volumes[vol_path]['used']) size_avail = human_readable_size( mounted_volumes[vol_path]['avail']) + vol_data['size_avail'] = size_avail + vol_data['size_used'] = size_used + vol_data['mount_point'] = mounted_volumes[vol_path]['target'] vol_data['show_data']['data'] = 'Mounted on {}'.format( mounted_volumes[vol_path]['target']) vol_data['show_data']['data'] = '{:40} ({} used, {} free)'.format( diff --git a/.bin/Scripts/mount-all-volumes b/.bin/Scripts/mount-all-volumes index d743d656..9e5de0ea 100755 --- a/.bin/Scripts/mount-all-volumes +++ b/.bin/Scripts/mount-all-volumes @@ -18,7 +18,7 @@ if __name__ == '__main__': print_standard('{}: Volume mount tool'.format(KIT_NAME_FULL)) # Mount volumes - report = mount_all_volumes() + report = mount_volumes(all_devices=True) # Print report print_info('\nResults') From 007d2ef692403163538f318d1703d34474d67b6b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 00:15:28 -0600 Subject: [PATCH 022/293] Added select_path() for Image mode * Can select the current path, a local device's volume, or enter manually * Optionally add a ticket folder to path before imaging --- .bin/Scripts/functions/ddrescue.py | 110 +++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ae28527a..3689878f 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -6,6 +6,7 @@ import re import time from functions.common import * +from functions.data import * from operator import itemgetter # STATIC VARIABLES @@ -92,9 +93,6 @@ def get_status_color(s, t_success=99, t_warn=90): def menu_clone(source_path, dest_path): """ddrescue cloning menu.""" - source_is_image = False - source_dev_path = None - print_success('GNU ddrescue: Cloning Menu') # Set devices source = select_device('source', source_path) @@ -152,7 +150,31 @@ def menu_ddrescue(*args): def menu_image(source_path, dest_path): """ddrescue imaging menu.""" - print_success('GNU ddrescue: Imaging Menu') + + # Set devices + source = select_device('source', source_path, allow_image_file = False) + source['Type'] = 'Image' + source['Pass 1'] = 'Pending' + source['Pass 2'] = 'Pending' + source['Pass 3'] = 'Pending' + dest = select_path(dest_path, skip_device=source['Details']) + + # Show selection details + show_selection_details(source, dest) + + # Confirm + if not ask('Proceed with clone?'): + abort_ddrescue_tui() + show_safety_check() + + # Main menu + build_outer_panes(source, dest) + menu_main() + + # Done + run_program(['losetup', '-D']) + run_program(['tmux', 'kill-window']) + exit_script() def menu_main(): print_success('Main Menu') @@ -212,6 +234,83 @@ def menu_select_device(title='Which device?', skip_device={}): elif selection == 'Q': abort_ddrescue_tui() +def select_path(provided_path=None, skip_device={}): + selected_path = {} + pwd = os.path.realpath(global_vars['Env']['PWD']) + path_options = [ + {'Name': 'Current directory: {}'.format(pwd), 'Path': pwd}, + {'Name': 'Local device', 'Path': None}, + {'Name': 'Enter manually', 'Path': None}] + actions = [{'Name': 'Quit', 'Letter': 'Q'}] + selection = menu_select( + title = 'Please make a selection', + main_entries = path_options, + action_entries = actions) + + if selection == 'Q': + abort_ddrescue_tui() + elif selection.isnumeric(): + index = int(selection) - 1 + if path_options[index]['Path']: + # Current directory + selected_path['Path'] = pwd + + elif path_options[index]['Name'] == 'Local device': + # Local device + local_device = select_device( + skip_device = skip_device, + allow_image_file = False) + + # Mount device volume(s) + report = mount_volumes( + all_devices = False, + device_path = local_device['Dev Path'], + read_write = True) + + # Select volume + vol_options = [] + for k, v in sorted(report.items()): + disabled = v['show_data']['data'] == 'Failed to mount' + if disabled: + name = '{name} (Failed to mount)'.format(**v) + else: + name = '{name} (mounted on "{mount_point}")'.format(**v) + vol_options.append({ + 'Name': name, + 'Path': v['mount_point'], + 'Disabled': disabled}) + selection = menu_select( + title = 'Please select a volume', + main_entries = vol_options, + action_entries = actions) + if selection.isnumeric(): + selected_path['Path'] = vol_options[int(selection)-1]['Path'] + elif selection == 'Q': + abort_ddrescue_tui() + + elif path_options[index]['Name'] == 'Enter manually': + # Manual entry + while not selected_path: + m_path = input('Please enter path: ').strip() + if m_path and pathlib.Path(m_path).is_dir(): + selected_path['Path'] = os.path.realpath(m_path) + elif m_path and pathlib.Path(m_path).is_file(): + print_error('File "{}" exists'.format(m_path)) + else: + print_error('Invalid path "{}"'.format(m_path)) + + if ask('Create ticket folder?'): + ticket_folder = get_simple_string('Please enter folder name') + selected_path['Path'] = os.path.join( + selected_path['Path'], ticket_folder) + try: + os.makedirs(selected_path['Path'], exist_ok=True) + except OSError: + print_error('Failed to create folder "{}"'.format( + selected_path['Path'])) + abort_ddrescue_tui() + return selected_path + def select_device(description='device', provided_path=None, skip_device={}, allow_image_file=True): """Select device via provided path or menu, return dev as dict.""" @@ -329,9 +428,8 @@ def show_selection_details(source, dest): print_error('(ALL DATA WILL BE DELETED)', timestamp=False) show_device_details(dest['Dev Path']) else: - dest['Dest Path'] = '/media/SHOP/Cust Name/' print_success('Destination path') - print_standard(dest['Dest Path']) + print_standard(dest['Path']) print_standard(' ') def show_usage(script_name): From 1e4a3b6c0ec36355e019f7581022e4b0278c0364 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 00:49:41 -0600 Subject: [PATCH 023/293] Fix provided_path for Imaging and adjust top panes * Moved select_path menu sections to menu_select_path() --- .bin/Scripts/functions/ddrescue.py | 63 ++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 3689878f..0eda4a18 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -157,7 +157,7 @@ def menu_image(source_path, dest_path): source['Pass 1'] = 'Pending' source['Pass 2'] = 'Pending' source['Pass 3'] = 'Pending' - dest = select_path(dest_path, skip_device=source['Details']) + dest = select_dest_path(dest_path, skip_device=source['Details']) # Show selection details show_selection_details(source, dest) @@ -234,14 +234,19 @@ def menu_select_device(title='Which device?', skip_device={}): elif selection == 'Q': abort_ddrescue_tui() -def select_path(provided_path=None, skip_device={}): - selected_path = {} +def menu_select_path(skip_device={}): + """Select path via menu, returns path as str.""" pwd = os.path.realpath(global_vars['Env']['PWD']) + s_path = None + + # Build Menu path_options = [ {'Name': 'Current directory: {}'.format(pwd), 'Path': pwd}, {'Name': 'Local device', 'Path': None}, {'Name': 'Enter manually', 'Path': None}] actions = [{'Name': 'Quit', 'Letter': 'Q'}] + + # Show Menu selection = menu_select( title = 'Please make a selection', main_entries = path_options, @@ -253,7 +258,7 @@ def select_path(provided_path=None, skip_device={}): index = int(selection) - 1 if path_options[index]['Path']: # Current directory - selected_path['Path'] = pwd + s_path = pwd elif path_options[index]['Name'] == 'Local device': # Local device @@ -284,32 +289,58 @@ def select_path(provided_path=None, skip_device={}): main_entries = vol_options, action_entries = actions) if selection.isnumeric(): - selected_path['Path'] = vol_options[int(selection)-1]['Path'] + s_path = vol_options[int(selection)-1]['Path'] elif selection == 'Q': abort_ddrescue_tui() elif path_options[index]['Name'] == 'Enter manually': # Manual entry - while not selected_path: + while not s_path: m_path = input('Please enter path: ').strip() if m_path and pathlib.Path(m_path).is_dir(): - selected_path['Path'] = os.path.realpath(m_path) + s_path = os.path.realpath(m_path) elif m_path and pathlib.Path(m_path).is_file(): print_error('File "{}" exists'.format(m_path)) else: print_error('Invalid path "{}"'.format(m_path)) + return s_path +def select_dest_path(provided_path=None, skip_device={}): + dest = {} + + # Set path + if provided_path: + dest['Path'] = provided_path + else: + dest['Path'] = menu_select_path(skip_device=skip_device) + dest['Path'] = os.path.realpath(dest['Path']) + + # Check path + if not pathlib.Path(dest['Path']).is_dir(): + print_error('Invalid path "{}"'.format(dest['Path'])) + abort_ddrescue_tui() + + # Create ticket folder if ask('Create ticket folder?'): ticket_folder = get_simple_string('Please enter folder name') - selected_path['Path'] = os.path.join( - selected_path['Path'], ticket_folder) + dest['Path'] = os.path.join( + dest['Path'], ticket_folder) try: - os.makedirs(selected_path['Path'], exist_ok=True) + os.makedirs(dest['Path'], exist_ok=True) except OSError: print_error('Failed to create folder "{}"'.format( - selected_path['Path'])) + dest['Path'])) abort_ddrescue_tui() - return selected_path + + # Set display name + result = run_program(['tput', 'cols']) + width = int((int(result.stdout.decode().strip()) - 21) / 2) - 2 + if len(dest['Path']) > width: + dest['Display Name'] = '...{}'.format(dest['Path'][-(width-3):]) + else: + dest['Display Name'] = dest['Path'] + + return dest def select_device(description='device', provided_path=None, skip_device={}, allow_image_file=True): @@ -332,7 +363,7 @@ def select_device(description='device', provided_path=None, dev['Dev Path'] = setup_loopback_device(dev['Path']) dev['Is Image'] = True else: - print_error('Invalid {} "{}".'.format(description, dev['Path'])) + print_error('Invalid {} "{}"'.format(description, dev['Path'])) abort_ddrescue_tui() # Get device details @@ -359,6 +390,12 @@ def select_device(description='device', provided_path=None, else: dev['Display Name'] = '{name} {size} {model}'.format( **dev['Details']) + result = run_program(['tput', 'cols']) + width = int((int(result.stdout.decode().strip()) - 21) / 2) - 2 + if len(dev['Display Name']) > width: + dev['Display Name'] = '{}...'.format(dev['Display Name'][:(width-3)]) + else: + dev['Display Name'] = dev['Display Name'] return dev From 29266f161172371ece53b9c53c865a94ac3e7cda Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 01:11:43 -0600 Subject: [PATCH 024/293] Added initial Imaging source child dev support --- .bin/Scripts/functions/ddrescue.py | 55 ++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 0eda4a18..691d6169 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -165,7 +165,16 @@ def menu_image(source_path, dest_path): # Confirm if not ask('Proceed with clone?'): abort_ddrescue_tui() - show_safety_check() + + # TODO Replace with real child dev selection menu + if 'children' in source['Details']: + source['Children'] = [] + for c in source['Details']['children']: + source['Children'].append({ + 'Dev Path': c['name'], + 'Pass 1': 'Pending', + 'Pass 2': 'Pending', + 'Pass 3': 'Pending'}) # Main menu build_outer_panes(source, dest) @@ -511,8 +520,48 @@ def update_progress(source): s_display = s_display, **COLORS)) else: - #TODO - pass + # Image mode + if 'Children' in source: + for child in source['Children']: + output.append('{BLUE}{dev}{CLEAR}'.format( + dev = child['Dev Path'], + **COLORS)) + for x in (1, 2, 3): + p_num = 'Pass {}'.format(x) + s_display = child[p_num] + try: + s_display = float(s_display) + except ValueError: + # Ignore and leave s_display alone + pass + else: + s_display = '{:0.2f} %'.format(s_display) + output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( + p_num = p_num, + s_color = get_status_color(child[p_num]), + s_display = s_display, + **COLORS)) + output.append(' ') + else: + # Whole disk + output.append('{BLUE}{dev}{CLEAR} {YELLOW}(Whole){CLEAR}'.format( + dev = source['Dev Path'], + **COLORS)) + for x in (1, 2, 3): + p_num = 'Pass {}'.format(x) + s_display = source[p_num] + try: + s_display = float(s_display) + except ValueError: + # Ignore and leave s_display alone + pass + else: + s_display = '{:0.2f} %'.format(s_display) + output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( + p_num = p_num, + s_color = get_status_color(source[p_num]), + s_display = s_display, + **COLORS)) # Add line-endings output = ['{}\n'.format(line) for line in output] From de8f3bbd2b31fa1016260cbf67df8710e15596ce Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 13:21:12 -0600 Subject: [PATCH 025/293] Use image file instead of loopback device * Still setup loopback for image details but use image directly in ddrescue * Adjusted outer/side panes to use image path instead of loopback dev --- .bin/Scripts/functions/ddrescue.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 691d6169..06e7166b 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -393,16 +393,17 @@ def select_device(description='device', provided_path=None, # Set display name if dev['Is Image']: - dev['Display Name'] = '{name} {size} ({image_name})'.format( - image_name = dev['Path'][dev['Path'].rfind('/')+1:], - **dev['Details']) + dev['Display Name'] = dev['Path'] else: dev['Display Name'] = '{name} {size} {model}'.format( **dev['Details']) result = run_program(['tput', 'cols']) width = int((int(result.stdout.decode().strip()) - 21) / 2) - 2 if len(dev['Display Name']) > width: - dev['Display Name'] = '{}...'.format(dev['Display Name'][:(width-3)]) + if dev['Is Image']: + dev['Display Name'] = '...{}'.format(dev['Display Name'][-(width-3):]) + else: + dev['Display Name'] = '{}...'.format(dev['Display Name'][:(width-3)]) else: dev['Display Name'] = dev['Display Name'] @@ -502,7 +503,7 @@ def update_progress(source): # Main device if source['Type'] == 'Clone': output.append('{BLUE}{dev}{CLEAR}'.format( - dev = source['Dev Path'], + dev = 'Image File' if source['Is Image'] else source['Dev Path'], **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) From fd8ac7cf1ad402d371b9af25028eb962a88b78a7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 14:16:38 -0600 Subject: [PATCH 026/293] Add child device selection menu for Image mode * Can select either whole device or child dev(s), not both --- .bin/Scripts/functions/ddrescue.py | 78 +++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 11 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 06e7166b..51cd45f2 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -166,15 +166,8 @@ def menu_image(source_path, dest_path): if not ask('Proceed with clone?'): abort_ddrescue_tui() - # TODO Replace with real child dev selection menu - if 'children' in source['Details']: - source['Children'] = [] - for c in source['Details']['children']: - source['Children'].append({ - 'Dev Path': c['name'], - 'Pass 1': 'Pending', - 'Pass 2': 'Pending', - 'Pass 3': 'Pending'}) + # Select child device(s) + source['Children'] = menu_select_children(source) # Main menu build_outer_panes(source, dest) @@ -192,6 +185,68 @@ def menu_main(): print_standard(' ') pause('Press Enter to exit...') +def menu_select_children(source): + """Select child device(s) or whole disk, returns list.""" + dev_options = [{ + 'Base Name': '{:<14}(Whole device)'.format(source['Dev Path']), + 'Path': source['Dev Path'], + 'Selected': False}] + for child in source['Details'].get('children', []): + dev_options.append({ + 'Base Name': '{:<14}({:>6} {})'.format( + child['name'], + child['size'], + child['fstype'] if child['fstype'] else 'Unknown'), + 'Path': child['name'], + 'Selected': False}) + actions = [ + {'Name': 'Proceed', 'Letter': 'P'}, + {'Name': 'Quit', 'Letter': 'Q'}] + + # Skip Menu if there's no children + if len(dev_options) == 1: + return [] + + # Show Menu + while True: + # Update entries + for dev in dev_options: + dev['Name'] = '{} {}'.format( + '*' if dev['Selected'] else ' ', + dev['Base Name']) + + selection = menu_select( + title = 'Please select part(s) to image', + main_entries = dev_options, + action_entries = actions) + + if selection.isnumeric(): + # Toggle selection + index = int(selection) - 1 + dev_options[index]['Selected'] = not dev_options[index]['Selected'] + + # Deselect whole device if child selected (this round) + if index > 0: + dev_options[0]['Selected'] = False + + # Deselect all children if whole device selected + if dev_options[0]['Selected']: + for dev in dev_options[1:]: + dev['Selected'] = False + elif selection == 'P': + break + elif selection == 'Q': + abort_ddrescue_tui() + + # Check selection + selected_children = [{ + 'Dev Path': d['Path'], + 'Pass 1': 'Pending', + 'Pass 2': 'Pending', + 'Pass 3': 'Pending'} for d in dev_options + if d['Selected'] and 'Whole device' not in d['Base Name']] + return selected_children + def menu_select_device(title='Which device?', skip_device={}): """Select block device via a menu, returns dev_path as str.""" skip_names = [ @@ -522,7 +577,8 @@ def update_progress(source): **COLORS)) else: # Image mode - if 'Children' in source: + if source['Children']: + # Just parts for child in source['Children']: output.append('{BLUE}{dev}{CLEAR}'.format( dev = child['Dev Path'], @@ -544,7 +600,7 @@ def update_progress(source): **COLORS)) output.append(' ') else: - # Whole disk + # Whole device output.append('{BLUE}{dev}{CLEAR} {YELLOW}(Whole){CLEAR}'.format( dev = source['Dev Path'], **COLORS)) From 310a2eb63a25dae6695e06db6a120de07b1cac5e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 16:01:29 -0600 Subject: [PATCH 027/293] Initial Main Menu code * Required refactoring pass status code * Need to add settings menu next --- .bin/Scripts/functions/ddrescue.py | 154 ++++++++++++++++++++++++----- 1 file changed, 128 insertions(+), 26 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 51cd45f2..85149355 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -10,7 +10,19 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES -USAGE=""" {script_name} clone [source [destination]] +DDRESCUE_SETTINGS = [ + {'Flag': '--binary-prefixes', 'Enabled': True, 'Hidden': True}, + {'Flag': '--data-preview', 'Enabled': True, 'Hidden': True}, + {'Flag': '--idirect', 'Enabled': True}, + {'Flag': '--max-read-rate', 'Enabled': False, 'Value': '128MiB'}, + {'Flag': '--min-read-rate', 'Enabled': True, 'Value': '64KiB'}, + {'Flag': '--odirect', 'Enabled': True}, + {'Flag': '--reopen-on-error', 'Enabled': True}, + {'Flag': '--retry-passes=', 'Enabled': True, 'Value': '0'}, + {'Flag': '--timeout=', 'Enabled': True, 'Value': '5m'}, + {'Flag': '-vvvv', 'Enabled': True, 'Hidden': True}, + ] +USAGE = """ {script_name} clone [source [destination]] {script_name} image [source [destination]] (e.g. {script_name} clone /dev/sda /dev/sdb) """ @@ -97,9 +109,9 @@ def menu_clone(source_path, dest_path): # Set devices source = select_device('source', source_path) source['Type'] = 'Clone' - source['Pass 1'] = 'Pending' - source['Pass 2'] = 'Pending' - source['Pass 3'] = 'Pending' + source['Pass 1'] = {'Status': 'Pending', 'Done': False} + source['Pass 2'] = {'Status': 'Pending', 'Done': False} + source['Pass 3'] = {'Status': 'Pending', 'Done': False} dest = select_device('destination', dest_path, skip_device = source['Details'], allow_image_file = False) @@ -113,7 +125,7 @@ def menu_clone(source_path, dest_path): # Main menu build_outer_panes(source, dest) - menu_main() + menu_main(source) # Done run_program(['losetup', '-D']) @@ -154,16 +166,16 @@ def menu_image(source_path, dest_path): # Set devices source = select_device('source', source_path, allow_image_file = False) source['Type'] = 'Image' - source['Pass 1'] = 'Pending' - source['Pass 2'] = 'Pending' - source['Pass 3'] = 'Pending' + source['Pass 1'] = {'Status': 'Pending', 'Done': False} + source['Pass 2'] = {'Status': 'Pending', 'Done': False} + source['Pass 3'] = {'Status': 'Pending', 'Done': False} dest = select_dest_path(dest_path, skip_device=source['Details']) # Show selection details show_selection_details(source, dest) # Confirm - if not ask('Proceed with clone?'): + if not ask('Proceed with imaging?'): abort_ddrescue_tui() # Select child device(s) @@ -171,26 +183,116 @@ def menu_image(source_path, dest_path): # Main menu build_outer_panes(source, dest) - menu_main() + menu_main(source) # Done run_program(['losetup', '-D']) run_program(['tmux', 'kill-window']) exit_script() -def menu_main(): - print_success('Main Menu') - print_standard(' ') - print_warning('#TODO') - print_standard(' ') - pause('Press Enter to exit...') +def menu_main(source): + """Main menu is used to set ddrescue settings.""" + if 'Settings' not in source: + source['Settings'] = DDRESCUE_SETTINGS.copy() + + # Build menu + main_options = [ + {'Base Name': 'Retry', 'Enabled': False}, + {'Base Name': 'Reverse direction', 'Enabled': False}, + ] + actions =[ + {'Name': 'Start', 'Letter': 'S'}, + {'Name': 'Change settings {YELLOW}(experts only){CLEAR}'.format( + **COLORS), + 'Letter': 'C'}, + {'Name': 'Quit', 'Letter': 'Q', 'CRLF': True}, + ] + + # Show menu + while True: + # Update entries + for opt in main_options: + opt['Name'] = '{} {}'.format( + '✓' if opt['Enabled'] else 'X', + opt['Base Name']) + + selection = menu_select( + title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}'.format(**COLORS), + main_entries = main_options, + action_entries = actions) + + if selection.isnumeric(): + # Toggle selection + index = int(selection) - 1 + main_options[index]['Enabled'] = not main_options[index]['Enabled'] + elif selection == 'S': + # Set settings for pass + settings = [] + # TODO move to new function and replace with real code + for s in source['Settings']: + if not s['Enabled']: + continue + if s['Flag'][-1:] == '=': + settings.append('{Flag}{Value}'.format(**s)) + else: + settings.append(s['Flag']) + if 'Value' in s: + settings.append(s['Value']) + for opt in main_options: + if 'Retry' in opt['Base Name'] and opt['Enabled']: + settings.extend(['--retrim', '--try-again']) + if 'Reverse' in opt['Base Name'] and opt['Enabled']: + settings.append('--reverse') + # Disable for next pass + opt['Enabled'] = False + print_success('GO!') + if source['Pass 3']['Done']: + # Go to results + print_success('Done?') + elif source['Pass 2']['Done']: + # In pass 3 + print_error('Pass 3') + print_standard(str(settings)) + source['Pass 3']['Done'] = True + source['Pass 3']['Status'] = '99.99' + elif source['Pass 1']['Done']: + # In pass 2 + print_warning('Pass 2') + settings.append('--no-scrape') + print_standard(str(settings)) + source['Pass 2']['Done'] = True + source['Pass 2']['Status'] = '98.1415' + else: + # In pass 1 + print_info('Pass 1') + settings.extend(['--no-trim', '--no-scrape']) + print_standard(str(settings)) + status = source['Pass 1']['Status'] + if status == 'Pending': + source['Pass 1']['Status'] = '78.6623' + elif float(status) < 80: + source['Pass 1']['Status'] = '86.1102' + elif float(status) < 95: + source['Pass 1']['Status'] = '97.77' + source['Pass 1']['Done'] = True + update_progress(source) + pause() + elif selection == 'C': + # TODO Move to new function and replace with real code + print_warning( + 'These settings can cause {RED}SERIOUS damage{YELLOW} to drives'.format( + **COLORS)) + print_standard('Please read the manual before making any changes') + pause() + elif selection == 'Q': + break def menu_select_children(source): """Select child device(s) or whole disk, returns list.""" dev_options = [{ 'Base Name': '{:<14}(Whole device)'.format(source['Dev Path']), 'Path': source['Dev Path'], - 'Selected': False}] + 'Selected': True}] for child in source['Details'].get('children', []): dev_options.append({ 'Base Name': '{:<14}({:>6} {})'.format( @@ -241,9 +343,9 @@ def menu_select_children(source): # Check selection selected_children = [{ 'Dev Path': d['Path'], - 'Pass 1': 'Pending', - 'Pass 2': 'Pending', - 'Pass 3': 'Pending'} for d in dev_options + 'Pass 1': {'Status': 'Pending', 'Done': False}, + 'Pass 2': {'Status': 'Pending', 'Done': False}, + 'Pass 3': {'Status': 'Pending', 'Done': False}} for d in dev_options if d['Selected'] and 'Whole device' not in d['Base Name']] return selected_children @@ -562,7 +664,7 @@ def update_progress(source): **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) - s_display = source[p_num] + s_display = source[p_num]['Status'] try: s_display = float(s_display) except ValueError: @@ -572,7 +674,7 @@ def update_progress(source): s_display = '{:0.2f} %'.format(s_display) output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( p_num = p_num, - s_color = get_status_color(source[p_num]), + s_color = get_status_color(source[p_num]['Status']), s_display = s_display, **COLORS)) else: @@ -585,7 +687,7 @@ def update_progress(source): **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) - s_display = child[p_num] + s_display = child[p_num]['Status'] try: s_display = float(s_display) except ValueError: @@ -595,7 +697,7 @@ def update_progress(source): s_display = '{:0.2f} %'.format(s_display) output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( p_num = p_num, - s_color = get_status_color(child[p_num]), + s_color = get_status_color(child[p_num]['Status']), s_display = s_display, **COLORS)) output.append(' ') @@ -606,7 +708,7 @@ def update_progress(source): **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) - s_display = source[p_num] + s_display = source[p_num]['Status'] try: s_display = float(s_display) except ValueError: @@ -616,7 +718,7 @@ def update_progress(source): s_display = '{:0.2f} %'.format(s_display) output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( p_num = p_num, - s_color = get_status_color(source[p_num]), + s_color = get_status_color(source[p_num]['Status']), s_display = s_display, **COLORS)) From 7d851d222228a339270f839c327637d016f9919d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 16:59:45 -0600 Subject: [PATCH 028/293] Add settings menu --- .bin/Scripts/functions/ddrescue.py | 95 ++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 25 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 85149355..cf96bfe1 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -10,18 +10,18 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES -DDRESCUE_SETTINGS = [ - {'Flag': '--binary-prefixes', 'Enabled': True, 'Hidden': True}, - {'Flag': '--data-preview', 'Enabled': True, 'Hidden': True}, - {'Flag': '--idirect', 'Enabled': True}, - {'Flag': '--max-read-rate', 'Enabled': False, 'Value': '128MiB'}, - {'Flag': '--min-read-rate', 'Enabled': True, 'Value': '64KiB'}, - {'Flag': '--odirect', 'Enabled': True}, - {'Flag': '--reopen-on-error', 'Enabled': True}, - {'Flag': '--retry-passes=', 'Enabled': True, 'Value': '0'}, - {'Flag': '--timeout=', 'Enabled': True, 'Value': '5m'}, - {'Flag': '-vvvv', 'Enabled': True, 'Hidden': True}, - ] +DDRESCUE_SETTINGS = { + '--binary-prefixes': {'Enabled': True, 'Hidden': True}, + '--data-preview': {'Enabled': True, 'Hidden': True}, + '--idirect': {'Enabled': True}, + '--odirect': {'Enabled': True}, + '--max-read-rate': {'Enabled': False, 'Value': '128MiB'}, + '--min-read-rate': {'Enabled': True, 'Value': '64KiB'}, + '--reopen-on-error': {'Enabled': True}, + '--retry-passes=': {'Enabled': True, 'Value': '0'}, + '--timeout=': {'Enabled': True, 'Value': '5m'}, + '-vvvv': {'Enabled': True, 'Hidden': True}, + } USAGE = """ {script_name} clone [source [destination]] {script_name} image [source [destination]] (e.g. {script_name} clone /dev/sda /dev/sdb) @@ -229,15 +229,15 @@ def menu_main(source): # Set settings for pass settings = [] # TODO move to new function and replace with real code - for s in source['Settings']: - if not s['Enabled']: + for k, v in source['Settings'].items(): + if not v['Enabled']: continue - if s['Flag'][-1:] == '=': - settings.append('{Flag}{Value}'.format(**s)) + if k[-1:] == '=': + settings.append('{}{}'.format(k, v['Value'])) else: - settings.append(s['Flag']) - if 'Value' in s: - settings.append(s['Value']) + settings.append(k) + if 'Value' in v: + settings.append(v['Value']) for opt in main_options: if 'Retry' in opt['Base Name'] and opt['Enabled']: settings.extend(['--retrim', '--try-again']) @@ -278,12 +278,7 @@ def menu_main(source): update_progress(source) pause() elif selection == 'C': - # TODO Move to new function and replace with real code - print_warning( - 'These settings can cause {RED}SERIOUS damage{YELLOW} to drives'.format( - **COLORS)) - print_standard('Please read the manual before making any changes') - pause() + menu_settings(source) elif selection == 'Q': break @@ -471,6 +466,56 @@ def menu_select_path(skip_device={}): print_error('Invalid path "{}"'.format(m_path)) return s_path +def menu_settings(source): + """Change advanced ddrescue settings.""" + title = '{GREEN}ddrescue TUI: Expert Settings{CLEAR}\n\n'.format(**COLORS) + title += '{YELLOW}These settings can cause {CLEAR}'.format(**COLORS) + title += '{RED}MAJOR DAMAGE{CLEAR}{YELLOW} to drives{CLEAR}\n'.format( + **COLORS) + title += 'Please read the manual before making any changes' + + # Build menu + settings = [] + for k, v in sorted(source['Settings'].items()): + if not v.get('Hidden', False): + settings.append({'Base Name': k.replace('=', ''), 'Flag': k}) + actions = [{'Name': 'Main Menu', 'Letter': 'M'}] + + # Show menu + while True: + for s in settings: + s['Name'] = '{}{}{}'.format( + s['Base Name'], + ' = ' if 'Value' in source['Settings'][s['Flag']] else '', + source['Settings'][s['Flag']].get('Value', '')) + if not source['Settings'][s['Flag']]['Enabled']: + s['Name'] = '{YELLOW}{name} (Disabled){CLEAR}'.format( + name = s['Name'], + **COLORS) + selection = menu_select( + title = title, + main_entries = settings, + action_entries = actions) + if selection.isnumeric(): + index = int(selection) - 1 + flag = settings[index]['Flag'] + enabled = source['Settings'][flag]['Enabled'] + if 'Value' in source['Settings'][flag]: + answer = choice( + choices = ['Toggle flag', 'Change value'], + prompt = 'Please make a selection for "{}"'.format(flag)) + if answer == 'Toggle flag': + # Toggle + source['Settings'][flag]['Enabled'] = not enabled + else: + # Update value + source['Settings'][flag]['Value'] = get_simple_string( + prompt = 'Enter new value') + else: + source['Settings'][flag]['Enabled'] = not enabled + elif selection == 'M': + break + def select_dest_path(provided_path=None, skip_device={}): dest = {} From d1d3e1592e84601f3243cad6f477e94b16ec3db8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 18:11:23 -0600 Subject: [PATCH 029/293] Added get_process() --- .bin/Scripts/functions/common.py | 33 +++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index 1aa8cfaa..75fe99d1 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -197,6 +197,30 @@ def extract_item(item, filter='', silent=False): if not silent: print_warning('WARNING: Errors encountered while exctracting data') +def get_process(name=None): + """Get process by name, returns psutil.Process obj.""" + proc = None + if not name: + raise GenericError + + for p in psutil.process_iter(): + try: + if p.name() == name: + proc = p + except psutil._exceptions.NoSuchProcess: + # Process finished during iteration? Going to ignore + pass + return proc + +def get_simple_string(prompt='Enter string'): + """Get string from user (minimal allowed character set) and return as str.""" + simple_string = None + while simple_string is None: + _input = input('{}: '.format(prompt)) + if re.match(r'^(\w|-|_| )+$', _input, re.ASCII): + simple_string = _input.strip() + return simple_string + def get_ticket_number(): """Get TicketNumber from user, save in LogDir, and return as str.""" if not ENABLED_TICKET_NUMBERS: @@ -213,15 +237,6 @@ def get_ticket_number(): f.write(ticket_number) return ticket_number -def get_simple_string(prompt='Enter string'): - """Get string from user (minimal allowed character set) and return as str.""" - simple_string = None - while simple_string is None: - _input = input('{}: '.format(prompt)) - if re.match(r'^(\w|-|_| )+$', _input, re.ASCII): - simple_string = _input.strip() - return simple_string - def human_readable_size(size, decimals=0): """Convert size in bytes to a human-readable format and return a str.""" # Prep string formatting From 358191539cdba297b8230e1ddb9edc59677b9d49 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 19:19:38 -0600 Subject: [PATCH 030/293] Added run_ddrescue() and update_smart_report() * Working "wait" loop while ddrescue is running. --- .bin/Scripts/functions/ddrescue.py | 162 ++++++++++++++++++++++------- 1 file changed, 123 insertions(+), 39 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index cf96bfe1..fa454ef1 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -2,7 +2,9 @@ import json import pathlib +import psutil import re +import signal import time from functions.common import * @@ -108,10 +110,11 @@ def menu_clone(source_path, dest_path): # Set devices source = select_device('source', source_path) - source['Type'] = 'Clone' + source['Current Pass'] = 'Pass 1' source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} source['Pass 3'] = {'Status': 'Pending', 'Done': False} + source['Type'] = 'Clone' dest = select_device('destination', dest_path, skip_device = source['Details'], allow_image_file = False) @@ -165,10 +168,11 @@ def menu_image(source_path, dest_path): # Set devices source = select_device('source', source_path, allow_image_file = False) - source['Type'] = 'Image' + source['Current Pass'] = 'Pass 1' source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} source['Pass 3'] = {'Status': 'Pending', 'Done': False} + source['Type'] = 'Image' dest = select_dest_path(dest_path, skip_device=source['Details']) # Show selection details @@ -213,7 +217,7 @@ def menu_main(source): # Update entries for opt in main_options: opt['Name'] = '{} {}'.format( - '✓' if opt['Enabled'] else 'X', + '[✓]' if opt['Enabled'] else '[ ]', opt['Base Name']) selection = menu_select( @@ -228,7 +232,6 @@ def menu_main(source): elif selection == 'S': # Set settings for pass settings = [] - # TODO move to new function and replace with real code for k, v in source['Settings'].items(): if not v['Enabled']: continue @@ -245,38 +248,9 @@ def menu_main(source): settings.append('--reverse') # Disable for next pass opt['Enabled'] = False - print_success('GO!') - if source['Pass 3']['Done']: - # Go to results - print_success('Done?') - elif source['Pass 2']['Done']: - # In pass 3 - print_error('Pass 3') - print_standard(str(settings)) - source['Pass 3']['Done'] = True - source['Pass 3']['Status'] = '99.99' - elif source['Pass 1']['Done']: - # In pass 2 - print_warning('Pass 2') - settings.append('--no-scrape') - print_standard(str(settings)) - source['Pass 2']['Done'] = True - source['Pass 2']['Status'] = '98.1415' - else: - # In pass 1 - print_info('Pass 1') - settings.extend(['--no-trim', '--no-scrape']) - print_standard(str(settings)) - status = source['Pass 1']['Status'] - if status == 'Pending': - source['Pass 1']['Status'] = '78.6623' - elif float(status) < 80: - source['Pass 1']['Status'] = '86.1102' - elif float(status) < 95: - source['Pass 1']['Status'] = '97.77' - source['Pass 1']['Done'] = True - update_progress(source) - pause() + + # Run pass + run_ddrescue(source, settings) elif selection == 'C': menu_settings(source) elif selection == 'Q': @@ -502,9 +476,9 @@ def menu_settings(source): enabled = source['Settings'][flag]['Enabled'] if 'Value' in source['Settings'][flag]: answer = choice( - choices = ['Toggle flag', 'Change value'], - prompt = 'Please make a selection for "{}"'.format(flag)) - if answer == 'Toggle flag': + choices = ['T', 'C'], + prompt = 'Toggle or change value for "{}"'.format(flag)) + if answer == 'T': # Toggle source['Settings'][flag]['Enabled'] = not enabled else: @@ -516,6 +490,99 @@ def menu_settings(source): elif selection == 'M': break +def run_ddrescue(source, settings): + """Run ddrescue pass.""" + if source['Current Pass'] == 'Pass 1': + settings.extend(['--no-trim', '--no-scrape']) + elif source['Current Pass'] == 'Pass 2': + settings.append('--no-scrape') + elif source['Current Pass'] == 'Pass 3': + pass + else: + # Assuming Done + return + + # Set heights + ## NOTE: 10/32 is based on min heights for SMART/ddrescue panes (10 + 22) + result = run_program(['tput', 'lines']) + height = int(result.stdout.decode().strip()) + height_smart = int(height * (12 / 34)) + height_ddrescue = height - height_smart + + # Show SMART status + update_smart_report(source) + smart_pane = tmux_splitw( + '-bdvl', str(height_smart), + '-PF', '#D', + 'watch', '--color', '--no-title', '--interval', '5', + 'cat', source['SMART Report']) + + # Start ddrescue + return_code = None + try: + clear_screen() + #ddrescue_proc = popen_program('ddrescue who.dd wat.dd why.map'.split()) + ddrescue_proc = popen_program(['./__choose_exit']) + while True: + sleep(3) + with open(source['SMART Report'], 'a') as f: + f.write('heh.\n') + return_code = ddrescue_proc.poll() + if return_code: + # i.e. not None and not 0 + print_error('Error(s) encountered, see message above.') + break + elif return_code is not None: + # Assuming normal exit + break + except KeyboardInterrupt: + # Catch user abort + pass + + # Was ddrescue aborted? + if return_code is None: + print_warning('Aborted') + + # TODO + update_progress(source) + print_info('Return: {}'.format(return_code)) + pause() + run_program(['tmux', 'kill-pane', '-t', smart_pane]) + return + + ##TODO + #print_success('GO!') + #if source['Pass 3']['Done']: + # # Go to results + # print_success('Done?') + #elif source['Pass 2']['Done']: + # # In pass 3 + # print_error('Pass 3') + # print_standard(str(settings)) + # source['Pass 3']['Done'] = True + # source['Pass 3']['Status'] = '99.99' + #elif source['Pass 1']['Done']: + # # In pass 2 + # print_warning('Pass 2') + # settings.append('--no-scrape') + # print_standard(str(settings)) + # source['Pass 2']['Done'] = True + # source['Pass 2']['Status'] = '98.1415' + #else: + # # In pass 1 + # print_info('Pass 1') + # settings.extend(['--no-trim', '--no-scrape']) + # print_standard(str(settings)) + # status = source['Pass 1']['Status'] + # if status == 'Pending': + # source['Pass 1']['Status'] = '78.6623' + # elif float(status) < 80: + # source['Pass 1']['Status'] = '86.1102' + # elif float(status) < 95: + # source['Pass 1']['Status'] = '97.77' + # source['Pass 1']['Done'] = True + #update_progress(source) + def select_dest_path(provided_path=None, skip_device={}): dest = {} @@ -773,6 +840,23 @@ def update_progress(source): with open(source['Progress Out'], 'w') as f: f.writelines(output) +def update_smart_report(source): + """Update smart report file.""" + if 'SMART Report' not in source: + source['SMART Report'] = '{}/smart_report.out'.format( + global_vars['LogDir']) + output = [] + + # TODO + output.append('SMART Report') + output.append('TODO') + + # Add line-endings + output = ['{}\n'.format(line) for line in output] + + with open(source['SMART Report'], 'w') as f: + f.writelines(output) + if __name__ == '__main__': print("This file is not meant to be called directly.") From a12a5912797dbf2fd0416f479828aa9f07091fac Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 21:05:37 -0600 Subject: [PATCH 031/293] Moved SMART sections to a separate script * Refresh rate is now handled by 'watch --interval' * Allows for much simpler ddrescue execution / tracking * Removed all 'SMART Report' sections from functions/ddrescue.py * functions/hw_diags.py has been further extended * Supports full device paths (only for displaying attributes ATM) * Adds a timestamp when only displaying attributes --- .bin/Scripts/ddrescue-tui-smart-display | 39 ++++++++++++++++++++++ .bin/Scripts/functions/ddrescue.py | 43 +++++-------------------- .bin/Scripts/functions/hw_diags.py | 39 ++++++++++++++++++---- 3 files changed, 79 insertions(+), 42 deletions(-) create mode 100755 .bin/Scripts/ddrescue-tui-smart-display diff --git a/.bin/Scripts/ddrescue-tui-smart-display b/.bin/Scripts/ddrescue-tui-smart-display new file mode 100755 index 00000000..a53a2dca --- /dev/null +++ b/.bin/Scripts/ddrescue-tui-smart-display @@ -0,0 +1,39 @@ +#!/bin/python3 +# +## Wizard Kit: SMART attributes display for ddrescue TUI + +import os +import sys +import time + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.hw_diags import * +#init_global_vars() + +if __name__ == '__main__': + try: + # Prep + clear_screen() + dev_path = sys.argv[1] + devs = scan_disks(True, dev_path) + + # Warn if SMART unavailable + if dev_path not in devs: + print_error('SMART data not available') + input('') + + # Initial screen + dev = devs[dev_path] + clear_screen() + show_disk_details(dev, only_attributes=True) + + # Done + exit_script() + except SystemExit: + pass + except: + major_exception() + +# vim: sts=4 sw=4 ts=4 diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index fa454ef1..ebc8b0f2 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -510,38 +510,28 @@ def run_ddrescue(source, settings): height_ddrescue = height - height_smart # Show SMART status - update_smart_report(source) smart_pane = tmux_splitw( '-bdvl', str(height_smart), '-PF', '#D', - 'watch', '--color', '--no-title', '--interval', '5', - 'cat', source['SMART Report']) + 'watch', '--color', '--no-title', '--interval', '300', + 'ddrescue-tui-smart-display', source['Dev Path']) # Start ddrescue - return_code = None try: clear_screen() - #ddrescue_proc = popen_program('ddrescue who.dd wat.dd why.map'.split()) - ddrescue_proc = popen_program(['./__choose_exit']) - while True: - sleep(3) - with open(source['SMART Report'], 'a') as f: - f.write('heh.\n') - return_code = ddrescue_proc.poll() - if return_code: - # i.e. not None and not 0 - print_error('Error(s) encountered, see message above.') - break - elif return_code is not None: - # Assuming normal exit - break + ddrescue_proc = popen_program(['./__choose_exit', *settings]) + ddrescue_proc.wait() except KeyboardInterrupt: # Catch user abort pass # Was ddrescue aborted? + return_code = ddrescue_proc.poll() if return_code is None: print_warning('Aborted') + elif return_code: + # i.e. not None and not 0 + print_error('Error(s) encountered, see message above.') # TODO update_progress(source) @@ -840,23 +830,6 @@ def update_progress(source): with open(source['Progress Out'], 'w') as f: f.writelines(output) -def update_smart_report(source): - """Update smart report file.""" - if 'SMART Report' not in source: - source['SMART Report'] = '{}/smart_report.out'.format( - global_vars['LogDir']) - output = [] - - # TODO - output.append('SMART Report') - output.append('TODO') - - # Add line-endings - output = ['{}\n'.format(line) for line in output] - - with open(source['SMART Report'], 'w') as f: - f.writelines(output) - if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 1b61d8ca..26547d07 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1,6 +1,7 @@ # Wizard Kit: Functions - HW Diagnostics import json +import time from functions.common import * @@ -56,7 +57,9 @@ def get_read_rate(s): def get_smart_details(dev): """Get SMART data for dev if possible, returns dict.""" - cmd = 'sudo smartctl --all --json /dev/{}'.format(dev).split() + cmd = 'sudo smartctl --all --json {}{}'.format( + '' if '/dev/' in dev else '/dev/', + dev).split() result = run_program(cmd, check=False) try: return json.loads(result.stdout.decode()) @@ -509,12 +512,17 @@ def run_tests(tests): global_vars['LogFile'])) pause('Press Enter to exit...') -def scan_disks(): +def scan_disks(full_paths=False, only_path=None): """Scan for disks eligible for hardware testing.""" clear_screen() # Get eligible disk list - result = run_program(['lsblk', '-J', '-O']) + cmd = ['lsblk', '-J', '-O'] + if full_paths: + cmd.append('-p') + if only_path: + cmd.append(only_path) + result = run_program(cmd) json_data = json.loads(result.stdout.decode()) devs = {} for d in json_data.get('blockdevices', []): @@ -536,13 +544,18 @@ def scan_disks(): for dev, data in devs.items(): # Get SMART attributes run_program( - cmd = 'sudo smartctl -s on /dev/{}'.format(dev).split(), + cmd = 'sudo smartctl -s on {}{}'.format( + '' if full_paths else '/dev/', + dev).split(), check = False) data['smartctl'] = get_smart_details(dev) # Get NVMe attributes if data['lsblk']['tran'] == 'nvme': cmd = 'sudo nvme smart-log /dev/{} -o json'.format(dev).split() + cmd = 'sudo nvme smart-log {}{} -o json'.format( + '' if full_paths else '/dev/', + dev).split() result = run_program(cmd, check=False) try: data['nvme-cli'] = json.loads(result.stdout.decode()) @@ -595,7 +608,9 @@ def show_disk_details(dev, only_attributes=False): dev_name = dev['lsblk']['name'] if not only_attributes: # Device description - print_info('Device: /dev/{}'.format(dev['lsblk']['name'])) + print_info('Device: {}{}'.format( + '' if '/dev/' in dev['lsblk']['name'] else '/dev/', + dev['lsblk']['name'])) print_standard(' {:>4} ({}) {} {}'.format( str(dev['lsblk'].get('size', '???b')).strip(), str(dev['lsblk'].get('tran', '???')).strip().upper().replace( @@ -617,7 +632,12 @@ def show_disk_details(dev, only_attributes=False): # Attributes if dev.get('NVMe Disk', False): - print_info('Attributes:') + if only_attributes: + print_info('SMART Attributes:', end='') + print_warning(' Updated: {}'.format( + time.strftime('%Y-%m-%d %H:%M %Z'))) + else: + print_info('Attributes:') for attrib, threshold in sorted(ATTRIBUTES['NVMe'].items()): if attrib in dev['nvme-cli']: print_standard( @@ -638,7 +658,12 @@ def show_disk_details(dev, only_attributes=False): print_success(raw_str, timestamp=False) elif dev['smartctl'].get('ata_smart_attributes', None): # SMART attributes - print_info('Attributes:') + if only_attributes: + print_info('SMART Attributes:', end='') + print_warning(' Updated: {}'.format( + time.strftime('%Y-%m-%d %H:%M %Z'))) + else: + print_info('Attributes:') s_table = dev['smartctl'].get('ata_smart_attributes', {}).get( 'table', {}) s_table = {a.get('id', 'Unknown'): a for a in s_table} From c705ba6afc5700300b2c46e3bb3f8e6ff60f776a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 22:10:37 -0600 Subject: [PATCH 032/293] Add pass completion detection sections * Retry option now sets recovery back to pass 1 --- .bin/Scripts/functions/ddrescue.py | 43 ++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ebc8b0f2..4b2fd311 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -105,6 +105,20 @@ def get_status_color(s, t_success=99, t_warn=90): color = COLORS['RED'] return color +def mark_pass_complete(source): + """Mark current pass complete and set next pass as current.""" + current_pass = source['Current Pass'] + current_pass_num = int(current_pass[-1:]) + next_pass_num = current_pass_num + 1 + next_pass = 'Pass {}'.format(next_pass_num) + + # Update source vars + source['Current Pass'] = next_pass + source[current_pass]['Done'] = True + + # TODO Remove test code + source[current_pass]['Status'] = str(11.078 * current_pass_num * 3) + def menu_clone(source_path, dest_path): """ddrescue cloning menu.""" @@ -201,7 +215,7 @@ def menu_main(source): # Build menu main_options = [ - {'Base Name': 'Retry', 'Enabled': False}, + {'Base Name': 'Retry (mark non-rescued sectors "non-tried")', 'Enabled': False}, {'Base Name': 'Reverse direction', 'Enabled': False}, ] actions =[ @@ -244,6 +258,10 @@ def menu_main(source): for opt in main_options: if 'Retry' in opt['Base Name'] and opt['Enabled']: settings.extend(['--retrim', '--try-again']) + source['Current Pass'] = 'Pass 1' + source['Pass 1']['Done'] = False + source['Pass 2']['Done'] = False + source['Pass 3']['Done'] = False if 'Reverse' in opt['Base Name'] and opt['Enabled']: settings.append('--reverse') # Disable for next pass @@ -492,21 +510,25 @@ def menu_settings(source): def run_ddrescue(source, settings): """Run ddrescue pass.""" - if source['Current Pass'] == 'Pass 1': + current_pass = source['Current Pass'] + source[current_pass]['Status'] = 'Working' + update_progress(source) + if current_pass == 'Pass 1': settings.extend(['--no-trim', '--no-scrape']) - elif source['Current Pass'] == 'Pass 2': + elif current_pass == 'Pass 2': + # Allow trimming settings.append('--no-scrape') - elif source['Current Pass'] == 'Pass 3': + elif current_pass == 'Pass 3': + # Allow trimming and scraping pass else: - # Assuming Done - return + raise GenericError("This shouldn't happen?") # Set heights - ## NOTE: 10/32 is based on min heights for SMART/ddrescue panes (10 + 22) + ## NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) result = run_program(['tput', 'lines']) height = int(result.stdout.decode().strip()) - height_smart = int(height * (12 / 34)) + height_smart = int(height * (12 / 33)) height_ddrescue = height - height_smart # Show SMART status @@ -529,9 +551,14 @@ def run_ddrescue(source, settings): return_code = ddrescue_proc.poll() if return_code is None: print_warning('Aborted') + source[current_pass]['Status'] = 'Incomplete' elif return_code: # i.e. not None and not 0 print_error('Error(s) encountered, see message above.') + source[current_pass]['Status'] = 'Incomplete' + else: + # Not None and not non-zero int, assuming 0 + mark_pass_complete(source) # TODO update_progress(source) From 9d91a28d7a0756e11e64d1783982b4efdc6f8fb3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 17 Jul 2018 23:22:08 -0600 Subject: [PATCH 033/293] Add children pass, status, and update sections * Updating device / child device status/progress done in mark_*() functions * Add current pass description to main menu * Current pass (overall) only updated if all children have passed * Fix Pass 4 crash --- .bin/Scripts/functions/ddrescue.py | 131 +++++++++++++++++++++-------- 1 file changed, 98 insertions(+), 33 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 4b2fd311..0d0a2aa5 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -106,19 +106,53 @@ def get_status_color(s, t_success=99, t_warn=90): return color def mark_pass_complete(source): - """Mark current pass complete and set next pass as current.""" + """Mark current pass complete for device, and overall if applicable.""" current_pass = source['Current Pass'] current_pass_num = int(current_pass[-1:]) next_pass_num = current_pass_num + 1 - next_pass = 'Pass {}'.format(next_pass_num) + if 1 <= next_pass_num <= 3: + next_pass = 'Pass {}'.format(next_pass_num) + else: + next_pass = 'Done' + # Check children progress + pass_complete_for_all_devs = True + for child in source['Children']: + if child['Dev Path'] == source['Current Device']: + # This function was called for this device, mark complete + child[current_pass]['Done'] = True + # TODO remove test code + child[current_pass]['Status'] = str(12.5 * current_pass_num * 2.75) + if not child[current_pass]['Done']: + pass_complete_for_all_devs = False + # Update source vars - source['Current Pass'] = next_pass - source[current_pass]['Done'] = True + if pass_complete_for_all_devs: + source['Current Pass'] = next_pass + source[current_pass]['Done'] = True # TODO Remove test code source[current_pass]['Status'] = str(11.078 * current_pass_num * 3) +def mark_pass_incomplete(source): + """Mark current pass incomplete.""" + current_pass = source['Current Pass'] + source[current_pass]['Status'] = 'Incomplete' + for child in source['Children']: + if child['Dev Path'] == source['Current Device']: + # This function was called for this device, mark incomplete + child[current_pass]['Status'] = 'Incomplete' + +def mark_all_passes_pending(source): + """Mark all devs and passes as pending in preparation for retry.""" + source['Current Pass'] = 'Pass 1' + for p_num in ['Pass 1', 'Pass 2', 'Pass 3']: + source[p_num]['Status'] = 'Pending' + source[p_num]['Done'] = False + for child in source['Children']: + child[p_num]['Status'] = 'Pending' + child[p_num]['Done'] = False + def menu_clone(source_path, dest_path): """ddrescue cloning menu.""" @@ -210,6 +244,8 @@ def menu_image(source_path, dest_path): def menu_main(source): """Main menu is used to set ddrescue settings.""" + title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS) + title += '{BLUE}Current pass: {CLEAR}'.format(**COLORS) if 'Settings' not in source: source['Settings'] = DDRESCUE_SETTINGS.copy() @@ -228,6 +264,13 @@ def menu_main(source): # Show menu while True: + display_pass = '1 "Initial Read"' + if source['Current Pass'] == 'Pass 2': + display_pass = '2 "Trimming bad areas"' + elif source['Current Pass'] == 'Pass 3': + display_pass = '3 "Scraping bad areas"' + elif source['Current Pass'] == 'Done': + display_pass = 'Done' # Update entries for opt in main_options: opt['Name'] = '{} {}'.format( @@ -235,7 +278,7 @@ def menu_main(source): opt['Base Name']) selection = menu_select( - title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}'.format(**COLORS), + title = title + display_pass, main_entries = main_options, action_entries = actions) @@ -258,10 +301,7 @@ def menu_main(source): for opt in main_options: if 'Retry' in opt['Base Name'] and opt['Enabled']: settings.extend(['--retrim', '--try-again']) - source['Current Pass'] = 'Pass 1' - source['Pass 1']['Done'] = False - source['Pass 2']['Done'] = False - source['Pass 3']['Done'] = False + mark_all_passes_pending(source) if 'Reverse' in opt['Base Name'] and opt['Enabled']: settings.append('--reverse') # Disable for next pass @@ -511,8 +551,8 @@ def menu_settings(source): def run_ddrescue(source, settings): """Run ddrescue pass.""" current_pass = source['Current Pass'] - source[current_pass]['Status'] = 'Working' - update_progress(source) + + # Set pass options if current_pass == 'Pass 1': settings.extend(['--no-trim', '--no-scrape']) elif current_pass == 'Pass 2': @@ -521,9 +561,21 @@ def run_ddrescue(source, settings): elif current_pass == 'Pass 3': # Allow trimming and scraping pass + elif current_pass == 'Done': + clear_screen() + print_warning('Recovery already completed?') + pause('Press Enter to return to main menu...') + return else: raise GenericError("This shouldn't happen?") + # Set device(s) to clone/image + source[current_pass]['Status'] = 'Working' + devs = [source] + if source['Children']: + # Use only selected child devices + devs = source['Children'] + # Set heights ## NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) result = run_program(['tput', 'lines']) @@ -537,33 +589,46 @@ def run_ddrescue(source, settings): '-PF', '#D', 'watch', '--color', '--no-title', '--interval', '300', 'ddrescue-tui-smart-display', source['Dev Path']) + + # Start pass for each selected device + for dev in devs: + if dev[current_pass]['Done']: + # Move to next device + continue + source['Current Device'] = dev['Dev Path'] + dev[current_pass]['Status'] = 'Working' + update_progress(source) + + # Start ddrescue + try: + clear_screen() + print_info('Current dev: {}'.format(dev['Dev Path'])) + ddrescue_proc = popen_program(['./__choose_exit', *settings]) + ddrescue_proc.wait() + except KeyboardInterrupt: + # Catch user abort + pass - # Start ddrescue - try: - clear_screen() - ddrescue_proc = popen_program(['./__choose_exit', *settings]) - ddrescue_proc.wait() - except KeyboardInterrupt: - # Catch user abort - pass - - # Was ddrescue aborted? - return_code = ddrescue_proc.poll() - if return_code is None: - print_warning('Aborted') - source[current_pass]['Status'] = 'Incomplete' - elif return_code: - # i.e. not None and not 0 - print_error('Error(s) encountered, see message above.') - source[current_pass]['Status'] = 'Incomplete' - else: - # Not None and not non-zero int, assuming 0 - mark_pass_complete(source) + # Was ddrescue aborted? + return_code = ddrescue_proc.poll() + if return_code is None: + print_warning('Aborted') + mark_pass_incomplete(source) + break + elif return_code: + # i.e. not None and not 0 + print_error('Error(s) encountered, see message above.') + mark_pass_incomplete(source) + break + else: + # Not None and not non-zero int, assuming 0 + mark_pass_complete(source) # TODO update_progress(source) print_info('Return: {}'.format(return_code)) - pause() + if str(return_code) != '0': + pause() run_program(['tmux', 'kill-pane', '-t', smart_pane]) return From 88c28a3f25a3ce9881edb083da626c451fec901f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 18:26:03 -0600 Subject: [PATCH 034/293] Added auto-continue code * Enabled by default * Based on static thresholds per pass. * Pass 1: 85% * Pass 2: 98% * If using child devices, all must be above the threshold to continue --- .bin/Scripts/functions/ddrescue.py | 67 ++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 0d0a2aa5..b1bd0673 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -12,6 +12,8 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES +AUTO_NEXT_PASS_1_THRESHOLD = 85 +AUTO_NEXT_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { '--binary-prefixes': {'Enabled': True, 'Hidden': True}, '--data-preview': {'Enabled': True, 'Hidden': True}, @@ -122,7 +124,9 @@ def mark_pass_complete(source): # This function was called for this device, mark complete child[current_pass]['Done'] = True # TODO remove test code - child[current_pass]['Status'] = str(12.5 * current_pass_num * 2.75) + from random import randint + status = randint((current_pass_num-1)*10+85, 110) + randint(0, 99) / 100 + child[current_pass]['Status'] = status if not child[current_pass]['Done']: pass_complete_for_all_devs = False @@ -132,7 +136,18 @@ def mark_pass_complete(source): source[current_pass]['Done'] = True # TODO Remove test code - source[current_pass]['Status'] = str(11.078 * current_pass_num * 3) + if source['Children']: + status = 100 + for child in source['Children']: + try: + status = min(status, child[current_pass]['Status']) + except TypeError: + # Force 0% to ensure we won't auto-continue to next pass + status = 0 + else: + from random import randint + status = randint((current_pass_num-1)*10+75, 100) + randint(0, 99) / 100 + source[current_pass]['Status'] = status def mark_pass_incomplete(source): """Mark current pass incomplete.""" @@ -251,7 +266,10 @@ def menu_main(source): # Build menu main_options = [ - {'Base Name': 'Retry (mark non-rescued sectors "non-tried")', 'Enabled': False}, + {'Base Name': 'Auto continue (if recovery % over threshold)', + 'Enabled': True}, + {'Base Name': 'Retry (mark non-rescued sectors "non-tried")', + 'Enabled': False}, {'Base Name': 'Reverse direction', 'Enabled': False}, ] actions =[ @@ -264,12 +282,13 @@ def menu_main(source): # Show menu while True: + current_pass = source['Current Pass'] display_pass = '1 "Initial Read"' - if source['Current Pass'] == 'Pass 2': + if current_pass == 'Pass 2': display_pass = '2 "Trimming bad areas"' - elif source['Current Pass'] == 'Pass 3': + elif current_pass == 'Pass 3': display_pass = '3 "Scraping bad areas"' - elif source['Current Pass'] == 'Done': + elif current_pass == 'Done': display_pass = 'Done' # Update entries for opt in main_options: @@ -302,13 +321,43 @@ def menu_main(source): if 'Retry' in opt['Base Name'] and opt['Enabled']: settings.extend(['--retrim', '--try-again']) mark_all_passes_pending(source) + current_pass = 'Pass 1' if 'Reverse' in opt['Base Name'] and opt['Enabled']: settings.append('--reverse') # Disable for next pass - opt['Enabled'] = False + if 'Auto' not in opt['Base Name']: + opt['Enabled'] = False - # Run pass - run_ddrescue(source, settings) + # Run ddrecue + auto_run = True + while auto_run: + run_ddrescue(source, settings) + auto_run = False + if current_pass == 'Done': + # "Pass Done" i.e. all passes done + break + if not main_options[0]['Enabled']: + # Auto next pass + break + if source[current_pass]['Done']: + try: + recovered = float(source[current_pass]['Status']) + except ValueError: + # Nope + recovered = 'Nope' + pass + else: + if current_pass == 'Pass 1' and recovered > 85: + auto_run = True + elif current_pass == 'Pass 2' and recovered > 98: + auto_run = True + # Update current pass for next iteration + print_info('State:') + print_standard(' Pass #: {}\n Auto: {}\n Recovered: {}'.format( + current_pass, auto_run, recovered)) + pause() + current_pass = source['Current Pass'] + elif selection == 'C': menu_settings(source) elif selection == 'Q': From f2c557f77c2fa3202b4cd7565ff3ee25468a9daa Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 20:54:51 -0600 Subject: [PATCH 035/293] Added safety checks for the destination * Dev size / avail space checks * Permission checks * No mount option checks (yet?) --- .bin/Scripts/functions/ddrescue.py | 90 +++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index b1bd0673..f3e3c13b 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -5,6 +5,7 @@ import pathlib import psutil import re import signal +import stat import time from functions.common import * @@ -12,6 +13,7 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES +AUTHORIZED_DEST_FSTYPES = ['ext3', 'ext4', 'xfs'] AUTO_NEXT_PASS_1_THRESHOLD = 85 AUTO_NEXT_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { @@ -33,7 +35,8 @@ USAGE = """ {script_name} clone [source [destination]] # Functions def abort_ddrescue_tui(): - run_program(['losetup', '-D']) + # TODO uncomment line below + # run_program(['losetup', '-D']) abort() def build_outer_panes(source, dest): @@ -65,7 +68,72 @@ def build_outer_panes(source, dest): tmux_splitw('-dhl', '21', 'watch', '--color', '--no-title', '--interval', '1', 'cat', source['Progress Out']) - + +def dest_safety_check(source, dest): + """Verify the destination is appropriate for the source.""" + source_size = source['Details']['size'] + if dest['Is Dir']: + cmd = ['findmnt', '-D', '-J', + '-T', dest['Path']] + result = run_program(cmd) + try: + json_data = json.loads(result.stdout.decode()) + except Exception: + # Welp, let's abort + print_error('Failed to verify destination usability.') + abort_ddrescue_tui() + else: + dest_size = json_data['filesystems'][0]['avail'] + dest['Free Space'] = dest_size + dest['Filesystem'] = json_data['filesystems'][0]['fstype'] + else: + dest_size = dest['Details']['size'] + + # Fix strings before converting to bytes + source_size = re.sub( + r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', source_size.upper()) + dest_size = re.sub( + r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', dest_size.upper()) + + # Convert to bytes and compare size + source_size = convert_to_bytes(source_size) + dest_size = convert_to_bytes(dest_size) + if source['Type'] == 'Image' and dest_size < (source_size * 1.2): + # Imaging: ensure 120% of source size is available + print_error( + 'Not enough free space on destination, refusing to continue.') + print_standard(' Dest {d_size} < Required {s_size}'.format( + d_size = human_readable_size(dest_size), + s_size = human_readable_size(source_size * 1.2))) + abort_ddrescue_tui() + elif source['Type'] == 'Clone' and source_size > dest_size: + # Cloning: ensure dest >= size + print_error('Destination is too small, refusing to continue.') + print_standard(' Dest {d_size} < Source {s_size}'.format( + d_size = human_readable_size(dest_size), + s_size = human_readable_size(source_size))) + abort_ddrescue_tui() + + # Filesystem checks + if source['Type'] == 'Image': + # Filesystem Type + if dest['Filesystem'] not in AUTHORIZED_DEST_FSTYPES: + print_error( + 'Destination filesystem "{}" is not a recommended type.'.format( + dest['Filesystem'])) + if not ask('Proceed anyways? (strongly discouraged by author)'): + abort_ddrescue_tui() + # Read-Write access + ## Note: only checks path permissions, not mount options + ## if the FS is RO then ddrescue will fail later + dest_ok = True + dest_st_mode = os.stat(dest['Path']).st_mode + dest_ok = dest_ok and dest_st_mode & stat.S_IRUSR + dest_ok = dest_ok and dest_st_mode & stat.S_IWUSR + dest_ok = dest_ok and dest_st_mode & stat.S_IXUSR + if not dest_ok: + print_error('Destination is not writable, refusing to continue.') + abort_ddrescue_tui() def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" @@ -180,6 +248,7 @@ def menu_clone(source_path, dest_path): source['Type'] = 'Clone' dest = select_device('destination', dest_path, skip_device = source['Details'], allow_image_file = False) + dest_safety_check(source, dest) # Show selection details show_selection_details(source, dest) @@ -237,6 +306,7 @@ def menu_image(source_path, dest_path): source['Pass 3'] = {'Status': 'Pending', 'Done': False} source['Type'] = 'Image' dest = select_dest_path(dest_path, skip_device=source['Details']) + dest_safety_check(source, dest) # Show selection details show_selection_details(source, dest) @@ -352,10 +422,6 @@ def menu_main(source): elif current_pass == 'Pass 2' and recovered > 98: auto_run = True # Update current pass for next iteration - print_info('State:') - print_standard(' Pass #: {}\n Auto: {}\n Recovered: {}'.format( - current_pass, auto_run, recovered)) - pause() current_pass = source['Current Pass'] elif selection == 'C': @@ -652,7 +718,8 @@ def run_ddrescue(source, settings): try: clear_screen() print_info('Current dev: {}'.format(dev['Dev Path'])) - ddrescue_proc = popen_program(['./__choose_exit', *settings]) + #ddrescue_proc = popen_program(['./__choose_exit', *settings]) + ddrescue_proc = popen_program(['./__exit_ok', *settings]) ddrescue_proc.wait() except KeyboardInterrupt: # Catch user abort @@ -715,7 +782,7 @@ def run_ddrescue(source, settings): #update_progress(source) def select_dest_path(provided_path=None, skip_device={}): - dest = {} + dest = {'Is Dir': True, 'Is Image': False} # Set path if provided_path: @@ -754,7 +821,7 @@ def select_dest_path(provided_path=None, skip_device={}): def select_device(description='device', provided_path=None, skip_device={}, allow_image_file=True): """Select device via provided path or menu, return dev as dict.""" - dev = {'Is Image': False} + dev = {'Is Dir': False, 'Is Image': False} # Set path if provided_path: @@ -777,6 +844,8 @@ def select_device(description='device', provided_path=None, # Get device details dev['Details'] = get_device_details(dev['Dev Path']) + if 'Children' not in dev: + dev['Children'] = {} # Check for parent device(s) while dev['Details']['pkname']: @@ -877,6 +946,9 @@ def show_selection_details(source, dest): else: print_success('Destination path') print_standard(dest['Path']) + print_info('{:<8}{}'.format('FREE', 'FSTYPE')) + print_standard('{:<8}{}'.format( + dest['Free Space'], dest['Filesystem'])) print_standard(' ') def show_usage(script_name): From e5ce254e8b3b6ef92d680a70be9d251bb636e46e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 22:02:17 -0600 Subject: [PATCH 036/293] Verify destination FS is mounted read-write --- .bin/Scripts/functions/ddrescue.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index f3e3c13b..9f39b682 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -73,7 +73,8 @@ def dest_safety_check(source, dest): """Verify the destination is appropriate for the source.""" source_size = source['Details']['size'] if dest['Is Dir']: - cmd = ['findmnt', '-D', '-J', + cmd = ['findmnt', '-J', + '-o', 'SOURCE,TARGET,FSTYPE,OPTIONS,SIZE,AVAIL,USED', '-T', dest['Path']] result = run_program(cmd) try: @@ -86,6 +87,7 @@ def dest_safety_check(source, dest): dest_size = json_data['filesystems'][0]['avail'] dest['Free Space'] = dest_size dest['Filesystem'] = json_data['filesystems'][0]['fstype'] + dest['Mount options'] = json_data['filesystems'][0]['options'] else: dest_size = dest['Details']['size'] @@ -114,18 +116,16 @@ def dest_safety_check(source, dest): s_size = human_readable_size(source_size))) abort_ddrescue_tui() - # Filesystem checks + # Imaging specific checks if source['Type'] == 'Image': # Filesystem Type if dest['Filesystem'] not in AUTHORIZED_DEST_FSTYPES: print_error( 'Destination filesystem "{}" is not a recommended type.'.format( dest['Filesystem'])) - if not ask('Proceed anyways? (strongly discouraged by author)'): + if not ask('Proceed anyways? (Strongly discouraged)'): abort_ddrescue_tui() # Read-Write access - ## Note: only checks path permissions, not mount options - ## if the FS is RO then ddrescue will fail later dest_ok = True dest_st_mode = os.stat(dest['Path']).st_mode dest_ok = dest_ok and dest_st_mode & stat.S_IRUSR @@ -134,6 +134,12 @@ def dest_safety_check(source, dest): if not dest_ok: print_error('Destination is not writable, refusing to continue.') abort_ddrescue_tui() + + # Mount options check + if 'rw' not in dest['Mount options'].split(','): + print_error( + 'Destination is not mounted read-write, refusing to continue.') + abort_ddrescue_tui() def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" From 19dcc87950fe05b4eee3e2e5711838a7b0e80b66 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 22:09:47 -0600 Subject: [PATCH 037/293] Pause when showing usage --- .bin/Scripts/functions/ddrescue.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 9f39b682..0e24d7b8 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -960,6 +960,7 @@ def show_selection_details(source, dest): def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) + pause() def tmux_splitw(*args): """Run tmux split-window command and return output as str.""" From 646e1a3764f57b36ca4c3c9ec0b1acf94fdb0860 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 22:17:32 -0600 Subject: [PATCH 038/293] Show list of authorized fstypes with error --- .bin/Scripts/functions/ddrescue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 0e24d7b8..887ab0d1 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -123,6 +123,9 @@ def dest_safety_check(source, dest): print_error( 'Destination filesystem "{}" is not a recommended type.'.format( dest['Filesystem'])) + print_info('Authorized types are: {}'.format( + ' / '.join(AUTHORIZED_DEST_FSTYPES).upper())) + print_standard(' ') if not ask('Proceed anyways? (Strongly discouraged)'): abort_ddrescue_tui() # Read-Write access From e640caee746389e49643fdae72de9b3c1ba8b801 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 23:19:42 -0600 Subject: [PATCH 039/293] Add dest image/map path sections --- .bin/Scripts/functions/ddrescue.py | 46 ++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 887ab0d1..2471f61c 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -261,6 +261,7 @@ def menu_clone(source_path, dest_path): # Show selection details show_selection_details(source, dest) + set_dest_image_paths(source, dest) # Confirm if not ask('Proceed with clone?'): @@ -326,6 +327,7 @@ def menu_image(source_path, dest_path): # Select child device(s) source['Children'] = menu_select_children(source) + set_dest_image_paths(source, dest) # Main menu build_outer_panes(source, dest) @@ -444,13 +446,14 @@ def menu_select_children(source): 'Base Name': '{:<14}(Whole device)'.format(source['Dev Path']), 'Path': source['Dev Path'], 'Selected': True}] - for child in source['Details'].get('children', []): + for c_details in source['Details'].get('children', []): dev_options.append({ 'Base Name': '{:<14}({:>6} {})'.format( - child['name'], - child['size'], - child['fstype'] if child['fstype'] else 'Unknown'), - 'Path': child['name'], + c_details['name'], + c_details['size'], + c_details['fstype'] if c_details['fstype'] else 'Unknown'), + 'Details': c_details, + 'Path': c_details['name'], 'Selected': False}) actions = [ {'Name': 'Proceed', 'Letter': 'P'}, @@ -493,6 +496,7 @@ def menu_select_children(source): # Check selection selected_children = [{ + 'Details': d['Details'], 'Dev Path': d['Path'], 'Pass 1': {'Status': 'Pending', 'Done': False}, 'Pass 2': {'Status': 'Pending', 'Done': False}, @@ -887,6 +891,38 @@ def select_device(description='device', provided_path=None, return dev +def set_dest_image_paths(source, dest): + """Set destination image path for source and any child devices.""" + if source['Type'] == 'Clone': + base = '{pwd}/Clone_{Date-Time}'.format( + pwd = os.path.realpath(global_vars['Env']['PWD']), + **global_vars) + else: + base = '{Path}/{size}_{model}'.format( + size = source['Details']['size'], + model = source['Details'].get('model', 'Unknown'), + **dest) + source['Dest Paths'] = { + 'Image': '{}.dd'.format(base), + 'Map': '{}.map'.format(base)} + + # Child devices + for child in source['Children']: + p_label = '' + if child['Details']['label']: + p_label = '_{}'.format(child['Details']['label']) + base = '{Path}/{size}_{model}_{p_num}_{p_size}{p_label}'.format( + size = source['Details']['size'], + model = source['Details'].get('model', 'Unknown'), + p_num = child['Details']['name'].replace( + child['Details']['pkname'], ''), + p_size = child['Details']['size'], + p_label = p_label, + **dest) + child['Dest Paths'] = { + 'Image': '{}.dd'.format(base), + 'Map': '{}.map'.format(base)} + def setup_loopback_device(source_path): """Setup a loopback device for source_path, returns dev_path as str.""" cmd = ( From f84413f1a9aa73289f24e7bbaef0c2a9e8bc7b85 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 23:36:15 -0600 Subject: [PATCH 040/293] Fix SMART not available warning --- .bin/Scripts/ddrescue-tui-smart-display | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/ddrescue-tui-smart-display b/.bin/Scripts/ddrescue-tui-smart-display index a53a2dca..285229d6 100755 --- a/.bin/Scripts/ddrescue-tui-smart-display +++ b/.bin/Scripts/ddrescue-tui-smart-display @@ -22,7 +22,7 @@ if __name__ == '__main__': # Warn if SMART unavailable if dev_path not in devs: print_error('SMART data not available') - input('') + exit_script() # Initial screen dev = devs[dev_path] From d09664bb7d6c79601bb6287514cef4066baa4e10 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 23:37:02 -0600 Subject: [PATCH 041/293] Misc cleanup --- .bin/Scripts/functions/ddrescue.py | 47 ++++-------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 2471f61c..ba0bd308 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -35,8 +35,7 @@ USAGE = """ {script_name} clone [source [destination]] # Functions def abort_ddrescue_tui(): - # TODO uncomment line below - # run_program(['losetup', '-D']) + run_program(['losetup', '-D']) abort() def build_outer_panes(source, dest): @@ -731,8 +730,8 @@ def run_ddrescue(source, settings): try: clear_screen() print_info('Current dev: {}'.format(dev['Dev Path'])) - #ddrescue_proc = popen_program(['./__choose_exit', *settings]) - ddrescue_proc = popen_program(['./__exit_ok', *settings]) + ddrescue_proc = popen_program(['./__choose_exit', *settings]) + #ddrescue_proc = popen_program(['./__exit_ok', *settings]) ddrescue_proc.wait() except KeyboardInterrupt: # Catch user abort @@ -753,46 +752,12 @@ def run_ddrescue(source, settings): # Not None and not non-zero int, assuming 0 mark_pass_complete(source) - # TODO + # Cleanup update_progress(source) - print_info('Return: {}'.format(return_code)) if str(return_code) != '0': - pause() + # Pause on errors + pause('Press Enter to return to main menu... ') run_program(['tmux', 'kill-pane', '-t', smart_pane]) - return - - ##TODO - #print_success('GO!') - #if source['Pass 3']['Done']: - # # Go to results - # print_success('Done?') - #elif source['Pass 2']['Done']: - # # In pass 3 - # print_error('Pass 3') - # print_standard(str(settings)) - # source['Pass 3']['Done'] = True - # source['Pass 3']['Status'] = '99.99' - #elif source['Pass 1']['Done']: - # # In pass 2 - # print_warning('Pass 2') - # settings.append('--no-scrape') - # print_standard(str(settings)) - # source['Pass 2']['Done'] = True - # source['Pass 2']['Status'] = '98.1415' - #else: - # # In pass 1 - # print_info('Pass 1') - # settings.extend(['--no-trim', '--no-scrape']) - # print_standard(str(settings)) - # status = source['Pass 1']['Status'] - # if status == 'Pending': - # source['Pass 1']['Status'] = '78.6623' - # elif float(status) < 80: - # source['Pass 1']['Status'] = '86.1102' - # elif float(status) < 95: - # source['Pass 1']['Status'] = '97.77' - # source['Pass 1']['Done'] = True - #update_progress(source) def select_dest_path(provided_path=None, skip_device={}): dest = {'Is Dir': True, 'Is Image': False} From 7597394d61782b58f826c8cf94696cb6194194be Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 18 Jul 2018 23:53:05 -0600 Subject: [PATCH 042/293] Build real ddrescue cmd for Cloning or Imaging * --force is only used for cloning --- .bin/Scripts/functions/ddrescue.py | 37 +++++++++++++++++++----------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ba0bd308..d3ef9e23 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -269,7 +269,7 @@ def menu_clone(source_path, dest_path): # Main menu build_outer_panes(source, dest) - menu_main(source) + menu_main(source, dest) # Done run_program(['losetup', '-D']) @@ -330,14 +330,14 @@ def menu_image(source_path, dest_path): # Main menu build_outer_panes(source, dest) - menu_main(source) + menu_main(source, dest) # Done run_program(['losetup', '-D']) run_program(['tmux', 'kill-window']) exit_script() -def menu_main(source): +def menu_main(source, dest): """Main menu is used to set ddrescue settings.""" title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS) title += '{BLUE}Current pass: {CLEAR}'.format(**COLORS) @@ -411,7 +411,7 @@ def menu_main(source): # Run ddrecue auto_run = True while auto_run: - run_ddrescue(source, settings) + run_ddrescue(source, dest, settings) auto_run = False if current_pass == 'Done': # "Pass Done" i.e. all passes done @@ -675,7 +675,7 @@ def menu_settings(source): elif selection == 'M': break -def run_ddrescue(source, settings): +def run_ddrescue(source, dest, settings): """Run ddrescue pass.""" current_pass = source['Current Pass'] @@ -698,10 +698,10 @@ def run_ddrescue(source, settings): # Set device(s) to clone/image source[current_pass]['Status'] = 'Working' - devs = [source] + source_devs = [source] if source['Children']: # Use only selected child devices - devs = source['Children'] + source_devs = source['Children'] # Set heights ## NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) @@ -718,20 +718,29 @@ def run_ddrescue(source, settings): 'ddrescue-tui-smart-display', source['Dev Path']) # Start pass for each selected device - for dev in devs: - if dev[current_pass]['Done']: + for s_dev in source_devs: + if s_dev[current_pass]['Done']: # Move to next device continue - source['Current Device'] = dev['Dev Path'] - dev[current_pass]['Status'] = 'Working' + source['Current Device'] = s_dev['Dev Path'] + s_dev[current_pass]['Status'] = 'Working' update_progress(source) + # Set ddrescue cmd + if source['Type'] == 'Clone': + cmd = ['ddrescue', *settings, '--force', + s_dev['Dev Path'], dest['Dev Path'], s_dev['Dest Paths']['Map']] + else: + cmd = ['ddrescue', *settings, + s_dev['Dev Path'], s_dev['Dest Paths']['Image'], + s_dev['Dest Paths']['Map']] + # Start ddrescue try: clear_screen() - print_info('Current dev: {}'.format(dev['Dev Path'])) - ddrescue_proc = popen_program(['./__choose_exit', *settings]) - #ddrescue_proc = popen_program(['./__exit_ok', *settings]) + print_info('Current dev: {}'.format(s_dev['Dev Path'])) + ddrescue_proc = popen_program(['./__choose_exit', *cmd]) + #ddrescue_proc = popen_program(['./__exit_ok', *cmd]) ddrescue_proc.wait() except KeyboardInterrupt: # Catch user abort From 016f87b76c3712e2cd57a49e474fd3b9c2e3ff8d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 19 Jul 2018 00:43:41 -0600 Subject: [PATCH 043/293] Don't hide source dev when selecting dest dev * Disable the entry instead * It's more clear what's being done --- .bin/Scripts/functions/ddrescue.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index d3ef9e23..f04da365 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -524,9 +524,8 @@ def menu_select_device(title='Which device?', skip_device={}): # Build menu dev_options = [] for dev in json_data['blockdevices']: - # Skip if dev is in skip_names - if dev['name'] in skip_names or dev['pkname'] in skip_names: - continue + # Disable dev if in skip_names + disable_dev = dev['name'] in skip_names or dev['pkname'] in skip_names # Append non-matching devices dev_options.append({ @@ -536,7 +535,8 @@ def menu_select_device(title='Which device?', skip_device={}): size = dev['size'] if dev['size'] else '', model = dev['model'] if dev['model'] else '', serial = dev['serial'] if dev['serial'] else ''), - 'Path': dev['name']}) + 'Path': dev['name'], + 'Disabled': disable_dev}) dev_options = sorted(dev_options, key=itemgetter('Name')) if not dev_options: print_error('No devices available.') @@ -547,7 +547,8 @@ def menu_select_device(title='Which device?', skip_device={}): selection = menu_select( title = title, main_entries = dev_options, - action_entries = actions) + action_entries = actions, + disabled_label = 'SOURCE DEVICE') if selection.isnumeric(): return dev_options[int(selection)-1]['Path'] @@ -741,6 +742,7 @@ def run_ddrescue(source, dest, settings): print_info('Current dev: {}'.format(s_dev['Dev Path'])) ddrescue_proc = popen_program(['./__choose_exit', *cmd]) #ddrescue_proc = popen_program(['./__exit_ok', *cmd]) + #ddrescue_proc = popen_program(cmd) ddrescue_proc.wait() except KeyboardInterrupt: # Catch user abort From 5f4598814abfeca13382f91f6dce8c33c3d6e258 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 19 Jul 2018 00:45:04 -0600 Subject: [PATCH 044/293] Clear screen before printing abort warning * Otherwise the "Abort" string is in the middle of the ddrescue output * Also added secondary return code to be treated as a user abort --- .bin/Scripts/functions/ddrescue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index f04da365..5ef7b4cf 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -750,7 +750,8 @@ def run_ddrescue(source, dest, settings): # Was ddrescue aborted? return_code = ddrescue_proc.poll() - if return_code is None: + if return_code is None or return_code is 130: + clear_screen() print_warning('Aborted') mark_pass_incomplete(source) break From 658229337071030c760a6f639f2e0493269311e8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 19 Jul 2018 01:34:14 -0600 Subject: [PATCH 045/293] Initial resume code -- Needs testing --- .bin/Scripts/functions/ddrescue.py | 37 ++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 5ef7b4cf..6faa7a2e 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -868,12 +868,45 @@ def select_device(description='device', provided_path=None, return dev +def check_dest_paths(source): + """Check for image and/or map file and alert user about details.""" + dd_image_exists = os.path.exists(source['Dest Paths']['Image']) + map_exists = os.path.exists(source['Dest Paths']['Map']) + if 'Clone' in source['Dest Paths']['Map']: + if map_exists: + # We're cloning and a matching map file was detected + if ask('Matching map file detected, resume recovery?'): + print_success('TODO: ...') + exit_script() + else: + abort_ddrescue_tui() + else: + # We're imaging + if dd_image_exists and not map_exists: + # Refuce to resume without map file + print_error('Destination image "{}" exists but map missing.'.format( + source['Dest Paths']['Image'])) + abort_ddrescue_tui() + elif not dd_image_exists and map_exists: + # Can't resume without dd_image + print_error('Destination image missing but map "{}" exists.'.format( + source['Dest Paths']['Map'])) + abort_ddrescue_tui() + elif dd_image_exists and map_exists: + # Matching dd_image and map file were detected + if ask('Matching image and map file detected, resume recovery?'): + print_success('TODO: ...') + exit_script() + else: + abort_ddrescue_tui() + def set_dest_image_paths(source, dest): """Set destination image path for source and any child devices.""" if source['Type'] == 'Clone': - base = '{pwd}/Clone_{Date-Time}'.format( + base = '{pwd}/Clone_{size}_{model}'.format( pwd = os.path.realpath(global_vars['Env']['PWD']), - **global_vars) + size = source['Details']['size'], + model = source['Details'].get('model', 'Unknown')) else: base = '{Path}/{size}_{model}'.format( size = source['Details']['size'], From 93c9b206d935c9d3d9ab2a3a2d9df8a1c5fb251a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 20 Jul 2018 13:56:49 -0600 Subject: [PATCH 046/293] Added ddrescue-tui aliases wkclone and wkimage --- .linux_items/include/airootfs/etc/skel/.aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index fab61bb1..852f3803 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -35,3 +35,5 @@ alias srsz='sudo rsync -avhzPS --stats --exclude-from="$HOME/.rsync_exclusions"' alias testdisk='sudo testdisk' alias umount='sudo umount' alias unmount='sudo umount' +alias wkclone='sudo ddrescue-tui clone' +alias wkimage='sudo ddrescue-tui image' From 281607f3e4deb74553776201cdf2c690d0a3455d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 20 Jul 2018 13:57:55 -0600 Subject: [PATCH 047/293] Adjusted confirm/show details order --- .bin/Scripts/functions/ddrescue.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 6faa7a2e..a35f72e7 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -261,6 +261,7 @@ def menu_clone(source_path, dest_path): # Show selection details show_selection_details(source, dest) set_dest_image_paths(source, dest) + check_dest_paths(source) # Confirm if not ask('Proceed with clone?'): @@ -316,6 +317,11 @@ def menu_image(source_path, dest_path): source['Type'] = 'Image' dest = select_dest_path(dest_path, skip_device=source['Details']) dest_safety_check(source, dest) + + # Select child device(s) + source['Children'] = menu_select_children(source) + set_dest_image_paths(source, dest) + check_dest_paths(source) # Show selection details show_selection_details(source, dest) @@ -323,10 +329,6 @@ def menu_image(source_path, dest_path): # Confirm if not ask('Proceed with imaging?'): abort_ddrescue_tui() - - # Select child device(s) - source['Children'] = menu_select_children(source) - set_dest_image_paths(source, dest) # Main menu build_outer_panes(source, dest) @@ -875,10 +877,7 @@ def check_dest_paths(source): if 'Clone' in source['Dest Paths']['Map']: if map_exists: # We're cloning and a matching map file was detected - if ask('Matching map file detected, resume recovery?'): - print_success('TODO: ...') - exit_script() - else: + if not ask('Matching map file detected, resume recovery?'): abort_ddrescue_tui() else: # We're imaging From 37734e65bfae5fb771f55e62c5106ba2ed8c0e40 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 20 Jul 2018 17:53:09 -0600 Subject: [PATCH 048/293] Bugfix: Paths are now relative to the current dir * They were relative to the script's dir before --- .bin/Scripts/ddrescue-tui-menu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/ddrescue-tui-menu b/.bin/Scripts/ddrescue-tui-menu index ea8c1a55..a8205ded 100755 --- a/.bin/Scripts/ddrescue-tui-menu +++ b/.bin/Scripts/ddrescue-tui-menu @@ -6,8 +6,8 @@ import os import sys # Init -os.chdir(os.path.dirname(os.path.realpath(__file__))) -sys.path.append(os.getcwd()) +sys.path.append(os.path.dirname(os.path.realpath(__file__))) + from functions.ddrescue import * from functions.hw_diags import * init_global_vars() From d7dfb34b0206655d5413f252c8fb8e73802443f8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 20 Jul 2018 18:06:59 -0600 Subject: [PATCH 049/293] Resume function working for imaging cases --- .bin/Scripts/functions/ddrescue.py | 46 +++++++++++++++++++----------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index a35f72e7..81cc9777 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -880,24 +880,36 @@ def check_dest_paths(source): if not ask('Matching map file detected, resume recovery?'): abort_ddrescue_tui() else: - # We're imaging - if dd_image_exists and not map_exists: - # Refuce to resume without map file - print_error('Destination image "{}" exists but map missing.'.format( - source['Dest Paths']['Image'])) + abort_imaging = False + resume_files_exist = False + source_devs = [source] + if source['Children']: + source_devs = source['Children'] + for dev in source_devs: + # We're imaging + dd_image_exists = os.path.exists(dev['Dest Paths']['Image']) + map_exists = os.path.exists(dev['Dest Paths']['Map']) + if dd_image_exists and not map_exists: + # Refuce to resume without map file + i = dev['Dest Paths']['Image'] + i = i[i.rfind('/')+1:] + print_error( + 'Detected image "{}" but not the matching map'.format(i)) + abort_imaging = True + elif not dd_image_exists and map_exists: + # Can't resume without dd_image + m = dev['Dest Paths']['Map'] + m = m[m.rfind('/')+1:] + print_error( + 'Detected map "{}" but not the matching image'.format(m)) + abort_imaging = True + elif dd_image_exists and map_exists: + # Matching dd_image and map file were detected + resume_files_exist = True + p = 'Matching image and map file{} detected, resume recovery?'.format( + 's' if len(source_devs) > 1 else '') + if abort_imaging or (resume_files_exist and not ask(p)): abort_ddrescue_tui() - elif not dd_image_exists and map_exists: - # Can't resume without dd_image - print_error('Destination image missing but map "{}" exists.'.format( - source['Dest Paths']['Map'])) - abort_ddrescue_tui() - elif dd_image_exists and map_exists: - # Matching dd_image and map file were detected - if ask('Matching image and map file detected, resume recovery?'): - print_success('TODO: ...') - exit_script() - else: - abort_ddrescue_tui() def set_dest_image_paths(source, dest): """Set destination image path for source and any child devices.""" From 6b28444c36fd6a173b7287267dbd534971ff398d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 21 Jul 2018 20:31:39 -0600 Subject: [PATCH 050/293] Fix function order --- .bin/Scripts/functions/ddrescue.py | 82 +++++++++++++++--------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 81cc9777..718f9262 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -68,6 +68,47 @@ def build_outer_panes(source, dest): 'watch', '--color', '--no-title', '--interval', '1', 'cat', source['Progress Out']) +def check_dest_paths(source): + """Check for image and/or map file and alert user about details.""" + dd_image_exists = os.path.exists(source['Dest Paths']['Image']) + map_exists = os.path.exists(source['Dest Paths']['Map']) + if 'Clone' in source['Dest Paths']['Map']: + if map_exists: + # We're cloning and a matching map file was detected + if not ask('Matching map file detected, resume recovery?'): + abort_ddrescue_tui() + else: + abort_imaging = False + resume_files_exist = False + source_devs = [source] + if source['Children']: + source_devs = source['Children'] + for dev in source_devs: + # We're imaging + dd_image_exists = os.path.exists(dev['Dest Paths']['Image']) + map_exists = os.path.exists(dev['Dest Paths']['Map']) + if dd_image_exists and not map_exists: + # Refuce to resume without map file + i = dev['Dest Paths']['Image'] + i = i[i.rfind('/')+1:] + print_error( + 'Detected image "{}" but not the matching map'.format(i)) + abort_imaging = True + elif not dd_image_exists and map_exists: + # Can't resume without dd_image + m = dev['Dest Paths']['Map'] + m = m[m.rfind('/')+1:] + print_error( + 'Detected map "{}" but not the matching image'.format(m)) + abort_imaging = True + elif dd_image_exists and map_exists: + # Matching dd_image and map file were detected + resume_files_exist = True + p = 'Matching image and map file{} detected, resume recovery?'.format( + 's' if len(source_devs) > 1 else '') + if abort_imaging or (resume_files_exist and not ask(p)): + abort_ddrescue_tui() + def dest_safety_check(source, dest): """Verify the destination is appropriate for the source.""" source_size = source['Details']['size'] @@ -870,47 +911,6 @@ def select_device(description='device', provided_path=None, return dev -def check_dest_paths(source): - """Check for image and/or map file and alert user about details.""" - dd_image_exists = os.path.exists(source['Dest Paths']['Image']) - map_exists = os.path.exists(source['Dest Paths']['Map']) - if 'Clone' in source['Dest Paths']['Map']: - if map_exists: - # We're cloning and a matching map file was detected - if not ask('Matching map file detected, resume recovery?'): - abort_ddrescue_tui() - else: - abort_imaging = False - resume_files_exist = False - source_devs = [source] - if source['Children']: - source_devs = source['Children'] - for dev in source_devs: - # We're imaging - dd_image_exists = os.path.exists(dev['Dest Paths']['Image']) - map_exists = os.path.exists(dev['Dest Paths']['Map']) - if dd_image_exists and not map_exists: - # Refuce to resume without map file - i = dev['Dest Paths']['Image'] - i = i[i.rfind('/')+1:] - print_error( - 'Detected image "{}" but not the matching map'.format(i)) - abort_imaging = True - elif not dd_image_exists and map_exists: - # Can't resume without dd_image - m = dev['Dest Paths']['Map'] - m = m[m.rfind('/')+1:] - print_error( - 'Detected map "{}" but not the matching image'.format(m)) - abort_imaging = True - elif dd_image_exists and map_exists: - # Matching dd_image and map file were detected - resume_files_exist = True - p = 'Matching image and map file{} detected, resume recovery?'.format( - 's' if len(source_devs) > 1 else '') - if abort_imaging or (resume_files_exist and not ask(p)): - abort_ddrescue_tui() - def set_dest_image_paths(source, dest): """Set destination image path for source and any child devices.""" if source['Type'] == 'Clone': From 9e48c1d1a63d8e02a6dd33d0e80d57299e5291f4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 22 Jul 2018 02:03:04 -0600 Subject: [PATCH 051/293] Read data from MAP files (Big update) * Added read_map_file() which uses ddrescuelog to create dict of current state * Added --test-mode= option to expert menu * Add size (in bytes) to all devs * Allows to calculate real total percent recovered * Detect 100% completion via ddrescuelog -D * Moved mark_complete / mark_incomplete code to update_progress() * Update progress every 30s during ddrescue passes * Fixed auto_run logic --- .bin/Scripts/functions/ddrescue.py | 252 +++++++++++++++++++---------- 1 file changed, 169 insertions(+), 83 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 718f9262..5656c212 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -25,9 +25,12 @@ DDRESCUE_SETTINGS = { '--min-read-rate': {'Enabled': True, 'Value': '64KiB'}, '--reopen-on-error': {'Enabled': True}, '--retry-passes=': {'Enabled': True, 'Value': '0'}, + '--test-mode=': {'Enabled': True, 'Value': 'some.map'}, '--timeout=': {'Enabled': True, 'Value': '5m'}, '-vvvv': {'Enabled': True, 'Hidden': True}, } +REGEX_MAP_DATA = re.compile(r'^\s*(?P\S+):.*\(\s*(?P\d+\.?\d*)%.*') +REGEX_MAP_STATUS = re.compile(r'.*current status:\s+(?P.*)') USAGE = """ {script_name} clone [source [destination]] {script_name} image [source [destination]] (e.g. {script_name} clone /dev/sda /dev/sdb) @@ -131,15 +134,9 @@ def dest_safety_check(source, dest): else: dest_size = dest['Details']['size'] - # Fix strings before converting to bytes - source_size = re.sub( - r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', source_size.upper()) - dest_size = re.sub( - r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', dest_size.upper()) - # Convert to bytes and compare size - source_size = convert_to_bytes(source_size) - dest_size = convert_to_bytes(dest_size) + source_size = get_device_size_in_bytes(source_size) + dest_size = get_device_size_in_bytes(dest_size) if source['Type'] == 'Image' and dest_size < (source_size * 1.2): # Imaging: ensure 120% of source size is available print_error( @@ -202,6 +199,23 @@ def get_device_details(dev_path): # Just return the first device (there should only be one) return json_data['blockdevices'][0] +def get_device_size_in_bytes(s): + """Convert size string from lsblk string to bytes, returns int.""" + s = re.sub(r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', s, re.IGNORECASE) + return convert_to_bytes(s) + +def get_recovery_scope_size(source): + """Calculate total size of selected dev(s).""" + source['Total Size'] = 0 + if source['Children']: + for child in source['Children']: + child['Size'] = get_device_size_in_bytes(child['Details']['size']) + source['Total Size'] += child['Size'] + else: + # Whole dev + source['Size'] = get_device_size_in_bytes(source['Details']['size']) + source['Total Size'] = source['Size'] + def get_status_color(s, t_success=99, t_warn=90): """Get color based on status, returns str.""" color = COLORS['CLEAR'] @@ -214,7 +228,7 @@ def get_status_color(s, t_success=99, t_warn=90): if s in ('Pending',): color = COLORS['CLEAR'] - elif s in ('Working',): + elif s in ('Skipped', 'Unknown', 'Working'): color = COLORS['YELLOW'] elif p_recovered >= t_success: color = COLORS['GREEN'] @@ -224,57 +238,6 @@ def get_status_color(s, t_success=99, t_warn=90): color = COLORS['RED'] return color -def mark_pass_complete(source): - """Mark current pass complete for device, and overall if applicable.""" - current_pass = source['Current Pass'] - current_pass_num = int(current_pass[-1:]) - next_pass_num = current_pass_num + 1 - if 1 <= next_pass_num <= 3: - next_pass = 'Pass {}'.format(next_pass_num) - else: - next_pass = 'Done' - - # Check children progress - pass_complete_for_all_devs = True - for child in source['Children']: - if child['Dev Path'] == source['Current Device']: - # This function was called for this device, mark complete - child[current_pass]['Done'] = True - # TODO remove test code - from random import randint - status = randint((current_pass_num-1)*10+85, 110) + randint(0, 99) / 100 - child[current_pass]['Status'] = status - if not child[current_pass]['Done']: - pass_complete_for_all_devs = False - - # Update source vars - if pass_complete_for_all_devs: - source['Current Pass'] = next_pass - source[current_pass]['Done'] = True - - # TODO Remove test code - if source['Children']: - status = 100 - for child in source['Children']: - try: - status = min(status, child[current_pass]['Status']) - except TypeError: - # Force 0% to ensure we won't auto-continue to next pass - status = 0 - else: - from random import randint - status = randint((current_pass_num-1)*10+75, 100) + randint(0, 99) / 100 - source[current_pass]['Status'] = status - -def mark_pass_incomplete(source): - """Mark current pass incomplete.""" - current_pass = source['Current Pass'] - source[current_pass]['Status'] = 'Incomplete' - for child in source['Children']: - if child['Dev Path'] == source['Current Device']: - # This function was called for this device, mark incomplete - child[current_pass]['Status'] = 'Incomplete' - def mark_all_passes_pending(source): """Mark all devs and passes as pending in preparation for retry.""" source['Current Pass'] = 'Pass 1' @@ -294,6 +257,8 @@ def menu_clone(source_path, dest_path): source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} source['Pass 3'] = {'Status': 'Pending', 'Done': False} + source['Recovered Size'] = 0, + source['Total Size'] = 0, source['Type'] = 'Clone' dest = select_device('destination', dest_path, skip_device = source['Details'], allow_image_file = False) @@ -303,6 +268,7 @@ def menu_clone(source_path, dest_path): show_selection_details(source, dest) set_dest_image_paths(source, dest) check_dest_paths(source) + get_recovery_scope_size(source) # Confirm if not ask('Proceed with clone?'): @@ -355,6 +321,8 @@ def menu_image(source_path, dest_path): source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} source['Pass 3'] = {'Status': 'Pending', 'Done': False} + source['Recovered Size'] = 0, + source['Total Size'] = 0, source['Type'] = 'Image' dest = select_dest_path(dest_path, skip_device=source['Details']) dest_safety_check(source, dest) @@ -363,6 +331,7 @@ def menu_image(source_path, dest_path): source['Children'] = menu_select_children(source) set_dest_image_paths(source, dest) check_dest_paths(source) + get_recovery_scope_size(source) # Show selection details show_selection_details(source, dest) @@ -441,6 +410,8 @@ def menu_main(source, dest): if 'Value' in v: settings.append(v['Value']) for opt in main_options: + if 'Auto' in opt['Base Name']: + auto_run = opt['Enabled'] if 'Retry' in opt['Base Name'] and opt['Enabled']: settings.extend(['--retrim', '--try-again']) mark_all_passes_pending(source) @@ -452,10 +423,10 @@ def menu_main(source, dest): opt['Enabled'] = False # Run ddrecue - auto_run = True - while auto_run: + first_run = True + while auto_run or first_run: + first_run = False run_ddrescue(source, dest, settings) - auto_run = False if current_pass == 'Done': # "Pass Done" i.e. all passes done break @@ -463,17 +434,13 @@ def menu_main(source, dest): # Auto next pass break if source[current_pass]['Done']: - try: - recovered = float(source[current_pass]['Status']) - except ValueError: - # Nope - recovered = 'Nope' - pass - else: - if current_pass == 'Pass 1' and recovered > 85: - auto_run = True - elif current_pass == 'Pass 2' and recovered > 98: - auto_run = True + min_status = source[current_pass]['Min Status'] + if (current_pass == 'Pass 1' + and min_status < AUTO_NEXT_PASS_1_THRESHOLD): + auto_run = False + elif (current_pass == 'Pass 2' + and min_status < AUTO_NEXT_PASS_2_THRESHOLD): + auto_run = False # Update current pass for next iteration current_pass = source['Current Pass'] @@ -719,9 +686,42 @@ def menu_settings(source): elif selection == 'M': break +def read_map_file(map_path): + """Read map file with ddrescuelog and return data as dict.""" + map_data = {} + try: + result = run_program(['ddrescuelog', '-t', map_path]) + except subprocess.CalledProcessError: + print_error('Failed to read map data') + abort_ddrescue_tui() + + # Parse output + for line in result.stdout.decode().splitlines(): + m = REGEX_MAP_DATA.match(line.strip()) + if m: + try: + map_data[m.group('key')] = float(m.group('value')) + except ValueError: + print_error('Failed to read map data') + abort_ddrescue_tui() + m = REGEX_MAP_STATUS.match(line.strip()) + if m: + map_data['pass completed'] = bool(m.group('status') == 'finished') + + # Check if 100% done + try: + run_program(['ddrescuelog', '-D', map_path]) + except subprocess.CalledProcessError: + map_data['full recovery'] = False + else: + map_data['full recovery'] = True + + return map_data + def run_ddrescue(source, dest, settings): """Run ddrescue pass.""" current_pass = source['Current Pass'] + return_code = None # Set pass options if current_pass == 'Pass 1': @@ -786,7 +786,12 @@ def run_ddrescue(source, dest, settings): ddrescue_proc = popen_program(['./__choose_exit', *cmd]) #ddrescue_proc = popen_program(['./__exit_ok', *cmd]) #ddrescue_proc = popen_program(cmd) - ddrescue_proc.wait() + while True: + try: + ddrescue_proc.wait(timeout=30) + break + except subprocess.TimeoutExpired: + update_progress(source) except KeyboardInterrupt: # Catch user abort pass @@ -796,19 +801,14 @@ def run_ddrescue(source, dest, settings): if return_code is None or return_code is 130: clear_screen() print_warning('Aborted') - mark_pass_incomplete(source) break elif return_code: # i.e. not None and not 0 print_error('Error(s) encountered, see message above.') - mark_pass_incomplete(source) break - else: - # Not None and not non-zero int, assuming 0 - mark_pass_complete(source) # Cleanup - update_progress(source) + update_progress(source, end_run=True) if str(return_code) != '0': # Pause on errors pause('Press Enter to return to main menu... ') @@ -878,7 +878,7 @@ def select_device(description='device', provided_path=None, # Get device details dev['Details'] = get_device_details(dev['Dev Path']) if 'Children' not in dev: - dev['Children'] = {} + dev['Children'] = [] # Check for parent device(s) while dev['Details']['pkname']: @@ -1028,8 +1028,26 @@ def tmux_splitw(*args): result = run_program(cmd) return result.stdout.decode().strip() -def update_progress(source): +def update_progress(source, end_run=False): """Update progress file.""" + current_pass = source['Current Pass'] + pass_complete_for_all_devs = True + total_recovery = True + source['Recovered Size'] = 0 + if current_pass != 'Done': + source[current_pass]['Min Status'] = 100 + try: + current_pass_num = int(current_pass[-1:]) + next_pass_num = current_pass_num + 1 + except ValueError: + # Either Done or undefined? + current_pass_num = -1 + next_pass_num = -1 + if 1 <= next_pass_num <= 3: + next_pass = 'Pass {}'.format(next_pass_num) + else: + next_pass = 'Done' + if 'Progress Out' not in source: source['Progress Out'] = '{}/progress.out'.format(global_vars['LogDir']) output = [] @@ -1038,6 +1056,74 @@ def update_progress(source): else: output.append(' {BLUE}Imaging Status{CLEAR}'.format(**COLORS)) output.append('─────────────────────') + + # Update children progress + for child in source['Children']: + if os.path.exists(child['Dest Paths']['Map']): + map_data = read_map_file(child['Dest Paths']['Map']) + if child['Dev Path'] == source.get('Current Device', ''): + # Current child device + r_size = map_data['rescued']/100 * child['Size'] + child[current_pass]['Done'] = map_data['pass completed'] + child[current_pass]['Status'] = map_data['rescued'] + child['Recovered Size'] = r_size + + # All child devices + pass_complete_for_all_devs &= child[current_pass]['Done'] + total_recovery &= map_data['full recovery'] + try: + source['Recovered Size'] += child.get('Recovered Size', 0) + source[current_pass]['Min Status'] = min( + source[current_pass]['Min Status'], + child[current_pass]['Status']) + except TypeError: + # Force 0% to disable auto-continue + source[current_pass]['Min Status'] = 0 + else: + # Map missing, assuming this pass hasn't run for this dev yet + pass_complete_for_all_devs = False + total_recovery = False + + # Update source progress + if len(source['Children']) > 0: + # Imaging parts, skip updating source progress + pass + elif os.path.exists(source['Dest Paths']['Map']): + # Cloning/Imaging whole device + map_data = read_map_file(source['Dest Paths']['Map']) + source[current_pass]['Done'] = map_data['pass completed'] + source[current_pass]['Status'] = map_data['rescued'] + source['Recovered Size'] = map_data['rescued']/100 * source['Size'] + try: + source[current_pass]['Min Status'] = min( + source[current_pass]['Min Status'], + source[current_pass]['Status']) + except TypeError: + # Force 0% to disable auto-continue + source[current_pass]['Min Status'] = 0 + pass_complete_for_all_devs &= source[current_pass]['Done'] + total_recovery &= map_data['full recovery'] + else: + # Cloning/Imaging whole device and map missing + pass_complete_for_all_devs = False + total_recovery = False + + # End of pass updates + if end_run: + if total_recovery: + # Sweet! + source['Current Pass'] = 'Done' + source['Recovered Size'] = source['Total Size'] + for p_num in ['Pass 1', 'Pass 2', 'Pass 3']: + if source[p_num]['Status'] == 'Pending': + source[p_num]['Status'] = 'Skipped' + for child in source['Children']: + if child[p_num]['Status'] == 'Pending': + child[p_num]['Status'] = 'Skipped' + elif pass_complete_for_all_devs: + # Ready for next pass? + source['Current Pass'] = next_pass + source[current_pass]['Done'] = True # Main device if source['Type'] == 'Clone': From 1f63f911447a5397c2d41478222fa7db31f9d703 Mon Sep 17 00:00:00 2001 From: Alan Mason <2xShirt@gmail.com> Date: Sun, 22 Jul 2018 16:27:34 -0600 Subject: [PATCH 052/293] PEP8 Cleanup --- .bin/Scripts/functions/ddrescue.py | 297 ++++++++++++++++------------- 1 file changed, 169 insertions(+), 128 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 5656c212..ca0d94a3 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -13,7 +13,7 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES -AUTHORIZED_DEST_FSTYPES = ['ext3', 'ext4', 'xfs'] +RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs'] AUTO_NEXT_PASS_1_THRESHOLD = 85 AUTO_NEXT_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { @@ -36,41 +36,45 @@ USAGE = """ {script_name} clone [source [destination]] (e.g. {script_name} clone /dev/sda /dev/sdb) """ + # Functions def abort_ddrescue_tui(): run_program(['losetup', '-D']) abort() + def build_outer_panes(source, dest): """Build top and side panes.""" clear_screen() - + # Top panes source_pane = tmux_splitw( '-bdvl', '2', '-PF', '#D', 'echo-and-hold "{BLUE}Source{CLEAR}\n{text}"'.format( - text = source['Display Name'], + text=source['Display Name'], **COLORS)) tmux_splitw( '-t', source_pane, '-dhl', '21', 'echo-and-hold "{BLUE}Started{CLEAR}\n{text}"'.format( - text = time.strftime("%Y-%m-%d %H:%M %Z"), + text=time.strftime("%Y-%m-%d %H:%M %Z"), **COLORS)) tmux_splitw( '-t', source_pane, '-dhp', '50', 'echo-and-hold "{BLUE}Destination{CLEAR}\n{text}"'.format( - text = dest['Display Name'], + text=dest['Display Name'], **COLORS)) - + # Side pane update_progress(source) - tmux_splitw('-dhl', '21', + tmux_splitw( + '-dhl', '21', 'watch', '--color', '--no-title', '--interval', '1', 'cat', source['Progress Out']) + def check_dest_paths(source): """Check for image and/or map file and alert user about details.""" dd_image_exists = os.path.exists(source['Dest Paths']['Image']) @@ -112,11 +116,13 @@ def check_dest_paths(source): if abort_imaging or (resume_files_exist and not ask(p)): abort_ddrescue_tui() + def dest_safety_check(source, dest): """Verify the destination is appropriate for the source.""" source_size = source['Details']['size'] if dest['Is Dir']: - cmd = ['findmnt', '-J', + cmd = [ + 'findmnt', '-J', '-o', 'SOURCE,TARGET,FSTYPE,OPTIONS,SIZE,AVAIL,USED', '-T', dest['Path']] result = run_program(cmd) @@ -141,27 +147,29 @@ def dest_safety_check(source, dest): # Imaging: ensure 120% of source size is available print_error( 'Not enough free space on destination, refusing to continue.') - print_standard(' Dest {d_size} < Required {s_size}'.format( - d_size = human_readable_size(dest_size), - s_size = human_readable_size(source_size * 1.2))) + print_standard( + ' Dest {d_size} < Required {s_size}'.format( + d_size=human_readable_size(dest_size), + s_size=human_readable_size(source_size * 1.2))) abort_ddrescue_tui() elif source['Type'] == 'Clone' and source_size > dest_size: # Cloning: ensure dest >= size print_error('Destination is too small, refusing to continue.') - print_standard(' Dest {d_size} < Source {s_size}'.format( - d_size = human_readable_size(dest_size), - s_size = human_readable_size(source_size))) + print_standard( + ' Dest {d_size} < Source {s_size}'.format( + d_size=human_readable_size(dest_size), + s_size=human_readable_size(source_size))) abort_ddrescue_tui() # Imaging specific checks if source['Type'] == 'Image': # Filesystem Type - if dest['Filesystem'] not in AUTHORIZED_DEST_FSTYPES: + if dest['Filesystem'] not in RECOMMENDED_FSTYPES: print_error( - 'Destination filesystem "{}" is not a recommended type.'.format( - dest['Filesystem'])) - print_info('Authorized types are: {}'.format( - ' / '.join(AUTHORIZED_DEST_FSTYPES).upper())) + 'Destination filesystem "{}" is not recommended.'.format( + dest['Filesystem'])) + print_info('Recommended types are: {}'.format( + ' / '.join(RECOMMENDED_FSTYPES).upper())) print_standard(' ') if not ask('Proceed anyways? (Strongly discouraged)'): abort_ddrescue_tui() @@ -174,13 +182,14 @@ def dest_safety_check(source, dest): if not dest_ok: print_error('Destination is not writable, refusing to continue.') abort_ddrescue_tui() - + # Mount options check if 'rw' not in dest['Mount options'].split(','): print_error( 'Destination is not mounted read-write, refusing to continue.') abort_ddrescue_tui() + def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" try: @@ -199,11 +208,13 @@ def get_device_details(dev_path): # Just return the first device (there should only be one) return json_data['blockdevices'][0] + def get_device_size_in_bytes(s): """Convert size string from lsblk string to bytes, returns int.""" s = re.sub(r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', s, re.IGNORECASE) return convert_to_bytes(s) + def get_recovery_scope_size(source): """Calculate total size of selected dev(s).""" source['Total Size'] = 0 @@ -216,6 +227,7 @@ def get_recovery_scope_size(source): source['Size'] = get_device_size_in_bytes(source['Details']['size']) source['Total Size'] = source['Size'] + def get_status_color(s, t_success=99, t_warn=90): """Get color based on status, returns str.""" color = COLORS['CLEAR'] @@ -225,7 +237,7 @@ def get_status_color(s, t_success=99, t_warn=90): except ValueError: # Status is either in lists below or will default to red pass - + if s in ('Pending',): color = COLORS['CLEAR'] elif s in ('Skipped', 'Unknown', 'Working'): @@ -238,6 +250,7 @@ def get_status_color(s, t_success=99, t_warn=90): color = COLORS['RED'] return color + def mark_all_passes_pending(source): """Mark all devs and passes as pending in preparation for retry.""" source['Current Pass'] = 'Pass 1' @@ -248,9 +261,10 @@ def mark_all_passes_pending(source): child[p_num]['Status'] = 'Pending' child[p_num]['Done'] = False + def menu_clone(source_path, dest_path): """ddrescue cloning menu.""" - + # Set devices source = select_device('source', source_path) source['Current Pass'] = 'Pass 1' @@ -260,21 +274,22 @@ def menu_clone(source_path, dest_path): source['Recovered Size'] = 0, source['Total Size'] = 0, source['Type'] = 'Clone' - dest = select_device('destination', dest_path, - skip_device = source['Details'], allow_image_file = False) + dest = select_device( + 'destination', dest_path, + skip_device=source['Details'], allow_image_file=False) dest_safety_check(source, dest) - + # Show selection details show_selection_details(source, dest) set_dest_image_paths(source, dest) check_dest_paths(source) get_recovery_scope_size(source) - + # Confirm if not ask('Proceed with clone?'): abort_ddrescue_tui() show_safety_check() - + # Main menu build_outer_panes(source, dest) menu_main(source, dest) @@ -284,6 +299,7 @@ def menu_clone(source_path, dest_path): run_program(['tmux', 'kill-window']) exit_script() + def menu_ddrescue(*args): """Main ddrescue loop/menu.""" args = list(args) @@ -312,11 +328,12 @@ def menu_ddrescue(*args): show_usage(script_name) exit_script() + def menu_image(source_path, dest_path): """ddrescue imaging menu.""" - + # Set devices - source = select_device('source', source_path, allow_image_file = False) + source = select_device('source', source_path, allow_image_file=False) source['Current Pass'] = 'Pass 1' source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} @@ -332,14 +349,14 @@ def menu_image(source_path, dest_path): set_dest_image_paths(source, dest) check_dest_paths(source) get_recovery_scope_size(source) - + # Show selection details show_selection_details(source, dest) - + # Confirm if not ask('Proceed with imaging?'): abort_ddrescue_tui() - + # Main menu build_outer_panes(source, dest) menu_main(source, dest) @@ -349,6 +366,7 @@ def menu_image(source_path, dest_path): run_program(['tmux', 'kill-window']) exit_script() + def menu_main(source, dest): """Main menu is used to set ddrescue settings.""" title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS) @@ -364,7 +382,7 @@ def menu_main(source, dest): 'Enabled': False}, {'Base Name': 'Reverse direction', 'Enabled': False}, ] - actions =[ + actions = [ {'Name': 'Start', 'Letter': 'S'}, {'Name': 'Change settings {YELLOW}(experts only){CLEAR}'.format( **COLORS), @@ -387,11 +405,11 @@ def menu_main(source, dest): opt['Name'] = '{} {}'.format( '[✓]' if opt['Enabled'] else '[ ]', opt['Base Name']) - + selection = menu_select( - title = title + display_pass, - main_entries = main_options, - action_entries = actions) + title=title+display_pass, + main_entries=main_options, + action_entries=actions) if selection.isnumeric(): # Toggle selection @@ -435,20 +453,21 @@ def menu_main(source, dest): break if source[current_pass]['Done']: min_status = source[current_pass]['Min Status'] - if (current_pass == 'Pass 1' - and min_status < AUTO_NEXT_PASS_1_THRESHOLD): + if (current_pass == 'Pass 1' and + min_status < AUTO_NEXT_PASS_1_THRESHOLD): auto_run = False - elif (current_pass == 'Pass 2' - and min_status < AUTO_NEXT_PASS_2_THRESHOLD): + elif (current_pass == 'Pass 2' and + min_status < AUTO_NEXT_PASS_2_THRESHOLD): auto_run = False # Update current pass for next iteration current_pass = source['Current Pass'] - + elif selection == 'C': menu_settings(source) elif selection == 'Q': break + def menu_select_children(source): """Select child device(s) or whole disk, returns list.""" dev_options = [{ @@ -467,7 +486,7 @@ def menu_select_children(source): actions = [ {'Name': 'Proceed', 'Letter': 'P'}, {'Name': 'Quit', 'Letter': 'Q'}] - + # Skip Menu if there's no children if len(dev_options) == 1: return [] @@ -481,9 +500,9 @@ def menu_select_children(source): dev['Base Name']) selection = menu_select( - title = 'Please select part(s) to image', - main_entries = dev_options, - action_entries = actions) + title='Please select part(s) to image', + main_entries=dev_options, + action_entries=actions) if selection.isnumeric(): # Toggle selection @@ -513,6 +532,7 @@ def menu_select_children(source): if d['Selected'] and 'Whole device' not in d['Base Name']] return selected_children + def menu_select_device(title='Which device?', skip_device={}): """Select block device via a menu, returns dev_path as str.""" skip_names = [ @@ -540,11 +560,11 @@ def menu_select_device(title='Which device?', skip_device={}): # Append non-matching devices dev_options.append({ 'Name': '{name:12} {tran:5} {size:6} {model} {serial}'.format( - name = dev['name'], - tran = dev['tran'] if dev['tran'] else '', - size = dev['size'] if dev['size'] else '', - model = dev['model'] if dev['model'] else '', - serial = dev['serial'] if dev['serial'] else ''), + name=dev['name'], + tran=dev['tran'] if dev['tran'] else '', + size=dev['size'] if dev['size'] else '', + model=dev['model'] if dev['model'] else '', + serial=dev['serial'] if dev['serial'] else ''), 'Path': dev['name'], 'Disabled': disable_dev}) dev_options = sorted(dev_options, key=itemgetter('Name')) @@ -555,16 +575,17 @@ def menu_select_device(title='Which device?', skip_device={}): # Show Menu actions = [{'Name': 'Quit', 'Letter': 'Q'}] selection = menu_select( - title = title, - main_entries = dev_options, - action_entries = actions, - disabled_label = 'SOURCE DEVICE') + title=title, + main_entries=dev_options, + action_entries=actions, + disabled_label='SOURCE DEVICE') if selection.isnumeric(): return dev_options[int(selection)-1]['Path'] elif selection == 'Q': abort_ddrescue_tui() + def menu_select_path(skip_device={}): """Select path via menu, returns path as str.""" pwd = os.path.realpath(global_vars['Env']['PWD']) @@ -579,9 +600,9 @@ def menu_select_path(skip_device={}): # Show Menu selection = menu_select( - title = 'Please make a selection', - main_entries = path_options, - action_entries = actions) + title='Please make a selection', + main_entries=path_options, + action_entries=actions) if selection == 'Q': abort_ddrescue_tui() @@ -594,14 +615,14 @@ def menu_select_path(skip_device={}): elif path_options[index]['Name'] == 'Local device': # Local device local_device = select_device( - skip_device = skip_device, - allow_image_file = False) + skip_device=skip_device, + allow_image_file=False) # Mount device volume(s) report = mount_volumes( - all_devices = False, - device_path = local_device['Dev Path'], - read_write = True) + all_devices=False, + device_path=local_device['Dev Path'], + read_write=True) # Select volume vol_options = [] @@ -616,9 +637,9 @@ def menu_select_path(skip_device={}): 'Path': v['mount_point'], 'Disabled': disabled}) selection = menu_select( - title = 'Please select a volume', - main_entries = vol_options, - action_entries = actions) + title='Please select a volume', + main_entries=vol_options, + action_entries=actions) if selection.isnumeric(): s_path = vol_options[int(selection)-1]['Path'] elif selection == 'Q': @@ -636,6 +657,7 @@ def menu_select_path(skip_device={}): print_error('Invalid path "{}"'.format(m_path)) return s_path + def menu_settings(source): """Change advanced ddrescue settings.""" title = '{GREEN}ddrescue TUI: Expert Settings{CLEAR}\n\n'.format(**COLORS) @@ -660,32 +682,33 @@ def menu_settings(source): source['Settings'][s['Flag']].get('Value', '')) if not source['Settings'][s['Flag']]['Enabled']: s['Name'] = '{YELLOW}{name} (Disabled){CLEAR}'.format( - name = s['Name'], + name=s['Name'], **COLORS) selection = menu_select( - title = title, - main_entries = settings, - action_entries = actions) + title=title, + main_entries=settings, + action_entries=actions) if selection.isnumeric(): index = int(selection) - 1 flag = settings[index]['Flag'] enabled = source['Settings'][flag]['Enabled'] if 'Value' in source['Settings'][flag]: answer = choice( - choices = ['T', 'C'], - prompt = 'Toggle or change value for "{}"'.format(flag)) + choices=['T', 'C'], + prompt='Toggle or change value for "{}"'.format(flag)) if answer == 'T': # Toggle source['Settings'][flag]['Enabled'] = not enabled else: # Update value source['Settings'][flag]['Value'] = get_simple_string( - prompt = 'Enter new value') + prompt='Enter new value') else: source['Settings'][flag]['Enabled'] = not enabled elif selection == 'M': break + def read_map_file(map_path): """Read map file with ddrescuelog and return data as dict.""" map_data = {} @@ -694,7 +717,7 @@ def read_map_file(map_path): except subprocess.CalledProcessError: print_error('Failed to read map data') abort_ddrescue_tui() - + # Parse output for line in result.stdout.decode().splitlines(): m = REGEX_MAP_DATA.match(line.strip()) @@ -718,6 +741,7 @@ def read_map_file(map_path): return map_data + def run_ddrescue(source, dest, settings): """Run ddrescue pass.""" current_pass = source['Current Pass'] @@ -739,28 +763,28 @@ def run_ddrescue(source, dest, settings): return else: raise GenericError("This shouldn't happen?") - + # Set device(s) to clone/image source[current_pass]['Status'] = 'Working' source_devs = [source] if source['Children']: # Use only selected child devices source_devs = source['Children'] - + # Set heights - ## NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) + # NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) result = run_program(['tput', 'lines']) height = int(result.stdout.decode().strip()) height_smart = int(height * (12 / 33)) height_ddrescue = height - height_smart - + # Show SMART status smart_pane = tmux_splitw( '-bdvl', str(height_smart), '-PF', '#D', 'watch', '--color', '--no-title', '--interval', '300', 'ddrescue-tui-smart-display', source['Dev Path']) - + # Start pass for each selected device for s_dev in source_devs: if s_dev[current_pass]['Done']: @@ -769,23 +793,24 @@ def run_ddrescue(source, dest, settings): source['Current Device'] = s_dev['Dev Path'] s_dev[current_pass]['Status'] = 'Working' update_progress(source) - + # Set ddrescue cmd if source['Type'] == 'Clone': - cmd = ['ddrescue', *settings, '--force', - s_dev['Dev Path'], dest['Dev Path'], s_dev['Dest Paths']['Map']] + cmd = [ + 'ddrescue', *settings, '--force', s_dev['Dev Path'], + dest['Dev Path'], s_dev['Dest Paths']['Map']] else: - cmd = ['ddrescue', *settings, - s_dev['Dev Path'], s_dev['Dest Paths']['Image'], - s_dev['Dest Paths']['Map']] + cmd = [ + 'ddrescue', *settings, s_dev['Dev Path'], + s_dev['Dest Paths']['Image'], s_dev['Dest Paths']['Map']] # Start ddrescue try: clear_screen() print_info('Current dev: {}'.format(s_dev['Dev Path'])) ddrescue_proc = popen_program(['./__choose_exit', *cmd]) - #ddrescue_proc = popen_program(['./__exit_ok', *cmd]) - #ddrescue_proc = popen_program(cmd) + # ddrescue_proc = popen_program(['./__exit_ok', *cmd]) + # ddrescue_proc = popen_program(cmd) while True: try: ddrescue_proc.wait(timeout=30) @@ -814,6 +839,7 @@ def run_ddrescue(source, dest, settings): pause('Press Enter to return to main menu... ') run_program(['tmux', 'kill-pane', '-t', smart_pane]) + def select_dest_path(provided_path=None, skip_device={}): dest = {'Is Dir': True, 'Is Image': False} @@ -851,11 +877,12 @@ def select_dest_path(provided_path=None, skip_device={}): return dest + def select_device(description='device', provided_path=None, - skip_device={}, allow_image_file=True): + skip_device={}, allow_image_file=True): """Select device via provided path or menu, return dev as dict.""" dev = {'Is Dir': False, 'Is Image': False} - + # Set path if provided_path: dev['Path'] = provided_path @@ -864,7 +891,7 @@ def select_device(description='device', provided_path=None, title='Please select a {}'.format(description), skip_device=skip_device) dev['Path'] = os.path.realpath(dev['Path']) - + # Check path if pathlib.Path(dev['Path']).is_block_device(): dev['Dev Path'] = dev['Path'] @@ -879,13 +906,13 @@ def select_device(description='device', provided_path=None, dev['Details'] = get_device_details(dev['Dev Path']) if 'Children' not in dev: dev['Children'] = [] - + # Check for parent device(s) while dev['Details']['pkname']: print_warning('{} "{}" is a child device.'.format( description.title(), dev['Dev Path'])) if ask('Use parent device "{}" instead?'.format( - dev['Details']['pkname'])): + dev['Details']['pkname'])): # Update dev with parent info dev['Dev Path'] = dev['Details']['pkname'] dev['Details'] = get_device_details(dev['Dev Path']) @@ -903,25 +930,28 @@ def select_device(description='device', provided_path=None, width = int((int(result.stdout.decode().strip()) - 21) / 2) - 2 if len(dev['Display Name']) > width: if dev['Is Image']: - dev['Display Name'] = '...{}'.format(dev['Display Name'][-(width-3):]) + dev['Display Name'] = '...{}'.format( + dev['Display Name'][-(width-3):]) else: - dev['Display Name'] = '{}...'.format(dev['Display Name'][:(width-3)]) + dev['Display Name'] = '{}...'.format( + dev['Display Name'][:(width-3)]) else: dev['Display Name'] = dev['Display Name'] return dev + def set_dest_image_paths(source, dest): """Set destination image path for source and any child devices.""" if source['Type'] == 'Clone': base = '{pwd}/Clone_{size}_{model}'.format( - pwd = os.path.realpath(global_vars['Env']['PWD']), - size = source['Details']['size'], - model = source['Details'].get('model', 'Unknown')) + pwd=os.path.realpath(global_vars['Env']['PWD']), + size=source['Details']['size'], + model=source['Details'].get('model', 'Unknown')) else: base = '{Path}/{size}_{model}'.format( - size = source['Details']['size'], - model = source['Details'].get('model', 'Unknown'), + size=source['Details']['size'], + model=source['Details'].get('model', 'Unknown'), **dest) source['Dest Paths'] = { 'Image': '{}.dd'.format(base), @@ -933,17 +963,18 @@ def set_dest_image_paths(source, dest): if child['Details']['label']: p_label = '_{}'.format(child['Details']['label']) base = '{Path}/{size}_{model}_{p_num}_{p_size}{p_label}'.format( - size = source['Details']['size'], - model = source['Details'].get('model', 'Unknown'), - p_num = child['Details']['name'].replace( + size=source['Details']['size'], + model=source['Details'].get('model', 'Unknown'), + p_num=child['Details']['name'].replace( child['Details']['pkname'], ''), - p_size = child['Details']['size'], - p_label = p_label, + p_size=child['Details']['size'], + p_label=p_label, **dest) child['Dest Paths'] = { 'Image': '{}.dd'.format(base), 'Map': '{}.map'.format(base)} + def setup_loopback_device(source_path): """Setup a loopback device for source_path, returns dev_path as str.""" cmd = ( @@ -962,6 +993,7 @@ def setup_loopback_device(source_path): else: return dev_path + def show_device_details(dev_path): """Display device details on screen.""" cmd = ( @@ -982,6 +1014,7 @@ def show_device_details(dev_path): for line in output: print_standard(line) + def show_safety_check(): """Display safety check message and get confirmation from user.""" print_standard('\nSAFETY CHECK') @@ -992,9 +1025,10 @@ def show_safety_check(): if not ask('Asking again to confirm, is this correct?'): abort_ddrescue_tui() + def show_selection_details(source, dest): clear_screen() - + # Source print_success('Source device') if source['Is Image']: @@ -1003,7 +1037,7 @@ def show_selection_details(source, dest): source['Dev Path'])) show_device_details(source['Dev Path']) print_standard(' ') - + # Destination if source['Type'] == 'Clone': print_success('Destination device ', end='') @@ -1017,17 +1051,20 @@ def show_selection_details(source, dest): dest['Free Space'], dest['Filesystem'])) print_standard(' ') + def show_usage(script_name): print_info('Usage:') print_standard(USAGE.format(script_name=script_name)) pause() + def tmux_splitw(*args): """Run tmux split-window command and return output as str.""" cmd = ['tmux', 'split-window', *args] result = run_program(cmd) return result.stdout.decode().strip() + def update_progress(source, end_run=False): """Update progress file.""" current_pass = source['Current Pass'] @@ -1047,9 +1084,10 @@ def update_progress(source, end_run=False): next_pass = 'Pass {}'.format(next_pass_num) else: next_pass = 'Done' - + if 'Progress Out' not in source: - source['Progress Out'] = '{}/progress.out'.format(global_vars['LogDir']) + source['Progress Out'] = '{}/progress.out'.format( + global_vars['LogDir']) output = [] if source['Type'] == 'Clone': output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) @@ -1067,7 +1105,7 @@ def update_progress(source, end_run=False): child[current_pass]['Done'] = map_data['pass completed'] child[current_pass]['Status'] = map_data['rescued'] child['Recovered Size'] = r_size - + # All child devices pass_complete_for_all_devs &= child[current_pass]['Done'] total_recovery &= map_data['full recovery'] @@ -1083,7 +1121,7 @@ def update_progress(source, end_run=False): # Map missing, assuming this pass hasn't run for this dev yet pass_complete_for_all_devs = False total_recovery = False - + # Update source progress if len(source['Children']) > 0: # Imaging parts, skip updating source progress @@ -1107,7 +1145,7 @@ def update_progress(source, end_run=False): # Cloning/Imaging whole device and map missing pass_complete_for_all_devs = False total_recovery = False - + # End of pass updates if end_run: if total_recovery: @@ -1124,11 +1162,11 @@ def update_progress(source, end_run=False): # Ready for next pass? source['Current Pass'] = next_pass source[current_pass]['Done'] = True - + # Main device if source['Type'] == 'Clone': output.append('{BLUE}{dev}{CLEAR}'.format( - dev = 'Image File' if source['Is Image'] else source['Dev Path'], + dev='Image File' if source['Is Image'] else source['Dev Path'], **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) @@ -1141,9 +1179,9 @@ def update_progress(source, end_run=False): else: s_display = '{:0.2f} %'.format(s_display) output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( - p_num = p_num, - s_color = get_status_color(source[p_num]['Status']), - s_display = s_display, + p_num=p_num, + s_color=get_status_color(source[p_num]['Status']), + s_display=s_display, **COLORS)) else: # Image mode @@ -1151,7 +1189,7 @@ def update_progress(source, end_run=False): # Just parts for child in source['Children']: output.append('{BLUE}{dev}{CLEAR}'.format( - dev = child['Dev Path'], + dev=child['Dev Path'], **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) @@ -1163,16 +1201,17 @@ def update_progress(source, end_run=False): pass else: s_display = '{:0.2f} %'.format(s_display) - output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( - p_num = p_num, - s_color = get_status_color(child[p_num]['Status']), - s_display = s_display, - **COLORS)) + output.append( + '{p_num}{s_color}{s_display:>15}{CLEAR}'.format( + p_num=p_num, + s_color=get_status_color(child[p_num]['Status']), + s_display=s_display, + **COLORS)) output.append(' ') else: # Whole device output.append('{BLUE}{dev}{CLEAR} {YELLOW}(Whole){CLEAR}'.format( - dev = source['Dev Path'], + dev=source['Dev Path'], **COLORS)) for x in (1, 2, 3): p_num = 'Pass {}'.format(x) @@ -1184,11 +1223,12 @@ def update_progress(source, end_run=False): pass else: s_display = '{:0.2f} %'.format(s_display) - output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( - p_num = p_num, - s_color = get_status_color(source[p_num]['Status']), - s_display = s_display, - **COLORS)) + output.append( + '{p_num}{s_color}{s_display:>15}{CLEAR}'.format( + p_num=p_num, + s_color=get_status_color(source[p_num]['Status']), + s_display=s_display, + **COLORS)) # Add line-endings output = ['{}\n'.format(line) for line in output] @@ -1196,6 +1236,7 @@ def update_progress(source, end_run=False): with open(source['Progress Out'], 'w') as f: f.writelines(output) + if __name__ == '__main__': print("This file is not meant to be called directly.") From cd955fe1fc871b991d8016a75694ba8bdeaffd27 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 22 Jul 2018 21:56:39 -0600 Subject: [PATCH 053/293] Add overall recovery status to side-pane * --test-mode disabled by default * Fixed bug that prevented escaping auto_run via Ctrl-c * Fixed no-trim / no-scrape flag handling * Only proceed device(s) have been selected in menu_select_children --- .bin/Scripts/functions/ddrescue.py | 115 +++++++++++++++++------------ 1 file changed, 69 insertions(+), 46 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ca0d94a3..27cac0ba 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -14,23 +14,25 @@ from operator import itemgetter # STATIC VARIABLES RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs'] -AUTO_NEXT_PASS_1_THRESHOLD = 85 +AUTO_NEXT_PASS_1_THRESHOLD = 90 AUTO_NEXT_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { '--binary-prefixes': {'Enabled': True, 'Hidden': True}, '--data-preview': {'Enabled': True, 'Hidden': True}, '--idirect': {'Enabled': True}, '--odirect': {'Enabled': True}, - '--max-read-rate': {'Enabled': False, 'Value': '128MiB'}, + '--max-read-rate': {'Enabled': False, 'Value': '4MiB'}, '--min-read-rate': {'Enabled': True, 'Value': '64KiB'}, '--reopen-on-error': {'Enabled': True}, '--retry-passes=': {'Enabled': True, 'Value': '0'}, - '--test-mode=': {'Enabled': True, 'Value': 'some.map'}, + '--test-mode=': {'Enabled': False, 'Value': 'some.map'}, '--timeout=': {'Enabled': True, 'Value': '5m'}, '-vvvv': {'Enabled': True, 'Hidden': True}, } REGEX_MAP_DATA = re.compile(r'^\s*(?P\S+):.*\(\s*(?P\d+\.?\d*)%.*') REGEX_MAP_STATUS = re.compile(r'.*current status:\s+(?P.*)') +STATUS_COLOR_CLEAR = ('Pending',) +STATUS_COLOR_YELLOW = ('Skipped', 'Unknown', 'Working') USAGE = """ {script_name} clone [source [destination]] {script_name} image [source [destination]] (e.g. {script_name} clone /dev/sda /dev/sdb) @@ -238,9 +240,9 @@ def get_status_color(s, t_success=99, t_warn=90): # Status is either in lists below or will default to red pass - if s in ('Pending',): + if s in STATUS_COLOR_CLEAR: color = COLORS['CLEAR'] - elif s in ('Skipped', 'Unknown', 'Working'): + elif s in STATUS_COLOR_YELLOW: color = COLORS['YELLOW'] elif p_recovered >= t_success: color = COLORS['GREEN'] @@ -445,6 +447,7 @@ def menu_main(source, dest): while auto_run or first_run: first_run = False run_ddrescue(source, dest, settings) + update_progress(source, end_run=True) if current_pass == 'Done': # "Pass Done" i.e. all passes done break @@ -459,6 +462,8 @@ def menu_main(source, dest): elif (current_pass == 'Pass 2' and min_status < AUTO_NEXT_PASS_2_THRESHOLD): auto_run = False + else: + auto_run = False # Update current pass for next iteration current_pass = source['Current Pass'] @@ -493,11 +498,14 @@ def menu_select_children(source): # Show Menu while True: + one_or_more_devs_selected = False # Update entries for dev in dev_options: - dev['Name'] = '{} {}'.format( - '*' if dev['Selected'] else ' ', - dev['Base Name']) + if dev['Selected']: + one_or_more_devs_selected = True + dev['Name'] = '* {}'.format(dev['Base Name']) + else: + dev['Name'] = ' {}'.format(dev['Base Name']) selection = menu_select( title='Please select part(s) to image', @@ -517,7 +525,7 @@ def menu_select_children(source): if dev_options[0]['Selected']: for dev in dev_options[1:]: dev['Selected'] = False - elif selection == 'P': + elif selection == 'P' and one_or_more_devs_selected: break elif selection == 'Q': abort_ddrescue_tui() @@ -747,22 +755,11 @@ def run_ddrescue(source, dest, settings): current_pass = source['Current Pass'] return_code = None - # Set pass options - if current_pass == 'Pass 1': - settings.extend(['--no-trim', '--no-scrape']) - elif current_pass == 'Pass 2': - # Allow trimming - settings.append('--no-scrape') - elif current_pass == 'Pass 3': - # Allow trimming and scraping - pass - elif current_pass == 'Done': + if current_pass == 'Done': clear_screen() print_warning('Recovery already completed?') pause('Press Enter to return to main menu...') return - else: - raise GenericError("This shouldn't happen?") # Set device(s) to clone/image source[current_pass]['Status'] = 'Working' @@ -803,6 +800,14 @@ def run_ddrescue(source, dest, settings): cmd = [ 'ddrescue', *settings, s_dev['Dev Path'], s_dev['Dest Paths']['Image'], s_dev['Dest Paths']['Map']] + if current_pass == 'Pass 1': + cmd.extend(['--no-trim', '--no-scrape']) + elif current_pass == 'Pass 2': + # Allow trimming + cmd.append('--no-scrape') + elif current_pass == 'Pass 3': + # Allow trimming and scraping + pass # Start ddrescue try: @@ -813,7 +818,9 @@ def run_ddrescue(source, dest, settings): # ddrescue_proc = popen_program(cmd) while True: try: - ddrescue_proc.wait(timeout=30) + ddrescue_proc.wait(timeout=10) + sleep(2) + update_progress(source) break except subprocess.TimeoutExpired: update_progress(source) @@ -832,8 +839,7 @@ def run_ddrescue(source, dest, settings): print_error('Error(s) encountered, see message above.') break - # Cleanup - update_progress(source, end_run=True) + # Done if str(return_code) != '0': # Pause on errors pause('Press Enter to return to main menu... ') @@ -1066,7 +1072,7 @@ def tmux_splitw(*args): def update_progress(source, end_run=False): - """Update progress file.""" + """Update progress for source dev(s) and update status pane file.""" current_pass = source['Current Pass'] pass_complete_for_all_devs = True total_recovery = True @@ -1085,16 +1091,6 @@ def update_progress(source, end_run=False): else: next_pass = 'Done' - if 'Progress Out' not in source: - source['Progress Out'] = '{}/progress.out'.format( - global_vars['LogDir']) - output = [] - if source['Type'] == 'Clone': - output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) - else: - output.append(' {BLUE}Imaging Status{CLEAR}'.format(**COLORS)) - output.append('─────────────────────') - # Update children progress for child in source['Children']: if os.path.exists(child['Dest Paths']['Map']): @@ -1129,17 +1125,18 @@ def update_progress(source, end_run=False): elif os.path.exists(source['Dest Paths']['Map']): # Cloning/Imaging whole device map_data = read_map_file(source['Dest Paths']['Map']) - source[current_pass]['Done'] = map_data['pass completed'] - source[current_pass]['Status'] = map_data['rescued'] + if current_pass != 'Done': + source[current_pass]['Done'] = map_data['pass completed'] + source[current_pass]['Status'] = map_data['rescued'] + try: + source[current_pass]['Min Status'] = min( + source[current_pass]['Min Status'], + source[current_pass]['Status']) + except TypeError: + # Force 0% to disable auto-continue + source[current_pass]['Min Status'] = 0 + pass_complete_for_all_devs &= source[current_pass]['Done'] source['Recovered Size'] = map_data['rescued']/100 * source['Size'] - try: - source[current_pass]['Min Status'] = min( - source[current_pass]['Min Status'], - source[current_pass]['Status']) - except TypeError: - # Force 0% to disable auto-continue - source[current_pass]['Min Status'] = 0 - pass_complete_for_all_devs &= source[current_pass]['Done'] total_recovery &= map_data['full recovery'] else: # Cloning/Imaging whole device and map missing @@ -1161,7 +1158,30 @@ def update_progress(source, end_run=False): elif pass_complete_for_all_devs: # Ready for next pass? source['Current Pass'] = next_pass - source[current_pass]['Done'] = True + if current_pass != 'Done': + source[current_pass]['Done'] = True + + # Start building output lines + if 'Progress Out' not in source: + source['Progress Out'] = '{}/progress.out'.format( + global_vars['LogDir']) + output = [] + if source['Type'] == 'Clone': + output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) + else: + output.append(' {BLUE}Imaging Status{CLEAR}'.format(**COLORS)) + output.append('─────────────────────') + + # Overall progress + recovered_p = (source['Recovered Size'] / source['Total Size']) * 100 + recovered_s = human_readable_size(source['Recovered Size']) + output.append('{BLUE}Overall Progress{CLEAR}'.format(**COLORS)) + output.append('Recovered:{s_color}{recovered_p:>9.2f} %{CLEAR}'.format( + s_color=get_status_color(recovered_p), + recovered_p=recovered_p, + **COLORS)) + output.append('{:>21}'.format(recovered_s)) + output.append('─────────────────────') # Main device if source['Type'] == 'Clone': @@ -1207,6 +1227,9 @@ def update_progress(source, end_run=False): s_color=get_status_color(child[p_num]['Status']), s_display=s_display, **COLORS)) + p = (child.get('Recovered Size', 0) / child['Size']) * 100 + output.append('Recovered:{s_color}{p:>9.2f} %{CLEAR}'.format( + s_color=get_status_color(p), p=p, **COLORS)) output.append(' ') else: # Whole device From f5994d851b58fbfb2d14a9503b3f34e81092106a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 22 Jul 2018 21:56:52 -0600 Subject: [PATCH 054/293] Allow more characters in get_simple_string() --- .bin/Scripts/functions/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index 75fe99d1..dc427157 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -217,7 +217,7 @@ def get_simple_string(prompt='Enter string'): simple_string = None while simple_string is None: _input = input('{}: '.format(prompt)) - if re.match(r'^(\w|-|_| )+$', _input, re.ASCII): + if re.match(r"^(\w|-| |\.|')+$", _input, re.ASCII): simple_string = _input.strip() return simple_string From 2430ba5e00900a5577a06a46266ddf55df0f9c97 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 23 Jul 2018 00:43:22 -0600 Subject: [PATCH 055/293] Resume session via map file(s) * Read map file(s) and set progress, status, and current pass --- .bin/Scripts/functions/ddrescue.py | 110 ++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 10 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 27cac0ba..aa0655d5 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -21,11 +21,11 @@ DDRESCUE_SETTINGS = { '--data-preview': {'Enabled': True, 'Hidden': True}, '--idirect': {'Enabled': True}, '--odirect': {'Enabled': True}, - '--max-read-rate': {'Enabled': False, 'Value': '4MiB'}, + '--max-read-rate': {'Enabled': False, 'Value': '32MiB'}, '--min-read-rate': {'Enabled': True, 'Value': '64KiB'}, '--reopen-on-error': {'Enabled': True}, '--retry-passes=': {'Enabled': True, 'Value': '0'}, - '--test-mode=': {'Enabled': False, 'Value': 'some.map'}, + '--test-mode=': {'Enabled': False, 'Value': 'test.map'}, '--timeout=': {'Enabled': True, 'Value': '5m'}, '-vvvv': {'Enabled': True, 'Hidden': True}, } @@ -256,6 +256,7 @@ def get_status_color(s, t_success=99, t_warn=90): def mark_all_passes_pending(source): """Mark all devs and passes as pending in preparation for retry.""" source['Current Pass'] = 'Pass 1' + source['Started Recovery'] = False for p_num in ['Pass 1', 'Pass 2', 'Pass 3']: source[p_num]['Status'] = 'Pending' source[p_num]['Done'] = False @@ -273,8 +274,9 @@ def menu_clone(source_path, dest_path): source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} source['Pass 3'] = {'Status': 'Pending', 'Done': False} - source['Recovered Size'] = 0, - source['Total Size'] = 0, + source['Recovered Size'] = 0 + source['Started Recovery'] = False + source['Total Size'] = 0 source['Type'] = 'Clone' dest = select_device( 'destination', dest_path, @@ -283,9 +285,12 @@ def menu_clone(source_path, dest_path): # Show selection details show_selection_details(source, dest) + + # Set status details set_dest_image_paths(source, dest) - check_dest_paths(source) get_recovery_scope_size(source) + check_dest_paths(source) + resume_from_map(source) # Confirm if not ask('Proceed with clone?'): @@ -340,8 +345,9 @@ def menu_image(source_path, dest_path): source['Pass 1'] = {'Status': 'Pending', 'Done': False} source['Pass 2'] = {'Status': 'Pending', 'Done': False} source['Pass 3'] = {'Status': 'Pending', 'Done': False} - source['Recovered Size'] = 0, - source['Total Size'] = 0, + source['Recovered Size'] = 0 + source['Started Recovery'] = False + source['Total Size'] = 0 source['Type'] = 'Image' dest = select_dest_path(dest_path, skip_device=source['Details']) dest_safety_check(source, dest) @@ -349,8 +355,9 @@ def menu_image(source_path, dest_path): # Select child device(s) source['Children'] = menu_select_children(source) set_dest_image_paths(source, dest) - check_dest_paths(source) get_recovery_scope_size(source) + check_dest_paths(source) + resume_from_map(source) # Show selection details show_selection_details(source, dest) @@ -750,6 +757,84 @@ def read_map_file(map_path): return map_data +def resume_from_map(source): + """Read map file(s) and set current progress to resume previous session.""" + map_data_read = False + non_tried = 0 + non_trimmed = 0 + non_scraped = 0 + + # Read map data + if source['Type'] != 'Clone' and source['Children']: + # Imaging child device(s) + for child in source['Children']: + if os.path.exists(child['Dest Paths']['Map']): + map_data = read_map_file(child['Dest Paths']['Map']) + map_data_read = True + non_tried += map_data['non-tried'] + non_trimmed += map_data['non-trimmed'] + non_scraped += map_data['non-scraped'] + child['Recovered Size'] = map_data['rescued']/100*child['Size'] + + # Get (dev) current pass + dev_current_pass = 1 + if map_data['non-tried'] == 0: + if map_data['non-trimmed'] > 0: + dev_current_pass = 2 + elif map_data['non-scraped'] > 0: + dev_current_pass = 3 + elif map_data['rescued'] == 100: + dev_current_pass = 4 + + # Mark passes as skipped + for x in range(1, dev_current_pass): + p_num = 'Pass {}'.format(x) + child[p_num]['Done'] = True + child[p_num]['Status'] = 'Skipped' + + elif map_data_read: + # No map but we've already read at least one map, force pass 1 + non_tried = 1 + elif os.path.exists(source['Dest Paths']['Map']): + # Cloning or Imaging whole device + map_data = read_map_file(source['Dest Paths']['Map']) + map_data_read = True + non_tried += map_data['non-tried'] + non_trimmed += map_data['non-trimmed'] + non_scraped += map_data['non-scraped'] + + # Bail + if not map_data_read: + # No map data found, assuming fresh start + return + + # Set current pass + if non_tried > 0: + current_pass = 'Pass 1' + elif non_trimmed > 0: + current_pass = 'Pass 2' + source['Pass 1']['Done'] = True + source['Pass 1']['Status'] = 'Skipped' + elif non_scraped > 0: + current_pass = 'Pass 3' + source['Pass 1']['Done'] = True + source['Pass 1']['Status'] = 'Skipped' + source['Pass 2']['Done'] = True + source['Pass 2']['Status'] = 'Skipped' + else: + source['Current Pass'] = 'Done' + update_progress(source, end_run=True) + return + source['Current Pass'] = current_pass + + # Update current pass + if not source['Children']: + if os.path.exists(source['Dest Paths']['Map']): + map_data = read_map_file(source['Dest Paths']['Map']) + source[current_pass]['Done'] = map_data['pass completed'] + source['Recovered Size'] = map_data['rescued']/100*source['Size'] + + def run_ddrescue(source, dest, settings): """Run ddrescue pass.""" current_pass = source['Current Pass'] @@ -763,6 +848,7 @@ def run_ddrescue(source, dest, settings): # Set device(s) to clone/image source[current_pass]['Status'] = 'Working' + source['Started Recovery'] = True source_devs = [source] if source['Children']: # Use only selected child devices @@ -1093,13 +1179,16 @@ def update_progress(source, end_run=False): # Update children progress for child in source['Children']: + if current_pass == 'Done': + continue if os.path.exists(child['Dest Paths']['Map']): map_data = read_map_file(child['Dest Paths']['Map']) if child['Dev Path'] == source.get('Current Device', ''): # Current child device r_size = map_data['rescued']/100 * child['Size'] child[current_pass]['Done'] = map_data['pass completed'] - child[current_pass]['Status'] = map_data['rescued'] + if source['Started Recovery']: + child[current_pass]['Status'] = map_data['rescued'] child['Recovered Size'] = r_size # All child devices @@ -1127,7 +1216,8 @@ def update_progress(source, end_run=False): map_data = read_map_file(source['Dest Paths']['Map']) if current_pass != 'Done': source[current_pass]['Done'] = map_data['pass completed'] - source[current_pass]['Status'] = map_data['rescued'] + if source['Started Recovery']: + source[current_pass]['Status'] = map_data['rescued'] try: source[current_pass]['Min Status'] = min( source[current_pass]['Min Status'], From f5ff65bfe0c68a1cbbee502fc2253e984df4d2bb Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 23 Jul 2018 23:25:12 -0600 Subject: [PATCH 056/293] Started rewriting ddrescue.py Added two classes: * BlockPair() * Track source/dest pair specific data * update_progress() method for its own data * RecoveryState() * Track BlockPair objects and overall state * update_progress() method for overall data Reasons: * Code readability * Better status updates, code currently split between: * get_recovery_scope_size() * resume_from_map() * update_progress() * Functions that should probably be merged into other functions: * get_recovery_scope_size() * set_dest_image_paths() * check_dest_paths() * Logic that needs to be cleaned up: * Calculating overall recovery size * Pass "Done"ness and status strings need separated * Pass "Done"ness at the device and overall levels * Updating output for side pane status display --- .bin/Scripts/functions/ddrescue.py | 126 ++++++++++++++++++++++++----- 1 file changed, 107 insertions(+), 19 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index aa0655d5..341d1266 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -13,7 +13,6 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES -RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs'] AUTO_NEXT_PASS_1_THRESHOLD = 90 AUTO_NEXT_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { @@ -29,16 +28,98 @@ DDRESCUE_SETTINGS = { '--timeout=': {'Enabled': True, 'Value': '5m'}, '-vvvv': {'Enabled': True, 'Hidden': True}, } -REGEX_MAP_DATA = re.compile(r'^\s*(?P\S+):.*\(\s*(?P\d+\.?\d*)%.*') -REGEX_MAP_STATUS = re.compile(r'.*current status:\s+(?P.*)') -STATUS_COLOR_CLEAR = ('Pending',) -STATUS_COLOR_YELLOW = ('Skipped', 'Unknown', 'Working') +RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs'] +SIDE_PANE_WIDTH = 21 USAGE = """ {script_name} clone [source [destination]] {script_name} image [source [destination]] (e.g. {script_name} clone /dev/sda /dev/sdb) """ +# Clases +class BlockPair(): + """Object to track data and methods together for source and dest.""" + def __init__(self, source_path, dest_path, map_path, total_size): + self.source_path = source_path + self.dest_path = dest_path + self.map_path = map_path + self.pass_done = [False, False, False] + self.rescued = 0 + self.total_size = total_size + self.status = ['Pending', 'Pending', 'Pending'] + + def finish_pass(pass_num): + """Mark pass as done and check if 100% recovered.""" + if map_data['full recovery']: + self.pass_done = [True, True, True] + self.recovered = self.total_size + self.status[pass_num] = get_formatted_status(100) + else: + self.pass_done[pass_num] = True + + def get_pass_done(pass_num): + """Return pass number's done state.""" + return self.pass_done[pass_num] + + def get_rescued(): + """Return rescued size.""" + return self.rescued + + def update_progress(pass_num): + """Update progress using map file.""" + if os.path.exists(self.map_path): + map_data = read_map_file(self.map_path) + self.rescued = map_data['rescued'] * self.total_size + self.status[pass_num] = get_formatted_status( + label='Pass {}'.format(pass_num), + data=(self.rescued/self.total_size)*100) + + +class RecoveryState(): + """Object to track BlockPair objects and overall state.""" + def __init__(self, mode): + self.block_pairs = [] + self.current_pass = 0 + self.finished = False + self.mode = mode.lower() + self.rescued = 0 + self.started = False + self.total_size = 0 + if mode not in ('clone', 'image'): + raise GenericError('Unsupported mode') + + def add_block_pair(obj): + """Append BlockPair object to internal list.""" + self.block_pairs.append(obj) + + def set_pass_num(): + """Set current pass based on all block-pair's progress.""" + self.current_pass = 0 + for pass_num in (2, 1, 0): + # Iterate backwards through passes + pass_done = True + for bp in self.block_pairs: + pass_done &= bp.get_pass_done(pass_num) + if pass_done: + # All block-pairs reported being done + # Set to next pass, unless we're on the last pass (2) + self.current_pass = min(2, pass_num + 1) + if pass_num == 2: + # Also mark overall recovery as finished if on last pass + self.finished = True + break + + def update_progress(): + """Update overall progress using block_pairs.""" + self.rescued = 0 + for bp in self.block_pairs: + self.rescued += bp.get_rescued() + self.status_percent = get_formatted_status( + label='Recovered:', data=(self.rescued/self.total_size)*100) + self.status_amount = get_formatted_status( + label='', data=human_readable_size(self.rescued)) + + # Functions def abort_ddrescue_tui(): run_program(['losetup', '-D']) @@ -58,7 +139,7 @@ def build_outer_panes(source, dest): **COLORS)) tmux_splitw( '-t', source_pane, - '-dhl', '21', + '-dhl', '{}'.format(SIDE_PANE_WIDTH), 'echo-and-hold "{BLUE}Started{CLEAR}\n{text}"'.format( text=time.strftime("%Y-%m-%d %H:%M %Z"), **COLORS)) @@ -72,7 +153,7 @@ def build_outer_panes(source, dest): # Side pane update_progress(source) tmux_splitw( - '-dhl', '21', + '-dhl', '{}'.format(SIDE_PANE_WIDTH), 'watch', '--color', '--no-title', '--interval', '1', 'cat', source['Progress Out']) @@ -217,8 +298,13 @@ def get_device_size_in_bytes(s): return convert_to_bytes(s) +def get_formatted_status(label, data): + """TODO""" + # TODO + pass def get_recovery_scope_size(source): """Calculate total size of selected dev(s).""" + # TODO function deprecated source['Total Size'] = 0 if source['Children']: for child in source['Children']: @@ -240,9 +326,9 @@ def get_status_color(s, t_success=99, t_warn=90): # Status is either in lists below or will default to red pass - if s in STATUS_COLOR_CLEAR: + if s in ('Pending',): color = COLORS['CLEAR'] - elif s in STATUS_COLOR_YELLOW: + elif s in ('Skipped', 'Unknown', 'Working'): color = COLORS['YELLOW'] elif p_recovered >= t_success: color = COLORS['GREEN'] @@ -727,22 +813,19 @@ def menu_settings(source): def read_map_file(map_path): """Read map file with ddrescuelog and return data as dict.""" map_data = {} - try: - result = run_program(['ddrescuelog', '-t', map_path]) - except subprocess.CalledProcessError: - print_error('Failed to read map data') - abort_ddrescue_tui() + result = run_program(['ddrescuelog', '-t', map_path]) # Parse output for line in result.stdout.decode().splitlines(): - m = REGEX_MAP_DATA.match(line.strip()) + m = re.match( + r'^\s*(?P\S+):.*\(\s*(?P\d+\.?\d*)%.*', line.strip()) if m: try: map_data[m.group('key')] = float(m.group('value')) except ValueError: print_error('Failed to read map data') abort_ddrescue_tui() - m = REGEX_MAP_STATUS.match(line.strip()) + m = re.match(r'.*current status:\s+(?P.*)', line.strip()) if m: map_data['pass completed'] = bool(m.group('status') == 'finished') @@ -759,6 +842,7 @@ def read_map_file(map_path): def resume_from_map(source): """Read map file(s) and set current progress to resume previous session.""" + # TODO function deprecated map_data_read = False non_tried = 0 non_trimmed = 0 @@ -961,7 +1045,8 @@ def select_dest_path(provided_path=None, skip_device={}): # Set display name result = run_program(['tput', 'cols']) - width = int((int(result.stdout.decode().strip()) - 21) / 2) - 2 + width = int( + (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 if len(dest['Path']) > width: dest['Display Name'] = '...{}'.format(dest['Path'][-(width-3):]) else: @@ -1019,7 +1104,8 @@ def select_device(description='device', provided_path=None, dev['Display Name'] = '{name} {size} {model}'.format( **dev['Details']) result = run_program(['tput', 'cols']) - width = int((int(result.stdout.decode().strip()) - 21) / 2) - 2 + width = int( + (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 if len(dev['Display Name']) > width: if dev['Is Image']: dev['Display Name'] = '...{}'.format( @@ -1035,6 +1121,7 @@ def select_device(description='device', provided_path=None, def set_dest_image_paths(source, dest): """Set destination image path for source and any child devices.""" + # TODO function deprecated if source['Type'] == 'Clone': base = '{pwd}/Clone_{size}_{model}'.format( pwd=os.path.realpath(global_vars['Env']['PWD']), @@ -1270,7 +1357,8 @@ def update_progress(source, end_run=False): s_color=get_status_color(recovered_p), recovered_p=recovered_p, **COLORS)) - output.append('{:>21}'.format(recovered_s)) + output.append('{recovered_s:>{width}}'.format( + recovered_s=recovered_s, width=SIDE_PANE_WIDTH)) output.append('─────────────────────') # Main device From fa3b3b11b05ef2ade99372ba409652d382361a94 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 24 Jul 2018 00:39:22 -0600 Subject: [PATCH 057/293] Added methods: load_map and self_check(s) * load_map() is called on BlockPair() instantiation * This partially replaces resume_from_map() * Also fixed improper method declarations lacking the self argument --- .bin/Scripts/functions/ddrescue.py | 71 ++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 341d1266..9e1b8ee7 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -39,33 +39,75 @@ USAGE = """ {script_name} clone [source [destination]] # Clases class BlockPair(): """Object to track data and methods together for source and dest.""" - def __init__(self, source_path, dest_path, map_path, total_size): + def __init__(self, source_path, dest_path, map_path, mode, total_size): self.source_path = source_path self.dest_path = dest_path self.map_path = map_path + self.mode = mode self.pass_done = [False, False, False] self.rescued = 0 self.total_size = total_size self.status = ['Pending', 'Pending', 'Pending'] + if os.path.exists(self.map_path): + self.load_map_data() - def finish_pass(pass_num): + def finish_pass(self, pass_num): """Mark pass as done and check if 100% recovered.""" if map_data['full recovery']: self.pass_done = [True, True, True] - self.recovered = self.total_size + self.rescued = self.total_size self.status[pass_num] = get_formatted_status(100) + # Mark future passes as Skipped + pass_num += 1 + while pass_num <= 2 + self.status[pass_num] = 'Skipped' + pass_num += 1 else: self.pass_done[pass_num] = True - def get_pass_done(pass_num): + def get_pass_done(self, pass_num): """Return pass number's done state.""" return self.pass_done[pass_num] - def get_rescued(): + def get_rescued(self): """Return rescued size.""" return self.rescued - def update_progress(pass_num): + def load_map_data(self): + """Load data from map file and set progress.""" + map_data = read_map_file(self.map_path) + self.rescued = map_data['rescued'] * self.total_size + if map_data['full recovery']: + self.pass_done = [True, True, True] + self.rescued = self.total_size + self.status = ['Skipped', 'Skipped', 'Skipped'] + elif map_data['non-tried'] > 0: + # Initial pass incomplete + pass + elif map_data['non-trimmed'] > 0: + self.pass_done[0] = True + self.status[0] = 'Skipped' + elif map_data['non-scraped'] > 0: + self.pass_done = [True, True, False] + self.status = ['Skipped', 'Skipped', 'Pending'] + + def self_check(self): + """Self check to abort on bad dest/map combinations.""" + dest_exists = os.path.exists(self.dest_path) + map_exists = os.path.exists(self.map_path) + if self.mode == 'image': + if dest_exists and not map_exists: + raise GenericError( + 'Detected image "{}" but not the matching map'.format( + self.dest_path)) + elif not dest_exists and map_exists: + raise GenericError( + 'Detected map "{}" but not the matching image'.format( + self.map_path)) + elif not dest_exists: + raise Genericerror('Destination device missing') + + def update_progress(self, pass_num): """Update progress using map file.""" if os.path.exists(self.map_path): map_data = read_map_file(self.map_path) @@ -83,16 +125,27 @@ class RecoveryState(): self.finished = False self.mode = mode.lower() self.rescued = 0 + self.resumed = False self.started = False self.total_size = 0 if mode not in ('clone', 'image'): raise GenericError('Unsupported mode') - def add_block_pair(obj): + def add_block_pair(self, obj): """Append BlockPair object to internal list.""" + obj.set_mode(self.mode) self.block_pairs.append(obj) - def set_pass_num(): + def self_checks(self): + """Run self-checks for each BlockPair object.""" + for bp in self.block_pairs: + try: + bp.self_check() + except GenericError as err: + print_error(err) + abort_ddrescue_tui() + + def set_pass_num(self): """Set current pass based on all block-pair's progress.""" self.current_pass = 0 for pass_num in (2, 1, 0): @@ -109,7 +162,7 @@ class RecoveryState(): self.finished = True break - def update_progress(): + def update_progress(self): """Update overall progress using block_pairs.""" self.rescued = 0 for bp in self.block_pairs: From 98b05c93bf16c90d2ceb2c5e0cc509b0c763c6e4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 24 Jul 2018 00:54:58 -0600 Subject: [PATCH 058/293] Moved menu_ddrescue() to ddrescue-tui-menu file * Let's parse the sys.argv earlier in the process --- .bin/Scripts/ddrescue-tui-menu | 24 +++++++++++++++++++-- .bin/Scripts/functions/ddrescue.py | 34 +++++------------------------- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/.bin/Scripts/ddrescue-tui-menu b/.bin/Scripts/ddrescue-tui-menu index a8205ded..798cd43e 100755 --- a/.bin/Scripts/ddrescue-tui-menu +++ b/.bin/Scripts/ddrescue-tui-menu @@ -16,9 +16,29 @@ if __name__ == '__main__': try: # Prep clear_screen() + args = list(sys.argv) + run_mode = '' + source_path = None + dest_path = None - # Show menu - menu_ddrescue(*sys.argv) + # Parse args + try: + script_name = os.path.basename(args.pop(0)) + run_mode = str(args.pop(0)).lower() + source_path = args.pop(0) + dest_path = args.pop(0) + except IndexError: + # We'll set the missing paths later + pass + + # Show usage? + if run_mode in ('clone', 'image'): + menu_ddrescue(source_path, dest_path, run_mode) + else: + if not re.search(r'(^$|help|-h|\?)', run_mode, re.IGNORECASE): + print_error('Invalid mode.') + show_usage(script_name) + exit_script() # Done print_standard('\nDone.') diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 9e1b8ee7..d76ee2cc 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -59,7 +59,7 @@ class BlockPair(): self.status[pass_num] = get_formatted_status(100) # Mark future passes as Skipped pass_num += 1 - while pass_num <= 2 + while pass_num <= 2: self.status[pass_num] = 'Skipped' pass_num += 1 else: @@ -446,34 +446,10 @@ def menu_clone(source_path, dest_path): exit_script() -def menu_ddrescue(*args): - """Main ddrescue loop/menu.""" - args = list(args) - script_name = os.path.basename(args.pop(0)) - run_mode = '' - source_path = None - dest_path = None - - # Parse args - try: - run_mode = args.pop(0) - source_path = args.pop(0) - dest_path = args.pop(0) - except IndexError: - # We'll set the missing paths later - pass - - # Show proper menu or exit - if run_mode == 'clone': - menu_clone(source_path, dest_path) - elif run_mode == 'image': - menu_image(source_path, dest_path) - else: - if not re.search(r'(^$|help|-h|\?)', run_mode, re.IGNORECASE): - print_error('Invalid mode.') - show_usage(script_name) - exit_script() - +def menu_ddrescue(source_path, dest_path, run_mode): + """Main ddrescue menu.""" + # TODO Merge menu_clone and menu_image here + pass def menu_image(source_path, dest_path): """ddrescue imaging menu.""" From 180eb0f9ef36b6953b4c39168db8736018193402 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 25 Jul 2018 21:44:40 -0600 Subject: [PATCH 059/293] Added base, dev, dir, and image objects --- .bin/Scripts/functions/ddrescue.py | 76 ++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index d76ee2cc..5698859a 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -173,6 +173,68 @@ class RecoveryState(): label='', data=human_readable_size(self.rescued)) +class BaseObj(): + """Base object used by DevObj, DirObj, and ImageObj.""" + def __init__(self, path): + self.type = 'Base' + self.path = os.path.realpath(path) + self.set_details() + + def is_dev(): + return self.type == 'Dev' + + def is_dir(): + return self.type == 'Dir' + + def is_image(): + return self.type == 'Image' + + def self_check(): + pass + + def set_details(self): + pass + + +class DevObj(BaseObj): + """Block device object.""" + def self_check(self): + """Verify that self.path points to a block device.""" + if not pathlib.Path(self.path).is_block_device(): + raise GenericError('TODO') + + def set_details(self): + """Set details via lsblk.""" + self.type = 'Dev' + # TODO Run lsblk + + +class DirObj(BaseObj): + def self_check(self): + """Verify that self.path points to a directory.""" + if not pathlib.Path(self.path).is_dir(): + raise GenericError('TODO') + + def set_details(self): + """Set details via findmnt.""" + self.type = 'Dir' + # TODO Run findmnt + + +class ImageObj(BaseObj): + def self_check(self): + """Verify that self.path points to a file.""" + if not pathlib.Path(self.path).is_file(): + raise GenericError('TODO') + + def set_details(self): + """Setup loopback device and set details via lsblk.""" + self.type = 'Image' + # TODO Run losetup + # TODO Run lsblk + # TODO Remove loopback device + + # Functions def abort_ddrescue_tui(): run_program(['losetup', '-D']) @@ -253,6 +315,20 @@ def check_dest_paths(source): abort_ddrescue_tui() +def create_path_obj(path): + """Create Dev, Dir, or Image obj based on path given.""" + obj = None + if pathlib.Path(self.path).is_block_device(): + obj = Dev(path) + elif pathlib.Path(self.path).is_dir(): + obj = DirObj(path) + elif pathlib.Path(self.path).is_file(): + obj = ImageObj(path) + else: + raise GenericAbort('TODO') + return obj + + def dest_safety_check(source, dest): """Verify the destination is appropriate for the source.""" source_size = source['Details']['size'] From 66c756333592efc20f175af7c86145b22780f526 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 25 Jul 2018 23:31:04 -0600 Subject: [PATCH 060/293] Set details for Dev/Dir/Image objects * Colored report data is generated during obj instantiation * Code has been moved into its own function * Entire colored string is now stored for each Obj * (Should make show_selection, etc more mode/Obj agnostic) * loopback_dev vs image_path is now better separated * losetup is called in ImageObj.set_details() * loopback -D is still called during program cleanup/wrapup * get_device_size_in_bytes() has been renamed get_size_in_bytes() --- .bin/Scripts/functions/ddrescue.py | 111 +++++++++++++++++++++-------- 1 file changed, 83 insertions(+), 28 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 5698859a..1484b00c 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -206,7 +206,10 @@ class DevObj(BaseObj): def set_details(self): """Set details via lsblk.""" self.type = 'Dev' - # TODO Run lsblk + self.details = get_device_details(self.path) + self.name = self.details.get('name', 'UNKNOWN') + self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) + self.report = get_device_report(self.path) class DirObj(BaseObj): @@ -218,7 +221,10 @@ class DirObj(BaseObj): def set_details(self): """Set details via findmnt.""" self.type = 'Dir' - # TODO Run findmnt + self.details = get_dir_details(self.path) + self.name = self.path + self.size = get_size_in_bytes(self.details.get('avail', 'UNKNOWN')) + self.report = get_dir_report(self.path) class ImageObj(BaseObj): @@ -230,9 +236,12 @@ class ImageObj(BaseObj): def set_details(self): """Setup loopback device and set details via lsblk.""" self.type = 'Image' - # TODO Run losetup - # TODO Run lsblk - # TODO Remove loopback device + self.loop_dev = setup_loopback_device(self.path) + self.details = get_image_details(self.loopdev) + self.name = self.path[self.path.rfind('/')+1:] + self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) + self.report = get_image_report(self.loop_dev) + self.report = self.report.replace(self.loop_dev, '{Img}') # Functions @@ -333,28 +342,14 @@ def dest_safety_check(source, dest): """Verify the destination is appropriate for the source.""" source_size = source['Details']['size'] if dest['Is Dir']: - cmd = [ - 'findmnt', '-J', - '-o', 'SOURCE,TARGET,FSTYPE,OPTIONS,SIZE,AVAIL,USED', - '-T', dest['Path']] - result = run_program(cmd) - try: - json_data = json.loads(result.stdout.decode()) - except Exception: - # Welp, let's abort - print_error('Failed to verify destination usability.') - abort_ddrescue_tui() - else: - dest_size = json_data['filesystems'][0]['avail'] - dest['Free Space'] = dest_size - dest['Filesystem'] = json_data['filesystems'][0]['fstype'] - dest['Mount options'] = json_data['filesystems'][0]['options'] + # MOVED + pass else: dest_size = dest['Details']['size'] # Convert to bytes and compare size - source_size = get_device_size_in_bytes(source_size) - dest_size = get_device_size_in_bytes(dest_size) + source_size = get_size_in_bytes(source_size) + dest_size = get_size_in_bytes(dest_size) if source['Type'] == 'Image' and dest_size < (source_size * 1.2): # Imaging: ensure 120% of source size is available print_error( @@ -413,15 +408,75 @@ def get_device_details(dev_path): dev_path) result = run_program(cmd) except CalledProcessError: - print_error('Failed to get device details for {}'.format(dev_path)) - abort_ddrescue_tui() + # Return empty dict and let calling section deal with the issue + return {} json_data = json.loads(result.stdout.decode()) # Just return the first device (there should only be one) return json_data['blockdevices'][0] -def get_device_size_in_bytes(s): +def get_device_report(dev_path): + """Build colored device report using lsblk, returns str.""" + result = run_program([ + 'lsblk', '--nodeps', + '--output', 'NAME,TRAN,TYPE,SIZE,VENDOR,MODEL,SERIAL', + dev_path]) + lines = result.stdout.decode().strip().splitlines() + lines.append('') + + # FS details (if any) + result = run_program([ + 'lsblk', + '--output', 'NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT', + dev_path]) + lines.extend(result.stdout.decode().strip().splitlines()) + + # Color label lines + output = [] + for line in lines: + if line[0:4] == 'NAME': + output.append('{BLUE}{line}{CLEAR}'.format(line=line, **COLORS)) + else: + output.append(line) + + # Done + return '\n'.join(output) + + +def get_dir_details(dir_path): + """Get dir details via findmnt, returns JSON dict.""" + try: + result = run_program([ + 'findmnt', '-J', + '-o', 'SOURCE,TARGET,FSTYPE,OPTIONS,SIZE,AVAIL,USED', + '-T', dir_path]) + json_data = json.loads(result.stdout.decode()) + except Exception: + raise GenericError( + 'Failed to get directory details for "{}".'.format(self.path)) + else: + return json_data['filesystems'][0] + + +def get_dir_report(dir_path): + """Build colored dir report using findmnt, returns str.""" + output = [] + result = run_program([ + 'findmnt', + '--output', 'SIZE,AVAIL,USED,FSTYPE,OPTIONS', + '--target', dir_path]) + for line in result.stdout.decode().strip().splitlines(): + if 'FSTYPE' in line: + output.append('{BLUE}{line}{CLEAR}'.format(line=line, **COLORS)) + else: + output.append(line) + + # Done + return '\n'.join(output) + + +def get_size_in_bytes(s): """Convert size string from lsblk string to bytes, returns int.""" s = re.sub(r'(\d+\.?\d*)\s*([KMGTB])B?', r'\1 \2B', s, re.IGNORECASE) return convert_to_bytes(s) @@ -437,11 +492,11 @@ def get_recovery_scope_size(source): source['Total Size'] = 0 if source['Children']: for child in source['Children']: - child['Size'] = get_device_size_in_bytes(child['Details']['size']) + child['Size'] = get_size_in_bytes(child['Details']['size']) source['Total Size'] += child['Size'] else: # Whole dev - source['Size'] = get_device_size_in_bytes(source['Details']['size']) + source['Size'] = get_size_in_bytes(source['Details']['size']) source['Total Size'] = source['Size'] From 6aeba34bdb3fde9e3d67e77af5b234532534d202 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 25 Jul 2018 23:57:50 -0600 Subject: [PATCH 061/293] Include path in dir report --- .bin/Scripts/functions/ddrescue.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 1484b00c..d2b1f84b 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -462,15 +462,23 @@ def get_dir_details(dir_path): def get_dir_report(dir_path): """Build colored dir report using findmnt, returns str.""" output = [] + width = len(dir_path)+1 result = run_program([ 'findmnt', '--output', 'SIZE,AVAIL,USED,FSTYPE,OPTIONS', '--target', dir_path]) for line in result.stdout.decode().strip().splitlines(): if 'FSTYPE' in line: - output.append('{BLUE}{line}{CLEAR}'.format(line=line, **COLORS)) + output.append('{BLUE}{path:<{width}}{line}{CLEAR}'.format( + path=dir_path, + width=width, + line=line, + **COLORS)) else: - output.append(line) + output.append('{path:<{width}}{line}'.format( + path=dir_path, + width=width, + line=line)) # Done return '\n'.join(output) From d1eefd05ab1c9d7b38c8c10f196bc37dd1e3fb55 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 17:31:39 -0600 Subject: [PATCH 062/293] Major update to refactor for object-centricity * Dest/map paths are now set in two steps: * The filename prefix is set when creating the DevObj() * The full paths are set when creating the BlockPair() * Merged dest safety checks into RecoveryState.add_block_pair() * Mostly check_dest_paths() and dest_safety_check() * Moved dir RWX checks to is_writable_dir() * Moved mount RW check to is_writable_filesystem() * Started merging menu_clone() and menu_image() into menu_ddrescue() --- .bin/Scripts/functions/ddrescue.py | 229 ++++++++++++++++++++++------- 1 file changed, 177 insertions(+), 52 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index d2b1f84b..6a264127 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -39,15 +39,29 @@ USAGE = """ {script_name} clone [source [destination]] # Clases class BlockPair(): """Object to track data and methods together for source and dest.""" - def __init__(self, source_path, dest_path, map_path, mode, total_size): - self.source_path = source_path - self.dest_path = dest_path - self.map_path = map_path + def __init__(self, source, dest, mode): + self.source_path = source.path self.mode = mode + self.name = source.name self.pass_done = [False, False, False] self.rescued = 0 - self.total_size = total_size self.status = ['Pending', 'Pending', 'Pending'] + self.total_size = source.size + # Set dest paths + if self.mode == 'clone': + # Cloning + self.dest_path = dest.path + self.map_path = '{pwd}/Clone_{prefix}.map'.format( + pwd=os.path.realpath(global_vars['Env']['PWD']), + prefix=source.prefix) + else: + # Imaging + self.dest_path = '{path}/{prefix}.dd'.format( + path=dest.path, + prefix=source.prefix) + self.map_path = '{path}/{prefix}.map'.format( + path=dest.path, + prefix=source.prefix) if os.path.exists(self.map_path): self.load_map_data() @@ -69,10 +83,6 @@ class BlockPair(): """Return pass number's done state.""" return self.pass_done[pass_num] - def get_rescued(self): - """Return rescued size.""" - return self.rescued - def load_map_data(self): """Load data from map file and set progress.""" map_data = read_map_file(self.map_path) @@ -105,7 +115,7 @@ class BlockPair(): 'Detected map "{}" but not the matching image'.format( self.map_path)) elif not dest_exists: - raise Genericerror('Destination device missing') + raise GenericError('Destination device missing') def update_progress(self, pass_num): """Update progress using map file.""" @@ -131,10 +141,48 @@ class RecoveryState(): if mode not in ('clone', 'image'): raise GenericError('Unsupported mode') - def add_block_pair(self, obj): - """Append BlockPair object to internal list.""" - obj.set_mode(self.mode) - self.block_pairs.append(obj) + def add_block_pair(self, source, dest): + """Run safety checks and append new BlockPair to internal list.""" + if self.mode == 'clone': + # Cloning safety checks + if source.is_dir(): + raise GenericAbort('Invalid source "{}"'.format( + source.path)) + elif not dest.is_dev(): + raise GenericAbort('Invalid destination "{}"'.format( + dest.path)) + elif source.size > dest.size: + raise GenericAbort( + 'Destination is too small, refusing to continue.') + else: + # Imaging safety checks + if not source.is_dev(): + raise GenericAbort('Invalid source "{}"'.format( + source.path)) + elif not dest.is_dir(): + raise GenericAbort('Invalid destination "{}"'.format( + dest.path)) + elif (source.size * 1.2) > dest.size: + raise GenericAbort( + 'Destination is too small, refusing to continue.') + elif dest.fstype.lower() not in RECOMMENDED_FSTYPES: + print_error( + 'Destination filesystem "{}" is not recommended.'.format( + dest.fstype.upper())) + print_info('Recommended types are: {}'.format( + ' / '.join(RECOMMENDED_FSTYPES).upper())) + print_standard(' ') + if not ask('Proceed anyways? (Strongly discouraged)'): + raise GenericAbort('Aborted.') + elif not is_writable_dir(dest): + raise GenericAbort( + 'Destination is not writable, refusing to continue.') + elif not is_writable_filesystem(dest): + raise GenericAbort( + 'Destination is mounted read-only, refusing to continue.') + + # Safety checks passed + self.block_pairs.append(BlockPair(source, dest)) def self_checks(self): """Run self-checks for each BlockPair object.""" @@ -143,7 +191,7 @@ class RecoveryState(): bp.self_check() except GenericError as err: print_error(err) - abort_ddrescue_tui() + raise GenericAbort('Aborted.') def set_pass_num(self): """Set current pass based on all block-pair's progress.""" @@ -165,8 +213,10 @@ class RecoveryState(): def update_progress(self): """Update overall progress using block_pairs.""" self.rescued = 0 + self.total_size = 0 for bp in self.block_pairs: - self.rescued += bp.get_rescued() + self.rescued += bp.rescued + self.total_size += bp.size self.status_percent = get_formatted_status( label='Recovered:', data=(self.rescued/self.total_size)*100) self.status_amount = get_formatted_status( @@ -176,24 +226,24 @@ class RecoveryState(): class BaseObj(): """Base object used by DevObj, DirObj, and ImageObj.""" def __init__(self, path): - self.type = 'Base' + self.type = 'base' self.path = os.path.realpath(path) self.set_details() - def is_dev(): - return self.type == 'Dev' + def is_dev(self): + return self.type == 'dev' - def is_dir(): - return self.type == 'Dir' + def is_dir(self): + return self.type == 'dir' - def is_image(): - return self.type == 'Image' + def is_image(self): + return self.type == 'image' - def self_check(): + def self_check(self): pass def set_details(self): - pass + self.details = {} class DevObj(BaseObj): @@ -205,11 +255,32 @@ class DevObj(BaseObj): def set_details(self): """Set details via lsblk.""" - self.type = 'Dev' + self.type = 'dev' self.details = get_device_details(self.path) self.name = self.details.get('name', 'UNKNOWN') + self.model = self.details.get('model', 'UNKNOWN') + self.model_size = self.details.get('size', 'UNKNOWN') self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) self.report = get_device_report(self.path) + self.parent = self.details.get('pkname', '') + self.label = self.details.get('label', '') + if not self.label: + # Force empty string in case it's set to None + self.label = '' + self.update_filename_prefix() + + def update_filename_prefix(self): + """Set filename prefix based on details.""" + self.prefix = '{m_size}_{model}'.format( + m_size=self.model_size, + model=self.model) + if self.parent: + # Add child device details + self.prefix += '_{c_num}_{c_size}{sep}{c_label}'.format( + c_num=self.name.replace(self.parent, ''), + c_size=self.details.get('size', 'UNKNOWN'), + sep='_' if self.label else '', + c_label=self.label) class DirObj(BaseObj): @@ -220,8 +291,9 @@ class DirObj(BaseObj): def set_details(self): """Set details via findmnt.""" - self.type = 'Dir' + self.type = 'dir' self.details = get_dir_details(self.path) + self.fstype = self.details.get('fstype', 'UNKNOWN') self.name = self.path self.size = get_size_in_bytes(self.details.get('avail', 'UNKNOWN')) self.report = get_dir_report(self.path) @@ -234,14 +306,16 @@ class ImageObj(BaseObj): raise GenericError('TODO') def set_details(self): - """Setup loopback device and set details via lsblk.""" - self.type = 'Image' + """Setup loopback device, set details via lsblk, then detach device.""" + self.type = 'image' self.loop_dev = setup_loopback_device(self.path) - self.details = get_image_details(self.loopdev) + self.details = get_device_details(self.loopdev) + self.details['model'] = 'ImageFile' self.name = self.path[self.path.rfind('/')+1:] self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) - self.report = get_image_report(self.loop_dev) + self.report = get_device_report(self.loop_dev) self.report = self.report.replace(self.loop_dev, '{Img}') + run_program(['losetup', '--detach', loop_path], check=False) # Functions @@ -284,9 +358,9 @@ def build_outer_panes(source, dest): def check_dest_paths(source): """Check for image and/or map file and alert user about details.""" - dd_image_exists = os.path.exists(source['Dest Paths']['Image']) + dd_image_exists = os.path.exists(source['Dest Paths']['image']) map_exists = os.path.exists(source['Dest Paths']['Map']) - if 'Clone' in source['Dest Paths']['Map']: + if 'clone' in source['Dest Paths']['Map']: if map_exists: # We're cloning and a matching map file was detected if not ask('Matching map file detected, resume recovery?'): @@ -299,11 +373,11 @@ def check_dest_paths(source): source_devs = source['Children'] for dev in source_devs: # We're imaging - dd_image_exists = os.path.exists(dev['Dest Paths']['Image']) + dd_image_exists = os.path.exists(dev['Dest Paths']['image']) map_exists = os.path.exists(dev['Dest Paths']['Map']) if dd_image_exists and not map_exists: # Refuce to resume without map file - i = dev['Dest Paths']['Image'] + i = dev['Dest Paths']['image'] i = i[i.rfind('/')+1:] print_error( 'Detected image "{}" but not the matching map'.format(i)) @@ -350,7 +424,7 @@ def dest_safety_check(source, dest): # Convert to bytes and compare size source_size = get_size_in_bytes(source_size) dest_size = get_size_in_bytes(dest_size) - if source['Type'] == 'Image' and dest_size < (source_size * 1.2): + if source['Type'] == 'image' and dest_size < (source_size * 1.2): # Imaging: ensure 120% of source size is available print_error( 'Not enough free space on destination, refusing to continue.') @@ -359,7 +433,7 @@ def dest_safety_check(source, dest): d_size=human_readable_size(dest_size), s_size=human_readable_size(source_size * 1.2))) abort_ddrescue_tui() - elif source['Type'] == 'Clone' and source_size > dest_size: + elif source['Type'] == 'clone' and source_size > dest_size: # Cloning: ensure dest >= size print_error('Destination is too small, refusing to continue.') print_standard( @@ -369,7 +443,7 @@ def dest_safety_check(source, dest): abort_ddrescue_tui() # Imaging specific checks - if source['Type'] == 'Image': + if source['Type'] == 'image': # Filesystem Type if dest['Filesystem'] not in RECOMMENDED_FSTYPES: print_error( @@ -531,6 +605,21 @@ def get_status_color(s, t_success=99, t_warn=90): return color +def is_writable_dir(dir_obj): + """Check if we have read-write-execute permissions, returns bool.""" + is_ok = True + path_st_mode = os.stat(dir_obj.path).st_mode + is_ok == is_ok and path_st_mode & stat.S_IRUSR + is_ok == is_ok and path_st_mode & stat.S_IWUSR + is_ok == is_ok and path_st_mode & stat.S_IXUSR + return is_ok + + +def is_writable_filesystem(dir_obj): + """Check if filesystem is mounted read-write, returns bool.""" + return 'rw' in dir_obj.details.get('options', '') + + def mark_all_passes_pending(source): """Mark all devs and passes as pending in preparation for retry.""" source['Current Pass'] = 'Pass 1' @@ -555,7 +644,7 @@ def menu_clone(source_path, dest_path): source['Recovered Size'] = 0 source['Started Recovery'] = False source['Total Size'] = 0 - source['Type'] = 'Clone' + source['Type'] = 'clone' dest = select_device( 'destination', dest_path, skip_device=source['Details'], allow_image_file=False) @@ -586,9 +675,45 @@ def menu_clone(source_path, dest_path): def menu_ddrescue(source_path, dest_path, run_mode): - """Main ddrescue menu.""" - # TODO Merge menu_clone and menu_image here - pass + """ddrescue menu.""" + source = None + dest = None + if source_path: + source = create_path_obj(source_path) + if dest_path: + dest = create_path_obj(dest_path) + + # Show selection menus (if necessary) + if not source: + source = select_device('source') + if not dest: + if run_mode == 'clone': + dest = select_device('destination', skip_device=source) + else: + dest = select_directory() + + # Build BlockPairs + state = RecoveryState(run_mode) + if run_mode == 'clone': + state.add_block_pair(source, dest) + else: + # TODO select dev or child dev(s) + + # Confirmations + # TODO Show selection details + # TODO resume? + # TODO Proceed? (maybe merge with resume? prompt?) + # TODO double-confirm for clones for safety + + # Main menu + build_outer_panes(source, dest) + # TODO Fix + #menu_main(source, dest) + pause('Fake Main Menu... ') + + # Done + run_program(['tmux', 'kill-window']) + exit_script() def menu_image(source_path, dest_path): """ddrescue imaging menu.""" @@ -602,7 +727,7 @@ def menu_image(source_path, dest_path): source['Recovered Size'] = 0 source['Started Recovery'] = False source['Total Size'] = 0 - source['Type'] = 'Image' + source['Type'] = 'image' dest = select_dest_path(dest_path, skip_device=source['Details']) dest_safety_check(source, dest) @@ -1017,7 +1142,7 @@ def resume_from_map(source): non_scraped = 0 # Read map data - if source['Type'] != 'Clone' and source['Children']: + if source['Type'] != 'clone' and source['Children']: # Imaging child device(s) for child in source['Children']: if os.path.exists(child['Dest Paths']['Map']): @@ -1130,14 +1255,14 @@ def run_ddrescue(source, dest, settings): update_progress(source) # Set ddrescue cmd - if source['Type'] == 'Clone': + if source['Type'] == 'clone': cmd = [ 'ddrescue', *settings, '--force', s_dev['Dev Path'], dest['Dev Path'], s_dev['Dest Paths']['Map']] else: cmd = [ 'ddrescue', *settings, s_dev['Dev Path'], - s_dev['Dest Paths']['Image'], s_dev['Dest Paths']['Map']] + s_dev['Dest Paths']['image'], s_dev['Dest Paths']['Map']] if current_pass == 'Pass 1': cmd.extend(['--no-trim', '--no-scrape']) elif current_pass == 'Pass 2': @@ -1290,7 +1415,7 @@ def select_device(description='device', provided_path=None, def set_dest_image_paths(source, dest): """Set destination image path for source and any child devices.""" # TODO function deprecated - if source['Type'] == 'Clone': + if source['Type'] == 'clone': base = '{pwd}/Clone_{size}_{model}'.format( pwd=os.path.realpath(global_vars['Env']['PWD']), size=source['Details']['size'], @@ -1301,7 +1426,7 @@ def set_dest_image_paths(source, dest): model=source['Details'].get('model', 'Unknown'), **dest) source['Dest Paths'] = { - 'Image': '{}.dd'.format(base), + 'image': '{}.dd'.format(base), 'Map': '{}.map'.format(base)} # Child devices @@ -1318,7 +1443,7 @@ def set_dest_image_paths(source, dest): p_label=p_label, **dest) child['Dest Paths'] = { - 'Image': '{}.dd'.format(base), + 'image': '{}.dd'.format(base), 'Map': '{}.map'.format(base)} @@ -1386,7 +1511,7 @@ def show_selection_details(source, dest): print_standard(' ') # Destination - if source['Type'] == 'Clone': + if source['Type'] == 'clone': print_success('Destination device ', end='') print_error('(ALL DATA WILL BE DELETED)', timestamp=False) show_device_details(dest['Dev Path']) @@ -1511,7 +1636,7 @@ def update_progress(source, end_run=False): source['Progress Out'] = '{}/progress.out'.format( global_vars['LogDir']) output = [] - if source['Type'] == 'Clone': + if source['Type'] == 'clone': output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) else: output.append(' {BLUE}Imaging Status{CLEAR}'.format(**COLORS)) @@ -1530,7 +1655,7 @@ def update_progress(source, end_run=False): output.append('─────────────────────') # Main device - if source['Type'] == 'Clone': + if source['Type'] == 'clone': output.append('{BLUE}{dev}{CLEAR}'.format( dev='Image File' if source['Is Image'] else source['Dev Path'], **COLORS)) From 127c3b810d56c939782a66e40b8a15daa6faad6d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 18:07:12 -0600 Subject: [PATCH 063/293] Fixed image prefixes and removed unsused functions --- .bin/Scripts/functions/ddrescue.py | 233 +---------------------------- 1 file changed, 5 insertions(+), 228 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 6a264127..ca4226c5 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -115,7 +115,8 @@ class BlockPair(): 'Detected map "{}" but not the matching image'.format( self.map_path)) elif not dest_exists: - raise GenericError('Destination device missing') + raise GenericError('Destination device "{}" missing'.format( + self.dest_path)) def update_progress(self, pass_num): """Update progress using map file.""" @@ -312,6 +313,8 @@ class ImageObj(BaseObj): self.details = get_device_details(self.loopdev) self.details['model'] = 'ImageFile' self.name = self.path[self.path.rfind('/')+1:] + self.prefix = '{}_ImageFile'.format( + self.details.get('size', 'UNKNOWN')) self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) self.report = get_device_report(self.loop_dev) self.report = self.report.replace(self.loop_dev, '{Img}') @@ -356,48 +359,6 @@ def build_outer_panes(source, dest): 'cat', source['Progress Out']) -def check_dest_paths(source): - """Check for image and/or map file and alert user about details.""" - dd_image_exists = os.path.exists(source['Dest Paths']['image']) - map_exists = os.path.exists(source['Dest Paths']['Map']) - if 'clone' in source['Dest Paths']['Map']: - if map_exists: - # We're cloning and a matching map file was detected - if not ask('Matching map file detected, resume recovery?'): - abort_ddrescue_tui() - else: - abort_imaging = False - resume_files_exist = False - source_devs = [source] - if source['Children']: - source_devs = source['Children'] - for dev in source_devs: - # We're imaging - dd_image_exists = os.path.exists(dev['Dest Paths']['image']) - map_exists = os.path.exists(dev['Dest Paths']['Map']) - if dd_image_exists and not map_exists: - # Refuce to resume without map file - i = dev['Dest Paths']['image'] - i = i[i.rfind('/')+1:] - print_error( - 'Detected image "{}" but not the matching map'.format(i)) - abort_imaging = True - elif not dd_image_exists and map_exists: - # Can't resume without dd_image - m = dev['Dest Paths']['Map'] - m = m[m.rfind('/')+1:] - print_error( - 'Detected map "{}" but not the matching image'.format(m)) - abort_imaging = True - elif dd_image_exists and map_exists: - # Matching dd_image and map file were detected - resume_files_exist = True - p = 'Matching image and map file{} detected, resume recovery?'.format( - 's' if len(source_devs) > 1 else '') - if abort_imaging or (resume_files_exist and not ask(p)): - abort_ddrescue_tui() - - def create_path_obj(path): """Create Dev, Dir, or Image obj based on path given.""" obj = None @@ -412,65 +373,6 @@ def create_path_obj(path): return obj -def dest_safety_check(source, dest): - """Verify the destination is appropriate for the source.""" - source_size = source['Details']['size'] - if dest['Is Dir']: - # MOVED - pass - else: - dest_size = dest['Details']['size'] - - # Convert to bytes and compare size - source_size = get_size_in_bytes(source_size) - dest_size = get_size_in_bytes(dest_size) - if source['Type'] == 'image' and dest_size < (source_size * 1.2): - # Imaging: ensure 120% of source size is available - print_error( - 'Not enough free space on destination, refusing to continue.') - print_standard( - ' Dest {d_size} < Required {s_size}'.format( - d_size=human_readable_size(dest_size), - s_size=human_readable_size(source_size * 1.2))) - abort_ddrescue_tui() - elif source['Type'] == 'clone' and source_size > dest_size: - # Cloning: ensure dest >= size - print_error('Destination is too small, refusing to continue.') - print_standard( - ' Dest {d_size} < Source {s_size}'.format( - d_size=human_readable_size(dest_size), - s_size=human_readable_size(source_size))) - abort_ddrescue_tui() - - # Imaging specific checks - if source['Type'] == 'image': - # Filesystem Type - if dest['Filesystem'] not in RECOMMENDED_FSTYPES: - print_error( - 'Destination filesystem "{}" is not recommended.'.format( - dest['Filesystem'])) - print_info('Recommended types are: {}'.format( - ' / '.join(RECOMMENDED_FSTYPES).upper())) - print_standard(' ') - if not ask('Proceed anyways? (Strongly discouraged)'): - abort_ddrescue_tui() - # Read-Write access - dest_ok = True - dest_st_mode = os.stat(dest['Path']).st_mode - dest_ok = dest_ok and dest_st_mode & stat.S_IRUSR - dest_ok = dest_ok and dest_st_mode & stat.S_IWUSR - dest_ok = dest_ok and dest_st_mode & stat.S_IXUSR - if not dest_ok: - print_error('Destination is not writable, refusing to continue.') - abort_ddrescue_tui() - - # Mount options check - if 'rw' not in dest['Mount options'].split(','): - print_error( - 'Destination is not mounted read-write, refusing to continue.') - abort_ddrescue_tui() - - def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" try: @@ -568,18 +470,6 @@ def get_formatted_status(label, data): """TODO""" # TODO pass -def get_recovery_scope_size(source): - """Calculate total size of selected dev(s).""" - # TODO function deprecated - source['Total Size'] = 0 - if source['Children']: - for child in source['Children']: - child['Size'] = get_size_in_bytes(child['Details']['size']) - source['Total Size'] += child['Size'] - else: - # Whole dev - source['Size'] = get_size_in_bytes(source['Details']['size']) - source['Total Size'] = source['Size'] def get_status_color(s, t_success=99, t_warn=90): @@ -698,6 +588,7 @@ def menu_ddrescue(source_path, dest_path, run_mode): state.add_block_pair(source, dest) else: # TODO select dev or child dev(s) + pass # Confirmations # TODO Show selection details @@ -1133,85 +1024,6 @@ def read_map_file(map_path): return map_data -def resume_from_map(source): - """Read map file(s) and set current progress to resume previous session.""" - # TODO function deprecated - map_data_read = False - non_tried = 0 - non_trimmed = 0 - non_scraped = 0 - - # Read map data - if source['Type'] != 'clone' and source['Children']: - # Imaging child device(s) - for child in source['Children']: - if os.path.exists(child['Dest Paths']['Map']): - map_data = read_map_file(child['Dest Paths']['Map']) - map_data_read = True - non_tried += map_data['non-tried'] - non_trimmed += map_data['non-trimmed'] - non_scraped += map_data['non-scraped'] - child['Recovered Size'] = map_data['rescued']/100*child['Size'] - - # Get (dev) current pass - dev_current_pass = 1 - if map_data['non-tried'] == 0: - if map_data['non-trimmed'] > 0: - dev_current_pass = 2 - elif map_data['non-scraped'] > 0: - dev_current_pass = 3 - elif map_data['rescued'] == 100: - dev_current_pass = 4 - - # Mark passes as skipped - for x in range(1, dev_current_pass): - p_num = 'Pass {}'.format(x) - child[p_num]['Done'] = True - child[p_num]['Status'] = 'Skipped' - - elif map_data_read: - # No map but we've already read at least one map, force pass 1 - non_tried = 1 - elif os.path.exists(source['Dest Paths']['Map']): - # Cloning or Imaging whole device - map_data = read_map_file(source['Dest Paths']['Map']) - map_data_read = True - non_tried += map_data['non-tried'] - non_trimmed += map_data['non-trimmed'] - non_scraped += map_data['non-scraped'] - - # Bail - if not map_data_read: - # No map data found, assuming fresh start - return - - # Set current pass - if non_tried > 0: - current_pass = 'Pass 1' - elif non_trimmed > 0: - current_pass = 'Pass 2' - source['Pass 1']['Done'] = True - source['Pass 1']['Status'] = 'Skipped' - elif non_scraped > 0: - current_pass = 'Pass 3' - source['Pass 1']['Done'] = True - source['Pass 1']['Status'] = 'Skipped' - source['Pass 2']['Done'] = True - source['Pass 2']['Status'] = 'Skipped' - else: - source['Current Pass'] = 'Done' - update_progress(source, end_run=True) - return - source['Current Pass'] = current_pass - - # Update current pass - if not source['Children']: - if os.path.exists(source['Dest Paths']['Map']): - map_data = read_map_file(source['Dest Paths']['Map']) - source[current_pass]['Done'] = map_data['pass completed'] - source['Recovered Size'] = map_data['rescued']/100*source['Size'] - - def run_ddrescue(source, dest, settings): """Run ddrescue pass.""" current_pass = source['Current Pass'] @@ -1412,41 +1224,6 @@ def select_device(description='device', provided_path=None, return dev -def set_dest_image_paths(source, dest): - """Set destination image path for source and any child devices.""" - # TODO function deprecated - if source['Type'] == 'clone': - base = '{pwd}/Clone_{size}_{model}'.format( - pwd=os.path.realpath(global_vars['Env']['PWD']), - size=source['Details']['size'], - model=source['Details'].get('model', 'Unknown')) - else: - base = '{Path}/{size}_{model}'.format( - size=source['Details']['size'], - model=source['Details'].get('model', 'Unknown'), - **dest) - source['Dest Paths'] = { - 'image': '{}.dd'.format(base), - 'Map': '{}.map'.format(base)} - - # Child devices - for child in source['Children']: - p_label = '' - if child['Details']['label']: - p_label = '_{}'.format(child['Details']['label']) - base = '{Path}/{size}_{model}_{p_num}_{p_size}{p_label}'.format( - size=source['Details']['size'], - model=source['Details'].get('model', 'Unknown'), - p_num=child['Details']['name'].replace( - child['Details']['pkname'], ''), - p_size=child['Details']['size'], - p_label=p_label, - **dest) - child['Dest Paths'] = { - 'image': '{}.dd'.format(base), - 'Map': '{}.map'.format(base)} - - def setup_loopback_device(source_path): """Setup a loopback device for source_path, returns dev_path as str.""" cmd = ( From a19ac4772b52d78734570d797120a91d610156cf Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 18:29:14 -0600 Subject: [PATCH 064/293] Better exception handling --- .bin/Scripts/ddrescue-tui-menu | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/ddrescue-tui-menu b/.bin/Scripts/ddrescue-tui-menu index 798cd43e..10cde744 100755 --- a/.bin/Scripts/ddrescue-tui-menu +++ b/.bin/Scripts/ddrescue-tui-menu @@ -38,12 +38,21 @@ if __name__ == '__main__': if not re.search(r'(^$|help|-h|\?)', run_mode, re.IGNORECASE): print_error('Invalid mode.') show_usage(script_name) - exit_script() # Done print_standard('\nDone.') pause("Press Enter to exit...") exit_script() + except GenericAbort as ga: + if str(ga): + print_warning(str(ga)) + abort() + except GenericError as ge: + if str(ge): + print_error(str(ge)) + else: + print_error('Generic Error?') + abort() except SystemExit: pass except: From 4047b956f57f11f3ef6529eac397a04103f5b1fe Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 18:54:31 -0600 Subject: [PATCH 065/293] Even better exception handling --- .bin/Scripts/ddrescue-tui-menu | 10 ++-- .bin/Scripts/functions/ddrescue.py | 78 +++++++++++++----------------- 2 files changed, 37 insertions(+), 51 deletions(-) diff --git a/.bin/Scripts/ddrescue-tui-menu b/.bin/Scripts/ddrescue-tui-menu index 10cde744..f96dec36 100755 --- a/.bin/Scripts/ddrescue-tui-menu +++ b/.bin/Scripts/ddrescue-tui-menu @@ -43,15 +43,13 @@ if __name__ == '__main__': print_standard('\nDone.') pause("Press Enter to exit...") exit_script() - except GenericAbort as ga: - if str(ga): - print_warning(str(ga)) + except GenericAbort: abort() except GenericError as ge: + msg = 'Generic Error' if str(ge): - print_error(str(ge)) - else: - print_error('Generic Error?') + msg = str(ge) + print_error(msg) abort() except SystemExit: pass diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ca4226c5..5069f65c 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -147,24 +147,24 @@ class RecoveryState(): if self.mode == 'clone': # Cloning safety checks if source.is_dir(): - raise GenericAbort('Invalid source "{}"'.format( + raise GenericError('Invalid source "{}"'.format( source.path)) elif not dest.is_dev(): - raise GenericAbort('Invalid destination "{}"'.format( + raise GenericError('Invalid destination "{}"'.format( dest.path)) elif source.size > dest.size: - raise GenericAbort( + raise GenericError( 'Destination is too small, refusing to continue.') else: # Imaging safety checks if not source.is_dev(): - raise GenericAbort('Invalid source "{}"'.format( + raise GenericError('Invalid source "{}"'.format( source.path)) elif not dest.is_dir(): - raise GenericAbort('Invalid destination "{}"'.format( + raise GenericError('Invalid destination "{}"'.format( dest.path)) elif (source.size * 1.2) > dest.size: - raise GenericAbort( + raise GenericError( 'Destination is too small, refusing to continue.') elif dest.fstype.lower() not in RECOMMENDED_FSTYPES: print_error( @@ -174,12 +174,12 @@ class RecoveryState(): ' / '.join(RECOMMENDED_FSTYPES).upper())) print_standard(' ') if not ask('Proceed anyways? (Strongly discouraged)'): - raise GenericAbort('Aborted.') + raise GenericAbort() elif not is_writable_dir(dest): - raise GenericAbort( + raise GenericError( 'Destination is not writable, refusing to continue.') elif not is_writable_filesystem(dest): - raise GenericAbort( + raise GenericError( 'Destination is mounted read-only, refusing to continue.') # Safety checks passed @@ -188,11 +188,7 @@ class RecoveryState(): def self_checks(self): """Run self-checks for each BlockPair object.""" for bp in self.block_pairs: - try: - bp.self_check() - except GenericError as err: - print_error(err) - raise GenericAbort('Aborted.') + bp.self_check() def set_pass_num(self): """Set current pass based on all block-pair's progress.""" @@ -252,7 +248,8 @@ class DevObj(BaseObj): def self_check(self): """Verify that self.path points to a block device.""" if not pathlib.Path(self.path).is_block_device(): - raise GenericError('TODO') + raise GenericError('Path "{}" is not a block device.'.format( + self.path)) def set_details(self): """Set details via lsblk.""" @@ -288,7 +285,8 @@ class DirObj(BaseObj): def self_check(self): """Verify that self.path points to a directory.""" if not pathlib.Path(self.path).is_dir(): - raise GenericError('TODO') + raise GenericError('Path "{}" is not a directory.'.format( + self.path)) def set_details(self): """Set details via findmnt.""" @@ -304,7 +302,8 @@ class ImageObj(BaseObj): def self_check(self): """Verify that self.path points to a file.""" if not pathlib.Path(self.path).is_file(): - raise GenericError('TODO') + raise GenericError('Path "{}" is not an image file.'.format( + self.path)) def set_details(self): """Setup loopback device, set details via lsblk, then detach device.""" @@ -322,11 +321,6 @@ class ImageObj(BaseObj): # Functions -def abort_ddrescue_tui(): - run_program(['losetup', '-D']) - abort() - - def build_outer_panes(source, dest): """Build top and side panes.""" clear_screen() @@ -369,7 +363,7 @@ def create_path_obj(path): elif pathlib.Path(self.path).is_file(): obj = ImageObj(path) else: - raise GenericAbort('TODO') + raise GenericError('Invalid path "{}"'.format(path)) return obj @@ -551,7 +545,7 @@ def menu_clone(source_path, dest_path): # Confirm if not ask('Proceed with clone?'): - abort_ddrescue_tui() + raise GenericAbort() show_safety_check() # Main menu @@ -634,7 +628,7 @@ def menu_image(source_path, dest_path): # Confirm if not ask('Proceed with imaging?'): - abort_ddrescue_tui() + raise GenericAbort() # Main menu build_outer_panes(source, dest) @@ -805,7 +799,7 @@ def menu_select_children(source): elif selection == 'P' and one_or_more_devs_selected: break elif selection == 'Q': - abort_ddrescue_tui() + raise GenericAbort() # Check selection selected_children = [{ @@ -833,8 +827,8 @@ def menu_select_device(title='Which device?', skip_device={}): result = run_program(cmd) json_data = json.loads(result.stdout.decode()) except CalledProcessError: - print_error('Failed to get device details for {}'.format(dev_path)) - abort_ddrescue_tui() + raise GenericError( + 'Failed to get device details for {}'.format(dev_path)) # Build menu dev_options = [] @@ -854,8 +848,7 @@ def menu_select_device(title='Which device?', skip_device={}): 'Disabled': disable_dev}) dev_options = sorted(dev_options, key=itemgetter('Name')) if not dev_options: - print_error('No devices available.') - abort_ddrescue_tui() + raise GenericError('No devices available.') # Show Menu actions = [{'Name': 'Quit', 'Letter': 'Q'}] @@ -868,7 +861,7 @@ def menu_select_device(title='Which device?', skip_device={}): if selection.isnumeric(): return dev_options[int(selection)-1]['Path'] elif selection == 'Q': - abort_ddrescue_tui() + raise GenericAbort() def menu_select_path(skip_device={}): @@ -890,7 +883,7 @@ def menu_select_path(skip_device={}): action_entries=actions) if selection == 'Q': - abort_ddrescue_tui() + raise GenericAbort() elif selection.isnumeric(): index = int(selection) - 1 if path_options[index]['Path']: @@ -928,7 +921,7 @@ def menu_select_path(skip_device={}): if selection.isnumeric(): s_path = vol_options[int(selection)-1]['Path'] elif selection == 'Q': - abort_ddrescue_tui() + raise GenericAbort() elif path_options[index]['Name'] == 'Enter manually': # Manual entry @@ -1007,8 +1000,7 @@ def read_map_file(map_path): try: map_data[m.group('key')] = float(m.group('value')) except ValueError: - print_error('Failed to read map data') - abort_ddrescue_tui() + raise GenericError('Failed to read map data') m = re.match(r'.*current status:\s+(?P.*)', line.strip()) if m: map_data['pass completed'] = bool(m.group('status') == 'finished') @@ -1133,8 +1125,7 @@ def select_dest_path(provided_path=None, skip_device={}): # Check path if not pathlib.Path(dest['Path']).is_dir(): - print_error('Invalid path "{}"'.format(dest['Path'])) - abort_ddrescue_tui() + raise GenericError('Invalid path "{}"'.format(dest['Path'])) # Create ticket folder if ask('Create ticket folder?'): @@ -1144,9 +1135,8 @@ def select_dest_path(provided_path=None, skip_device={}): try: os.makedirs(dest['Path'], exist_ok=True) except OSError: - print_error('Failed to create folder "{}"'.format( - dest['Path'])) - abort_ddrescue_tui() + raise GenericError( + 'Failed to create folder "{}"'.format(dest['Path'])) # Set display name result = run_program(['tput', 'cols']) @@ -1181,8 +1171,7 @@ def select_device(description='device', provided_path=None, dev['Dev Path'] = setup_loopback_device(dev['Path']) dev['Is Image'] = True else: - print_error('Invalid {} "{}"'.format(description, dev['Path'])) - abort_ddrescue_tui() + raise GenericError('Invalid {} "{}"'.format(description, dev['Path'])) # Get device details dev['Details'] = get_device_details(dev['Dev Path']) @@ -1237,8 +1226,7 @@ def setup_loopback_device(source_path): dev_path = out.stdout.decode().strip() sleep(1) except CalledProcessError: - print_error('Failed to setup loopback device for source.') - abort_ddrescue_tui() + raise GenericError('Failed to setup loopback device for source.') else: return dev_path @@ -1272,7 +1260,7 @@ def show_safety_check(): print_warning('This is irreversible and will lead ' 'to {CLEAR}{RED}DATA LOSS.'.format(**COLORS)) if not ask('Asking again to confirm, is this correct?'): - abort_ddrescue_tui() + raise GenericAbort() def show_selection_details(source, dest): From 6cdc4015e741c203dcecb249f31b40d6c0c11261 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 19:34:51 -0600 Subject: [PATCH 066/293] Updated menu_ddrescue() and related sections * RecoveryState is updated before confirmation(s) * New confirmation prompt that supports both cloning and imaging modes * Refactored show_selection_details() to use new objects * Allows resumed state to be detected and prompt switched to "Resume?" * Renamed function show_safety_check() to double_confirm_clone() for clarity --- .bin/Scripts/functions/ddrescue.py | 74 ++++++++++++++++-------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 5069f65c..a99f8085 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -44,6 +44,7 @@ class BlockPair(): self.mode = mode self.name = source.name self.pass_done = [False, False, False] + self.resumed = False self.rescued = 0 self.status = ['Pending', 'Pending', 'Pending'] self.total_size = source.size @@ -64,6 +65,7 @@ class BlockPair(): prefix=source.prefix) if os.path.exists(self.map_path): self.load_map_data() + self.resumed = True def finish_pass(self, pass_num): """Mark pass as done and check if 100% recovered.""" @@ -186,9 +188,12 @@ class RecoveryState(): self.block_pairs.append(BlockPair(source, dest)) def self_checks(self): - """Run self-checks for each BlockPair object.""" + """Run self-checks for each BlockPair and update state values.""" + self.total_size = 0 for bp in self.block_pairs: bp.self_check() + self.resumed |= bp.resumed + self.total_size += bp.size def set_pass_num(self): """Set current pass based on all block-pair's progress.""" @@ -210,10 +215,8 @@ class RecoveryState(): def update_progress(self): """Update overall progress using block_pairs.""" self.rescued = 0 - self.total_size = 0 for bp in self.block_pairs: self.rescued += bp.rescued - self.total_size += bp.size self.status_percent = get_formatted_status( label='Recovered:', data=(self.rescued/self.total_size)*100) self.status_amount = get_formatted_status( @@ -367,6 +370,16 @@ def create_path_obj(path): return obj +def double_confirm_clone(): + """Display warning and get 2nd confirmation from user, returns bool.""" + print_standard('\nSAFETY CHECK') + print_warning('All data will be DELETED from the ' + 'destination device and partition(s) listed above.') + print_warning('This is irreversible and will lead ' + 'to {CLEAR}{RED}DATA LOSS.'.format(**COLORS)) + return ask('Asking again to confirm, is this correct?') + + def get_device_details(dev_path): """Get device details via lsblk, returns JSON dict.""" try: @@ -584,11 +597,22 @@ def menu_ddrescue(source_path, dest_path, run_mode): # TODO select dev or child dev(s) pass + # Update state + state.self_checks() + state.set_pass_num() + state.update_progress() + # Confirmations - # TODO Show selection details - # TODO resume? - # TODO Proceed? (maybe merge with resume? prompt?) - # TODO double-confirm for clones for safety + clear_screen() + show_selection_details(state, source, dest) + prompt = 'Start {}?'.format(state.mode.replace('e', 'ing')) + if state.resumed: + print_info('Map data detected and loaded.') + prompt = prompt.replace('Start', 'Resume') + if not ask(prompt): + raise GenericAbort() + if state.mode == 'clone' and not double_confirm_clone(): + raise GenericAbort() # Main menu build_outer_panes(source, dest) @@ -1252,40 +1276,20 @@ def show_device_details(dev_path): print_standard(line) -def show_safety_check(): - """Display safety check message and get confirmation from user.""" - print_standard('\nSAFETY CHECK') - print_warning('All data will be DELETED from the ' - 'destination device and partition(s) listed above.') - print_warning('This is irreversible and will lead ' - 'to {CLEAR}{RED}DATA LOSS.'.format(**COLORS)) - if not ask('Asking again to confirm, is this correct?'): - raise GenericAbort() - - -def show_selection_details(source, dest): - clear_screen() - +def show_selection_details(state, source, dest): + """Show selection details.""" # Source - print_success('Source device') - if source['Is Image']: - print_standard('Using image file: {}'.format(source['Path'])) - print_standard(' (via loopback device: {})'.format( - source['Dev Path'])) - show_device_details(source['Dev Path']) + print_success('Source') + print_standard(source.report) print_standard(' ') # Destination - if source['Type'] == 'clone': - print_success('Destination device ', end='') + if state.mode == 'clone': + print_success('Destination ', end='') print_error('(ALL DATA WILL BE DELETED)', timestamp=False) - show_device_details(dest['Dev Path']) else: - print_success('Destination path') - print_standard(dest['Path']) - print_info('{:<8}{}'.format('FREE', 'FSTYPE')) - print_standard('{:<8}{}'.format( - dest['Free Space'], dest['Filesystem'])) + print_success('Destination') + print_standard(dest.report) print_standard(' ') From 30b703e025e813f7fdbb30952a5715fecdb911af Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 20:09:48 -0600 Subject: [PATCH 067/293] Updated get_formatted_status() --- .bin/Scripts/functions/ddrescue.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index a99f8085..0dbb24a2 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -72,7 +72,9 @@ class BlockPair(): if map_data['full recovery']: self.pass_done = [True, True, True] self.rescued = self.total_size - self.status[pass_num] = get_formatted_status(100) + self.status[pass_num] = get_formatted_status( + label='Pass {}'.format(pass_num), + data=100) # Mark future passes as Skipped pass_num += 1 while pass_num <= 2: @@ -474,9 +476,23 @@ def get_size_in_bytes(s): def get_formatted_status(label, data): - """TODO""" - # TODO - pass + """Build status string using provided info, returns str.""" + data_width = SIDE_PANE_WIDTH - len(label) + try: + data_str = '{data:>{data_width}.2f} %'.format( + data=data, + data_width=data_width-2) + except ValueError: + # Assuming non-numeric data + data_str = '{data:>{data_width}}'.format( + data=data, + data_width=data_width) + status = '{label}{s_color}{data_str}{CLEAR}'.format( + label=label, + s_color=get_status_color(data), + data_str=data_str, + **COLORS) + return status def get_status_color(s, t_success=99, t_warn=90): @@ -489,7 +505,7 @@ def get_status_color(s, t_success=99, t_warn=90): # Status is either in lists below or will default to red pass - if s in ('Pending',): + if s in ('Pending',) or str(s)[-2:] in (' b', 'Kb', 'Mb', 'Gb', 'Tb'): color = COLORS['CLEAR'] elif s in ('Skipped', 'Unknown', 'Working'): color = COLORS['YELLOW'] From 53f0b93a5f03ca8b8c65285a72ad55133b52829b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 20:24:34 -0600 Subject: [PATCH 068/293] Misc bugfixes --- .bin/Scripts/functions/ddrescue.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 0dbb24a2..1e2fbcab 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -47,7 +47,7 @@ class BlockPair(): self.resumed = False self.rescued = 0 self.status = ['Pending', 'Pending', 'Pending'] - self.total_size = source.size + self.size = source.size # Set dest paths if self.mode == 'clone': # Cloning @@ -71,7 +71,7 @@ class BlockPair(): """Mark pass as done and check if 100% recovered.""" if map_data['full recovery']: self.pass_done = [True, True, True] - self.rescued = self.total_size + self.rescued = self.size self.status[pass_num] = get_formatted_status( label='Pass {}'.format(pass_num), data=100) @@ -90,10 +90,10 @@ class BlockPair(): def load_map_data(self): """Load data from map file and set progress.""" map_data = read_map_file(self.map_path) - self.rescued = map_data['rescued'] * self.total_size + self.rescued = map_data['rescued'] * self.size if map_data['full recovery']: self.pass_done = [True, True, True] - self.rescued = self.total_size + self.rescued = self.size self.status = ['Skipped', 'Skipped', 'Skipped'] elif map_data['non-tried'] > 0: # Initial pass incomplete @@ -126,10 +126,10 @@ class BlockPair(): """Update progress using map file.""" if os.path.exists(self.map_path): map_data = read_map_file(self.map_path) - self.rescued = map_data['rescued'] * self.total_size + self.rescued = map_data['rescued'] * self.size self.status[pass_num] = get_formatted_status( label='Pass {}'.format(pass_num), - data=(self.rescued/self.total_size)*100) + data=(self.rescued/self.size)*100) class RecoveryState(): @@ -187,7 +187,7 @@ class RecoveryState(): 'Destination is mounted read-only, refusing to continue.') # Safety checks passed - self.block_pairs.append(BlockPair(source, dest)) + self.block_pairs.append(BlockPair(source, dest, self.mode)) def self_checks(self): """Run self-checks for each BlockPair and update state values.""" @@ -314,15 +314,16 @@ class ImageObj(BaseObj): """Setup loopback device, set details via lsblk, then detach device.""" self.type = 'image' self.loop_dev = setup_loopback_device(self.path) - self.details = get_device_details(self.loopdev) + self.details = get_device_details(self.loop_dev) self.details['model'] = 'ImageFile' self.name = self.path[self.path.rfind('/')+1:] self.prefix = '{}_ImageFile'.format( self.details.get('size', 'UNKNOWN')) self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) self.report = get_device_report(self.loop_dev) - self.report = self.report.replace(self.loop_dev, '{Img}') - run_program(['losetup', '--detach', loop_path], check=False) + self.report = self.report.replace( + self.loop_dev[self.loop_dev.rfind('/')+1:], '(Img)') + run_program(['losetup', '--detach', self.loop_dev], check=False) # Functions @@ -361,11 +362,11 @@ def build_outer_panes(source, dest): def create_path_obj(path): """Create Dev, Dir, or Image obj based on path given.""" obj = None - if pathlib.Path(self.path).is_block_device(): - obj = Dev(path) - elif pathlib.Path(self.path).is_dir(): + if pathlib.Path(path).is_block_device(): + obj = DevObj(path) + elif pathlib.Path(path).is_dir(): obj = DirObj(path) - elif pathlib.Path(self.path).is_file(): + elif pathlib.Path(path).is_file(): obj = ImageObj(path) else: raise GenericError('Invalid path "{}"'.format(path)) @@ -611,6 +612,7 @@ def menu_ddrescue(source_path, dest_path, run_mode): state.add_block_pair(source, dest) else: # TODO select dev or child dev(s) + state.add_block_pair(source, dest) pass # Update state From 1e195f70fc8a932cffe31a16ceab82afb728b9e9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 26 Jul 2018 20:49:27 -0600 Subject: [PATCH 069/293] Fixed names and started updating build_outer_panes --- .bin/Scripts/functions/ddrescue.py | 43 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 1e2fbcab..691df3f0 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -260,7 +260,11 @@ class DevObj(BaseObj): """Set details via lsblk.""" self.type = 'dev' self.details = get_device_details(self.path) - self.name = self.details.get('name', 'UNKNOWN') + self.name = '{name} {size} {model} {serial}'.format( + name=self.details.get('name', 'UNKNOWN'), + size=self.details.get('size', 'UNKNOWN'), + model=self.details.get('model', 'UNKNOWN'), + serial=self.details.get('serial', 'UNKNOWN')) self.model = self.details.get('model', 'UNKNOWN') self.model_size = self.details.get('size', 'UNKNOWN') self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) @@ -298,7 +302,7 @@ class DirObj(BaseObj): self.type = 'dir' self.details = get_dir_details(self.path) self.fstype = self.details.get('fstype', 'UNKNOWN') - self.name = self.path + self.name = self.path + '/' self.size = get_size_in_bytes(self.details.get('avail', 'UNKNOWN')) self.report = get_dir_report(self.path) @@ -316,7 +320,9 @@ class ImageObj(BaseObj): self.loop_dev = setup_loopback_device(self.path) self.details = get_device_details(self.loop_dev) self.details['model'] = 'ImageFile' - self.name = self.path[self.path.rfind('/')+1:] + self.name = '{name} {size}'.format( + name=self.path[self.path.rfind('/')+1:], + size=self.details.get('size', 'UNKNOWN')) self.prefix = '{}_ImageFile'.format( self.details.get('size', 'UNKNOWN')) self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) @@ -330,13 +336,25 @@ class ImageObj(BaseObj): def build_outer_panes(source, dest): """Build top and side panes.""" clear_screen() + result = run_program(['tput', 'cols']) + width = int( + (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 # Top panes + source_str = source.name + if len(source_str) > width: + source_str = '{}...'.format(source_str[:width-3]) + dest_str = dest.name + if len(dest_str) > width: + if dest.is_dev(): + dest_str = '{}...'.format(dest_str[:width-3]) + else: + dest_str = '...{}'.format(dest_str[-width+3:]) source_pane = tmux_splitw( '-bdvl', '2', '-PF', '#D', 'echo-and-hold "{BLUE}Source{CLEAR}\n{text}"'.format( - text=source['Display Name'], + text=source_str, **COLORS)) tmux_splitw( '-t', source_pane, @@ -348,15 +366,16 @@ def build_outer_panes(source, dest): '-t', source_pane, '-dhp', '50', 'echo-and-hold "{BLUE}Destination{CLEAR}\n{text}"'.format( - text=dest['Display Name'], + text=dest_str, **COLORS)) # Side pane - update_progress(source) - tmux_splitw( - '-dhl', '{}'.format(SIDE_PANE_WIDTH), - 'watch', '--color', '--no-title', '--interval', '1', - 'cat', source['Progress Out']) + # TODO FIX IT + #update_progress(source) + #tmux_splitw( + # '-dhl', '{}'.format(SIDE_PANE_WIDTH), + # 'watch', '--color', '--no-title', '--interval', '1', + # 'cat', source['Progress Out']) def create_path_obj(path): @@ -455,8 +474,8 @@ def get_dir_report(dir_path): '--target', dir_path]) for line in result.stdout.decode().strip().splitlines(): if 'FSTYPE' in line: - output.append('{BLUE}{path:<{width}}{line}{CLEAR}'.format( - path=dir_path, + output.append('{BLUE}{label:<{width}}{line}{CLEAR}'.format( + label='PATH', width=width, line=line, **COLORS)) From 7ac91fd312d35ed76face8dcd595f4b3700e92d2 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 20:33:35 -0700 Subject: [PATCH 070/293] Adjust pass 1 threshold --- .bin/Scripts/functions/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 691df3f0..97bf0b48 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -13,7 +13,7 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES -AUTO_NEXT_PASS_1_THRESHOLD = 90 +AUTO_NEXT_PASS_1_THRESHOLD = 95 AUTO_NEXT_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { '--binary-prefixes': {'Enabled': True, 'Hidden': True}, From 03bdb4b4b72b2a02ddcfe98ae7191f22790d4589 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 21:12:05 -0700 Subject: [PATCH 071/293] Reordered classes and removed old menu functions --- .bin/Scripts/functions/ddrescue.py | 301 +++++++++++------------------ 1 file changed, 112 insertions(+), 189 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 97bf0b48..0e0e19a1 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -37,6 +37,29 @@ USAGE = """ {script_name} clone [source [destination]] # Clases +class BaseObj(): + """Base object used by DevObj, DirObj, and ImageObj.""" + def __init__(self, path): + self.type = 'base' + self.path = os.path.realpath(path) + self.set_details() + + def is_dev(self): + return self.type == 'dev' + + def is_dir(self): + return self.type == 'dir' + + def is_image(self): + return self.type == 'image' + + def self_check(self): + pass + + def set_details(self): + self.details = {} + + class BlockPair(): """Object to track data and methods together for source and dest.""" def __init__(self, source, dest, mode): @@ -132,6 +155,95 @@ class BlockPair(): data=(self.rescued/self.size)*100) +class DevObj(BaseObj): + """Block device object.""" + def self_check(self): + """Verify that self.path points to a block device.""" + if not pathlib.Path(self.path).is_block_device(): + raise GenericError('Path "{}" is not a block device.'.format( + self.path)) + if self.parent: + print_warning('"{}" is a child device.'.format(self.path)) + if ask('Use parent device "{}" instead?'.format(self.parent): + self.path = os.path.realpath(path) + self.set_details() + + def set_details(self): + """Set details via lsblk.""" + self.type = 'dev' + self.details = get_device_details(self.path) + self.name = '{name} {size} {model} {serial}'.format( + name=self.details.get('name', 'UNKNOWN'), + size=self.details.get('size', 'UNKNOWN'), + model=self.details.get('model', 'UNKNOWN'), + serial=self.details.get('serial', 'UNKNOWN')) + self.model = self.details.get('model', 'UNKNOWN') + self.model_size = self.details.get('size', 'UNKNOWN') + self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) + self.report = get_device_report(self.path) + self.parent = self.details.get('pkname', '') + self.label = self.details.get('label', '') + if not self.label: + # Force empty string in case it's set to None + self.label = '' + self.update_filename_prefix() + + def update_filename_prefix(self): + """Set filename prefix based on details.""" + self.prefix = '{m_size}_{model}'.format( + m_size=self.model_size, + model=self.model) + if self.parent: + # Add child device details + self.prefix += '_{c_num}_{c_size}{sep}{c_label}'.format( + c_num=self.name.replace(self.parent, ''), + c_size=self.details.get('size', 'UNKNOWN'), + sep='_' if self.label else '', + c_label=self.label) + + +class DirObj(BaseObj): + def self_check(self): + """Verify that self.path points to a directory.""" + if not pathlib.Path(self.path).is_dir(): + raise GenericError('Path "{}" is not a directory.'.format( + self.path)) + + def set_details(self): + """Set details via findmnt.""" + self.type = 'dir' + self.details = get_dir_details(self.path) + self.fstype = self.details.get('fstype', 'UNKNOWN') + self.name = self.path + '/' + self.size = get_size_in_bytes(self.details.get('avail', 'UNKNOWN')) + self.report = get_dir_report(self.path) + + +class ImageObj(BaseObj): + def self_check(self): + """Verify that self.path points to a file.""" + if not pathlib.Path(self.path).is_file(): + raise GenericError('Path "{}" is not an image file.'.format( + self.path)) + + def set_details(self): + """Setup loopback device, set details via lsblk, then detach device.""" + self.type = 'image' + self.loop_dev = setup_loopback_device(self.path) + self.details = get_device_details(self.loop_dev) + self.details['model'] = 'ImageFile' + self.name = '{name} {size}'.format( + name=self.path[self.path.rfind('/')+1:], + size=self.details.get('size', 'UNKNOWN')) + self.prefix = '{}_ImageFile'.format( + self.details.get('size', 'UNKNOWN')) + self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) + self.report = get_device_report(self.loop_dev) + self.report = self.report.replace( + self.loop_dev[self.loop_dev.rfind('/')+1:], '(Img)') + run_program(['losetup', '--detach', self.loop_dev], check=False) + + class RecoveryState(): """Object to track BlockPair objects and overall state.""" def __init__(self, mode): @@ -225,113 +337,6 @@ class RecoveryState(): label='', data=human_readable_size(self.rescued)) -class BaseObj(): - """Base object used by DevObj, DirObj, and ImageObj.""" - def __init__(self, path): - self.type = 'base' - self.path = os.path.realpath(path) - self.set_details() - - def is_dev(self): - return self.type == 'dev' - - def is_dir(self): - return self.type == 'dir' - - def is_image(self): - return self.type == 'image' - - def self_check(self): - pass - - def set_details(self): - self.details = {} - - -class DevObj(BaseObj): - """Block device object.""" - def self_check(self): - """Verify that self.path points to a block device.""" - if not pathlib.Path(self.path).is_block_device(): - raise GenericError('Path "{}" is not a block device.'.format( - self.path)) - - def set_details(self): - """Set details via lsblk.""" - self.type = 'dev' - self.details = get_device_details(self.path) - self.name = '{name} {size} {model} {serial}'.format( - name=self.details.get('name', 'UNKNOWN'), - size=self.details.get('size', 'UNKNOWN'), - model=self.details.get('model', 'UNKNOWN'), - serial=self.details.get('serial', 'UNKNOWN')) - self.model = self.details.get('model', 'UNKNOWN') - self.model_size = self.details.get('size', 'UNKNOWN') - self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) - self.report = get_device_report(self.path) - self.parent = self.details.get('pkname', '') - self.label = self.details.get('label', '') - if not self.label: - # Force empty string in case it's set to None - self.label = '' - self.update_filename_prefix() - - def update_filename_prefix(self): - """Set filename prefix based on details.""" - self.prefix = '{m_size}_{model}'.format( - m_size=self.model_size, - model=self.model) - if self.parent: - # Add child device details - self.prefix += '_{c_num}_{c_size}{sep}{c_label}'.format( - c_num=self.name.replace(self.parent, ''), - c_size=self.details.get('size', 'UNKNOWN'), - sep='_' if self.label else '', - c_label=self.label) - - -class DirObj(BaseObj): - def self_check(self): - """Verify that self.path points to a directory.""" - if not pathlib.Path(self.path).is_dir(): - raise GenericError('Path "{}" is not a directory.'.format( - self.path)) - - def set_details(self): - """Set details via findmnt.""" - self.type = 'dir' - self.details = get_dir_details(self.path) - self.fstype = self.details.get('fstype', 'UNKNOWN') - self.name = self.path + '/' - self.size = get_size_in_bytes(self.details.get('avail', 'UNKNOWN')) - self.report = get_dir_report(self.path) - - -class ImageObj(BaseObj): - def self_check(self): - """Verify that self.path points to a file.""" - if not pathlib.Path(self.path).is_file(): - raise GenericError('Path "{}" is not an image file.'.format( - self.path)) - - def set_details(self): - """Setup loopback device, set details via lsblk, then detach device.""" - self.type = 'image' - self.loop_dev = setup_loopback_device(self.path) - self.details = get_device_details(self.loop_dev) - self.details['model'] = 'ImageFile' - self.name = '{name} {size}'.format( - name=self.path[self.path.rfind('/')+1:], - size=self.details.get('size', 'UNKNOWN')) - self.prefix = '{}_ImageFile'.format( - self.details.get('size', 'UNKNOWN')) - self.size = get_size_in_bytes(self.details.get('size', 'UNKNOWN')) - self.report = get_device_report(self.loop_dev) - self.report = self.report.replace( - self.loop_dev[self.loop_dev.rfind('/')+1:], '(Img)') - run_program(['losetup', '--detach', self.loop_dev], check=False) - - # Functions def build_outer_panes(source, dest): """Build top and side panes.""" @@ -565,48 +570,6 @@ def mark_all_passes_pending(source): child[p_num]['Done'] = False -def menu_clone(source_path, dest_path): - """ddrescue cloning menu.""" - - # Set devices - source = select_device('source', source_path) - source['Current Pass'] = 'Pass 1' - source['Pass 1'] = {'Status': 'Pending', 'Done': False} - source['Pass 2'] = {'Status': 'Pending', 'Done': False} - source['Pass 3'] = {'Status': 'Pending', 'Done': False} - source['Recovered Size'] = 0 - source['Started Recovery'] = False - source['Total Size'] = 0 - source['Type'] = 'clone' - dest = select_device( - 'destination', dest_path, - skip_device=source['Details'], allow_image_file=False) - dest_safety_check(source, dest) - - # Show selection details - show_selection_details(source, dest) - - # Set status details - set_dest_image_paths(source, dest) - get_recovery_scope_size(source) - check_dest_paths(source) - resume_from_map(source) - - # Confirm - if not ask('Proceed with clone?'): - raise GenericAbort() - show_safety_check() - - # Main menu - build_outer_panes(source, dest) - menu_main(source, dest) - - # Done - run_program(['losetup', '-D']) - run_program(['tmux', 'kill-window']) - exit_script() - - def menu_ddrescue(source_path, dest_path, run_mode): """ddrescue menu.""" source = None @@ -661,46 +624,6 @@ def menu_ddrescue(source_path, dest_path, run_mode): run_program(['tmux', 'kill-window']) exit_script() -def menu_image(source_path, dest_path): - """ddrescue imaging menu.""" - - # Set devices - source = select_device('source', source_path, allow_image_file=False) - source['Current Pass'] = 'Pass 1' - source['Pass 1'] = {'Status': 'Pending', 'Done': False} - source['Pass 2'] = {'Status': 'Pending', 'Done': False} - source['Pass 3'] = {'Status': 'Pending', 'Done': False} - source['Recovered Size'] = 0 - source['Started Recovery'] = False - source['Total Size'] = 0 - source['Type'] = 'image' - dest = select_dest_path(dest_path, skip_device=source['Details']) - dest_safety_check(source, dest) - - # Select child device(s) - source['Children'] = menu_select_children(source) - set_dest_image_paths(source, dest) - get_recovery_scope_size(source) - check_dest_paths(source) - resume_from_map(source) - - # Show selection details - show_selection_details(source, dest) - - # Confirm - if not ask('Proceed with imaging?'): - raise GenericAbort() - - # Main menu - build_outer_panes(source, dest) - menu_main(source, dest) - - # Done - run_program(['losetup', '-D']) - run_program(['tmux', 'kill-window']) - exit_script() - - def menu_main(source, dest): """Main menu is used to set ddrescue settings.""" title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS) From ccf7f0686ed4db5bab1456d92b2a25511ca6e194 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 22:25:01 -0700 Subject: [PATCH 072/293] Updated select_device() to use DevObj() * Also fixed child/parent check(s) * Removed menu_select_device() since code was moved into select_device() --- .bin/Scripts/functions/ddrescue.py | 167 +++++++++-------------------- 1 file changed, 51 insertions(+), 116 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 0e0e19a1..604f3402 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -164,8 +164,8 @@ class DevObj(BaseObj): self.path)) if self.parent: print_warning('"{}" is a child device.'.format(self.path)) - if ask('Use parent device "{}" instead?'.format(self.parent): - self.path = os.path.realpath(path) + if ask('Use parent device "{}" instead?'.format(self.parent)): + self.path = os.path.realpath(self.parent) self.set_details() def set_details(self): @@ -576,17 +576,17 @@ def menu_ddrescue(source_path, dest_path, run_mode): dest = None if source_path: source = create_path_obj(source_path) + else: + source = select_device('source') + source.self_check() if dest_path: dest = create_path_obj(dest_path) - - # Show selection menus (if necessary) - if not source: - source = select_device('source') - if not dest: + else: if run_mode == 'clone': dest = select_device('destination', skip_device=source) else: dest = select_directory() + dest.self_check() # Build BlockPairs state = RecoveryState(run_mode) @@ -796,58 +796,6 @@ def menu_select_children(source): return selected_children -def menu_select_device(title='Which device?', skip_device={}): - """Select block device via a menu, returns dev_path as str.""" - skip_names = [ - skip_device.get('name', None), skip_device.get('pkname', None)] - skip_names = [n for n in skip_names if n] - try: - cmd = ( - 'lsblk', - '--json', - '--nodeps', - '--output-all', - '--paths') - result = run_program(cmd) - json_data = json.loads(result.stdout.decode()) - except CalledProcessError: - raise GenericError( - 'Failed to get device details for {}'.format(dev_path)) - - # Build menu - dev_options = [] - for dev in json_data['blockdevices']: - # Disable dev if in skip_names - disable_dev = dev['name'] in skip_names or dev['pkname'] in skip_names - - # Append non-matching devices - dev_options.append({ - 'Name': '{name:12} {tran:5} {size:6} {model} {serial}'.format( - name=dev['name'], - tran=dev['tran'] if dev['tran'] else '', - size=dev['size'] if dev['size'] else '', - model=dev['model'] if dev['model'] else '', - serial=dev['serial'] if dev['serial'] else ''), - 'Path': dev['name'], - 'Disabled': disable_dev}) - dev_options = sorted(dev_options, key=itemgetter('Name')) - if not dev_options: - raise GenericError('No devices available.') - - # Show Menu - actions = [{'Name': 'Quit', 'Letter': 'Q'}] - selection = menu_select( - title=title, - main_entries=dev_options, - action_entries=actions, - disabled_label='SOURCE DEVICE') - - if selection.isnumeric(): - return dev_options[int(selection)-1]['Path'] - elif selection == 'Q': - raise GenericAbort() - - def menu_select_path(skip_device={}): """Select path via menu, returns path as str.""" pwd = os.path.realpath(global_vars['Env']['PWD']) @@ -1134,67 +1082,54 @@ def select_dest_path(provided_path=None, skip_device={}): return dest -def select_device(description='device', provided_path=None, - skip_device={}, allow_image_file=True): - """Select device via provided path or menu, return dev as dict.""" - dev = {'Is Dir': False, 'Is Image': False} +def select_device(description='device', skip_device=None): + """Select device via a menu, returns DevObj.""" + cmd = ( + 'lsblk', + '--json', + '--nodeps', + '--output-all', + '--paths') + result = run_program(cmd) + json_data = json.loads(result.stdout.decode()) + skip_names = [] + if skip_device: + skip_names.append(skip_device.path) + if skip_device.parent: + skip_names.append(skip_device.parent) - # Set path - if provided_path: - dev['Path'] = provided_path - else: - dev['Path'] = menu_select_device( - title='Please select a {}'.format(description), - skip_device=skip_device) - dev['Path'] = os.path.realpath(dev['Path']) + # Build menu + dev_options = [] + for dev in json_data['blockdevices']: + # Disable dev if in skip_names + disabled = dev['name'] in skip_names or dev['pkname'] in skip_names - # Check path - if pathlib.Path(dev['Path']).is_block_device(): - dev['Dev Path'] = dev['Path'] - elif allow_image_file and pathlib.Path(dev['Path']).is_file(): - dev['Dev Path'] = setup_loopback_device(dev['Path']) - dev['Is Image'] = True - else: - raise GenericError('Invalid {} "{}"'.format(description, dev['Path'])) + # Add to options + dev_options.append({ + 'Name': '{name:12} {tran:5} {size:6} {model} {serial}'.format( + name=dev['name'], + tran=dev['tran'] if dev['tran'] else '', + size=dev['size'] if dev['size'] else '', + model=dev['model'] if dev['model'] else '', + serial=dev['serial'] if dev['serial'] else ''), + 'Dev': DevObj(dev['name']), + 'Disabled': disabled}) + dev_options = sorted(dev_options, key=itemgetter('Name')) + if not dev_options: + raise GenericError('No devices available.') - # Get device details - dev['Details'] = get_device_details(dev['Dev Path']) - if 'Children' not in dev: - dev['Children'] = [] + # Show Menu + actions = [{'Name': 'Quit', 'Letter': 'Q'}] + selection = menu_select( + title='Please select the {} device'.format(description), + main_entries=dev_options, + action_entries=actions, + disabled_label='ALREADY SELECTED') - # Check for parent device(s) - while dev['Details']['pkname']: - print_warning('{} "{}" is a child device.'.format( - description.title(), dev['Dev Path'])) - if ask('Use parent device "{}" instead?'.format( - dev['Details']['pkname'])): - # Update dev with parent info - dev['Dev Path'] = dev['Details']['pkname'] - dev['Details'] = get_device_details(dev['Dev Path']) - else: - # Leave alone - break - - # Set display name - if dev['Is Image']: - dev['Display Name'] = dev['Path'] - else: - dev['Display Name'] = '{name} {size} {model}'.format( - **dev['Details']) - result = run_program(['tput', 'cols']) - width = int( - (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 - if len(dev['Display Name']) > width: - if dev['Is Image']: - dev['Display Name'] = '...{}'.format( - dev['Display Name'][-(width-3):]) - else: - dev['Display Name'] = '{}...'.format( - dev['Display Name'][:(width-3)]) - else: - dev['Display Name'] = dev['Display Name'] - - return dev + if selection.isnumeric(): + return dev_options[int(selection)-1]['Dev'] + elif selection == 'Q': + raise GenericAbort() def setup_loopback_device(source_path): From 459b78dcc38833af2d281a6f2f186ca6e318a43d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 23:04:44 -0700 Subject: [PATCH 073/293] Updated select_dest_path(), now select_path() * Moved menu_select_path() code into select_path() * Removed menu_select_path() * Fixed formatting in get_dir_report() --- .bin/Scripts/functions/ddrescue.py | 178 ++++++++++++----------------- 1 file changed, 71 insertions(+), 107 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 604f3402..5d042429 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -281,7 +281,7 @@ class RecoveryState(): dest.path)) elif (source.size * 1.2) > dest.size: raise GenericError( - 'Destination is too small, refusing to continue.') + 'Not enough free space, refusing to continue.') elif dest.fstype.lower() not in RECOMMENDED_FSTYPES: print_error( 'Destination filesystem "{}" is not recommended.'.format( @@ -471,24 +471,25 @@ def get_dir_details(dir_path): def get_dir_report(dir_path): """Build colored dir report using findmnt, returns str.""" + dir_path = dir_path output = [] width = len(dir_path)+1 result = run_program([ 'findmnt', '--output', 'SIZE,AVAIL,USED,FSTYPE,OPTIONS', '--target', dir_path]) - for line in result.stdout.decode().strip().splitlines(): + for line in result.stdout.decode().splitlines(): if 'FSTYPE' in line: output.append('{BLUE}{label:<{width}}{line}{CLEAR}'.format( label='PATH', width=width, - line=line, + line=line.replace('\n',''), **COLORS)) else: output.append('{path:<{width}}{line}'.format( path=dir_path, width=width, - line=line)) + line=line.replace('\n',''))) # Done return '\n'.join(output) @@ -583,9 +584,10 @@ def menu_ddrescue(source_path, dest_path, run_mode): dest = create_path_obj(dest_path) else: if run_mode == 'clone': + x dest = select_device('destination', skip_device=source) else: - dest = select_directory() + dest = select_path(skip_device=source) dest.self_check() # Build BlockPairs @@ -796,78 +798,6 @@ def menu_select_children(source): return selected_children -def menu_select_path(skip_device={}): - """Select path via menu, returns path as str.""" - pwd = os.path.realpath(global_vars['Env']['PWD']) - s_path = None - - # Build Menu - path_options = [ - {'Name': 'Current directory: {}'.format(pwd), 'Path': pwd}, - {'Name': 'Local device', 'Path': None}, - {'Name': 'Enter manually', 'Path': None}] - actions = [{'Name': 'Quit', 'Letter': 'Q'}] - - # Show Menu - selection = menu_select( - title='Please make a selection', - main_entries=path_options, - action_entries=actions) - - if selection == 'Q': - raise GenericAbort() - elif selection.isnumeric(): - index = int(selection) - 1 - if path_options[index]['Path']: - # Current directory - s_path = pwd - - elif path_options[index]['Name'] == 'Local device': - # Local device - local_device = select_device( - skip_device=skip_device, - allow_image_file=False) - - # Mount device volume(s) - report = mount_volumes( - all_devices=False, - device_path=local_device['Dev Path'], - read_write=True) - - # Select volume - vol_options = [] - for k, v in sorted(report.items()): - disabled = v['show_data']['data'] == 'Failed to mount' - if disabled: - name = '{name} (Failed to mount)'.format(**v) - else: - name = '{name} (mounted on "{mount_point}")'.format(**v) - vol_options.append({ - 'Name': name, - 'Path': v['mount_point'], - 'Disabled': disabled}) - selection = menu_select( - title='Please select a volume', - main_entries=vol_options, - action_entries=actions) - if selection.isnumeric(): - s_path = vol_options[int(selection)-1]['Path'] - elif selection == 'Q': - raise GenericAbort() - - elif path_options[index]['Name'] == 'Enter manually': - # Manual entry - while not s_path: - m_path = input('Please enter path: ').strip() - if m_path and pathlib.Path(m_path).is_dir(): - s_path = os.path.realpath(m_path) - elif m_path and pathlib.Path(m_path).is_file(): - print_error('File "{}" exists'.format(m_path)) - else: - print_error('Invalid path "{}"'.format(m_path)) - return s_path - - def menu_settings(source): """Change advanced ddrescue settings.""" title = '{GREEN}ddrescue TUI: Expert Settings{CLEAR}\n\n'.format(**COLORS) @@ -1045,41 +975,75 @@ def run_ddrescue(source, dest, settings): run_program(['tmux', 'kill-pane', '-t', smart_pane]) -def select_dest_path(provided_path=None, skip_device={}): - dest = {'Is Dir': True, 'Is Image': False} +def select_path(skip_device=None): + """Optionally mount local dev and select path, returns DirObj.""" + wd = os.path.realpath(global_vars['Env']['PWD']) + selected_path = None - # Set path - if provided_path: - dest['Path'] = provided_path - else: - dest['Path'] = menu_select_path(skip_device=skip_device) - dest['Path'] = os.path.realpath(dest['Path']) + # Build menu + path_options = [ + {'Name': 'Current directory: {}'.format(wd), 'Path': wd}, + {'Name': 'Local device', 'Path': None}, + {'Name': 'Enter manually', 'Path': None}] + actions = [{'Name': 'Quit', 'Letter': 'Q'}] - # Check path - if not pathlib.Path(dest['Path']).is_dir(): - raise GenericError('Invalid path "{}"'.format(dest['Path'])) + # Show Menu + selection = menu_select( + title='Please make a selection', + main_entries=path_options, + action_entries=actions) - # Create ticket folder - if ask('Create ticket folder?'): - ticket_folder = get_simple_string('Please enter folder name') - dest['Path'] = os.path.join( - dest['Path'], ticket_folder) - try: - os.makedirs(dest['Path'], exist_ok=True) - except OSError: - raise GenericError( - 'Failed to create folder "{}"'.format(dest['Path'])) + if selection == 'Q': + raise GenericAbort() + elif selection.isnumeric(): + index = int(selection) - 1 + if path_options[index]['Path'] == wd: + # Current directory + selected_path = DirObj(wd) - # Set display name - result = run_program(['tput', 'cols']) - width = int( - (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 - if len(dest['Path']) > width: - dest['Display Name'] = '...{}'.format(dest['Path'][-(width-3):]) - else: - dest['Display Name'] = dest['Path'] + elif path_options[index]['Name'] == 'Local device': + # Local device + local_device = select_device( + skip_device=skip_device) - return dest + # Mount device volume(s) + report = mount_volumes( + all_devices=False, + device_path=local_device.path, + read_write=True) + + # Select volume + vol_options = [] + for k, v in sorted(report.items()): + disabled = v['show_data']['data'] == 'Failed to mount' + if disabled: + name = '{name} (Failed to mount)'.format(**v) + else: + name = '{name} (mounted on "{mount_point}")'.format(**v) + vol_options.append({ + 'Name': name, + 'Path': v['mount_point'], + 'Disabled': disabled}) + selection = menu_select( + title='Please select a volume', + main_entries=vol_options, + action_entries=actions) + if selection.isnumeric(): + selected_path = DirObj(vol_options[int(selection)-1]['Path']) + elif selection == 'Q': + raise GenericAbort() + + elif path_options[index]['Name'] == 'Enter manually': + # Manual entry + while not selected_path: + manual_path = input('Please enter path: ').strip() + if manual_path and pathlib.Path(manual_path).is_dir(): + selected_path = DirObj(manual_path) + elif manual_path and pathlib.Path(manual_path).is_file(): + print_error('File "{}" exists'.format(manual_path)) + else: + print_error('Invalid path "{}"'.format(manual_path)) + return selected_path def select_device(description='device', skip_device=None): From 177bf10e2d2ce00c224dbb14a105ba35bc5c4c94 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 23:32:39 -0700 Subject: [PATCH 074/293] Added select_parts() function * This replaced menu_select_children() * Removed menu_select_children() --- .bin/Scripts/functions/ddrescue.py | 141 ++++++++++++++--------------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 5d042429..a9b373d3 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -595,9 +595,9 @@ def menu_ddrescue(source_path, dest_path, run_mode): if run_mode == 'clone': state.add_block_pair(source, dest) else: - # TODO select dev or child dev(s) - state.add_block_pair(source, dest) - pass + source_parts = select_parts(source) + for part in source_parts: + state.add_block_pair(part, dest) # Update state state.self_checks() @@ -730,74 +730,6 @@ def menu_main(source, dest): break -def menu_select_children(source): - """Select child device(s) or whole disk, returns list.""" - dev_options = [{ - 'Base Name': '{:<14}(Whole device)'.format(source['Dev Path']), - 'Path': source['Dev Path'], - 'Selected': True}] - for c_details in source['Details'].get('children', []): - dev_options.append({ - 'Base Name': '{:<14}({:>6} {})'.format( - c_details['name'], - c_details['size'], - c_details['fstype'] if c_details['fstype'] else 'Unknown'), - 'Details': c_details, - 'Path': c_details['name'], - 'Selected': False}) - actions = [ - {'Name': 'Proceed', 'Letter': 'P'}, - {'Name': 'Quit', 'Letter': 'Q'}] - - # Skip Menu if there's no children - if len(dev_options) == 1: - return [] - - # Show Menu - while True: - one_or_more_devs_selected = False - # Update entries - for dev in dev_options: - if dev['Selected']: - one_or_more_devs_selected = True - dev['Name'] = '* {}'.format(dev['Base Name']) - else: - dev['Name'] = ' {}'.format(dev['Base Name']) - - selection = menu_select( - title='Please select part(s) to image', - main_entries=dev_options, - action_entries=actions) - - if selection.isnumeric(): - # Toggle selection - index = int(selection) - 1 - dev_options[index]['Selected'] = not dev_options[index]['Selected'] - - # Deselect whole device if child selected (this round) - if index > 0: - dev_options[0]['Selected'] = False - - # Deselect all children if whole device selected - if dev_options[0]['Selected']: - for dev in dev_options[1:]: - dev['Selected'] = False - elif selection == 'P' and one_or_more_devs_selected: - break - elif selection == 'Q': - raise GenericAbort() - - # Check selection - selected_children = [{ - 'Details': d['Details'], - 'Dev Path': d['Path'], - 'Pass 1': {'Status': 'Pending', 'Done': False}, - 'Pass 2': {'Status': 'Pending', 'Done': False}, - 'Pass 3': {'Status': 'Pending', 'Done': False}} for d in dev_options - if d['Selected'] and 'Whole device' not in d['Base Name']] - return selected_children - - def menu_settings(source): """Change advanced ddrescue settings.""" title = '{GREEN}ddrescue TUI: Expert Settings{CLEAR}\n\n'.format(**COLORS) @@ -975,6 +907,73 @@ def run_ddrescue(source, dest, settings): run_program(['tmux', 'kill-pane', '-t', smart_pane]) +def select_parts(source_device): + """Select partition(s) or whole device, returns list of DevObj()s.""" + selected_parts = [] + children = source_device.details.get('children', []) + + if not children: + # No partitions detected, auto-select whole device. + selected_parts = [source_device] + else: + # Build menu + dev_options = [{ + 'Base Name': '{:<14}(Whole device)'.format(source_device.path), + 'Dev': source_device, + 'Selected': True}] + for c_details in children: + dev_options.append({ + 'Base Name': '{:<14}({:>6} {})'.format( + c_details['name'], + c_details['size'], + c_details['fstype'] if c_details['fstype'] else 'Unknown'), + 'Details': c_details, + 'Dev': DevObj(c_details['name']), + 'Selected': False}) + actions = [ + {'Name': 'Proceed', 'Letter': 'P'}, + {'Name': 'Quit', 'Letter': 'Q'}] + + # Show menu + while True: + one_or_more_devs_selected = False + # Update entries + for dev in dev_options: + if dev['Selected']: + one_or_more_devs_selected = True + dev['Name'] = '* {}'.format(dev['Base Name']) + else: + dev['Name'] = ' {}'.format(dev['Base Name']) + + selection = menu_select( + title='Please select part(s) to image', + main_entries=dev_options, + action_entries=actions) + + if selection.isnumeric(): + # Toggle selection + index = int(selection) - 1 + dev_options[index]['Selected'] = not dev_options[index]['Selected'] + + # Deselect whole device if child selected (this round) + if index > 0: + dev_options[0]['Selected'] = False + + # Deselect all children if whole device selected + if dev_options[0]['Selected']: + for dev in dev_options[1:]: + dev['Selected'] = False + elif selection == 'P' and one_or_more_devs_selected: + break + elif selection == 'Q': + raise GenericAbort() + + # Build list of selected parts + selected_parts = [d['Dev'] for d in dev_options if d['Selected']] + + return selected_parts + + def select_path(skip_device=None): """Optionally mount local dev and select path, returns DirObj.""" wd = os.path.realpath(global_vars['Env']['PWD']) From c568668fd0971202c50d7e4d501100e6b06d2886 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 23:39:19 -0700 Subject: [PATCH 075/293] Re-added 'Create ticket folder?' section * Only asked if imaging and mounting a local device for the destination. --- .bin/Scripts/functions/ddrescue.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index a9b373d3..14c964c1 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -1004,6 +1004,7 @@ def select_path(skip_device=None): # Local device local_device = select_device( skip_device=skip_device) + s_path = '' # Mount device volume(s) report = mount_volumes( @@ -1028,10 +1029,23 @@ def select_path(skip_device=None): main_entries=vol_options, action_entries=actions) if selection.isnumeric(): - selected_path = DirObj(vol_options[int(selection)-1]['Path']) + s_path = vol_options[int(selection)-1]['Path'] elif selection == 'Q': raise GenericAbort() + # Create folder + if ask('Create ticket folder?'): + ticket_folder = get_simple_string('Please enter folder name') + s_path = os.path.join(s_path, ticket_folder) + try: + os.makedirs(s_path, exist_ok=True) + except OSError: + raise GenericError( + 'Failed to create folder "{}"'.format(s_path)) + + # Create DirObj + selected_path = DirObj(s_path) + elif path_options[index]['Name'] == 'Enter manually': # Manual entry while not selected_path: From d474c8b5d430614375169329f322c4a683b5249e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 1 Aug 2018 23:56:25 -0700 Subject: [PATCH 076/293] Updated build_outer_panes() *BROKEN* * Script broken until update_progress() is fixed --- .bin/Scripts/functions/ddrescue.py | 33 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 14c964c1..99dbf2fc 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -246,11 +246,14 @@ class ImageObj(BaseObj): class RecoveryState(): """Object to track BlockPair objects and overall state.""" - def __init__(self, mode): + def __init__(self, mode, source, dest): + self.mode = mode.lower() + self.source_name = source.name + self.dest_name = dest.name self.block_pairs = [] self.current_pass = 0 self.finished = False - self.mode = mode.lower() + self.progress_out = '{}/progress.out'.format(global_vars['LogDir']) self.rescued = 0 self.resumed = False self.started = False @@ -338,7 +341,7 @@ class RecoveryState(): # Functions -def build_outer_panes(source, dest): +def build_outer_panes(state): """Build top and side panes.""" clear_screen() result = run_program(['tput', 'cols']) @@ -346,12 +349,12 @@ def build_outer_panes(source, dest): (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 # Top panes - source_str = source.name + source_str = state.source_name if len(source_str) > width: source_str = '{}...'.format(source_str[:width-3]) - dest_str = dest.name + dest_str = state.dest_name if len(dest_str) > width: - if dest.is_dev(): + if state.mode == 'clone': dest_str = '{}...'.format(dest_str[:width-3]) else: dest_str = '...{}'.format(dest_str[-width+3:]) @@ -375,12 +378,11 @@ def build_outer_panes(source, dest): **COLORS)) # Side pane - # TODO FIX IT - #update_progress(source) - #tmux_splitw( - # '-dhl', '{}'.format(SIDE_PANE_WIDTH), - # 'watch', '--color', '--no-title', '--interval', '1', - # 'cat', source['Progress Out']) + update_progress(state) + tmux_splitw( + '-dhl', str(SIDE_PANE_WIDTH), + 'watch', '--color', '--no-title', '--interval', '1', + 'cat', state.progress_out) def create_path_obj(path): @@ -591,12 +593,11 @@ def menu_ddrescue(source_path, dest_path, run_mode): dest.self_check() # Build BlockPairs - state = RecoveryState(run_mode) + state = RecoveryState(run_mode, source, dest) if run_mode == 'clone': state.add_block_pair(source, dest) else: - source_parts = select_parts(source) - for part in source_parts: + for part in select_parts(source): state.add_block_pair(part, dest) # Update state @@ -617,7 +618,7 @@ def menu_ddrescue(source_path, dest_path, run_mode): raise GenericAbort() # Main menu - build_outer_panes(source, dest) + build_outer_panes(state) # TODO Fix #menu_main(source, dest) pause('Fake Main Menu... ') From 1a983344c28ef4c2aced823bdf0f53f0b173ce6b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 2 Aug 2018 00:42:14 -0700 Subject: [PATCH 077/293] Updated update_progress() --- .bin/Scripts/functions/ddrescue.py | 222 +++++------------------------ 1 file changed, 37 insertions(+), 185 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 99dbf2fc..362b467f 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -62,10 +62,10 @@ class BaseObj(): class BlockPair(): """Object to track data and methods together for source and dest.""" - def __init__(self, source, dest, mode): - self.source_path = source.path + def __init__(self, mode, source, dest): self.mode = mode - self.name = source.name + self.source = source + self.dest = dest self.pass_done = [False, False, False] self.resumed = False self.rescued = 0 @@ -89,6 +89,11 @@ class BlockPair(): if os.path.exists(self.map_path): self.load_map_data() self.resumed = True + # Fix status strings + for pass_num in [1, 2, 3]: + self.status[pass_num-1] = get_formatted_status( + label='Pass {}'.format(pass_num), + data=self.status[pass_num-1]) def finish_pass(self, pass_num): """Mark pass as done and check if 100% recovered.""" @@ -196,7 +201,7 @@ class DevObj(BaseObj): if self.parent: # Add child device details self.prefix += '_{c_num}_{c_size}{sep}{c_label}'.format( - c_num=self.name.replace(self.parent, ''), + c_num=self.path.replace(self.parent, ''), c_size=self.details.get('size', 'UNKNOWN'), sep='_' if self.label else '', c_label=self.label) @@ -248,8 +253,8 @@ class RecoveryState(): """Object to track BlockPair objects and overall state.""" def __init__(self, mode, source, dest): self.mode = mode.lower() - self.source_name = source.name - self.dest_name = dest.name + self.source = source + self.dest = dest self.block_pairs = [] self.current_pass = 0 self.finished = False @@ -302,7 +307,7 @@ class RecoveryState(): 'Destination is mounted read-only, refusing to continue.') # Safety checks passed - self.block_pairs.append(BlockPair(source, dest, self.mode)) + self.block_pairs.append(BlockPair(self.mode, source, dest)) def self_checks(self): """Run self-checks for each BlockPair and update state values.""" @@ -349,10 +354,10 @@ def build_outer_panes(state): (int(result.stdout.decode().strip()) - SIDE_PANE_WIDTH) / 2) - 2 # Top panes - source_str = state.source_name + source_str = state.source.name if len(source_str) > width: source_str = '{}...'.format(source_str[:width-3]) - dest_str = state.dest_name + dest_str = state.dest.name if len(dest_str) > width: if state.mode == 'clone': dest_str = '{}...'.format(dest_str[:width-3]) @@ -586,7 +591,6 @@ def menu_ddrescue(source_path, dest_path, run_mode): dest = create_path_obj(dest_path) else: if run_mode == 'clone': - x dest = select_device('destination', skip_device=source) else: dest = select_path(skip_device=source) @@ -970,7 +974,12 @@ def select_parts(source_device): raise GenericAbort() # Build list of selected parts - selected_parts = [d['Dev'] for d in dev_options if d['Selected']] + for d in dev_options: + if d['Selected']: + d['Dev'].model = source_device.model + d['Dev'].model_size = source_device.model_size + d['Dev'].update_filename_prefix() + selected_parts.append(d['Dev']) return selected_parts @@ -1179,197 +1188,40 @@ def tmux_splitw(*args): return result.stdout.decode().strip() -def update_progress(source, end_run=False): - """Update progress for source dev(s) and update status pane file.""" - current_pass = source['Current Pass'] - pass_complete_for_all_devs = True - total_recovery = True - source['Recovered Size'] = 0 - if current_pass != 'Done': - source[current_pass]['Min Status'] = 100 - try: - current_pass_num = int(current_pass[-1:]) - next_pass_num = current_pass_num + 1 - except ValueError: - # Either Done or undefined? - current_pass_num = -1 - next_pass_num = -1 - if 1 <= next_pass_num <= 3: - next_pass = 'Pass {}'.format(next_pass_num) - else: - next_pass = 'Done' - - # Update children progress - for child in source['Children']: - if current_pass == 'Done': - continue - if os.path.exists(child['Dest Paths']['Map']): - map_data = read_map_file(child['Dest Paths']['Map']) - if child['Dev Path'] == source.get('Current Device', ''): - # Current child device - r_size = map_data['rescued']/100 * child['Size'] - child[current_pass]['Done'] = map_data['pass completed'] - if source['Started Recovery']: - child[current_pass]['Status'] = map_data['rescued'] - child['Recovered Size'] = r_size - - # All child devices - pass_complete_for_all_devs &= child[current_pass]['Done'] - total_recovery &= map_data['full recovery'] - try: - source['Recovered Size'] += child.get('Recovered Size', 0) - source[current_pass]['Min Status'] = min( - source[current_pass]['Min Status'], - child[current_pass]['Status']) - except TypeError: - # Force 0% to disable auto-continue - source[current_pass]['Min Status'] = 0 - else: - # Map missing, assuming this pass hasn't run for this dev yet - pass_complete_for_all_devs = False - total_recovery = False - - # Update source progress - if len(source['Children']) > 0: - # Imaging parts, skip updating source progress - pass - elif os.path.exists(source['Dest Paths']['Map']): - # Cloning/Imaging whole device - map_data = read_map_file(source['Dest Paths']['Map']) - if current_pass != 'Done': - source[current_pass]['Done'] = map_data['pass completed'] - if source['Started Recovery']: - source[current_pass]['Status'] = map_data['rescued'] - try: - source[current_pass]['Min Status'] = min( - source[current_pass]['Min Status'], - source[current_pass]['Status']) - except TypeError: - # Force 0% to disable auto-continue - source[current_pass]['Min Status'] = 0 - pass_complete_for_all_devs &= source[current_pass]['Done'] - source['Recovered Size'] = map_data['rescued']/100 * source['Size'] - total_recovery &= map_data['full recovery'] - else: - # Cloning/Imaging whole device and map missing - pass_complete_for_all_devs = False - total_recovery = False - - # End of pass updates - if end_run: - if total_recovery: - # Sweet! - source['Current Pass'] = 'Done' - source['Recovered Size'] = source['Total Size'] - for p_num in ['Pass 1', 'Pass 2', 'Pass 3']: - if source[p_num]['Status'] == 'Pending': - source[p_num]['Status'] = 'Skipped' - for child in source['Children']: - if child[p_num]['Status'] == 'Pending': - child[p_num]['Status'] = 'Skipped' - elif pass_complete_for_all_devs: - # Ready for next pass? - source['Current Pass'] = next_pass - if current_pass != 'Done': - source[current_pass]['Done'] = True - - # Start building output lines - if 'Progress Out' not in source: - source['Progress Out'] = '{}/progress.out'.format( - global_vars['LogDir']) +def update_progress(state): + """Update progress file for side pane.""" output = [] - if source['Type'] == 'clone': + if state.mode == 'clone': output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) else: output.append(' {BLUE}Imaging Status{CLEAR}'.format(**COLORS)) output.append('─────────────────────') # Overall progress - recovered_p = (source['Recovered Size'] / source['Total Size']) * 100 - recovered_s = human_readable_size(source['Recovered Size']) output.append('{BLUE}Overall Progress{CLEAR}'.format(**COLORS)) - output.append('Recovered:{s_color}{recovered_p:>9.2f} %{CLEAR}'.format( - s_color=get_status_color(recovered_p), - recovered_p=recovered_p, - **COLORS)) - output.append('{recovered_s:>{width}}'.format( - recovered_s=recovered_s, width=SIDE_PANE_WIDTH)) + output.append(state.status_percent) + output.append(state.status_amount) output.append('─────────────────────') - # Main device - if source['Type'] == 'clone': - output.append('{BLUE}{dev}{CLEAR}'.format( - dev='Image File' if source['Is Image'] else source['Dev Path'], - **COLORS)) - for x in (1, 2, 3): - p_num = 'Pass {}'.format(x) - s_display = source[p_num]['Status'] - try: - s_display = float(s_display) - except ValueError: - # Ignore and leave s_display alone - pass - else: - s_display = '{:0.2f} %'.format(s_display) - output.append('{p_num}{s_color}{s_display:>15}{CLEAR}'.format( - p_num=p_num, - s_color=get_status_color(source[p_num]['Status']), - s_display=s_display, + # Source(s) progress + for bp in state.block_pairs: + if state.source.is_image(): + output.append('{BLUE}Image File{CLEAR}'.format(**COLORS)) + elif state.mode == 'image' and len(state.block_pairs) == 1: + output.append('{BLUE}{source} {YELLOW}(Whole){CLEAR}'.format( + source=bp.source.path, **COLORS)) - else: - # Image mode - if source['Children']: - # Just parts - for child in source['Children']: - output.append('{BLUE}{dev}{CLEAR}'.format( - dev=child['Dev Path'], - **COLORS)) - for x in (1, 2, 3): - p_num = 'Pass {}'.format(x) - s_display = child[p_num]['Status'] - try: - s_display = float(s_display) - except ValueError: - # Ignore and leave s_display alone - pass - else: - s_display = '{:0.2f} %'.format(s_display) - output.append( - '{p_num}{s_color}{s_display:>15}{CLEAR}'.format( - p_num=p_num, - s_color=get_status_color(child[p_num]['Status']), - s_display=s_display, - **COLORS)) - p = (child.get('Recovered Size', 0) / child['Size']) * 100 - output.append('Recovered:{s_color}{p:>9.2f} %{CLEAR}'.format( - s_color=get_status_color(p), p=p, **COLORS)) - output.append(' ') else: - # Whole device - output.append('{BLUE}{dev}{CLEAR} {YELLOW}(Whole){CLEAR}'.format( - dev=source['Dev Path'], + output.append('{BLUE}{source}{CLEAR}'.format( + source=bp.source.path, **COLORS)) - for x in (1, 2, 3): - p_num = 'Pass {}'.format(x) - s_display = source[p_num]['Status'] - try: - s_display = float(s_display) - except ValueError: - # Ignore and leave s_display alone - pass - else: - s_display = '{:0.2f} %'.format(s_display) - output.append( - '{p_num}{s_color}{s_display:>15}{CLEAR}'.format( - p_num=p_num, - s_color=get_status_color(source[p_num]['Status']), - s_display=s_display, - **COLORS)) + output.extend(bp.status) + output.append(' ') # Add line-endings output = ['{}\n'.format(line) for line in output] - with open(source['Progress Out'], 'w') as f: + with open(state.progress_out, 'w') as f: f.writelines(output) From e0a695a6731c33cdbca89d450e60a89ec1da042b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 20:35:09 -0700 Subject: [PATCH 078/293] Enable help flags for aliases --- .bin/Scripts/ddrescue-tui-menu | 10 +++++++--- .bin/Scripts/functions/ddrescue.py | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/ddrescue-tui-menu b/.bin/Scripts/ddrescue-tui-menu index f96dec36..988ec0fa 100755 --- a/.bin/Scripts/ddrescue-tui-menu +++ b/.bin/Scripts/ddrescue-tui-menu @@ -31,13 +31,17 @@ if __name__ == '__main__': # We'll set the missing paths later pass - # Show usage? + # Show usage + if re.search(r'-*(h|help|\?)', str(sys.argv), re.IGNORECASE): + show_usage(script_name) + exit_script() + + # Start cloning/imaging if run_mode in ('clone', 'image'): menu_ddrescue(source_path, dest_path, run_mode) else: - if not re.search(r'(^$|help|-h|\?)', run_mode, re.IGNORECASE): + if not re.search(r'^-*(h|help\?)', run_mode, re.IGNORECASE): print_error('Invalid mode.') - show_usage(script_name) # Done print_standard('\nDone.') diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 362b467f..3657bb19 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -118,7 +118,7 @@ class BlockPair(): def load_map_data(self): """Load data from map file and set progress.""" map_data = read_map_file(self.map_path) - self.rescued = map_data['rescued'] * self.size + self.rescued = map_data['rescued'] * self.size / 100 if map_data['full recovery']: self.pass_done = [True, True, True] self.rescued = self.size @@ -132,6 +132,9 @@ class BlockPair(): elif map_data['non-scraped'] > 0: self.pass_done = [True, True, False] self.status = ['Skipped', 'Skipped', 'Pending'] + else: + self.pass_done = [True, True, True] + self.status = ['Skipped', 'Skipped', 'Skipped'] def self_check(self): """Self check to abort on bad dest/map combinations.""" From 53a899f9678ca0347e6aa10d5ebdc210ea2679ec Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 21:53:22 -0700 Subject: [PATCH 079/293] Updated menu_main() to use RecoveryState obj * Also fixed rescued size calculations (again) --- .bin/Scripts/functions/ddrescue.py | 92 +++++++++++++++++------------- 1 file changed, 53 insertions(+), 39 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 3657bb19..cc57fc3c 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -13,8 +13,8 @@ from functions.data import * from operator import itemgetter # STATIC VARIABLES -AUTO_NEXT_PASS_1_THRESHOLD = 95 -AUTO_NEXT_PASS_2_THRESHOLD = 98 +AUTO_PASS_1_THRESHOLD = 95 +AUTO_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { '--binary-prefixes': {'Enabled': True, 'Hidden': True}, '--data-preview': {'Enabled': True, 'Hidden': True}, @@ -118,7 +118,8 @@ class BlockPair(): def load_map_data(self): """Load data from map file and set progress.""" map_data = read_map_file(self.map_path) - self.rescued = map_data['rescued'] * self.size / 100 + self.rescued_percent = map_data['rescued'] + self.rescued = (self.rescued_percent * self.size) / 100 if map_data['full recovery']: self.pass_done = [True, True, True] self.rescued = self.size @@ -157,7 +158,8 @@ class BlockPair(): """Update progress using map file.""" if os.path.exists(self.map_path): map_data = read_map_file(self.map_path) - self.rescued = map_data['rescued'] * self.size + self.rescued_percent = map_data['rescued'] + self.rescued = (self.rescued_percent * self.size) / 100 self.status[pass_num] = get_formatted_status( label='Pass {}'.format(pass_num), data=(self.rescued/self.size)*100) @@ -260,6 +262,8 @@ class RecoveryState(): self.dest = dest self.block_pairs = [] self.current_pass = 0 + self.current_pass_str = '0: Initializing' + self.ddrescue_settings = DDRESCUE_SETTINGS.copy() self.finished = False self.progress_out = '{}/progress.out'.format(global_vars['LogDir']) self.rescued = 0 @@ -312,6 +316,20 @@ class RecoveryState(): # Safety checks passed self.block_pairs.append(BlockPair(self.mode, source, dest)) + def current_pass_done(self): + """Checks if pass is done for all block-pairs, returns bool.""" + done = True + for bp in self.block_pairs: + done &= bp.get_pass_done(self.current_pass) + return done + + def current_pass_min(self): + """Gets minimum pass rescued percentage, returns float.""" + min_percent = 100 + for bp in self.block_pairs: + min_percent = min(min_percent, bp.rescued) + return min_percent + def self_checks(self): """Run self-checks for each BlockPair and update state values.""" self.total_size = 0 @@ -336,14 +354,23 @@ class RecoveryState(): # Also mark overall recovery as finished if on last pass self.finished = True break + if self.finished: + self.current_pass_str = '- "Done"' + elif pass_num == 0: + self.current_pass_str = '1 "Initial Read"' + elif pass_num == 1: + self.current_pass_str = '2 "Trimming bad areas"' + elif pass_num == 2: + self.current_pass_str = '3 "Scraping bad areas"' def update_progress(self): """Update overall progress using block_pairs.""" self.rescued = 0 for bp in self.block_pairs: self.rescued += bp.rescued + self.rescued_percent = (self.rescued / self.total_size) * 100 self.status_percent = get_formatted_status( - label='Recovered:', data=(self.rescued/self.total_size)*100) + label='Recovered:', data=self.rescued_percent) self.status_amount = get_formatted_status( label='', data=human_readable_size(self.rescued)) @@ -626,9 +653,7 @@ def menu_ddrescue(source_path, dest_path, run_mode): # Main menu build_outer_panes(state) - # TODO Fix - #menu_main(source, dest) - pause('Fake Main Menu... ') + menu_main(state) # Done run_program(['tmux', 'kill-window']) @@ -638,8 +663,6 @@ def menu_main(source, dest): """Main menu is used to set ddrescue settings.""" title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS) title += '{BLUE}Current pass: {CLEAR}'.format(**COLORS) - if 'Settings' not in source: - source['Settings'] = DDRESCUE_SETTINGS.copy() # Build menu main_options = [ @@ -659,14 +682,6 @@ def menu_main(source, dest): # Show menu while True: - current_pass = source['Current Pass'] - display_pass = '1 "Initial Read"' - if current_pass == 'Pass 2': - display_pass = '2 "Trimming bad areas"' - elif current_pass == 'Pass 3': - display_pass = '3 "Scraping bad areas"' - elif current_pass == 'Done': - display_pass = 'Done' # Update entries for opt in main_options: opt['Name'] = '{} {}'.format( @@ -674,7 +689,7 @@ def menu_main(source, dest): opt['Base Name']) selection = menu_select( - title=title+display_pass, + title=title+state.current_pass_str, main_entries=main_options, action_entries=actions) @@ -685,7 +700,7 @@ def menu_main(source, dest): elif selection == 'S': # Set settings for pass settings = [] - for k, v in source['Settings'].items(): + for k, v in state.ddrescue_settings.items(): if not v['Enabled']: continue if k[-1:] == '=': @@ -707,35 +722,34 @@ def menu_main(source, dest): if 'Auto' not in opt['Base Name']: opt['Enabled'] = False - # Run ddrecue - first_run = True - while auto_run or first_run: - first_run = False - run_ddrescue(source, dest, settings) - update_progress(source, end_run=True) - if current_pass == 'Done': - # "Pass Done" i.e. all passes done + # Run ddrescue + state.started = False + while auto_run or not state.started: + state.started = True + run_ddrescue(state) + if state.finished or not auto_run: break - if not main_options[0]['Enabled']: - # Auto next pass - break - if source[current_pass]['Done']: - min_status = source[current_pass]['Min Status'] - if (current_pass == 'Pass 1' and - min_status < AUTO_NEXT_PASS_1_THRESHOLD): + if state.current_pass_done(): + if (state.current_pass == 0 and + state.current_pass_min() < AUTO_PASS_1_THRESHOLD): auto_run = False - elif (current_pass == 'Pass 2' and - min_status < AUTO_NEXT_PASS_2_THRESHOLD): + if (state.current_pass == 1 and + state.current_pass_min() < AUTO_PASS_2_THRESHOLD): auto_run = False else: auto_run = False # Update current pass for next iteration - current_pass = source['Current Pass'] + state.set_pass_num() elif selection == 'C': menu_settings(source) elif selection == 'Q': - break + if state.rescued_percent < 100: + print_warning('Recovery is less than 100%') + if ask('Are you sure you want to quit?'): + break + else: + break def menu_settings(source): From bb270715c1bad0584d1a71405606024af644759b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 22:38:54 -0700 Subject: [PATCH 080/293] Updated run_ddrescue() to use new objects --- .bin/Scripts/functions/ddrescue.py | 79 ++++++++++++++---------------- 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index cc57fc3c..75375c72 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -65,6 +65,7 @@ class BlockPair(): def __init__(self, mode, source, dest): self.mode = mode self.source = source + self.source_path = source.path self.dest = dest self.pass_done = [False, False, False] self.resumed = False @@ -97,6 +98,7 @@ class BlockPair(): def finish_pass(self, pass_num): """Mark pass as done and check if 100% recovered.""" + map_data = read_map_file(self.map_path) if map_data['full recovery']: self.pass_done = [True, True, True] self.rescued = self.size @@ -111,10 +113,6 @@ class BlockPair(): else: self.pass_done[pass_num] = True - def get_pass_done(self, pass_num): - """Return pass number's done state.""" - return self.pass_done[pass_num] - def load_map_data(self): """Load data from map file and set progress.""" map_data = read_map_file(self.map_path) @@ -128,8 +126,8 @@ class BlockPair(): # Initial pass incomplete pass elif map_data['non-trimmed'] > 0: - self.pass_done[0] = True - self.status[0] = 'Skipped' + self.pass_done = [True, False, False] + self.status = ['Skipped', 'Pending', 'Pending'] elif map_data['non-scraped'] > 0: self.pass_done = [True, True, False] self.status = ['Skipped', 'Skipped', 'Pending'] @@ -259,6 +257,7 @@ class RecoveryState(): def __init__(self, mode, source, dest): self.mode = mode.lower() self.source = source + self.source_path = source.path self.dest = dest self.block_pairs = [] self.current_pass = 0 @@ -320,7 +319,7 @@ class RecoveryState(): """Checks if pass is done for all block-pairs, returns bool.""" done = True for bp in self.block_pairs: - done &= bp.get_pass_done(self.current_pass) + done &= bp.pass_done[self.current_pass] return done def current_pass_min(self): @@ -345,7 +344,7 @@ class RecoveryState(): # Iterate backwards through passes pass_done = True for bp in self.block_pairs: - pass_done &= bp.get_pass_done(pass_num) + pass_done &= bp.pass_done[pass_num] if pass_done: # All block-pairs reported being done # Set to next pass, unless we're on the last pass (2) @@ -806,7 +805,11 @@ def menu_settings(source): def read_map_file(map_path): """Read map file with ddrescuelog and return data as dict.""" map_data = {} - result = run_program(['ddrescuelog', '-t', map_path]) + try: + result = run_program(['ddrescuelog', '-t', map_path]) + except CalledProcessError: + # (Grossly) assuming map_data hasn't been saved yet, return empty dict + return map_data # Parse output for line in result.stdout.decode().splitlines(): @@ -824,7 +827,7 @@ def read_map_file(map_path): # Check if 100% done try: run_program(['ddrescuelog', '-D', map_path]) - except subprocess.CalledProcessError: + except CalledProcessError: map_data['full recovery'] = False else: map_data['full recovery'] = True @@ -832,25 +835,16 @@ def read_map_file(map_path): return map_data -def run_ddrescue(source, dest, settings): +def run_ddrescue(state): """Run ddrescue pass.""" - current_pass = source['Current Pass'] return_code = None - if current_pass == 'Done': + if state.finished: clear_screen() print_warning('Recovery already completed?') pause('Press Enter to return to main menu...') return - # Set device(s) to clone/image - source[current_pass]['Status'] = 'Working' - source['Started Recovery'] = True - source_devs = [source] - if source['Children']: - # Use only selected child devices - source_devs = source['Children'] - # Set heights # NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) result = run_program(['tput', 'lines']) @@ -863,39 +857,35 @@ def run_ddrescue(source, dest, settings): '-bdvl', str(height_smart), '-PF', '#D', 'watch', '--color', '--no-title', '--interval', '300', - 'ddrescue-tui-smart-display', source['Dev Path']) + 'ddrescue-tui-smart-display', state.source_path) - # Start pass for each selected device - for s_dev in source_devs: - if s_dev[current_pass]['Done']: - # Move to next device + # Run pass for each block-pair + for bp in state.block_pairs: + if bp.pass_done[state.current_pass]: + # Skip to next block-pair continue - source['Current Device'] = s_dev['Dev Path'] - s_dev[current_pass]['Status'] = 'Working' - update_progress(source) + bp.status[state.current_pass] = 'Working' + update_progress(state) # Set ddrescue cmd - if source['Type'] == 'clone': - cmd = [ - 'ddrescue', *settings, '--force', s_dev['Dev Path'], - dest['Dev Path'], s_dev['Dest Paths']['Map']] - else: - cmd = [ - 'ddrescue', *settings, s_dev['Dev Path'], - s_dev['Dest Paths']['image'], s_dev['Dest Paths']['Map']] - if current_pass == 'Pass 1': + cmd = [ + 'ddrescue', *settings, + bp.source_path, bp.dest_path, bp.map_path] + if state.mode == 'clone': + cmd.append('--force') + if current_pass == 0: cmd.extend(['--no-trim', '--no-scrape']) - elif current_pass == 'Pass 2': + elif current_pass == 1: # Allow trimming cmd.append('--no-scrape') - elif current_pass == 'Pass 3': + elif current_pass == 2: # Allow trimming and scraping pass # Start ddrescue try: clear_screen() - print_info('Current dev: {}'.format(s_dev['Dev Path'])) + print_info('Current dev: {}'.format(bp.source_path)) ddrescue_proc = popen_program(['./__choose_exit', *cmd]) # ddrescue_proc = popen_program(['./__exit_ok', *cmd]) # ddrescue_proc = popen_program(cmd) @@ -903,10 +893,10 @@ def run_ddrescue(source, dest, settings): try: ddrescue_proc.wait(timeout=10) sleep(2) - update_progress(source) + update_progress(state) break except subprocess.TimeoutExpired: - update_progress(source) + update_progress(state) except KeyboardInterrupt: # Catch user abort pass @@ -921,6 +911,9 @@ def run_ddrescue(source, dest, settings): # i.e. not None and not 0 print_error('Error(s) encountered, see message above.') break + else: + # Mark pass finished + bp.finish_pass(state.current_pass) # Done if str(return_code) != '0': From ca78da4dd4ce95e1f83abf62857de77cfeb2a1d7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 22:49:43 -0700 Subject: [PATCH 081/293] Updated show_selection_details() --- .bin/Scripts/functions/ddrescue.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 75375c72..56a24a4f 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -640,7 +640,7 @@ def menu_ddrescue(source_path, dest_path, run_mode): # Confirmations clear_screen() - show_selection_details(state, source, dest) + show_selection_details(state) prompt = 'Start {}?'.format(state.mode.replace('e', 'ing')) if state.resumed: print_info('Map data detected and loaded.') @@ -1168,11 +1168,11 @@ def show_device_details(dev_path): print_standard(line) -def show_selection_details(state, source, dest): +def show_selection_details(state): """Show selection details.""" # Source print_success('Source') - print_standard(source.report) + print_standard(state.source.report) print_standard(' ') # Destination @@ -1181,7 +1181,7 @@ def show_selection_details(state, source, dest): print_error('(ALL DATA WILL BE DELETED)', timestamp=False) else: print_success('Destination') - print_standard(dest.report) + print_standard(state.dest.report) print_standard(' ') From 5ac05c943ee269264fdb51fabb8b11cac6faf90a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 22:50:05 -0700 Subject: [PATCH 082/293] Removed unused function show_device_details() --- .bin/Scripts/functions/ddrescue.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 56a24a4f..9e8d260c 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -1147,27 +1147,6 @@ def setup_loopback_device(source_path): return dev_path -def show_device_details(dev_path): - """Display device details on screen.""" - cmd = ( - 'lsblk', '--nodeps', - '--output', 'NAME,TRAN,TYPE,SIZE,VENDOR,MODEL,SERIAL', - dev_path) - result = run_program(cmd) - output = result.stdout.decode().splitlines() - print_info(output.pop(0)) - for line in output: - print_standard(line) - - # Children info - cmd = ('lsblk', '--output', 'NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT', dev_path) - result = run_program(cmd) - output = result.stdout.decode().splitlines() - print_info(output.pop(0)) - for line in output: - print_standard(line) - - def show_selection_details(state): """Show selection details.""" # Source From 5948d1a62fcb9f5012826f66f1a9a4f35d8385a7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 22:50:47 -0700 Subject: [PATCH 083/293] Fixed menu_main() arguments --- .bin/Scripts/functions/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 9e8d260c..e0a31353 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -658,7 +658,7 @@ def menu_ddrescue(source_path, dest_path, run_mode): run_program(['tmux', 'kill-window']) exit_script() -def menu_main(source, dest): +def menu_main(state): """Main menu is used to set ddrescue settings.""" title = '{GREEN}ddrescue TUI: Main Menu{CLEAR}\n\n'.format(**COLORS) title += '{BLUE}Current pass: {CLEAR}'.format(**COLORS) From 8461e581ea13675b3966bb4cd5d21b409079ce12 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 15 Aug 2018 23:24:01 -0700 Subject: [PATCH 084/293] Updated menu_settings() to use RecoveryState --- .bin/Scripts/functions/ddrescue.py | 51 +++++++++++++++++------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index e0a31353..c1065d97 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -262,7 +262,7 @@ class RecoveryState(): self.block_pairs = [] self.current_pass = 0 self.current_pass_str = '0: Initializing' - self.ddrescue_settings = DDRESCUE_SETTINGS.copy() + self.settings = DDRESCUE_SETTINGS.copy() self.finished = False self.progress_out = '{}/progress.out'.format(global_vars['LogDir']) self.rescued = 0 @@ -569,7 +569,7 @@ def get_status_color(s, t_success=99, t_warn=90): if s in ('Pending',) or str(s)[-2:] in (' b', 'Kb', 'Mb', 'Gb', 'Tb'): color = COLORS['CLEAR'] - elif s in ('Skipped', 'Unknown', 'Working'): + elif s in ('Skipped', 'Unknown'): color = COLORS['YELLOW'] elif p_recovered >= t_success: color = COLORS['GREEN'] @@ -699,7 +699,7 @@ def menu_main(state): elif selection == 'S': # Set settings for pass settings = [] - for k, v in state.ddrescue_settings.items(): + for k, v in state.settings.items(): if not v['Enabled']: continue if k[-1:] == '=': @@ -741,7 +741,7 @@ def menu_main(state): state.set_pass_num() elif selection == 'C': - menu_settings(source) + menu_settings(state) elif selection == 'Q': if state.rescued_percent < 100: print_warning('Recovery is less than 100%') @@ -751,7 +751,7 @@ def menu_main(state): break -def menu_settings(source): +def menu_settings(state): """Change advanced ddrescue settings.""" title = '{GREEN}ddrescue TUI: Expert Settings{CLEAR}\n\n'.format(**COLORS) title += '{YELLOW}These settings can cause {CLEAR}'.format(**COLORS) @@ -761,7 +761,7 @@ def menu_settings(source): # Build menu settings = [] - for k, v in sorted(source['Settings'].items()): + for k, v in sorted(state.settings.items()): if not v.get('Hidden', False): settings.append({'Base Name': k.replace('=', ''), 'Flag': k}) actions = [{'Name': 'Main Menu', 'Letter': 'M'}] @@ -771,9 +771,9 @@ def menu_settings(source): for s in settings: s['Name'] = '{}{}{}'.format( s['Base Name'], - ' = ' if 'Value' in source['Settings'][s['Flag']] else '', - source['Settings'][s['Flag']].get('Value', '')) - if not source['Settings'][s['Flag']]['Enabled']: + ' = ' if 'Value' in state.settings[s['Flag']] else '', + state.settings[s['Flag']].get('Value', '')) + if not state.settings[s['Flag']]['Enabled']: s['Name'] = '{YELLOW}{name} (Disabled){CLEAR}'.format( name=s['Name'], **COLORS) @@ -784,27 +784,27 @@ def menu_settings(source): if selection.isnumeric(): index = int(selection) - 1 flag = settings[index]['Flag'] - enabled = source['Settings'][flag]['Enabled'] - if 'Value' in source['Settings'][flag]: + enabled = state.settings[flag]['Enabled'] + if 'Value' in state.settings[flag]: answer = choice( choices=['T', 'C'], prompt='Toggle or change value for "{}"'.format(flag)) if answer == 'T': # Toggle - source['Settings'][flag]['Enabled'] = not enabled + state.settings[flag]['Enabled'] = not enabled else: # Update value - source['Settings'][flag]['Value'] = get_simple_string( + state.settings[flag]['Value'] = get_simple_string( prompt='Enter new value') else: - source['Settings'][flag]['Enabled'] = not enabled + state.settings[flag]['Enabled'] = not enabled elif selection == 'M': break def read_map_file(map_path): """Read map file with ddrescuelog and return data as dict.""" - map_data = {} + map_data = {'full recovery': False} try: result = run_program(['ddrescuelog', '-t', map_path]) except CalledProcessError: @@ -864,21 +864,28 @@ def run_ddrescue(state): if bp.pass_done[state.current_pass]: # Skip to next block-pair continue - bp.status[state.current_pass] = 'Working' update_progress(state) # Set ddrescue cmd - cmd = [ - 'ddrescue', *settings, - bp.source_path, bp.dest_path, bp.map_path] + cmd = ['ddrescue', bp.source_path, bp.dest_path, bp.map_path] + for k, v in state.settings.items(): + if not v['Enabled']: + continue + if 'Value' in v: + cmd.append('{}{}{}'.format( + k, + '' if k[-1:] == '=' else ' ', + v['Value'])) + else: + cmd.append(k) if state.mode == 'clone': cmd.append('--force') - if current_pass == 0: + if state.current_pass == 0: cmd.extend(['--no-trim', '--no-scrape']) - elif current_pass == 1: + elif state.current_pass == 1: # Allow trimming cmd.append('--no-scrape') - elif current_pass == 2: + elif state.current_pass == 2: # Allow trimming and scraping pass From 7d30a735fc6cff314d3e1b5eafdafa7e67b8463f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 16 Aug 2018 00:18:25 -0700 Subject: [PATCH 085/293] Fix retry option and settings sections --- .bin/Scripts/functions/ddrescue.py | 71 +++++++++++++----------------- 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index c1065d97..1858a30f 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -17,15 +17,15 @@ AUTO_PASS_1_THRESHOLD = 95 AUTO_PASS_2_THRESHOLD = 98 DDRESCUE_SETTINGS = { '--binary-prefixes': {'Enabled': True, 'Hidden': True}, - '--data-preview': {'Enabled': True, 'Hidden': True}, + '--data-preview': {'Enabled': True, 'Hidden': True, 'Value': '5'}, '--idirect': {'Enabled': True}, '--odirect': {'Enabled': True}, '--max-read-rate': {'Enabled': False, 'Value': '32MiB'}, '--min-read-rate': {'Enabled': True, 'Value': '64KiB'}, '--reopen-on-error': {'Enabled': True}, - '--retry-passes=': {'Enabled': True, 'Value': '0'}, - '--test-mode=': {'Enabled': False, 'Value': 'test.map'}, - '--timeout=': {'Enabled': True, 'Value': '5m'}, + '--retry-passes': {'Enabled': True, 'Value': '0'}, + '--test-mode': {'Enabled': False, 'Value': 'test.map'}, + '--timeout': {'Enabled': True, 'Value': '5m'}, '-vvvv': {'Enabled': True, 'Hidden': True}, } RECOMMENDED_FSTYPES = ['ext3', 'ext4', 'xfs'] @@ -90,7 +90,10 @@ class BlockPair(): if os.path.exists(self.map_path): self.load_map_data() self.resumed = True - # Fix status strings + fix_status_strings() + + def fix_status_strings(self): + """Format status strings via get_formatted_status().""" for pass_num in [1, 2, 3]: self.status[pass_num-1] = get_formatted_status( label='Pass {}'.format(pass_num), @@ -329,6 +332,15 @@ class RecoveryState(): min_percent = min(min_percent, bp.rescued) return min_percent + def retry_all_passes(self): + """Mark all passes as pending for all block-pairs.""" + self.current_pass = 0 + for bp in self.block_pairs: + bp.pass_done = [False, False, False] + bp.status = ['Pending', 'Pending', 'Pending'] + bp.fix_status_strings() + self.set_pass_num() + def self_checks(self): """Run self-checks for each BlockPair and update state values.""" self.total_size = 0 @@ -595,18 +607,6 @@ def is_writable_filesystem(dir_obj): return 'rw' in dir_obj.details.get('options', '') -def mark_all_passes_pending(source): - """Mark all devs and passes as pending in preparation for retry.""" - source['Current Pass'] = 'Pass 1' - source['Started Recovery'] = False - for p_num in ['Pass 1', 'Pass 2', 'Pass 3']: - source[p_num]['Status'] = 'Pending' - source[p_num]['Done'] = False - for child in source['Children']: - child[p_num]['Status'] = 'Pending' - child[p_num]['Done'] = False - - def menu_ddrescue(source_path, dest_path, run_mode): """ddrescue menu.""" source = None @@ -698,25 +698,22 @@ def menu_main(state): main_options[index]['Enabled'] = not main_options[index]['Enabled'] elif selection == 'S': # Set settings for pass - settings = [] + pass_settings = [] for k, v in state.settings.items(): if not v['Enabled']: continue - if k[-1:] == '=': - settings.append('{}{}'.format(k, v['Value'])) + if 'Value' in v: + pass_settings.append('{}={}'.format(k, v['Value'])) else: - settings.append(k) - if 'Value' in v: - settings.append(v['Value']) + pass_settings.append(k) for opt in main_options: if 'Auto' in opt['Base Name']: auto_run = opt['Enabled'] if 'Retry' in opt['Base Name'] and opt['Enabled']: - settings.extend(['--retrim', '--try-again']) - mark_all_passes_pending(source) - current_pass = 'Pass 1' + pass_settings.extend(['--retrim', '--try-again']) + state.retry_all_passes() if 'Reverse' in opt['Base Name'] and opt['Enabled']: - settings.append('--reverse') + pass_settings.append('--reverse') # Disable for next pass if 'Auto' not in opt['Base Name']: opt['Enabled'] = False @@ -725,7 +722,7 @@ def menu_main(state): state.started = False while auto_run or not state.started: state.started = True - run_ddrescue(state) + run_ddrescue(state, pass_settings) if state.finished or not auto_run: break if state.current_pass_done(): @@ -763,7 +760,7 @@ def menu_settings(state): settings = [] for k, v in sorted(state.settings.items()): if not v.get('Hidden', False): - settings.append({'Base Name': k.replace('=', ''), 'Flag': k}) + settings.append({'Base Name': k, 'Flag': k}) actions = [{'Name': 'Main Menu', 'Letter': 'M'}] # Show menu @@ -835,7 +832,7 @@ def read_map_file(map_path): return map_data -def run_ddrescue(state): +def run_ddrescue(state, pass_settings): """Run ddrescue pass.""" return_code = None @@ -867,17 +864,9 @@ def run_ddrescue(state): update_progress(state) # Set ddrescue cmd - cmd = ['ddrescue', bp.source_path, bp.dest_path, bp.map_path] - for k, v in state.settings.items(): - if not v['Enabled']: - continue - if 'Value' in v: - cmd.append('{}{}{}'.format( - k, - '' if k[-1:] == '=' else ' ', - v['Value'])) - else: - cmd.append(k) + cmd = [ + 'ddrescue', *pass_settings, + bp.source_path, bp.dest_path, bp.map_path] if state.mode == 'clone': cmd.append('--force') if state.current_pass == 0: From afaee53077706ddae7cb73e80dac23ea25d228ad Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 16 Aug 2018 00:43:09 -0700 Subject: [PATCH 086/293] Fixed current_pass updates/progression --- .bin/Scripts/functions/ddrescue.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 1858a30f..484a9f7a 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -90,7 +90,7 @@ class BlockPair(): if os.path.exists(self.map_path): self.load_map_data() self.resumed = True - fix_status_strings() + self.fix_status_strings() def fix_status_strings(self): """Format status strings via get_formatted_status().""" @@ -334,7 +334,7 @@ class RecoveryState(): def retry_all_passes(self): """Mark all passes as pending for all block-pairs.""" - self.current_pass = 0 + self.finished = False for bp in self.block_pairs: bp.pass_done = [False, False, False] bp.status = ['Pending', 'Pending', 'Pending'] @@ -367,11 +367,11 @@ class RecoveryState(): break if self.finished: self.current_pass_str = '- "Done"' - elif pass_num == 0: + elif self.current_pass == 0: self.current_pass_str = '1 "Initial Read"' - elif pass_num == 1: + elif self.current_pass == 1: self.current_pass_str = '2 "Trimming bad areas"' - elif pass_num == 2: + elif self.current_pass == 2: self.current_pass_str = '3 "Scraping bad areas"' def update_progress(self): @@ -724,6 +724,7 @@ def menu_main(state): state.started = True run_ddrescue(state, pass_settings) if state.finished or not auto_run: + state.set_pass_num() break if state.current_pass_done(): if (state.current_pass == 0 and From 2272d133f97924d9ae368c5b17980f9126b44340 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 16 Aug 2018 01:18:06 -0700 Subject: [PATCH 087/293] Fixed update_progress & update_sidepane --- .bin/Scripts/functions/ddrescue.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 484a9f7a..b2880896 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -424,7 +424,7 @@ def build_outer_panes(state): **COLORS)) # Side pane - update_progress(state) + update_sidepane(state) tmux_splitw( '-dhl', str(SIDE_PANE_WIDTH), 'watch', '--color', '--no-title', '--interval', '1', @@ -862,7 +862,7 @@ def run_ddrescue(state, pass_settings): if bp.pass_done[state.current_pass]: # Skip to next block-pair continue - update_progress(state) + update_sidepane(state) # Set ddrescue cmd cmd = [ @@ -887,17 +887,25 @@ def run_ddrescue(state, pass_settings): # ddrescue_proc = popen_program(['./__exit_ok', *cmd]) # ddrescue_proc = popen_program(cmd) while True: + bp.update_progress(state.current_pass) + update_sidepane(state) try: ddrescue_proc.wait(timeout=10) sleep(2) - update_progress(state) + bp.update_progress(state.current_pass) + update_sidepane(state) break except subprocess.TimeoutExpired: - update_progress(state) + # Catch to update bp/sidepane + pass except KeyboardInterrupt: # Catch user abort pass + # Update progress/sidepane again + bp.update_progress(state.current_pass) + update_sidepane(state) + # Was ddrescue aborted? return_code = ddrescue_proc.poll() if return_code is None or return_code is 130: @@ -1174,9 +1182,10 @@ def tmux_splitw(*args): return result.stdout.decode().strip() -def update_progress(state): +def update_sidepane(state): """Update progress file for side pane.""" output = [] + state.update_progress() if state.mode == 'clone': output.append(' {BLUE}Cloning Status{CLEAR}'.format(**COLORS)) else: @@ -1195,11 +1204,11 @@ def update_progress(state): output.append('{BLUE}Image File{CLEAR}'.format(**COLORS)) elif state.mode == 'image' and len(state.block_pairs) == 1: output.append('{BLUE}{source} {YELLOW}(Whole){CLEAR}'.format( - source=bp.source.path, + source=bp.source_path, **COLORS)) else: output.append('{BLUE}{source}{CLEAR}'.format( - source=bp.source.path, + source=bp.source_path, **COLORS)) output.extend(bp.status) output.append(' ') From 0c8de47893a806529f1e59951f7ab4053b794fdc Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 16 Aug 2018 01:49:06 -0700 Subject: [PATCH 088/293] Reworked auto mode and pass status sections --- .bin/Scripts/functions/ddrescue.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index b2880896..13b16fbd 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -106,12 +106,14 @@ class BlockPair(): self.pass_done = [True, True, True] self.rescued = self.size self.status[pass_num] = get_formatted_status( - label='Pass {}'.format(pass_num), + label='Pass {}'.format(pass_num+1), data=100) # Mark future passes as Skipped pass_num += 1 while pass_num <= 2: - self.status[pass_num] = 'Skipped' + self.status[pass_num] = get_formatted_status( + label='Pass {}'.format(pass_num+1), + data='Skipped') pass_num += 1 else: self.pass_done[pass_num] = True @@ -723,20 +725,18 @@ def menu_main(state): while auto_run or not state.started: state.started = True run_ddrescue(state, pass_settings) - if state.finished or not auto_run: - state.set_pass_num() - break if state.current_pass_done(): if (state.current_pass == 0 and state.current_pass_min() < AUTO_PASS_1_THRESHOLD): auto_run = False - if (state.current_pass == 1 and + elif (state.current_pass == 1 and state.current_pass_min() < AUTO_PASS_2_THRESHOLD): auto_run = False else: auto_run = False - # Update current pass for next iteration state.set_pass_num() + if state.finished: + break elif selection == 'C': menu_settings(state) @@ -919,6 +919,7 @@ def run_ddrescue(state, pass_settings): else: # Mark pass finished bp.finish_pass(state.current_pass) + update_sidepane(state) # Done if str(return_code) != '0': From ee4cea3b0197da065b56c9ef5214d0898739c93c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 16 Aug 2018 01:58:22 -0700 Subject: [PATCH 089/293] Added systemd journal pane --- .bin/Scripts/functions/ddrescue.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 13b16fbd..b967672b 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -847,8 +847,9 @@ def run_ddrescue(state, pass_settings): # NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep) result = run_program(['tput', 'lines']) height = int(result.stdout.decode().strip()) - height_smart = int(height * (12 / 33)) - height_ddrescue = height - height_smart + height_smart = int(height * (8 / 33)) + height_journal = int(height * (4 / 33)) + height_ddrescue = height - height_smart - height_journal # Show SMART status smart_pane = tmux_splitw( @@ -857,6 +858,12 @@ def run_ddrescue(state, pass_settings): 'watch', '--color', '--no-title', '--interval', '300', 'ddrescue-tui-smart-display', state.source_path) + # Show systemd journal output + journal_pane = tmux_splitw( + '-dvl', str(height_journal), + '-PF', '#D', + 'journalctl', '-f') + # Run pass for each block-pair for bp in state.block_pairs: if bp.pass_done[state.current_pass]: @@ -926,6 +933,7 @@ def run_ddrescue(state, pass_settings): # Pause on errors pause('Press Enter to return to main menu... ') run_program(['tmux', 'kill-pane', '-t', smart_pane]) + run_program(['tmux', 'kill-pane', '-t', journal_pane]) def select_parts(source_device): From 91b5dbfe88f94c76c0442ab0535717a57e7550ac Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 13:22:23 -0700 Subject: [PATCH 090/293] Added ENABLED_OPEN_LOGS toggle var --- .bin/Scripts/functions/common.py | 2 +- .bin/Scripts/settings/main.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index f677df45..2c9614a2 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -162,7 +162,7 @@ def exit_script(return_value=0): # Open Log (if it exists) log = global_vars.get('LogFile', '') - if log and os.path.exists(log) and psutil.WINDOWS: + if log and os.path.exists(log) and psutil.WINDOWS and ENABLED_OPEN_LOGS: try: extract_item('NotepadPlusPlus', silent=True) popen_program( diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index c49da96e..95be9c40 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -1,8 +1,9 @@ # Wizard Kit: Settings - Main / Branding # Features -ENABLED_UPLOAD_DATA = False +ENABLED_OPEN_LOGS = False ENABLED_TICKET_NUMBERS = False +ENABLED_UPLOAD_DATA = False # STATIC VARIABLES (also used by BASH and BATCH files) ## NOTE: There are no spaces around the = for easier parsing in BASH and BATCH From 71297eacc896442ebd24f39b21ab49e2c3391d00 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 13:24:59 -0700 Subject: [PATCH 091/293] Allow L_ARGS for Python scripts in Launch.cmd --- .bin/Scripts/Launch.cmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index 2364dcc8..ef3d31d9 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -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%"" %L_ARGS%", "", "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%"" %L_ARGS% -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" ) rem Run @@ -291,9 +291,9 @@ goto Exit :LaunchPyScriptUser if defined L_NCMD ( - start "" "%PYTHON%" "%script%" || goto ErrorUnknown + start "" "%PYTHON%" "%script%" %L_ARGS% || goto ErrorUnknown ) else ( - start "" "%CON%" -run "%PYTHON%" "%script%" -new_console:n || goto ErrorUnknown + start "" "%CON%" -run "%PYTHON%" "%script%" %L_ARGS% -new_console:n || goto ErrorUnknown ) goto Exit @@ -333,7 +333,7 @@ echo. Executable Working Dir Program Args [L_7ZIP] [L_ELEV] [L__CLI] echo. Folder Folder '.' [L_7ZIP] echo. Office Year Product [L_7ZIP] echo. PSScript Scripts Script [L_7ZIP] [L_ELEV] [L_NCMD] -echo. PyScript Scripts Script [L_7ZIP] [L_ELEV] [L_NCMD] +echo. PyScript Scripts Script Args [L_7ZIP] [L_ELEV] [L_NCMD] echo. QuickBooks Year Product [L_7ZIP] echo. echo.L_7ZIP: Extra arguments for 7-Zip (in the :ExtractCBin label) From ed3323fffbaa5e0ad9934843579271739fd2f568 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 13:30:07 -0700 Subject: [PATCH 092/293] Updated system checklist/diags and user checklits * Added D7_MODE to limit functions run during d7II * Added new archive_all_users() function to be run in system_diagnostics --- .bin/Scripts/functions/browsers.py | 68 ++++++++++++++++++--- .bin/Scripts/system_checklist.py | 30 +++++---- .bin/Scripts/system_diagnostics.py | 97 +++++++++++++++++------------- .bin/Scripts/user_checklist.py | 12 ++-- 4 files changed, 139 insertions(+), 68 deletions(-) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index b969a59c..7efa4af8 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -2,6 +2,8 @@ from functions.common import * +from operator import itemgetter + # Define other_results for later try_and_print browser_data = {} other_results = { @@ -98,11 +100,57 @@ SUPPORTED_BROWSERS = { }, } +def archive_all_users(): + """Create backups for all browsers for all users.""" + users_root = r'{}\Users'.format(global_vars['Env']['SYSTEMDRIVE']) + user_envs = [] + + # Build list of valid users + for user_name in os.listdir(users_root): + valid_user = True + if user_name in ('Default', 'Default User'): + # Skip default users + continue + user_path = os.path.join(users_root, user_name) + appdata_local = os.path.join(user_path, r'AppData\Local') + appdata_roaming = os.path.join(user_path, r'AppData\Roaming') + valid_user &= os.path.exists(appdata_local) + valid_user &= os.path.exists(appdata_roaming) + if valid_user: + user_envs.append({ + 'USERNAME': user_name, + 'USERPROFILE': user_path, + 'APPDATA': appdata_roaming, + 'LOCALAPPDATA': appdata_local}) + + # Backup browsers for all valid users + print_info('Backing up browsers') + for fake_env in sorted(user_envs, key=itemgetter('USERPROFILE')): + print_standard(fake_env['USERNAME']) + for b_k, b_v in sorted(SUPPORTED_BROWSERS.items()): + if b_k == 'Mozilla Firefox Dev': + continue + source_path = b_v['user_data_path'].format(**fake_env) + if not os.path.exists(source_path): + continue + source_items = source_path + '*' + archive_path = r'{BackupDir}\Browsers ({USERNAME})'.format( + **global_vars, **fake_env) + os.makedirs(archive_path, exist_ok=True) + archive_path += r'\{}.7z'.format(b_k) + cmd = [ + global_vars['Tools']['SevenZip'], + 'a', '-aoa', '-bso0', '-bse0', '-mx=1', + archive_path, source_items] + try_and_print(message=' {}...'.format(b_k), + function=run_program, cmd=cmd) + print_standard(' ') + def archive_browser(name): """Create backup of Browser saved in the BackupDir.""" source = '{}*'.format(browser_data[name]['user_data_path']) dest = r'{BackupDir}\Browsers ({USERNAME})'.format( - **global_vars, **global_vars['Env']) + **global_vars, **env) archive = r'{}\{}.7z'.format(dest, name) os.makedirs(dest, exist_ok=True) cmd = [ @@ -135,7 +183,7 @@ def clean_chromium_profile(profile): def clean_internet_explorer(**kwargs): """Uses the built-in function to reset IE and sets the homepage. - + NOTE: kwargs set but unused as a workaround.""" kill_process('iexplore.exe') run_program(['rundll32.exe', 'inetcpl.cpl,ResetIEtoDefaults'], check=False) @@ -179,11 +227,11 @@ def clean_mozilla_profile(profile): def get_browser_details(name): """Get installation status and profile details for all supported browsers.""" browser = SUPPORTED_BROWSERS[name].copy() - + # Update user_data_path browser['user_data_path'] = browser['user_data_path'].format( **global_vars['Env']) - + # Find executable (if multiple files are found, the last one is used) exe_path = None num_installs = 0 @@ -194,7 +242,7 @@ def get_browser_details(name): if os.path.exists(test_path): num_installs += 1 exe_path = test_path - + # Find profile(s) profiles = [] if browser['base'] == 'ie': @@ -227,7 +275,7 @@ def get_browser_details(name): if os.path.exists(browser['user_data_path']): profiles.append( {'name': 'Default', 'path': browser['user_data_path']}) - + # Get homepages if browser['base'] == 'ie': # IE is set to only have one profile above @@ -236,14 +284,14 @@ def get_browser_details(name): for profile in profiles: prefs_path = r'{path}\prefs.js'.format(**profile) profile['homepages'] = get_mozilla_homepages(prefs_path=prefs_path) - + # Add to browser_data browser_data[name] = browser browser_data[name].update({ 'exe_path': exe_path, 'profiles': profiles, }) - + # Raise installation warnings (if any) if num_installs == 0: raise NotInstalledError @@ -299,7 +347,7 @@ def get_mozilla_homepages(prefs_path): homepages = search.group(1).split('|') except Exception: pass - + return homepages def get_mozilla_profiles(search_path, dev=False): @@ -391,7 +439,7 @@ def install_adblock(indent=8, width=32): def list_homepages(indent=8, width=32): """List current homepages for reference.""" - + for browser in [k for k, v in sorted(browser_data.items()) if v['exe_path']]: # Skip Chromium-based browsers if browser_data[browser]['base'] == 'chromium': diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 73410d92..33865daa 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -15,6 +15,7 @@ from functions.setup import * init_global_vars() os.system('title {}: System Checklist Tool'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\System Checklist.log'.format(**global_vars) +D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': try: @@ -49,17 +50,18 @@ if __name__ == '__main__': function=cleanup_adwcleaner, cs='Done', other_results=other_results) # Export system info - print_info('Backup System Information') - try_and_print(message='AIDA64 reports...', - function=run_aida64, cs='Done', other_results=other_results) - try_and_print(message='File listing...', - function=backup_file_list, cs='Done', other_results=other_results) - try_and_print(message='Power plans...', - function=backup_power_plans, cs='Done') - try_and_print(message='Product Keys...', other_results=other_results, - function=run_produkey, cs='Done') - try_and_print(message='Registry...', - function=backup_registry, cs='Done', other_results=other_results) + if not D7_MODE: + print_info('Backup System Information') + try_and_print(message='AIDA64 reports...', + function=run_aida64, cs='Done', other_results=other_results) + try_and_print(message='File listing...', + function=backup_file_list, cs='Done', other_results=other_results) + try_and_print(message='Power plans...', + function=backup_power_plans, cs='Done') + try_and_print(message='Product Keys...', other_results=other_results, + function=run_produkey, cs='Done') + try_and_print(message='Registry...', + function=backup_registry, cs='Done', other_results=other_results) # User data print_info('User Data') @@ -79,12 +81,18 @@ if __name__ == '__main__': try_and_print(message='Installed RAM:', function=show_installed_ram, ns='Unknown', silent_function=False) show_free_space() + if D7_MODE: + try_and_print(message='Temp Size:', + function=show_temp_files_size, silent_function=False) try_and_print(message='Installed Antivirus:', function=get_installed_antivirus, ns='Unknown', other_results=other_results, print_return=True) try_and_print(message='Installed Office:', function=get_installed_office, ns='Unknown', other_results=other_results, print_return=True) + if D7_MODE: + try_and_print(message='Product Keys:', + function=get_product_keys, ns='Unknown', print_return=True) # Play audio, show devices, open Windows updates, and open Activation try_and_print(message='Opening Device Manager...', diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 9a6e1c0b..4c0fe0a8 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -15,6 +15,7 @@ init_global_vars() os.system('title {}: System Diagnostics Tool'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\System Diagnostics.log'.format( **global_vars) +D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': try: @@ -37,23 +38,23 @@ if __name__ == '__main__': # Sanitize Environment print_info('Sanitizing Environment') - # try_and_print(message='Killing processes...', - # function=run_process_killer, cs='Done') - try_and_print(message='Running RKill...', - function=run_rkill, cs='Done', other_results=other_results) - try_and_print(message='Running TDSSKiller...', - function=run_tdsskiller, cs='Done', other_results=other_results) + if not D7_MODE: + try_and_print(message='Running RKill...', + function=run_rkill, cs='Done', other_results=other_results) + try_and_print(message='Running TDSSKiller...', + function=run_tdsskiller, cs='Done', other_results=other_results) # Re-run if earlier process was stopped. stay_awake() # Start diags - print_info('Starting Background Scans') - check_connection() - try_and_print(message='Running HitmanPro...', - function=run_hitmanpro, cs='Started', other_results=other_results) - try_and_print(message='Running Autoruns...', - function=run_autoruns, cs='Started', other_results=other_results) + if not D7_MODE: + print_info('Starting Background Scans') + check_connection() + try_and_print(message='Running HitmanPro...', + function=run_hitmanpro, cs='Started', other_results=other_results) + try_and_print(message='Running Autoruns...', + function=run_autoruns, cs='Started', other_results=other_results) # OS Health Checks print_info('OS Health Checks') @@ -65,9 +66,14 @@ if __name__ == '__main__': try_and_print(message='DISM CheckHealth...', function=run_dism, other_results=other_results, repair=False) - # Scan for supported browsers - print_info('Scanning for browsers') - scan_for_browsers() + + if D7_MODE: + # Archive all browsers for all users + archive_all_users() + else: + # Scan for supported browsers + print_info('Scanning for browsers') + scan_for_browsers() # Export system info print_info('Backup System Information') @@ -75,46 +81,51 @@ if __name__ == '__main__': function=run_aida64, cs='Done', other_results=other_results) try_and_print(message='BleachBit report...', function=run_bleachbit, cs='Done', other_results=other_results) - backup_browsers() + if not D7_MODE: + backup_browsers() try_and_print(message='File listing...', function=backup_file_list, cs='Done', other_results=other_results) try_and_print(message='Power plans...', function=backup_power_plans, cs='Done') try_and_print(message='Product Keys...', function=run_produkey, cs='Done', other_results=other_results) - try_and_print(message='Registry...', - function=backup_registry, cs='Done', other_results=other_results) + if not D7_MODE: + try_and_print(message='Registry...', + function=backup_registry, cs='Done', other_results=other_results) # Summary - print_info('Summary') - try_and_print(message='Operating System:', - function=show_os_name, ns='Unknown', silent_function=False) - try_and_print(message='Activation:', - function=show_os_activation, ns='Unknown', silent_function=False) - try_and_print(message='Installed RAM:', - function=show_installed_ram, ns='Unknown', silent_function=False) - show_free_space() - try_and_print(message='Temp Size:', - function=show_temp_files_size, silent_function=False) - try_and_print(message='Installed Antivirus:', - function=get_installed_antivirus, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Installed Office:', - function=get_installed_office, ns='Unknown', - other_results=other_results, print_return=True) - try_and_print(message='Product Keys:', - function=get_product_keys, ns='Unknown', print_return=True) + if not D7_MODE: + print_info('Summary') + try_and_print(message='Operating System:', + function=show_os_name, ns='Unknown', silent_function=False) + try_and_print(message='Activation:', + function=show_os_activation, ns='Unknown', silent_function=False) + try_and_print(message='Installed RAM:', + function=show_installed_ram, ns='Unknown', silent_function=False) + show_free_space() + try_and_print(message='Temp Size:', + function=show_temp_files_size, silent_function=False) + try_and_print(message='Installed Antivirus:', + function=get_installed_antivirus, ns='Unknown', + other_results=other_results, print_return=True) + try_and_print(message='Installed Office:', + function=get_installed_office, ns='Unknown', + other_results=other_results, print_return=True) + try_and_print(message='Product Keys:', + function=get_product_keys, ns='Unknown', print_return=True) # User data - print_info('User Data') - try: - show_user_data_summary() - except Exception: - print_error(' Unknown error.') + if not D7_MODE: + print_info('User Data') + try: + show_user_data_summary() + except Exception: + print_error(' Unknown error.') # Done - print_standard('\nDone.') - pause('Press Enter to exit...') + if not D7_MODE: + print_standard('\nDone.') + pause('Press Enter to exit...') exit_script() except SystemExit: pass diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index 72697af7..c106c9ef 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -13,6 +13,7 @@ init_global_vars() os.system('title {}: User Checklist Tool'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\User Checklist ({USERNAME}).log'.format( **global_vars, **global_vars['Env']) +D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': try: @@ -46,8 +47,10 @@ if __name__ == '__main__': list_homepages() # Backup - print_info('Backing up browsers') - backup_browsers() + if not D7_MODE: + # Done during system_diagnostics + print_info('Backing up browsers') + backup_browsers() # Reset if answer_config_browsers and answer_reset_browsers: @@ -77,8 +80,9 @@ if __name__ == '__main__': popen_program(['start', '', 'https://fast.com'], shell=True) # Done - print_standard('\nDone.') - pause('Press Enter to exit...') + if not D7_MODE: + print_standard('\nDone.') + pause('Press Enter to exit...') exit_script() except SystemExit: pass From b42f393a1ae64899045d968c14e484742af9d822 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 15:28:33 -0700 Subject: [PATCH 093/293] Always configure browsers/classicshell/explorer --- .bin/Scripts/user_checklist.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index c106c9ef..e280567e 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -25,13 +25,16 @@ if __name__ == '__main__': 'NotInstalledError': 'Not installed', 'NoProfilesError': 'No profiles found', }} - answer_config_browsers = ask('Install adblock?') + #answer_config_browsers = ask('Install adblock?') + answer_config_browsers = True if answer_config_browsers: answer_reset_browsers = ask( 'Reset browsers to safe defaults first?') if global_vars['OS']['Version'] == '10': - answer_config_classicshell = ask('Configure ClassicShell?') - answer_config_explorer_user = ask('Configure Explorer?') + #answer_config_classicshell = ask('Configure ClassicShell?') + #answer_config_explorer_user = ask('Configure Explorer?') + answer_config_classicshell = True + answer_config_explorer_user = True # Cleanup print_info('Cleanup') From 9f77b532b6885af3c141bd949c4053614718ccc6 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 15:49:12 -0700 Subject: [PATCH 094/293] New reset_browsers script for use in d7ii * Adjusted user_checklist as well --- .bin/Scripts/reset_browsers.py | 61 ++++++++++++++++++++++++++++++++++ .bin/Scripts/user_checklist.py | 26 +++++++++------ 2 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 .bin/Scripts/reset_browsers.py diff --git a/.bin/Scripts/reset_browsers.py b/.bin/Scripts/reset_browsers.py new file mode 100644 index 00000000..248b8c72 --- /dev/null +++ b/.bin/Scripts/reset_browsers.py @@ -0,0 +1,61 @@ +# Wizard Kit: Reset Browsers + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.browsers import * +from functions.cleanup import * +from functions.setup import * +init_global_vars() +os.system('title {}: Browser Reset Tool'.format(KIT_NAME_FULL)) +global_vars['LogFile'] = r'{LogDir}\Browser Reset ({USERNAME}).log'.format( + **global_vars, **global_vars['Env']) +D7_MODE = 'd7mode' in sys.argv + +if __name__ == '__main__': + try: + stay_awake() + clear_screen() + print_info('{}: Browser Reset\n'.format(KIT_NAME_FULL)) + other_results = { + 'Warning': { + 'NotInstalledError': 'Not installed', + 'NoProfilesError': 'No profiles found', + }} + + # Bail early + if not D7_MODE or ask('Reset browsers to safe defaults first?'): + exit_script() + + # Scan for supported browsers + print_info('Scanning for browsers') + scan_for_browsers() + + # Homepages + print_info('Current homepages') + list_homepages() + + # Backup + print_info('Backing up browsers') + backup_browsers() + + # Reset + print_info('Resetting browsers') + reset_browsers() + + # Configure + print_info('Installing uBlock Origin') + install_adblock() + + # Done + if not D7_MODE: + print_standard('\nDone.') + pause('Press Enter to exit...') + exit_script() + except SystemExit: + pass + except: + major_exception() diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index e280567e..70511269 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -28,38 +28,44 @@ if __name__ == '__main__': #answer_config_browsers = ask('Install adblock?') answer_config_browsers = True if answer_config_browsers: + if D7_MODE: + # This is handled by another script option in d7ii + answer_reset_browsers = False + else: + answer_reset_browsers = ask( + 'Reset browsers to safe defaults first?') answer_reset_browsers = ask( - 'Reset browsers to safe defaults first?') if global_vars['OS']['Version'] == '10': #answer_config_classicshell = ask('Configure ClassicShell?') #answer_config_explorer_user = ask('Configure Explorer?') answer_config_classicshell = True answer_config_explorer_user = True - + # Cleanup print_info('Cleanup') try_and_print(message='Desktop...', function=cleanup_desktop, cs='Done') - + # Scan for supported browsers print_info('Scanning for browsers') scan_for_browsers() - + # Homepages - print_info('Current homepages') - list_homepages() - + if not D7_MODE: + print_info('Current homepages') + list_homepages() + # Backup if not D7_MODE: # Done during system_diagnostics print_info('Backing up browsers') backup_browsers() - + # Reset if answer_config_browsers and answer_reset_browsers: print_info('Resetting browsers') reset_browsers() - + # Configure print_info('Configuring programs') if answer_config_browsers: @@ -81,7 +87,7 @@ if __name__ == '__main__': # Run speedtest popen_program(['start', '', 'https://fast.com'], shell=True) - + # Done if not D7_MODE: print_standard('\nDone.') From 712eeff79e34aaae1f3d472fde21e38b46affd96 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 16:26:17 -0700 Subject: [PATCH 095/293] Set default main.py values for 1201 --- .bin/Scripts/settings/main.py | 71 +++++++++++++++-------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 95be9c40..22e6f955 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -8,83 +8,74 @@ ENABLED_UPLOAD_DATA = False # STATIC VARIABLES (also used by BASH and BATCH files) ## NOTE: There are no spaces around the = for easier parsing in BASH and BATCH # Main Kit -ARCHIVE_PASSWORD='Abracadabra' -KIT_NAME_FULL='Wizard Kit' -KIT_NAME_SHORT='WK' -SUPPORT_MESSAGE='Please let 2Shirt know by opening an issue on GitHub' +ARCHIVE_PASSWORD='Sorted1201' +KIT_NAME_FULL='1201-WizardKit' +KIT_NAME_SHORT='1201' +SUPPORT_MESSAGE='Please let support know by opening an issue on Gogs' # Live Linux MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags -ROOT_PASSWORD='Abracadabra' -TECH_PASSWORD='Abracadabra' +ROOT_PASSWORD='1201 loves computers!' +TECH_PASSWORD='Sorted1201' # Server IP addresses -OFFICE_SERVER_IP='10.0.0.10' -QUICKBOOKS_SERVER_IP='10.0.0.10' +OFFICE_SERVER_IP='10.11.1.20' +QUICKBOOKS_SERVER_IP='10.11.1.20' # Time Zones LINUX_TIME_ZONE='America/Los_Angeles' # See 'timedatectl list-timezones' for valid values WINDOWS_TIME_ZONE='Pacific Standard Time' # See 'tzutil /l' for valid values # WiFi -WIFI_SSID='SomeWifi' -WIFI_PASSWORD='Abracadabra' +WIFI_SSID='1201 Computers' +WIFI_PASSWORD='12011201' # SERVER VARIABLES ## NOTE: Windows can only use one user per server. This means that if ## one server serves multiple shares then you have to use the same ## user/password for all of those shares. BACKUP_SERVERS = [ - { 'IP': '10.0.0.10', - 'Name': 'ServerOne', + { 'IP': '10.11.1.20', + 'Name': 'Anaconda', 'Mounted': False, 'Share': 'Backups', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', - }, - { 'IP': '10.0.0.11', - 'Name': 'ServerTwo', - 'Mounted': False, - 'Share': 'Backups', - 'User': 'restore', - 'Pass': 'Abracadabra', - 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', }, ] CRASH_SERVER = { - 'Name': 'CrashServer', - 'Url': '', - 'User': '', + 'Name': "2Shirt's Nextcloud Server", + 'Url': 'https://nextcloud.2shirt.work/public.php/webdav/WK_Issues', + 'User': 'hgoTCWIL28oGWqJ', 'Pass': '', } OFFICE_SERVER = { 'IP': OFFICE_SERVER_IP, - 'Name': 'ServerOne', + 'Name': 'Anaconda', 'Mounted': False, 'Share': 'Office', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', } QUICKBOOKS_SERVER = { 'IP': QUICKBOOKS_SERVER_IP, - 'Name': 'ServerOne', + 'Name': 'Anaconda', 'Mounted': False, 'Share': 'QuickBooks', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', } WINDOWS_SERVER = { - 'IP': '10.0.0.10', - 'Name': 'ServerOne', + 'IP': '10.11.1.20', + 'Name': 'Anaconda', 'Mounted': False, 'Share': 'Windows', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', } if __name__ == '__main__': From c16a540b3ef07bd4d2967ec2b81c2b7e673741e7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 16:41:52 -0700 Subject: [PATCH 096/293] Fix D7_MODE logic in reset_browsers.py --- .bin/Scripts/reset_browsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/reset_browsers.py b/.bin/Scripts/reset_browsers.py index 248b8c72..8e889cf2 100644 --- a/.bin/Scripts/reset_browsers.py +++ b/.bin/Scripts/reset_browsers.py @@ -27,7 +27,7 @@ if __name__ == '__main__': }} # Bail early - if not D7_MODE or ask('Reset browsers to safe defaults first?'): + if D7_MODE or ask('Reset browsers to safe defaults first?'): exit_script() # Scan for supported browsers From b57374b177fcc283a82519888a649851e750cf0e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 16:47:09 -0700 Subject: [PATCH 097/293] Fix D7_MODE logic in reset_browsers (again) * Went wrong direction last time --- .bin/Scripts/reset_browsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/reset_browsers.py b/.bin/Scripts/reset_browsers.py index 8e889cf2..900263ee 100644 --- a/.bin/Scripts/reset_browsers.py +++ b/.bin/Scripts/reset_browsers.py @@ -27,7 +27,7 @@ if __name__ == '__main__': }} # Bail early - if D7_MODE or ask('Reset browsers to safe defaults first?'): + if not D7_MODE and not ask('Reset browsers to safe defaults first?'): exit_script() # Scan for supported browsers From 90a9751883d659bc54d51adee9c51b79c02017cf Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 17:09:55 -0700 Subject: [PATCH 098/293] More bugfixes for reset_browser split --- .bin/Scripts/functions/browsers.py | 2 +- .bin/Scripts/reset_browsers.py | 7 ------- .bin/Scripts/user_checklist.py | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index 7efa4af8..7e963032 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -150,7 +150,7 @@ def archive_browser(name): """Create backup of Browser saved in the BackupDir.""" source = '{}*'.format(browser_data[name]['user_data_path']) dest = r'{BackupDir}\Browsers ({USERNAME})'.format( - **global_vars, **env) + **global_vars, **global_vars['Env']) archive = r'{}\{}.7z'.format(dest, name) os.makedirs(dest, exist_ok=True) cmd = [ diff --git a/.bin/Scripts/reset_browsers.py b/.bin/Scripts/reset_browsers.py index 900263ee..e47cecbe 100644 --- a/.bin/Scripts/reset_browsers.py +++ b/.bin/Scripts/reset_browsers.py @@ -46,14 +46,7 @@ if __name__ == '__main__': print_info('Resetting browsers') reset_browsers() - # Configure - print_info('Installing uBlock Origin') - install_adblock() - # Done - if not D7_MODE: - print_standard('\nDone.') - pause('Press Enter to exit...') exit_script() except SystemExit: pass diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index 70511269..e71b4e96 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -34,7 +34,6 @@ if __name__ == '__main__': else: answer_reset_browsers = ask( 'Reset browsers to safe defaults first?') - answer_reset_browsers = ask( if global_vars['OS']['Version'] == '10': #answer_config_classicshell = ask('Configure ClassicShell?') #answer_config_explorer_user = ask('Configure Explorer?') From 241f5cb897b032b4d4aad72d1ca72312c512c636 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 17:15:10 -0700 Subject: [PATCH 099/293] Always open the uBlock store page for FF * If d7 defaults are run then uBO may still need installed --- .bin/Scripts/functions/browsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index 7e963032..485a4ef5 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -421,7 +421,7 @@ def install_adblock(indent=8, width=32): 'firefox.exe', r'distribution\extensions\uBlock0@raymondhill.net') if os.path.exists(ubo): - urls = ['about:addons'] + urls = ['about:addons', UBO_MOZILLA] elif browser_data[browser]['base'] == 'ie': urls.append(IE_GALLERY) From ceba2e5ff239ace2b08ad01ee5711245b784cf6f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 17:53:50 -0700 Subject: [PATCH 100/293] Add d7/Firefox workaround * When Firefox is run from d7ii all tabs crash thus preventing installing uBO * Added d7_forefix_fix.py to install uBO just for mozilla-type browsers --- .bin/Scripts/d7_firefox_fix.py | 44 ++++++++++++++++++++++++++++++ .bin/Scripts/functions/browsers.py | 10 +++++-- 2 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 .bin/Scripts/d7_firefox_fix.py diff --git a/.bin/Scripts/d7_firefox_fix.py b/.bin/Scripts/d7_firefox_fix.py new file mode 100644 index 00000000..27b33112 --- /dev/null +++ b/.bin/Scripts/d7_firefox_fix.py @@ -0,0 +1,44 @@ +# Wizard Kit: Install uBlock Origin for Firefox + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.browsers import * +from functions.cleanup import * +from functions.setup import * +init_global_vars() +os.system('title {}: User Checklist Tool'.format(KIT_NAME_FULL)) +global_vars['LogFile'] = r'{LogDir}\User Checklist ({USERNAME}).log'.format( + **global_vars, **global_vars['Env']) +D7_MODE = 'd7mode' in sys.argv + +if __name__ == '__main__': + try: + stay_awake() + clear_screen() + print_info('{}: Firefox Fix for d7') + other_results = { + 'Warning': { + 'NotInstalledError': 'Not installed', + 'NoProfilesError': 'No profiles found', + }} + + # Scan for Firefox browsers + print_info('Scanning for Firefox browsers') + scan_for_browsers(just_firefox=True) + + # Install uBlock Origin + print_info('Installing uBlock Origin') + install_adblock(just_firefox=True) + + # Done + print_standard('\nDone.') + pause('Press Enter to exit...') + exit_script() + except SystemExit: + pass + except: + major_exception() diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index 485a4ef5..50d0a990 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -374,9 +374,11 @@ def get_mozilla_profiles(search_path, dev=False): return profiles -def install_adblock(indent=8, width=32): +def install_adblock(indent=8, width=32, just_firefox=False): """Install adblock for all supported browsers.""" for browser in sorted(browser_data): + if just_firefox and browser_data[browser]['base'] != 'mozilla': + continue exe_path = browser_data[browser].get('exe_path', None) function=run_program if not exe_path: @@ -483,9 +485,11 @@ def reset_browsers(indent=8, width=32): indent=indent, width=width, function=function, other_results=other_results, profile=profile) -def scan_for_browsers(): +def scan_for_browsers(just_firefox=False): """Scan system for any supported browsers.""" - for name in sorted(SUPPORTED_BROWSERS): + for name, details in sorted(SUPPORTED_BROWSERS.items()): + if just_firefox and details['base'] != 'mozilla': + continue try_and_print(message='{}...'.format(name), function=get_browser_details, cs='Detected', other_results=other_results, name=name) From 2369786b6674771316b2f4f8d0f93ac779ef776d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 18:10:54 -0700 Subject: [PATCH 101/293] Bugfix: d7_firefox_fix.py --- .bin/Scripts/d7_firefox_fix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/d7_firefox_fix.py b/.bin/Scripts/d7_firefox_fix.py index 27b33112..7fe1f244 100644 --- a/.bin/Scripts/d7_firefox_fix.py +++ b/.bin/Scripts/d7_firefox_fix.py @@ -19,7 +19,7 @@ if __name__ == '__main__': try: stay_awake() clear_screen() - print_info('{}: Firefox Fix for d7') + print_info('{}: Firefox Fix for d7\n'.format(KIT_NAME_FULL)) other_results = { 'Warning': { 'NotInstalledError': 'Not installed', From 298222c9fc2250e6146d9ac6bfa71b7f989b4bc3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 18 Aug 2018 18:46:17 -0700 Subject: [PATCH 102/293] Password protect browser backups --- .bin/Scripts/functions/browsers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index 50d0a990..a374e54b 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -156,6 +156,7 @@ def archive_browser(name): cmd = [ global_vars['Tools']['SevenZip'], 'a', '-aoa', '-bso0', '-bse0', '-mx=1', + '-mhe=on', '-p{}'.format(ARCHIVE_PASSWORD), archive, source] run_program(cmd) From 1244b7f5e5f6d0035341412a3a4c4462c4952fc0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 11:53:33 -0700 Subject: [PATCH 103/293] New SW Bundles * Removed Air, Java, & Silverlight * Added SumatraPDF --- .bin/Scripts/settings/sources.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 3560b092..195a10bb 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -71,9 +71,8 @@ VCREDIST_SOURCES = { } NINITE_SOURCES = { 'Bundles': { - 'Runtimes.exe': '.net4.7.1-air-java8-silverlight', - 'Legacy.exe': '.net4.7.1-7zip-air-chrome-firefox-java8-silverlight-vlc', - 'Modern.exe': '.net4.7.1-7zip-air-chrome-classicstart-firefox-java8-silverlight-vlc', + 'Legacy.exe': '.net4.7.2-7zip-chrome-firefox-sumatrapdf-vlc', + 'Modern.exe': '.net4.7.2-7zip-chrome-classicstart-firefox-sumatrapdf-vlc', }, 'Audio-Video': { 'AIMP.exe': 'aimp', @@ -202,3 +201,5 @@ RST_SOURCES = { if __name__ == '__main__': print("This file is not meant to be called directly.") + +# vim: sts=4 sw=4 ts=4 tw=0 nowrap From 31a3d5a43bddcd0644e3911e3892de8a351c71c9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 12:04:11 -0700 Subject: [PATCH 104/293] Added D7_MODE to install_sw_bundle.py --- .bin/Scripts/install_sw_bundle.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/install_sw_bundle.py b/.bin/Scripts/install_sw_bundle.py index d98eb8d2..e35760c3 100644 --- a/.bin/Scripts/install_sw_bundle.py +++ b/.bin/Scripts/install_sw_bundle.py @@ -10,6 +10,7 @@ from functions.setup import * init_global_vars() os.system('title {}: SW Bundle Tool'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\Install SW Bundle.log'.format(**global_vars) +D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': try: @@ -25,10 +26,13 @@ if __name__ == '__main__': 'GenericRepair': 'Repaired', 'UnsupportedOSError': 'Unsupported OS', }} - answer_extensions = ask('Install Extensions?') - answer_adobe_reader = ask('Install Adobe Reader?') - answer_vcr = ask('Install Visual C++ Runtimes?') - answer_ninite = ask('Install Ninite Bundle?') + answer_extensions = D7_MODE or ask('Install Extensions?') + if D7_MODE: + answer_adobe_reader = False + else: + answer_adobe_reader = ask('Install Adobe Reader?') + answer_vcr = D7_MODE or ask('Install Visual C++ Runtimes?') + answer_ninite = D7_MODE or ask('Install Ninite Bundle?') if answer_ninite and global_vars['OS']['Version'] in ['7']: # Vista is dead, not going to check for it answer_mse = ask('Install MSE?') @@ -62,3 +66,5 @@ if __name__ == '__main__': pass except: major_exception() + +# vim: sts=4 sw=4 ts=4 From 4e022ed843036ef3a2d6e55e4bf2b876c99eba9b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 12:14:34 -0700 Subject: [PATCH 105/293] Run DISM RestoreHealth in D7_MODE --- .bin/Scripts/system_diagnostics.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 4c0fe0a8..de5409b8 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -63,8 +63,12 @@ if __name__ == '__main__': function=run_chkdsk, other_results=other_results) try_and_print(message='SFC scan...', function=run_sfc_scan, other_results=other_results) - try_and_print(message='DISM CheckHealth...', - function=run_dism, other_results=other_results, repair=False) + if D7_MODE: + try_and_print(message='DISM RestoreHealth...', + function=run_dism, other_results=other_results, repair=True) + else: + try_and_print(message='DISM CheckHealth...', + function=run_dism, other_results=other_results, repair=False) if D7_MODE: @@ -131,3 +135,5 @@ if __name__ == '__main__': pass except: major_exception() + +# vim: sts=4 sw=4 ts=4 From 39f947bdd1d862354733814998dced9ffc40d99b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 12:26:58 -0700 Subject: [PATCH 106/293] Leave SW Diags window open in D7_MODE on error(s) --- .bin/Scripts/system_diagnostics.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index de5409b8..7709c5de 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -16,6 +16,17 @@ os.system('title {}: System Diagnostics Tool'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\System Diagnostics.log'.format( **global_vars) D7_MODE = 'd7mode' in sys.argv +ERRORS = 0 + +def check_result(result, other_results): + """Check result for warnings and errors.""" + if not result['CS']: + for warning in other_results.get('Warning', {}).keys(): + if warning in str(result['Error']): + # Ignore warnings and repair statements + return + # Error is not a warning + ERRORS += 1 if __name__ == '__main__': try: @@ -58,14 +69,17 @@ if __name__ == '__main__': # OS Health Checks print_info('OS Health Checks') - try_and_print( + result = try_and_print( message='CHKDSK ({SYSTEMDRIVE})...'.format(**global_vars['Env']), function=run_chkdsk, other_results=other_results) - try_and_print(message='SFC scan...', + check_result(result, other_results) + result = try_and_print(message='SFC scan...', function=run_sfc_scan, other_results=other_results) + check_result(result, other_results) if D7_MODE: - try_and_print(message='DISM RestoreHealth...', + result = try_and_print(message='DISM RestoreHealth...', function=run_dism, other_results=other_results, repair=True) + check_result(result, other_results) else: try_and_print(message='DISM CheckHealth...', function=run_dism, other_results=other_results, repair=False) @@ -127,7 +141,7 @@ if __name__ == '__main__': print_error(' Unknown error.') # Done - if not D7_MODE: + if not D7_MODE or ERRORS > 0: print_standard('\nDone.') pause('Press Enter to exit...') exit_script() From 251c232a6e4302fa78b8ccd2d4d3617dd39637ab Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 12:50:36 -0700 Subject: [PATCH 107/293] Added Emsisoft a2cmd to system_checklist cleanup --- .bin/Scripts/functions/cleanup.py | 19 +++++++++++++++++++ .bin/Scripts/system_checklist.py | 6 ++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index 1bac4c6c..bd2e3ec2 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -87,5 +87,24 @@ def cleanup_desktop(): except OSError: pass +def cleanup_emsisoft(): + """Remove EmsisoftCmd files from drive root.""" + source_path = r'{}\EmsisoftCmd'.format(global_vars['Env']['SYSTEMDRIVE']) + source_quarantine = r'{}\Quarantine'.format(source_path) + + # Quarantine + if os.path.exists(source_quarantine): + os.makedirs(global_vars['QuarantineDir'], exist_ok=True) + dest_name = r'{QuarantineDir}\Emsisoft_{Date-Time}'.format( + **global_vars) + dest_name = non_clobber_rename(dest_name) + shutil.move(source_quarantine, dest_name) + + # Remove program + if os.path.exists(source_path): + shutil.rmtree(source_path) + if __name__ == '__main__': print("This file is not meant to be called directly.") + +# vim: sts=4 sw=4 ts=4 diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 33865daa..788af936 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -44,10 +44,12 @@ if __name__ == '__main__': # Cleanup print_info('Cleanup') - try_and_print(message='Desktop...', - function=cleanup_desktop, cs='Done') try_and_print(message='AdwCleaner...', function=cleanup_adwcleaner, cs='Done', other_results=other_results) + try_and_print(message='Desktop...', + function=cleanup_desktop, cs='Done') + try_and_print(message='Emsisoft a2cmd...', + function=cleanup_emsisoft, cs='Done') # Export system info if not D7_MODE: From 4f2f696d60e84b4a8ee5864a21429e4cd2c62d22 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 12:55:55 -0700 Subject: [PATCH 108/293] Adjust backup paths for cleanup functions --- .bin/Scripts/functions/cleanup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index bd2e3ec2..a604a47c 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -24,7 +24,7 @@ def cleanup_adwcleaner(): # Main folder if os.path.exists(source_path): os.makedirs(global_vars['ProgBackupDir'], exist_ok=True) - dest_name = r'{ProgBackupDir}\AdwCleaner_{Date-Time}'.format( + dest_name = r'{ProgBackupDir}\{Date}\AdwCleaner\{Date-Time}'.format( **global_vars) dest_name = non_clobber_rename(dest_name) shutil.move(source_path, dest_name) @@ -70,7 +70,7 @@ def cleanup_cbs(dest_folder): def cleanup_desktop(): """Move known backup files and reports into the ClientDir.""" - dest_folder = r'{ProgBackupDir}\Desktop_{Date-Time}'.format(**global_vars) + dest_folder = r'{ProgBackupDir}\{Date}\Desktop\{Date-Time}'.format(**global_vars) os.makedirs(dest_folder, exist_ok=True) desktop_path = r'{USERPROFILE}\Desktop'.format(**global_vars['Env']) From 42c5e918b6aad693bc40a14eb449a257a855e604 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 13:12:03 -0700 Subject: [PATCH 109/293] Added Registry backups to system_checklist cleanup --- .bin/Scripts/functions/cleanup.py | 25 +++++++++++++++++++++++++ .bin/Scripts/system_checklist.py | 2 ++ 2 files changed, 27 insertions(+) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index a604a47c..945938a9 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -104,6 +104,31 @@ def cleanup_emsisoft(): if os.path.exists(source_path): shutil.rmtree(source_path) +def cleanup_regbackups(): + """Move d7ii regbackups into backup folder.""" + source_path = r'{}\Support\RegBackups'.format( + global_vars['Env']['SYSTEMDRIVE']) + + # Bail early + if not os.path.exists(source_path): + return + + # Move to backup folder + for entry in os.scandir(source_path): + os.makedirs(global_vars['ProgBackupDir'], exist_ok=True) + dest_path = r'{ProgBackupDir}\{Date}\Registry\{name}'.format( + name=entry.name, + **global_vars) + dest_path = non_clobber_rename(dest_path) + shutil.move(entry.path, dest_path) + + # Delete source folders if empty + try: + os.rmdir(source_path) + os.rmdir(r'{}\Support'.format(global_vars['Env']['SYSTEMDRIVE'])) + except OSError: + pass + if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 788af936..6fdbcf79 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -50,6 +50,8 @@ if __name__ == '__main__': function=cleanup_desktop, cs='Done') try_and_print(message='Emsisoft a2cmd...', function=cleanup_emsisoft, cs='Done') + try_and_print(message='Registry Backup(s)...', + function=cleanup_regbackups, cs='Done') # Export system info if not D7_MODE: From edb82df4d3d7c96a9b3bd8b1b04385ef999cb55f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 13:24:39 -0700 Subject: [PATCH 110/293] Move AdwCleaner/Desktop to LogDir during cleanup * Instead of ProgBackupDir --- .bin/Scripts/functions/cleanup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index 945938a9..c02e3665 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -23,8 +23,8 @@ def cleanup_adwcleaner(): # Main folder if os.path.exists(source_path): - os.makedirs(global_vars['ProgBackupDir'], exist_ok=True) - dest_name = r'{ProgBackupDir}\{Date}\AdwCleaner\{Date-Time}'.format( + os.makedirs(global_vars['LogDir'], exist_ok=True) + dest_name = r'{LogDir}\{Date}\AdwCleaner'.format( **global_vars) dest_name = non_clobber_rename(dest_name) shutil.move(source_path, dest_name) @@ -70,7 +70,7 @@ def cleanup_cbs(dest_folder): def cleanup_desktop(): """Move known backup files and reports into the ClientDir.""" - dest_folder = r'{ProgBackupDir}\{Date}\Desktop\{Date-Time}'.format(**global_vars) + dest_folder = r'{ProgBackupDir}\{Date}\Desktop'.format(**global_vars) os.makedirs(dest_folder, exist_ok=True) desktop_path = r'{USERPROFILE}\Desktop'.format(**global_vars['Env']) From 9c1c8b90be797a0b8026bf4ab66ea3323e0ecea8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 14:10:37 -0700 Subject: [PATCH 111/293] Added d7II Cleanup sections * Renamed d7_firefox_fix.py to post_d7.py * This will include all items that need to be run outside d7II --- .bin/Scripts/functions/cleanup.py | 67 +++++++++++++++++++ .../Scripts/{d7_firefox_fix.py => post_d7.py} | 12 ++-- 2 files changed, 75 insertions(+), 4 deletions(-) rename .bin/Scripts/{d7_firefox_fix.py => post_d7.py} (78%) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index c02e3665..f2986571 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -68,6 +68,73 @@ def cleanup_cbs(dest_folder): r'{}\CbsPersist*'.format(temp_folder)] run_program(cmd) +def cleanup_d7ii(): + """Sort d7II logs and remove temp items.""" + d7_path = r'{}\d7II'.format(global_vars['ClientDir']) + d7_reports = r'{}_Reports'.format(d7_path) + d7_temp = r'{}\Temp'.format(d7_path) + + # Logs & Reports + if os.path.exists(d7_reports): + for entry in os.scandir(d7_reports): + r = re.match(r'(\d+)-(\d+)-(\d+)', entry.name) + d7_date = '{}-{:02d}-{:02d}'.format( + r.group(1), int(r.group(2)), int(r.group(3))) + d7_mlogs = r'{}\Malware Logs'.format(entry.path) + log_dest = r'{SYSTEMDRIVE}\{prefix}\Info\{date}'.format( + prefix=KIT_NAME_SHORT, + date=d7_date, + **global_vars['Env']) + + # Remove empty folders + for f in ('Malware Logs', 'Screen Shots'): + try: + os.rmdir(r'{}\{}'.format(entry.path, f)) + except FileNotFoundError: + pass + except OSError: + pass + + # Malware Logs + if os.path.exists(d7_mlogs): + for m_entry in os.scandir(d7_mlogs): + prefix = '' + if m_entry.name == 'MalwareScan_Report.txt': + prefix = 'd7II_' + dest_path = r'{log_dest}\{prefix}{name}'.format( + log_dest=log_dest, + prefix=prefix, + name=m_entry.name) + dest_path = non_clobber_rename(dest_path) + shutil.move(entry.path, dest_path) + try: + os.rmdir(d7_mlogs) + except OSError: + pass + + # Other items + for o_entry in os.scandir(entry.path): + dest_path = r'{log_dest}\d7II_{name}'.format( + log_dest=log_dest, + name=m_entry.name) + dest_path = non_clobber_rename(dest_path) + shutil.move(entry.path, dest_path) + + # Remove folder if empty + try: + os.rmdir(entry.path) + except OSError: + pass + + # Temp items + if os.path.exists(d7_path): + if os.path.exists(d7_temp): + shutil.rmtree(d7_temp) + try: + os.rmdir(d7_path) + except OSError: + pass + def cleanup_desktop(): """Move known backup files and reports into the ClientDir.""" dest_folder = r'{ProgBackupDir}\{Date}\Desktop'.format(**global_vars) diff --git a/.bin/Scripts/d7_firefox_fix.py b/.bin/Scripts/post_d7.py similarity index 78% rename from .bin/Scripts/d7_firefox_fix.py rename to .bin/Scripts/post_d7.py index 7fe1f244..1bdfc4f3 100644 --- a/.bin/Scripts/d7_firefox_fix.py +++ b/.bin/Scripts/post_d7.py @@ -1,4 +1,4 @@ -# Wizard Kit: Install uBlock Origin for Firefox +# Wizard Kit: Post-d7II items import os import sys @@ -10,16 +10,15 @@ from functions.browsers import * from functions.cleanup import * from functions.setup import * init_global_vars() -os.system('title {}: User Checklist Tool'.format(KIT_NAME_FULL)) +os.system('title {}: Post-d7II Work'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\User Checklist ({USERNAME}).log'.format( **global_vars, **global_vars['Env']) -D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': try: stay_awake() clear_screen() - print_info('{}: Firefox Fix for d7\n'.format(KIT_NAME_FULL)) + print_info('{}: Post-d7II Work\n'.format(KIT_NAME_FULL)) other_results = { 'Warning': { 'NotInstalledError': 'Not installed', @@ -34,6 +33,11 @@ if __name__ == '__main__': print_info('Installing uBlock Origin') install_adblock(just_firefox=True) + # Cleanup + print_info('Cleanup') + try_and_print(message='d7II...', + function=cleanup_d7ii, cs='Done') + # Done print_standard('\nDone.') pause('Press Enter to exit...') From 6f3a1ee55f933959ec8a82b438ba1d88eae4ce59 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 15:18:29 -0700 Subject: [PATCH 112/293] Run BleachBit cleaners directly and allow cleaning * Using the cleaner names to ensure desired cleanup * Using the --preset option could lead to unintended deletions * Cleaning is automatic in D7_MODE --- .bin/Scripts/functions/info.py | 59 +++++++++++++++---------- .bin/Scripts/system_diagnostics.py | 69 +++++++++++++++++++++++++++++- 2 files changed, 104 insertions(+), 24 deletions(-) diff --git a/.bin/Scripts/functions/info.py b/.bin/Scripts/functions/info.py index b81a4922..5f7f3631 100644 --- a/.bin/Scripts/functions/info.py +++ b/.bin/Scripts/functions/info.py @@ -162,7 +162,7 @@ def get_installed_office(): def get_shell_path(folder, user='current'): """Get shell path using SHGetKnownFolderPath via knownpaths, returns str. - + NOTE: Only works for the current user. Code based on https://gist.github.com/mkropat/7550097 """ @@ -175,14 +175,14 @@ def get_shell_path(folder, user='current'): except AttributeError: # Unknown folder ID, ignore and return None pass - + if folderid: try: path = knownpaths.get_path(folderid, getattr(knownpaths.UserHandle, user)) except PathNotFoundError: # Folder not found, ignore and return None pass - + return path def get_user_data_paths(user): @@ -196,7 +196,7 @@ def get_user_data_paths(user): 'Extra Folders': {}, } unload_hive = False - + if user['Name'] == global_vars['Env']['USERNAME']: # We can use SHGetKnownFolderPath for the current user paths['Profile']['Path'] = get_shell_path('Profile') @@ -212,7 +212,7 @@ def get_user_data_paths(user): except Exception: # Profile path not found, leaving as None. pass - + # Shell folders (Prep) if not reg_path_exists(HKU, hive_path) and paths['Profile']['Path']: # User not logged-in, loading hive @@ -226,7 +226,7 @@ def get_user_data_paths(user): except subprocess.CalledProcessError: # Failed to load user hive pass - + # Shell folders shell_folders = r'{}\{}'.format(hive_path, REG_SHELL_FOLDERS) if (reg_path_exists(HKU, hive_path) @@ -252,7 +252,7 @@ def get_user_data_paths(user): if (folder not in paths['Shell Folders'] and os.path.exists(folder_path)): paths['Shell Folders'][folder] = {'Path': folder_path} - + # Extra folders if paths['Profile']['Path']: for folder in EXTRA_FOLDERS: @@ -260,12 +260,12 @@ def get_user_data_paths(user): folder=folder, **paths['Profile']) if os.path.exists(folder_path): paths['Extra Folders'][folder] = {'Path': folder_path} - + # Shell folders (cleanup) if unload_hive: cmd = ['reg', 'unload', r'HKU\{}'.format(TMP_HIVE_PATH)] run_program(cmd, check=False) - + # Done return paths @@ -277,7 +277,7 @@ def get_user_folder_sizes(users): with winreg.OpenKey(HKCU, r'Software\Sysinternals\Du', access=winreg.KEY_WRITE) as key: winreg.SetValueEx(key, 'EulaAccepted', 0, winreg.REG_DWORD, 1) - + for u in users: u.update(get_user_data_paths(u)) if u['Profile']['Path']: @@ -292,7 +292,7 @@ def get_user_folder_sizes(users): def get_user_list(): """Get user list via WMIC, returns list of dicts.""" users = [] - + # Get user info from WMI cmd = ['wmic', 'useraccount', 'get', '/format:csv'] try: @@ -300,10 +300,10 @@ def get_user_list(): except subprocess.CalledProcessError: # Meh, return empty list to avoid a full crash return users - + entries = out.stdout.decode().splitlines() entries = [e.strip().split(',') for e in entries if e.strip()] - + # Add user(s) to dict keys = entries[0] for e in entries[1:]: @@ -314,10 +314,10 @@ def get_user_list(): # Assume SIDs ending with 1000+ are "Standard" and others are "System" e['Type'] = 'Standard' if re.search(r'-1\d+$', e['SID']) else 'System' users.append(e) - + # Sort list users.sort(key=itemgetter('Name')) - + # Done return users @@ -368,23 +368,38 @@ def run_aida64(): '/TEXT', '/SILENT', '/SAFEST'] run_program(cmd, check=False) -def run_bleachbit(): +def run_bleachbit(cleaners=None, preview=True): """Run BleachBit preview and save log. - + This is a preview so no files should be deleted.""" if not os.path.exists(global_vars['LogDir']+r'\BleachBit.log'): + debug_path = r'{}\BleachBit.debug'.format(global_vars['LogDir']) + error_path = debug_path.replace('debug', 'err') + log_path = debug_path.replace('debug', 'log') extract_item('BleachBit', silent=True) - cmd = [global_vars['Tools']['BleachBit'], '--preview', '--preset'] + + # Safety check + if not cleaners: + # Disable cleaning and use preset config + cleaners = ['--preset'] + preview = True + + # Run + cmd = [ + global_vars['Tools']['BleachBit'], + '--preview' if preview else '--clean', + '--debug-log="{}"'.format(debug_path)] + cmd.extend(cleaners) out = run_program(cmd, check=False) + # Save stderr if out.stderr.decode().splitlines(): - with open(global_vars['LogDir']+r'\BleachBit.err', 'a', - encoding='utf-8') as f: + with open(error_path, 'a', encoding='utf-8') as f: for line in out.stderr.decode().splitlines(): f.write(line.strip() + '\n') + # Save stdout - with open(global_vars['LogDir']+r'\BleachBit.log', 'a', - encoding='utf-8') as f: + with open(log_path, 'a', encoding='utf-8') as f: for line in out.stdout.decode().splitlines(): f.write(line.strip() + '\n') diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 7709c5de..535b14ef 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -18,6 +18,65 @@ global_vars['LogFile'] = r'{LogDir}\System Diagnostics.log'.format( D7_MODE = 'd7mode' in sys.argv ERRORS = 0 +# Static Variables +BLEACH_BIT_CLEANERS = { + 'Applications': ( + 'adobe_reader.cache', + 'adobe_reader.tmp', + 'amule.tmp', + 'flash.cache', + 'gimp.tmp', + 'hippo_opensim_viewer.cache', + 'java.cache', + 'libreoffice.cache', + 'liferea.cache', + 'miro.cache', + 'openofficeorg.cache', + 'pidgin.cache', + 'secondlife_viewer.Cache', + 'thunderbird.cache', + 'vuze.backup_files', + 'vuze.cache', + 'vuze.tmp', + 'yahoo_messenger.cache', + ), + 'Browsers': ( + 'chromium.cache', + 'chromium.current_session', + 'chromium.history', + 'firefox.cache', + 'firefox.download_history', + 'firefox.session_restore', + 'firefox.url_history', + 'google_chrome.cache', + 'google_chrome.history', + 'google_chrome.session', + 'google_earth.temporary_files', + 'google_toolbar.search_history', + 'internet_explorer.history', + 'internet_explorer.temporary_files', + 'opera.cache', + 'opera.current_session', + 'opera.download_history', + 'opera.url_history', + 'safari.cache', + 'safari.history', + 'seamonkey.cache', + 'seamonkey.download_history', + 'seamonkey.history', + ), + 'System': ( + 'system.clipboard', + 'system.tmp', + 'winapp2_windows.jump_lists', + 'winapp2_windows.ms_search', + 'windows_explorer.run', + 'windows_explorer.search_history', + 'windows_explorer.thumbnails', + ), +} + + def check_result(result, other_results): """Check result for warnings and errors.""" if not result['CS']: @@ -93,12 +152,18 @@ if __name__ == '__main__': print_info('Scanning for browsers') scan_for_browsers() + # Run BleachBit cleaners + print_info('BleachBit Cleanup') + for k, v in sorted(BLEACH_BIT_CLEANERS.items()): + try_and_print(message=' {}...'.format(k), + function=run_bleachbit, + cs='Done', other_results=other_results, + cleaners=v, preview=bool(not D7_MODE)) + # Export system info print_info('Backup System Information') try_and_print(message='AIDA64 reports...', function=run_aida64, cs='Done', other_results=other_results) - try_and_print(message='BleachBit report...', - function=run_bleachbit, cs='Done', other_results=other_results) if not D7_MODE: backup_browsers() try_and_print(message='File listing...', From 84120f150528454e6b33fa2d898046f5fc875168 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 15:59:58 -0700 Subject: [PATCH 113/293] Adjusted launchers for d7II --- .bin/Scripts/settings/launchers.py | 65 +++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 6e011691..2b7de0e6 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -14,16 +14,45 @@ LAUNCHERS = { 'L_ITEM': 'system_checklist.py', 'L_ELEV': 'True', }, + 'User Checklist': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'user_checklist.py', + }, + }, + r'.bin\Scripts\launchers_for_d7': { + 'Browser Reset': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'reset_browsers.py', + 'L_ARGS': 'd7mode', + }, + 'Install SW Bundle': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'install_sw_bundle.py', + 'L_ARGS': 'd7mode', + 'L_ELEV': 'True', + }, + 'System Checklist': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'system_checklist.py', + 'L_ARGS': 'd7mode', + 'L_ELEV': 'True', + }, 'System Diagnostics': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', 'L_ITEM': 'system_diagnostics.py', + 'L_ARGS': 'd7mode', 'L_ELEV': 'True', }, 'User Checklist': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', 'L_ITEM': 'user_checklist.py', + 'L_ARGS': 'd7mode', }, }, r'Data Recovery': { @@ -188,17 +217,10 @@ LAUNCHERS = { }, }, r'Diagnostics': { - 'HWiNFO': { + 'AIDA64': { 'L_TYPE': 'Executable', - 'L_PATH': 'HWiNFO', - 'L_ITEM': 'HWiNFO.exe', - 'Extra Code': [ - r'for %%a in (32 64) do (', - r' copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"', - r' (echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', - r' (echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', - r')', - ], + 'L_PATH': 'AIDA64', + 'L_ITEM': 'aida64.exe', }, 'ProduKey': { 'L_TYPE': 'Executable', @@ -212,13 +234,14 @@ LAUNCHERS = { r')', ], }, + 'System Diagnostics': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'system_diagnostics.py', + 'L_ELEV': 'True', + }, }, r'Diagnostics\Extras': { - 'AIDA64': { - 'L_TYPE': 'Executable', - 'L_PATH': 'AIDA64', - 'L_ITEM': 'aida64.exe', - }, 'Autoruns (with VirusTotal Scan)': { 'L_TYPE': 'Executable', 'L_PATH': 'Autoruns', @@ -265,6 +288,18 @@ LAUNCHERS = { r'call "%bin%\Scripts\init_client_dir.cmd" /Info', ], }, + 'HWiNFO': { + 'L_TYPE': 'Executable', + 'L_PATH': 'HWiNFO', + 'L_ITEM': 'HWiNFO.exe', + 'Extra Code': [ + r'for %%a in (32 64) do (', + r' copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"', + r' (echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', + r' (echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', + r')', + ], + }, 'HWiNFO (Sensors)': { 'L_TYPE': 'Executable', 'L_PATH': 'HWiNFO', From 2301c89b8c9cce14dbbd454683a7ed7279fd886b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 17:32:55 -0700 Subject: [PATCH 114/293] Add ESET NOD32 AV install sections * Installs with custom config --- .bin/Scripts/functions/setup.py | 30 +- .bin/Scripts/functions/update.py | 7 + .bin/Scripts/install_eset_nod32_av.py | 26 + .bin/Scripts/settings/launchers.py | 6 + .bin/Scripts/settings/sources.py | 1 + .../ESETConfigs/eset-config-no-pup.xml | 1668 +++++++++++++++++ .cbin/_include/ESETConfigs/eset-config.xml | 1668 +++++++++++++++++ 7 files changed, 3404 insertions(+), 2 deletions(-) create mode 100644 .bin/Scripts/install_eset_nod32_av.py create mode 100644 .cbin/_include/ESETConfigs/eset-config-no-pup.xml create mode 100644 .cbin/_include/ESETConfigs/eset-config.xml diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index d08692b5..8de759bc 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -1,6 +1,8 @@ # Wizard Kit: Functions - Setup from functions.common import * +from functions.update import * +from settings.sources import * # STATIC VARIABLES HKCU = winreg.HKEY_CURRENT_USER @@ -180,7 +182,7 @@ def write_registry_settings(settings, all_users=False): if 'WOW64_32' in v: access = access | winreg.KEY_WOW64_32KEY winreg.CreateKeyEx(hive, k, 0, access) - + # Create values with winreg.OpenKeyEx(hive, k, 0, access) as key: for name, value in v.get('DWORD Items', {}).items(): @@ -237,6 +239,30 @@ def install_classicstart_skin(): os.makedirs(dest_path, exist_ok=True) shutil.copy(source, dest) +def install_eset_nod32_av(scan_pups=True): + """Install ESET NOD32 AV with custom config.""" + extract_item('ESETConfigs', silent=True) + config_file = '{BinDir}\ESETConfigs\{config_file}.xml'.format( + config_file='eset-config' if scan_pups else 'eset-config-no-pup', + **global_vars) + + # Download + result = try_and_print(message='Downloading Setup...', cs='Done', + other_results=OTHER_RESULTS, function=download_generic, + out_dir=global_vars['ClientDir'], + out_name='eav_nt64.exe', + source_url=SOURCE_URLS['ESET NOD32']) + if not result['CS']: + raise GenericError('Failed to download ESET NOD32') + + # Install + cmd = [r'{ClientDir}\eav_nt64.exe'.format(**global_vars), + '--silent', '--accepteula', '--msi-property', + 'PRODUCTTYPE=eav', 'PRODUCT_LANG=1033', 'PRODUCT_LANG_CODE=en-US', + 'ADMINCFG="{}"'.format(config_file)] + try_and_print(message='Installing ESET NOD32 AV...', + other_results=OTHER_RESULTS, function=run_program, cmd=cmd) + def install_firefox_extensions(): """Extract Firefox extensions to installation folder.""" dist_path = r'{PROGRAMFILES}\Mozilla Firefox\distribution\extensions'.format( @@ -244,7 +270,7 @@ def install_firefox_extensions(): source_path = r'{CBinDir}\FirefoxExtensions.7z'.format(**global_vars) if not os.path.exists(source_path): raise FileNotFoundError - + # Extract extension(s) to distribution folder cmd = [ global_vars['Tools']['SevenZip'], 'x', '-aos', '-bso0', '-bse0', diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 6825f9ba..b324b2c8 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -551,6 +551,13 @@ def update_adobe_reader_dc(): download_generic( dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC']) +def update_eset_config(): + """Copy config files to .cbin before compress_item""" + dest = r'{}\ESETConfigs'.format(global_vars['cbindir']) + include_path = r'{}\_include\ESETConfigs'.format(global_vars['CBinDir']) + if os.path.exists(include_path): + shutil.copytree(include_path, dest) + def update_office(): # Remove existing folders remove_from_kit('_Office') diff --git a/.bin/Scripts/install_eset_nod32_av.py b/.bin/Scripts/install_eset_nod32_av.py new file mode 100644 index 00000000..1bb45d9a --- /dev/null +++ b/.bin/Scripts/install_eset_nod32_av.py @@ -0,0 +1,26 @@ +# Wizard Kit: Install ESET NOD32 AV + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.setup import * +init_global_vars() +os.system('title {}: Install ESET NOD32 AV'.format(KIT_NAME_FULL)) +global_vars['LogFile'] = r'{LogDir}\Install ESET NOD32 AV.log'.format(**global_vars) + +if __name__ == '__main__': + try: + stay_awake() + clear_screen() + print_info('{}: Install ESET NOD32 AV\n'.format(KIT_NAME_FULL)) + scan_pups = ask('Enable PUP scans in ESET?') + install_eset_nod32_av(scan_pups) + print_standard('\nDone.') + exit_script() + except SystemExit: + pass + except: + major_exception() diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 2b7de0e6..ac4e9da5 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -8,6 +8,12 @@ LAUNCHERS = { 'L_ITEM': 'activate.py', 'L_ELEV': 'True', }, + 'Install ESET NOD32 AV': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'install_eset_nod32_av.py', + 'L_ELEV': 'True', + }, 'System Checklist': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 195a10bb..8fc17af8 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -12,6 +12,7 @@ SOURCE_URLS = { 'ClassicStartSkin': 'http://www.classicshell.net/forum/download/file.php?id=3001&sid=9a195960d98fd754867dcb63d9315335', 'Du': 'https://download.sysinternals.com/files/DU.zip', 'ERUNT': 'http://www.aumha.org/downloads/erunt.zip', + 'ESET NOD32 AV': 'https://download.eset.com/com/eset/apps/home/eav/windows/latest/eav_nt64.exe', 'Everything32': 'https://www.voidtools.com/Everything-1.4.1.895.x86.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.895.x64.zip', 'FastCopy32': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip', diff --git a/.cbin/_include/ESETConfigs/eset-config-no-pup.xml b/.cbin/_include/ESETConfigs/eset-config-no-pup.xml new file mode 100644 index 00000000..ac4e010e --- /dev/null +++ b/.cbin/_include/ESETConfigs/eset-config-no-pup.xml @@ -0,0 +1,1668 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.cbin/_include/ESETConfigs/eset-config.xml b/.cbin/_include/ESETConfigs/eset-config.xml new file mode 100644 index 00000000..31804d40 --- /dev/null +++ b/.cbin/_include/ESETConfigs/eset-config.xml @@ -0,0 +1,1668 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 33d1f42002f6e252ae4d442f98c83dc5ddeb782d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 18:09:39 -0700 Subject: [PATCH 115/293] Add WinAIO Repair --- .bin/Scripts/functions/update.py | 255 ++++++++++++---------- .bin/Scripts/settings/launchers.py | 6 + .bin/Scripts/settings/sources.py | 1 + .bin/Scripts/update_kit.py | 1 + .cbin/_include/WinAIO Repair/settings.ini | Bin 0 -> 10338 bytes 5 files changed, 147 insertions(+), 116 deletions(-) create mode 100644 .cbin/_include/WinAIO Repair/settings.ini diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index b324b2c8..a879560a 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -28,7 +28,7 @@ def compress_item(item): wd = os.path.abspath(r'{}\{}'.format(wd, os.path.pardir)) include_str = item.name os.chdir(wd) - + # Compress cmd = [ global_vars['Tools']['SevenZip'], @@ -38,7 +38,7 @@ def compress_item(item): include_str, ] run_program(cmd) - + # Done os.chdir(prev_dir) @@ -96,7 +96,7 @@ def generate_launcher(section, name, options): dest = global_vars['BaseDir'] full_path = r'{}\{}.cmd'.format(dest, name) template = r'{}\Scripts\Launcher_Template.cmd'.format(global_vars['BinDir']) - + # Format options f_options = {} for opt in options.keys(): @@ -106,7 +106,7 @@ def generate_launcher(section, name, options): elif re.search(r'^L_\w+', opt, re.IGNORECASE): new_opt = 'set {}='.format(opt) f_options[new_opt] = ['set {}={}'.format(opt, options[opt])] - + # Read template and update using f_options out_text = [] with open(template, 'r') as f: @@ -118,7 +118,7 @@ def generate_launcher(section, name, options): out_text.extend(f_options[line]) else: out_text.append(line) - + # Write file os.makedirs(dest, exist_ok=True) with open(full_path, 'w') as f: @@ -172,7 +172,7 @@ def scan_for_net_installers(server, family_name, min_year): """Scan network shares for installers.""" if not server['Mounted']: mount_network_share(server) - + if server['Mounted']: for year in os.scandir(r'\\{IP}\{Share}'.format(**server)): try: @@ -204,13 +204,13 @@ def update_testdisk(): for exe in ['fidentify_win.exe', 'photorec_win.exe', 'qphotorec_win.exe', 'testdisk_win.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('TestDisk') - + # Download download_to_temp('testdisk_wip.zip', SOURCE_URLS['TestDisk']) - + # Extract files extract_temp_to_cbin('testdisk_wip.zip', 'TestDisk') dest = r'{}\TestDisk'.format(global_vars['CBinDir']) @@ -220,7 +220,7 @@ def update_testdisk(): shutil.move(item.path, dest_item) shutil.rmtree( r'{}\TestDisk\testdisk-7.1-WIP'.format(global_vars['CBinDir'])) - + # Cleanup remove_from_temp('testdisk_wip.zip') @@ -230,21 +230,21 @@ def update_fastcopy(): # Stop running processes for process in ['FastCopy.exe', 'FastCopy64.exe']: kill_process(process) - + # Remove existing folders remove_from_kit('FastCopy') - + # Download download_to_temp('FastCopy32.zip', SOURCE_URLS['FastCopy32']) download_to_temp('FastCopy64.zip', SOURCE_URLS['FastCopy64']) - + # Extract extract_temp_to_bin('FastCopy64.zip', 'FastCopy', sz_args=['FastCopy.exe']) shutil.move( r'{}\FastCopy\FastCopy.exe'.format(global_vars['BinDir']), r'{}\FastCopy\FastCopy64.exe'.format(global_vars['BinDir'])) extract_temp_to_bin('FastCopy32.zip', 'FastCopy', sz_args=[r'-x!setup.exe', r'-x!*.dll']) - + # Cleanup remove_from_temp('FastCopy32.zip') remove_from_temp('FastCopy64.zip') @@ -252,14 +252,14 @@ def update_fastcopy(): def update_wimlib(): # Stop running processes kill_process('wimlib-imagex.exe') - + # Remove existing folders remove_from_kit('wimlib') - + # Download download_to_temp('wimlib32.zip', SOURCE_URLS['wimlib32']) download_to_temp('wimlib64.zip', SOURCE_URLS['wimlib64']) - + # Extract extract_generic( r'{}\wimlib32.zip'.format(global_vars['TmpDir']), @@ -267,7 +267,7 @@ def update_wimlib(): extract_generic( r'{}\wimlib64.zip'.format(global_vars['TmpDir']), r'{}\wimlib\x64'.format(global_vars['CBinDir'])) - + # Cleanup remove_from_temp('wimlib32.zip') remove_from_temp('wimlib64.zip') @@ -275,16 +275,16 @@ def update_wimlib(): def update_xyplorer(): # Stop running processes kill_process('XYplorerFree.exe') - + # Remove existing folders remove_from_kit('XYplorerFree') - + # Download download_to_temp('xyplorer_free.zip', SOURCE_URLS['XYplorerFree']) - + # Extract files extract_temp_to_cbin('xyplorer_free.zip', 'XYplorerFree') - + # Cleanup remove_from_temp('xyplorer_free.zip') @@ -292,16 +292,16 @@ def update_xyplorer(): def update_aida64(): # Stop running processes kill_process('notepadplusplus.exe') - + # Remove existing folders remove_from_kit('AIDA64') - + # Download download_to_temp('aida64.zip', SOURCE_URLS['AIDA64']) - + # Extract files extract_temp_to_cbin('aida64.zip', 'AIDA64') - + # Cleanup remove_from_temp('aida64.zip') @@ -309,37 +309,37 @@ def update_autoruns(): # Stop running processes kill_process('Autoruns.exe') kill_process('Autoruns64.exe') - + # Remove existing folders remove_from_kit('Autoruns') - + # Download download_to_temp('Autoruns.zip', SOURCE_URLS['Autoruns']) - + # Extract files extract_temp_to_cbin('Autoruns.zip', 'Autoruns') - + # Cleanup remove_from_temp('Autoruns.zip') def update_bleachbit(): # Stop running processes kill_process('bleachbit.exe') - + # Remove existing folders remove_from_kit('BleachBit') - + # Download download_to_temp('bleachbit.zip', SOURCE_URLS['BleachBit']) download_to_temp('Winapp2.zip', SOURCE_URLS['Winapp2']) - + # Extract files extract_temp_to_cbin('bleachbit.zip', 'BleachBit') extract_generic( r'{}\Winapp2.zip'.format(global_vars['TmpDir']), r'{}\BleachBit\cleaners'.format(global_vars['CBinDir']), mode='e', sz_args=[r'Winapp2-master\Non-CCleaner\Winapp2.ini']) - + # Move files into place dest = r'{}\BleachBit'.format(global_vars['CBinDir']) for item in os.scandir(r'{}\BleachBit-Portable'.format(dest)): @@ -348,7 +348,7 @@ def update_bleachbit(): shutil.move(item.path, dest_item) shutil.rmtree( r'{}\BleachBit\BleachBit-Portable'.format(global_vars['CBinDir'])) - + # Cleanup remove_from_temp('bleachbit.zip') remove_from_temp('Winapp2.zip') @@ -357,21 +357,21 @@ def update_bluescreenview(): # Stop running processes for exe in ['BlueScreenView.exe', 'BlueScreenView64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('BlueScreenView') - + # Download download_to_temp('bluescreenview32.zip', SOURCE_URLS['BlueScreenView32']) download_to_temp('bluescreenview64.zip', SOURCE_URLS['BlueScreenView64']) - + # Extract files extract_temp_to_cbin('bluescreenview64.zip', 'BlueScreenView', sz_args=['BlueScreenView.exe']) shutil.move( r'{}\BlueScreenView\BlueScreenView.exe'.format(global_vars['CBinDir']), r'{}\BlueScreenView\BlueScreenView64.exe'.format(global_vars['CBinDir'])) extract_temp_to_cbin('bluescreenview32.zip', 'BlueScreenView') - + # Cleanup remove_from_temp('bluescreenview32.zip') remove_from_temp('bluescreenview64.zip') @@ -379,16 +379,16 @@ def update_bluescreenview(): def update_erunt(): # Stop running processes kill_process('ERUNT.EXE') - + # Remove existing folders remove_from_kit('ERUNT') - + # Download download_to_temp('erunt.zip', SOURCE_URLS['ERUNT']) - + # Extract files extract_temp_to_cbin('erunt.zip', 'ERUNT') - + # Cleanup remove_from_temp('erunt.zip') @@ -396,10 +396,10 @@ def update_hitmanpro(): # Stop running processes for exe in ['HitmanPro.exe', 'HitmanPro64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('HitmanPro') - + # Download dest = r'{}\HitmanPro'.format(global_vars['CBinDir']) download_generic(dest, 'HitmanPro.exe', SOURCE_URLS['HitmanPro32']) @@ -410,13 +410,13 @@ def update_hwinfo(): # Stop running processes for exe in ['HWiNFO32.exe', 'HWiNFO64.exe']: kill_process(exe) - + # Download download_to_temp('HWiNFO.zip', SOURCE_URLS['HWiNFO']) - + # Extract files extract_temp_to_bin('HWiNFO.zip', 'HWiNFO') - + # Cleanup remove_from_temp('HWiNFO.zip') @@ -424,21 +424,21 @@ def update_produkey(): # Stop running processes for exe in ['ProduKey.exe', 'ProduKey64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('ProduKey') - + # Download download_to_temp('produkey32.zip', SOURCE_URLS['ProduKey32']) download_to_temp('produkey64.zip', SOURCE_URLS['ProduKey64']) - + # Extract files extract_temp_to_cbin('produkey64.zip', 'ProduKey', sz_args=['ProduKey.exe']) shutil.move( r'{}\ProduKey\ProduKey.exe'.format(global_vars['CBinDir']), r'{}\ProduKey\ProduKey64.exe'.format(global_vars['CBinDir'])) extract_temp_to_cbin('produkey32.zip', 'ProduKey') - + # Cleanup remove_from_temp('produkey32.zip') remove_from_temp('produkey64.zip') @@ -447,14 +447,14 @@ def update_produkey(): def update_intel_rst(): # Remove existing folders remove_from_kit('Intel RST') - + # Prep dest = r'{}\_Drivers\Intel RST'.format(global_vars['CBinDir']) include_path = r'{}\_include\_Drivers\Intel RST'.format( global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) - + # Download for name, url in RST_SOURCES.items(): download_generic(dest, name, url) @@ -462,7 +462,7 @@ def update_intel_rst(): def update_intel_ssd_toolbox(): # Remove existing folders remove_from_kit('Intel SSD Toolbox.exe') - + # Download download_generic( r'{}\_Drivers\Intel SSD Toolbox'.format(global_vars['CBinDir']), @@ -472,7 +472,7 @@ def update_intel_ssd_toolbox(): def update_samsung_magician(): # Remove existing folders remove_from_kit('Samsung Magician.exe') - + # Download download_generic( r'{}\_Drivers\Samsung Magician'.format(global_vars['CBinDir']), @@ -486,7 +486,7 @@ def update_sdi_origin(): aria_dest = r'{}\aria2'.format(global_vars['TmpDir']) aria = r'{}\aria2c.exe'.format(aria_dest) extract_generic(aria_source, aria_dest, mode='e') - + # Prep for torrent download download_to_temp('sdio.torrent', SOURCE_URLS['SDIO Torrent']) sdio_torrent = r'{}\sdio.torrent'.format(global_vars['TmpDir']) @@ -497,7 +497,7 @@ def update_sdi_origin(): if r and not re.search(r'(\.(bat|inf)|Video|Server|Printer|XP)', line, re.IGNORECASE): indexes.append(int(r.group(1))) indexes = [str(i) for i in sorted(indexes)] - + # Download SDI Origin cmd = [ aria, @@ -510,13 +510,13 @@ def update_sdi_origin(): run_program(cmd, pipe=False, check=False, shell=True) sleep(1) wait_for_process('aria2c') - + # Download SDI Origin extra themes download_to_temp('sdio_themes.zip', SOURCE_URLS['SDIO Themes']) theme_source = r'{}\sdio_themes.zip'.format(global_vars['TmpDir']) theme_dest = r'{}\SDIO_Update\tools\SDI\themes'.format(aria_dest) extract_generic(theme_source, theme_dest) - + # Move files into place for item in os.scandir(r'{}\SDIO_Update'.format(aria_dest)): dest_item = '{}\_Drivers\SDIO\{}'.format( @@ -528,7 +528,7 @@ def update_sdi_origin(): if (not os.path.exists(dest_item) and not re.search(r'\.(inf|bat)$', item.name, re.IGNORECASE)): shutil.move(item.path, dest_item) - + # Cleanup remove_from_temp('aria2') remove_from_temp('aria2.zip') @@ -540,13 +540,13 @@ def update_adobe_reader_dc(): # Prep dest = r'{}\Installers\Extras\Office'.format( global_vars['BaseDir']) - + # Remove existing installer try: os.remove(r'{}\Adobe Reader DC.exe'.format(dest)) except FileNotFoundError: pass - + # Download download_generic( dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC']) @@ -561,13 +561,13 @@ def update_eset_config(): def update_office(): # Remove existing folders remove_from_kit('_Office') - + # Prep dest = r'{}\_Office'.format(global_vars['CBinDir']) include_path = r'{}\_include\_Office'.format(global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) - + # Download and extract for year in ['2013', '2016']: name = 'odt{}.exe'.format(year) @@ -582,7 +582,7 @@ def update_office(): shutil.move( r'{}\{}'.format(global_vars['TmpDir'], year), r'{}\_Office\{}'.format(global_vars['CBinDir'], year)) - + # Cleanup remove_from_temp('odt2013.exe') remove_from_temp('odt2016.exe') @@ -590,7 +590,7 @@ def update_office(): def update_classic_start_skin(): # Remove existing folders remove_from_kit('ClassicStartSkin') - + # Download download_generic( r'{}\ClassicStartSkin'.format(global_vars['CBinDir']), @@ -600,13 +600,13 @@ def update_classic_start_skin(): def update_vcredists(): # Remove existing folders remove_from_kit('_vcredists') - + # Prep dest = r'{}\_vcredists'.format(global_vars['CBinDir']) include_path = r'{}\_include\_vcredists'.format(global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) - + # Download for year in VCREDIST_SOURCES.keys(): for bit in ['32', '64']: @@ -620,10 +620,10 @@ def update_vcredists(): def update_one_ninite(section, dest, name, url, indent=8, width=40): # Prep url = 'https://ninite.com/{}/ninite.exe'.format(url) - + # Download download_generic(out_dir=dest, out_name=name, source_url=url) - + # Copy to Installers folder installer_parent = r'{}\Installers\Extras\{}'.format( global_vars['BaseDir'], section) @@ -647,16 +647,16 @@ def update_all_ninite(indent=8, width=40, other_results={}): def update_caffeine(): # Stop running processes kill_process('caffeine.exe') - + # Remove existing folders remove_from_kit('Caffeine') - + # Download download_to_temp('caffeine.zip', SOURCE_URLS['Caffeine']) - + # Extract files extract_temp_to_cbin('caffeine.zip', 'Caffeine') - + # Cleanup remove_from_temp('caffeine.zip') @@ -664,16 +664,16 @@ def update_du(): # Stop running processes kill_process('du.exe') kill_process('du64.exe') - + # Remove existing folders remove_from_kit('Du') - + # Download download_to_temp('du.zip', SOURCE_URLS['Du']) - + # Extract files extract_temp_to_cbin('du.zip', 'Du') - + # Cleanup remove_from_temp('du.zip') @@ -681,21 +681,21 @@ def update_everything(): # Stop running processes for exe in ['Everything.exe', 'Everything64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('Everything') - + # Download download_to_temp('everything32.zip', SOURCE_URLS['Everything32']) download_to_temp('everything64.zip', SOURCE_URLS['Everything64']) - + # Extract files extract_temp_to_cbin('everything64.zip', 'Everything', sz_args=['Everything.exe']) shutil.move( r'{}\Everything\Everything.exe'.format(global_vars['CBinDir']), r'{}\Everything\Everything64.exe'.format(global_vars['CBinDir'])) extract_temp_to_cbin('everything32.zip', 'Everything') - + # Cleanup remove_from_temp('everything32.zip') remove_from_temp('everything64.zip') @@ -703,86 +703,86 @@ def update_everything(): def update_firefox_ublock_origin(): # Remove existing folders remove_from_kit('FirefoxExtensions') - + # Download download_to_temp('ff-uBO.xpi', SOURCE_URLS['Firefox uBO']) - + # Extract files extract_generic( r'{}\ff-uBO.xpi'.format(global_vars['TmpDir']), r'{}\FirefoxExtensions\uBlock0@raymondhill.net'.format( global_vars['CBinDir'])) - + # Cleanup remove_from_temp('ff-uBO.xpi') def update_notepadplusplus(): # Stop running processes kill_process('notepadplusplus.exe') - + # Remove existing folders remove_from_kit('NotepadPlusPlus') - + # Download download_to_temp('npp.7z', SOURCE_URLS['NotepadPlusPlus']) - + # Extract files extract_temp_to_cbin('npp.7z', 'NotepadPlusPlus') shutil.move( r'{}\NotepadPlusPlus\notepad++.exe'.format(global_vars['CBinDir']), r'{}\NotepadPlusPlus\notepadplusplus.exe'.format(global_vars['CBinDir']) ) - + # Cleanup remove_from_temp('npp.7z') def update_putty(): # Stop running processes kill_process('PUTTY.EXE') - + # Remove existing folders remove_from_kit('PuTTY') - + # Download download_to_temp('putty.zip', SOURCE_URLS['PuTTY']) - + # Extract files extract_temp_to_cbin('putty.zip', 'PuTTY') - + # Cleanup remove_from_temp('putty.zip') def update_treesizefree(): # Stop running processes kill_process('TreeSizeFree.exe') - + # Remove existing folders remove_from_kit('TreeSizeFree') - + # Download download_to_temp( 'treesizefree.zip', SOURCE_URLS['TreeSizeFree']) - + # Extract files extract_temp_to_cbin('treesizefree.zip', 'TreeSizeFree') - + # Cleanup remove_from_temp('treesizefree.zip') def update_xmplay(): # Stop running processes kill_process('xmplay.exe') - + # Remove existing folders remove_from_kit('XMPlay') - + # Download download_to_temp('xmplay.zip', SOURCE_URLS['XMPlay']) download_to_temp('xmp-7z.zip', SOURCE_URLS['XMPlay 7z']) download_to_temp('xmp-gme.zip', SOURCE_URLS['XMPlay Game']) download_to_temp('xmp-rar.zip', SOURCE_URLS['XMPlay RAR']) download_to_temp('WAModern.zip', SOURCE_URLS['XMPlay WAModern']) - + # Extract files extract_temp_to_cbin('xmplay.zip', 'XMPlay', mode='e', sz_args=['xmplay.exe', 'xmplay.txt']) @@ -794,7 +794,7 @@ def update_xmplay(): r'{}\{}.zip'.format(global_vars['TmpDir'], item), r'{}\XMPlay\plugins'.format(global_vars['CBinDir']), mode='e', sz_args=filter) - + # Download Music dest = r'{}\XMPlay\music_tmp\MOD'.format(global_vars['CBinDir']) for mod in MUSIC_MOD: @@ -806,7 +806,7 @@ def update_xmplay(): name = '{}.rsn'.format(game) url = 'http://snesmusic.org/v2/download.php?spcNow={}'.format(game) download_generic(dest, name, url) - + # Compress Music cmd = [ global_vars['Tools']['SevenZip'], @@ -815,7 +815,7 @@ def update_xmplay(): r'{}\XMPlay\music_tmp\*'.format(global_vars['CBinDir']), ] run_program(cmd) - + # Cleanup remove_item(r'{}\XMPlay\music_tmp'.format(global_vars['CBinDir'])) remove_from_temp('xmplay.zip') @@ -828,10 +828,10 @@ def update_xmplay(): def update_adwcleaner(): # Stop running processes kill_process('AdwCleaner.exe') - + # Remove existing folders remove_from_kit('AdwCleaner') - + # Download url = resolve_dynamic_url( SOURCE_URLS['AdwCleaner'], @@ -842,10 +842,10 @@ def update_adwcleaner(): def update_kvrt(): # Stop running processes kill_process('KVRT.exe') - + # Remove existing folders remove_from_kit('KVRT') - + # Download download_generic( r'{}\KVRT'.format(global_vars['CBinDir']), @@ -855,10 +855,10 @@ def update_kvrt(): def update_rkill(): # Stop running processes kill_process('RKill.exe') - + # Remove existing folders remove_from_kit('RKill') - + # Download url = resolve_dynamic_url( SOURCE_URLS['RKill'], @@ -869,36 +869,59 @@ def update_rkill(): def update_tdsskiller(): # Stop running processes kill_process('TDSSKiller.exe') - + # Remove existing folders remove_from_kit('TDSSKiller') - + # Download download_generic( r'{}\TDSSKiller'.format(global_vars['CBinDir']), 'TDSSKiller.exe', SOURCE_URLS['TDSSKiller']) +def update_winaiorepair(): + # Stop running processes + kill_process('Repair_Windows.exe') + + # Remove existing folders + remove_from_kit('WinAIO Repair') + + # Download + download_to_temp('winaio.zip', SOURCE_URLS['WinAIO Repair']) + + # Extract + extract_temp_to_cbin('winaio.zip', 'WinAIO Repair') + dest = r'{}\WinAIO Repair'.format(global_vars['CBinDir']) + for item in os.scandir(r'{}\Tweaking.com - Windows Repair'.format(dest)): + dest_item = '{}\{}'.format(dest, item.name) + if not os.path.exists(dest_item): + shutil.move(item.path, dest_item) + shutil.rmtree( + r'{}\WinAIO Repair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir'])) + + # Cleanup + remove_from_temp('winaio.zip') + ## Uninstallers ## def update_iobit_uninstaller(): # Stop running processes kill_process('IObitUninstallerPortable.exe') - + # Remove existing folders remove_from_kit('IObitUninstallerPortable') - + # Download download_generic( global_vars['CBinDir'], 'IObitUninstallerPortable.exe', SOURCE_URLS['IOBit_Uninstaller']) - + # "Install" cmd = r'{}\IObitUninstallerPortable.exe'.format(global_vars['CBinDir']) popen_program(cmd) sleep(1) wait_for_process('IObitUninstallerPortable') - + # Cleanup remove_from_kit('IObitUninstallerPortable.exe') diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index ac4e9da5..2baeb1ea 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -619,6 +619,12 @@ LAUNCHERS = { r'mkdir "%q_dir%">nul 2>&1', ], }, + 'WinAIO Repair': { + 'L_TYPE': 'Executable', + 'L_PATH': 'WinAIO Repair', + 'L_ITEM': 'Repair_Windows.exe', + 'L_ELEV': 'True', + }, }, r'Uninstallers': { 'IObit Uninstaller': { diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 8fc17af8..2b7822ff 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -39,6 +39,7 @@ SOURCE_URLS = { 'TreeSizeFree': 'https://www.jam-software.com/treesize_free/TreeSizeFree-Portable.zip', 'wimlib32': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip', 'wimlib64': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip', + 'WinAIO Repair': 'http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip', 'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip', 'XMPlay 7z': 'http://support.xmplay.com/files/16/xmp-7z.zip?v=800962', 'XMPlay Game': 'http://support.xmplay.com/files/12/xmp-gme.zip?v=515637', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 6a5cdf82..c3e4e3e2 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -79,6 +79,7 @@ if __name__ == '__main__': try_and_print(message='KVRT...', function=update_kvrt, other_results=other_results, width=40) try_and_print(message='RKill...', function=update_rkill, other_results=other_results, width=40) try_and_print(message='TDSSKiller...', function=update_tdsskiller, other_results=other_results, width=40) + try_and_print(message='WinAIO Repair...', function=update_winaiorepair, other_results=other_results, width=40) # Uninstallers print_info(' Uninstallers') diff --git a/.cbin/_include/WinAIO Repair/settings.ini b/.cbin/_include/WinAIO Repair/settings.ini new file mode 100644 index 0000000000000000000000000000000000000000..76a72c4f884c58ddce96a1552b5c26d91df66192 GIT binary patch literal 10338 zcmbuFZBJXt8HVR`rT&MbN?WCBw@Dz$rj_`RkPzsGC5lP%VYgZlV;mHNSsNC%KfdjK z&CSD{Hx7wc76#9md0y}5ZOs4v`(rvu2kAJSrhlhDraz>&X_BVtU0Uk*B5l;xzSqic z*DIrRu2T!W@9X_Q>pN+j=AyEZ9^^Bd>66w^MQf5?>&Y~~kF|C#ZuOnFJw=*l=|cPG z>4knQ*>h1Cr_WkHyWusK4u_KXlXhKd^#}c4WW8ot7C%4J8k~7Q&zfvY>Q`wy??DRa z!sSdnjHdNvoo`)MRy(EL!JFKbpsy4bamwsd}$Jq3mC8GLi06Sm|`lWVfjrXv|Q!v zD0BN&e8$-hU(S7+CB)K;Y&SghWp)p|R_R096{h=qQ{RIxj4ZH#w)hNm%=8*Qy`!_1 z@l0{b1*aS#rnyoRje3hijeTGws#9Nb^1;;X`1PA(y3`R5DMlUljMZI+(D~NVI&I2((f!&o{9_k zp12s6DG*XAPRW?m#be3wrICUi@KXQjVcxEhtDc?b8np`F7t)X%NIsx~fr-`V&|NqO zt#W>%hy$mqoZZU41&P#;RVaYKqZQB2boR5(-petD4bNpwdYGk^fPYg!@c^5wrK_kVkBNm_b^*p8D+7b5Ijos`1L6lT^yl6X|x4J2lH2HPYSrP#@6d@l=`fp=Jj>M$SU}&~DgbUqcCe zlJ&6_T?930mZO~-w#+Mi5`1m$E!qS(x=y-=u#@}bKF!GbeoCcldazD+Pl)=f>_p$r z3`ZADbwe-y?xS7mVw*DE#AUYng(?}hI?C2G)Qo&xFLI?Grhd~#JeQH@?-g6 zoF%72L+4@6{b%6(&-7F0Ec4HgdUheJVA~U6iwLJWlAk>JA~iLa3OP|XhX!Pim}ucS z?OA^>do6EWuXEa$mS>_86fM_MtH?$7_^p1Bf(aE2Sh9tl(Y0XXE1h0TkMm4-nRW2V z<`Yx)MD?>yEz{5XDSS-#b$)WLZkdYxNtC~7A+BCizL90?)8M+~_(^tT_Wrvhq;kPG zsBY#b%+Mg;Hwl(&Ur0lv&yvZKywYcOF)h!8p!$xOtwHFyPGXnOnW}r5LMwK*^ISi@ z_oA_smv86Tm9{CTWoH_|YwjBAl2`I4m~<5+UwWFabmzcd%;87b^Gw?9hNDC zo?-UoBjRgYGB0FxC`P|gboVWYvoraaiJhGNA)kiRb8+XM0ncDVWOr|jq-8zi4cbIN zOgN5m@+jy;Mzon_siK2qZA;JHm(gP_bC0l@BaD3EI^o-uXF7{cj=U;Mhg6;|Kn6(n z^i}LljpRnic?bJ&i(?(H^qV*;G?4*+a~~CZLOaWMplBxksRCF7+1>k&GaYn|Di<<_ zUtZ?U&pCdcJE?=rWhBcm&)my*KHO!X7a3@x7ajoz_Lw7)dSk1gAG@#&)+&CAyCI`2 zq^;8T(vdkHoRGuN)YIHl91o-qe)+Rrwr;($2iLvKm26l^jwizLM^UAAxjM5BdMeTT z8XpDyH3=cY;L=frLfLe)Vi@p zX9HI8KQO+UPX^1d`)WE+Av5Z9zyFtjhK?vWzutj}1oG2M{sg6gwtwCzYHPJsqai$Bynqqm#ooC$#AaoakFG>ywL5$Nc%UX z3z)(yfyGDqn~ab3vCfVt7@O#g)=0UQn)|}O-73_qgswtG;>gm@mQ5tz7Y6Yjx1pz! zlq?a|l6B*=p0Dxvsa|nc<{KB=-!licwPl)eLCd$r@SrorX7%%3|7|K$QLTyl$h6=P ztI@d|O?UCF=gd8Egg-jrlctQ!rqPWV7gS|(1E*d}Vzet>YoB){5+n4M%{&tRYfIa; z3Ubw}y%FO3FS;r);*9JnXe+|IbaY62DnD?KfyW}hgcNOCx4Vs|T}t)C8|2BR=L*{P zam=|)0e*Y|eOO|lBwoZI2atq7I` z;q+upYaHI>vTf~|<+yKB_Nm>B3wMlR*R~zWQHRo(y11#oLtk`)e|?JXm&D(nHKUkM z@%@1N%>J{E%eG7)Fe(K&`$Zn57jsr~Rpkb9M=0d32HH(sEmMgH-*(4+LwI*cCM=E& zr$Q&W50BOF>8bBS=eIHn>lm>Q>lG>b9Bhoo@iuuEetlZmS|fSpMaFO+#UYuxc&yJ9 z&da7*?<$EU_msr_r9Rbf%P()@#yOh3$LT+L7o8lLiF^Qst4ygp4NSIq(hFga==7Jl zrh3JB!r2Q++&y4H?gLh#xG#${LzBgwxmTl0_l=&!5Z|?c*61&|Q*$1vgrn#XjKkYx zF8O_#t5Nv|jQkdOY5L>$(PB!$vRIy2u^qtW-E`?N@HM`=kdDqIRi?&#QjY}Y2tKoa zs{Ksc{T))VL0wO5NEX1Nyi>`*VN~zKEXy=!prQIb%AN?MF}INap?#wHfjNwK@^I<2 z+E}gAKqIom$$ge@cVqH8(yDciKAqk zdMA+Q>~gne)IpFyWr+U}U?THf88Pj=;Eo=-$X`@4*D+R@ubtQU4+h^Q^?N$F+4^XJ zFT$c&12k5Oqe2y%I@7mp5Y#||C!%%?g}mf-^J2pLC~1BB5d7U4qeYpo?&3-|DmOLQ z`!`VypQ1$_&FB_cvW=L2?OrsbDK{Hbj#48drkwTB(%*SU*TGE)_X?h|!^50E=$N?n*kb^O5#GNb7mO@A$w()LFFRekS%mO8?N#2kE;^6@TJ|^8BIh3EA^h zzt=<+-oE>o-ypD0zPi<@2WPe2kHznaUc4K5&D|jzyw}D1v0hKa9o`{X-8Q%Hirsw@ z(m$MM47BCz)4A*>O0l3b5|PC>=j(bQ=OevrrE;Q4e@(mXP56XA%kDn|#**;qZ1**<>dV#U^8=vs>NY*5u4NF1}AC`n2bsBBl2Zeq~ zc=~0M)a_j=LXoYjW&a81ELY2}<@?WE)og$r(b3orMAqZsDn}&s8P9Zibfdd|x`{ng fXvgy~g+4s?;eD9OkWY7YyTYu+bW?7%N+tO}2a?j- literal 0 HcmV?d00001 From 1d0378dd7bbd2590a7f4908b06dc98815cb82618 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 19 Aug 2018 19:23:24 -0700 Subject: [PATCH 116/293] Training wheels off --- .bin/Scripts/functions/ddrescue.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index b967672b..b890cc59 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -20,7 +20,7 @@ DDRESCUE_SETTINGS = { '--data-preview': {'Enabled': True, 'Hidden': True, 'Value': '5'}, '--idirect': {'Enabled': True}, '--odirect': {'Enabled': True}, - '--max-read-rate': {'Enabled': False, 'Value': '32MiB'}, + '--max-read-rate': {'Enabled': False, 'Value': '1MiB'}, '--min-read-rate': {'Enabled': True, 'Value': '64KiB'}, '--reopen-on-error': {'Enabled': True}, '--retry-passes': {'Enabled': True, 'Value': '0'}, @@ -890,9 +890,7 @@ def run_ddrescue(state, pass_settings): try: clear_screen() print_info('Current dev: {}'.format(bp.source_path)) - ddrescue_proc = popen_program(['./__choose_exit', *cmd]) - # ddrescue_proc = popen_program(['./__exit_ok', *cmd]) - # ddrescue_proc = popen_program(cmd) + ddrescue_proc = popen_program(cmd) while True: bp.update_progress(state.current_pass) update_sidepane(state) From 7bce6076c8411f7bdd4727bd9136b5b77daa48ec Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 20 Aug 2018 02:30:50 -0700 Subject: [PATCH 117/293] Added more d7II launchers --- .bin/Scripts/settings/launchers.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 2baeb1ea..a76e5438 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -8,6 +8,11 @@ LAUNCHERS = { 'L_ITEM': 'activate.py', 'L_ELEV': 'True', }, + 'd7II': { + 'L_TYPE': 'Executable', + 'L_PATH': 'd7II', + 'L_ITEM': 'd7II.exe', + }, 'Install ESET NOD32 AV': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -84,6 +89,11 @@ LAUNCHERS = { }, }, r'Data Transfers': { + "Fab's Autobackup Pro": { + 'L_TYPE': 'Executable', + 'L_PATH': 'AutoBackupPro', + 'L_ITEM': 'autobackup6pro.exe', + }, 'FastCopy (as ADMIN)': { 'L_TYPE': 'Executable', 'L_PATH': 'FastCopy', @@ -196,6 +206,12 @@ LAUNCHERS = { r'mkdir "%q_dir%">nul 2>&1', ], }, + 'Mac & Linux Reader': { + 'L_TYPE': 'Executable', + 'L_PATH': 'LinuxReader', + 'L_ITEM': 'LinuxReader.exe', + 'L_ELEV': 'True', + }, 'Transferred Keys': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -570,6 +586,11 @@ LAUNCHERS = { 'L_ITEM': 'dism.py', 'L_ELEV': 'True', }, + 'ESET Online Scanner': { + 'L_TYPE': 'Executable', + 'L_PATH': 'ESET', + 'L_ITEM': 'ESET.exe', + }, 'KVRT': { 'L_TYPE': 'Executable', 'L_PATH': 'KVRT', From 887cfd9f92525a3bdcfe4710a772f79e013d1e77 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 20 Aug 2018 02:31:22 -0700 Subject: [PATCH 118/293] Bugfix: typo --- .bin/Scripts/Launcher_Template.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/Launcher_Template.cmd b/.bin/Scripts/Launcher_Template.cmd index 90b15482..01d1758d 100644 --- a/.bin/Scripts/Launcher_Template.cmd +++ b/.bin/Scripts/Launcher_Template.cmd @@ -17,7 +17,7 @@ call :SetTitle Launcher rem EXTRA_CODE :DefineLaunch -:: See %bin%\SCripts\Launch.cmd for details under :Usage label +:: See %bin%\Scripts\Launch.cmd for details under :Usage label set L_TYPE= set L_PATH= set L_ITEM= @@ -110,4 +110,4 @@ goto Exit :: Cleanup and exit :: :Exit endlocal -exit /b %errorlevel% \ No newline at end of file +exit /b %errorlevel% From 84f3a4e819d41324843003c326509e653efef182 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 20 Aug 2018 02:44:46 -0700 Subject: [PATCH 119/293] Removed LICENSE.txt --- LICENSE.txt | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index d02f5a6e..00000000 --- a/LICENSE.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2018 Alan Mason - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file From 5b08a3b4b4445cdf931b6c7c63581fe4fac78cb9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 20 Aug 2018 02:44:52 -0700 Subject: [PATCH 120/293] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37c7f431..6228b18a 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ A collection of scripts to help technicians service Windows systems. * _(Recommended)_ Install and configure `sudo` * See the [wiki page](https://wiki.archlinux.org/index.php/Sudo) for details. * Login to the user added above -* Download the Github repo $ `git clone https://github.com/2Shirt/WizardKit.git` +* Download the Github repo $ `git clone https://1201north.ddns.net:3000/2Shirt/WizardKit.git` * Run the build script * $ `cd WizardKit` * $ `./Build\ Linux -b` From c25a46b49f2148e2f60cc95edc2bd5edaeff657c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 21 Aug 2018 12:03:31 -0700 Subject: [PATCH 121/293] Let's not remove browser history --- .bin/Scripts/system_diagnostics.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 535b14ef..7ce0f639 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -43,27 +43,16 @@ BLEACH_BIT_CLEANERS = { 'Browsers': ( 'chromium.cache', 'chromium.current_session', - 'chromium.history', 'firefox.cache', - 'firefox.download_history', 'firefox.session_restore', - 'firefox.url_history', 'google_chrome.cache', - 'google_chrome.history', 'google_chrome.session', 'google_earth.temporary_files', - 'google_toolbar.search_history', - 'internet_explorer.history', 'internet_explorer.temporary_files', 'opera.cache', 'opera.current_session', - 'opera.download_history', - 'opera.url_history', 'safari.cache', - 'safari.history', 'seamonkey.cache', - 'seamonkey.download_history', - 'seamonkey.history', ), 'System': ( 'system.clipboard', From 3875d4b2bdbd40f04e9fe4bd81c0286276c60cbe Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 21 Aug 2018 12:14:17 -0700 Subject: [PATCH 122/293] Fix error detection in SW Diags --- .bin/Scripts/system_diagnostics.py | 35 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 7ce0f639..c13147d4 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -16,7 +16,6 @@ os.system('title {}: System Diagnostics Tool'.format(KIT_NAME_FULL)) global_vars['LogFile'] = r'{LogDir}\System Diagnostics.log'.format( **global_vars) D7_MODE = 'd7mode' in sys.argv -ERRORS = 0 # Static Variables BLEACH_BIT_CLEANERS = { @@ -68,13 +67,15 @@ BLEACH_BIT_CLEANERS = { def check_result(result, other_results): """Check result for warnings and errors.""" + result_ok = True if not result['CS']: for warning in other_results.get('Warning', {}).keys(): if warning in str(result['Error']): # Ignore warnings and repair statements - return + return True # Error is not a warning - ERRORS += 1 + result_ok = False + return result_ok if __name__ == '__main__': try: @@ -82,6 +83,7 @@ if __name__ == '__main__': clear_screen() print_info('{}: System Diagnostics Tool\n'.format(KIT_NAME_FULL)) ticket_number = get_ticket_number() + system_ok = True other_results = { 'Error': { 'CalledProcessError': 'Unknown Error', @@ -94,7 +96,7 @@ if __name__ == '__main__': if ENABLED_TICKET_NUMBERS: print_info('Starting System Diagnostics for Ticket #{}\n'.format( ticket_number)) - + # Sanitize Environment print_info('Sanitizing Environment') if not D7_MODE: @@ -102,10 +104,10 @@ if __name__ == '__main__': function=run_rkill, cs='Done', other_results=other_results) try_and_print(message='Running TDSSKiller...', function=run_tdsskiller, cs='Done', other_results=other_results) - + # Re-run if earlier process was stopped. stay_awake() - + # Start diags if not D7_MODE: print_info('Starting Background Scans') @@ -114,25 +116,24 @@ if __name__ == '__main__': function=run_hitmanpro, cs='Started', other_results=other_results) try_and_print(message='Running Autoruns...', function=run_autoruns, cs='Started', other_results=other_results) - + # OS Health Checks print_info('OS Health Checks') result = try_and_print( message='CHKDSK ({SYSTEMDRIVE})...'.format(**global_vars['Env']), function=run_chkdsk, other_results=other_results) - check_result(result, other_results) + system_ok &= check_result(result, other_results) result = try_and_print(message='SFC scan...', function=run_sfc_scan, other_results=other_results) - check_result(result, other_results) + system_ok &= check_result(result, other_results) if D7_MODE: result = try_and_print(message='DISM RestoreHealth...', function=run_dism, other_results=other_results, repair=True) - check_result(result, other_results) + system_ok &= check_result(result, other_results) else: try_and_print(message='DISM CheckHealth...', function=run_dism, other_results=other_results, repair=False) - - + if D7_MODE: # Archive all browsers for all users archive_all_users() @@ -140,7 +141,7 @@ if __name__ == '__main__': # Scan for supported browsers print_info('Scanning for browsers') scan_for_browsers() - + # Run BleachBit cleaners print_info('BleachBit Cleanup') for k, v in sorted(BLEACH_BIT_CLEANERS.items()): @@ -148,7 +149,7 @@ if __name__ == '__main__': function=run_bleachbit, cs='Done', other_results=other_results, cleaners=v, preview=bool(not D7_MODE)) - + # Export system info print_info('Backup System Information') try_and_print(message='AIDA64 reports...', @@ -164,7 +165,7 @@ if __name__ == '__main__': if not D7_MODE: try_and_print(message='Registry...', function=backup_registry, cs='Done', other_results=other_results) - + # Summary if not D7_MODE: print_info('Summary') @@ -185,7 +186,7 @@ if __name__ == '__main__': other_results=other_results, print_return=True) try_and_print(message='Product Keys:', function=get_product_keys, ns='Unknown', print_return=True) - + # User data if not D7_MODE: print_info('User Data') @@ -193,7 +194,7 @@ if __name__ == '__main__': show_user_data_summary() except Exception: print_error(' Unknown error.') - + # Done if not D7_MODE or ERRORS > 0: print_standard('\nDone.') From b9b7b0456a71f8e4df08592ae0e968407b25cf3f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 30 Aug 2018 10:58:31 -0700 Subject: [PATCH 123/293] Fix error detection in SW Diags (again) --- .bin/Scripts/system_diagnostics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index c13147d4..1ee42ffa 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -196,7 +196,7 @@ if __name__ == '__main__': print_error(' Unknown error.') # Done - if not D7_MODE or ERRORS > 0: + if not D7_MODE or not system_ok: print_standard('\nDone.') pause('Press Enter to exit...') exit_script() From b043b63d2d3b051a9d656c3dfbfd4f946c4ce7a8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 30 Aug 2018 10:59:46 -0700 Subject: [PATCH 124/293] Don't ask to install MSE in D7_MODE --- .bin/Scripts/install_sw_bundle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/install_sw_bundle.py b/.bin/Scripts/install_sw_bundle.py index e35760c3..cc0c9a7f 100644 --- a/.bin/Scripts/install_sw_bundle.py +++ b/.bin/Scripts/install_sw_bundle.py @@ -33,7 +33,8 @@ if __name__ == '__main__': answer_adobe_reader = ask('Install Adobe Reader?') answer_vcr = D7_MODE or ask('Install Visual C++ Runtimes?') answer_ninite = D7_MODE or ask('Install Ninite Bundle?') - if answer_ninite and global_vars['OS']['Version'] in ['7']: + if not D7_MODE and ( + answer_ninite and global_vars['OS']['Version'] in ['7']): # Vista is dead, not going to check for it answer_mse = ask('Install MSE?') else: From 7d1850a48028e48fcdf82f4c8bdde4f8070c4a57 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 30 Aug 2018 11:27:47 -0700 Subject: [PATCH 125/293] Allow BleachBit to be run more than once per day --- .bin/Scripts/functions/info.py | 51 ++++++++++++++++------------------ 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/.bin/Scripts/functions/info.py b/.bin/Scripts/functions/info.py index 5f7f3631..e306d767 100644 --- a/.bin/Scripts/functions/info.py +++ b/.bin/Scripts/functions/info.py @@ -371,38 +371,35 @@ def run_aida64(): def run_bleachbit(cleaners=None, preview=True): """Run BleachBit preview and save log. - This is a preview so no files should be deleted.""" - if not os.path.exists(global_vars['LogDir']+r'\BleachBit.log'): - debug_path = r'{}\BleachBit.debug'.format(global_vars['LogDir']) - error_path = debug_path.replace('debug', 'err') - log_path = debug_path.replace('debug', 'log') - extract_item('BleachBit', silent=True) + If preview is True then no files should be deleted.""" + error_path = r'{}\BleachBit.err'.format(global_vars['LogDir']) + log_path = error_path.replace('err', 'log') + extract_item('BleachBit', silent=True) - # Safety check - if not cleaners: - # Disable cleaning and use preset config - cleaners = ['--preset'] - preview = True + # Safety check + if not cleaners: + # Disable cleaning and use preset config + cleaners = ['--preset'] + preview = True - # Run - cmd = [ - global_vars['Tools']['BleachBit'], - '--preview' if preview else '--clean', - '--debug-log="{}"'.format(debug_path)] - cmd.extend(cleaners) - out = run_program(cmd, check=False) + # Run + cmd = [ + global_vars['Tools']['BleachBit'], + '--preview' if preview else '--clean'] + cmd.extend(cleaners) + out = run_program(cmd, check=False) - # Save stderr - if out.stderr.decode().splitlines(): - with open(error_path, 'a', encoding='utf-8') as f: - for line in out.stderr.decode().splitlines(): - f.write(line.strip() + '\n') - - # Save stdout - with open(log_path, 'a', encoding='utf-8') as f: - for line in out.stdout.decode().splitlines(): + # Save stderr + if out.stderr.decode().splitlines(): + with open(error_path, 'a', encoding='utf-8') as f: + for line in out.stderr.decode().splitlines(): f.write(line.strip() + '\n') + # Save stdout + with open(log_path, 'a', encoding='utf-8') as f: + for line in out.stdout.decode().splitlines(): + f.write(line.strip() + '\n') + def show_disk_usage(disk): """Show free and used space for a specified disk.""" print_standard('{:5}'.format(disk.device.replace('/', ' ')), From 84d7207d90ef19b37721c9cbc996531c92be82c5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 31 Aug 2018 15:32:01 -0600 Subject: [PATCH 126/293] (Re)Add SMART values 196 and 199 * Value is only displayed, no additional aborts --- .bin/Scripts/functions/hw_diags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 26547d07..dce6f140 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -20,8 +20,10 @@ ATTRIBUTES = { 184: {'Error': 1}, 187: {'Warning': 1}, 188: {'Warning': 1}, + 196: {'Warning': 1, 'Error': 10, 'Ignore': True}, 197: {'Error': 1}, 198: {'Error': 1}, + 199: {'Error': 1, 'Ignore': True}, 201: {'Warning': 1}, }, } From b2e287520c72b77883394204665274807962f11e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 21:32:31 -0600 Subject: [PATCH 127/293] Fix help flags --- .bin/Scripts/ddrescue-tui-menu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/ddrescue-tui-menu b/.bin/Scripts/ddrescue-tui-menu index 988ec0fa..4bec6230 100755 --- a/.bin/Scripts/ddrescue-tui-menu +++ b/.bin/Scripts/ddrescue-tui-menu @@ -32,7 +32,7 @@ if __name__ == '__main__': pass # Show usage - if re.search(r'-*(h|help|\?)', str(sys.argv), re.IGNORECASE): + if re.search(r'-+(h|help)', str(sys.argv), re.IGNORECASE): show_usage(script_name) exit_script() From 7cfdddcfbdee402bc1caedfcb522c65127fa300d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 21:34:14 -0600 Subject: [PATCH 128/293] Fix using image file for clone source --- .bin/Scripts/functions/ddrescue.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index b890cc59..2af666a0 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -41,6 +41,7 @@ class BaseObj(): """Base object used by DevObj, DirObj, and ImageObj.""" def __init__(self, path): self.type = 'base' + self.parent = None self.path = os.path.realpath(path) self.set_details() From dbf4559e14b71eeeddf70c2a8f5c3d0ec2c2ac00 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 21:39:32 -0600 Subject: [PATCH 129/293] Adjusted image/map filenames * Partition filenames should include '_pX_' instead of just '_X_' * Trailing whitespace should be removed --- .bin/Scripts/functions/ddrescue.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 2af666a0..31f22446 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -207,13 +207,17 @@ class DevObj(BaseObj): self.prefix = '{m_size}_{model}'.format( m_size=self.model_size, model=self.model) + self.prefix = self.prefix.strip() if self.parent: # Add child device details - self.prefix += '_{c_num}_{c_size}{sep}{c_label}'.format( - c_num=self.path.replace(self.parent, ''), + c_num = self.path.replace(self.parent, '') + self.prefix += '_{c_prefix}{c_num}_{c_size}{sep}{c_label}'.format( + c_prefix='p' if len(c_num) == 1 else '', + c_num=c_num, c_size=self.details.get('size', 'UNKNOWN'), sep='_' if self.label else '', c_label=self.label) + self.prefix = self.prefix.strip() class DirObj(BaseObj): From 86fc23aed80b4317375e573047f072c2161f7852 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 21:42:37 -0600 Subject: [PATCH 130/293] Fix pass number in status pane * It was using the internal 0-2 instead of the display 1-3 --- .bin/Scripts/functions/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 31f22446..e573e255 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -165,7 +165,7 @@ class BlockPair(): self.rescued_percent = map_data['rescued'] self.rescued = (self.rescued_percent * self.size) / 100 self.status[pass_num] = get_formatted_status( - label='Pass {}'.format(pass_num), + label='Pass {}'.format(pass_num+1), data=(self.rescued/self.size)*100) From 9dbfce94d4f31b245bca61f5599cd4342bea0630 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 21:44:28 -0600 Subject: [PATCH 131/293] Fix auto continue logic --- .bin/Scripts/functions/ddrescue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index e573e255..fcdcec17 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -71,6 +71,7 @@ class BlockPair(): self.pass_done = [False, False, False] self.resumed = False self.rescued = 0 + self.rescued_percent = 0 self.status = ['Pending', 'Pending', 'Pending'] self.size = source.size # Set dest paths @@ -336,7 +337,7 @@ class RecoveryState(): """Gets minimum pass rescued percentage, returns float.""" min_percent = 100 for bp in self.block_pairs: - min_percent = min(min_percent, bp.rescued) + min_percent = min(min_percent, bp.rescued_percent) return min_percent def retry_all_passes(self): From bd47f089961eed3dfb69bfad8797efd198ba97f3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 21:45:46 -0600 Subject: [PATCH 132/293] Removed (Whole) label when imaging * If only one partition was selected it would be incorrectly labeled "Whole" * Easier to remove the label than rework the data structures --- .bin/Scripts/functions/ddrescue.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index fcdcec17..d3ca8456 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -1215,10 +1215,6 @@ def update_sidepane(state): for bp in state.block_pairs: if state.source.is_image(): output.append('{BLUE}Image File{CLEAR}'.format(**COLORS)) - elif state.mode == 'image' and len(state.block_pairs) == 1: - output.append('{BLUE}{source} {YELLOW}(Whole){CLEAR}'.format( - source=bp.source_path, - **COLORS)) else: output.append('{BLUE}{source}{CLEAR}'.format( source=bp.source_path, From d35dba75397da4a6cc19e8d44f80e83d96517312 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 22:58:20 -0600 Subject: [PATCH 133/293] Prevent crash when retrying recovery * IMO ddrescue was exiting too quickly to load the map data so I'll assume 0b --- .bin/Scripts/functions/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index d3ca8456..ae1194a9 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -163,7 +163,7 @@ class BlockPair(): """Update progress using map file.""" if os.path.exists(self.map_path): map_data = read_map_file(self.map_path) - self.rescued_percent = map_data['rescued'] + self.rescued_percent = map_data.get('rescued', 0) self.rescued = (self.rescued_percent * self.size) / 100 self.status[pass_num] = get_formatted_status( label='Pass {}'.format(pass_num+1), From 240c55f407bc1b18fad05e5d75f448f18b5b6992 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 3 Sep 2018 23:13:17 -0600 Subject: [PATCH 134/293] Remove more whitespace from image/map names --- .bin/Scripts/functions/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index ae1194a9..cf518ea0 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -218,7 +218,7 @@ class DevObj(BaseObj): c_size=self.details.get('size', 'UNKNOWN'), sep='_' if self.label else '', c_label=self.label) - self.prefix = self.prefix.strip() + self.prefix = self.prefix.strip().replace(' ', '_') class DirObj(BaseObj): From a35be6878013488a20a8e5c8139b34f5baa6ad03 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 4 Sep 2018 22:22:21 -0600 Subject: [PATCH 135/293] Add net devices to Conky before starting --- .../include/airootfs/etc/skel/.update_conky | 20 ++++++++++--------- .../include/airootfs/etc/skel/.xinitrc | 1 - .../include/airootfs/etc/skel/.zlogin | 6 ++++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.linux_items/include/airootfs/etc/skel/.update_conky b/.linux_items/include/airootfs/etc/skel/.update_conky index f67dc893..79801d8b 100755 --- a/.linux_items/include/airootfs/etc/skel/.update_conky +++ b/.linux_items/include/airootfs/etc/skel/.update_conky @@ -3,14 +3,16 @@ IF_LIST=($(ip l | egrep '^[0-9]+:\s+(eth|en|wl)' | sed -r 's/^[0-9]+:\s+(\w+):.*/\1/' | sort)) # Add interfaces to conkyrc -for i in "${IF_LIST[@]}"; do - if [[ "${i:0:1}" == "e" ]]; then - sed -i -r "s/#Network/Wired:\${alignr}\${addr $i}\n#Network/" ~/.conkyrc - else - sed -i -r "s/#Network/Wireless:\${alignr}\${addr $i}\n#Network/" ~/.conkyrc - fi -done +if fgrep '#Network' $HOME/.conkyrc; then + for i in "${IF_LIST[@]}"; do + if [[ "${i:0:1}" == "e" ]]; then + sed -i -r "s/#Network/Wired:\${alignr}\${addr $i}\n#Network/" $HOME/.conkyrc + else + sed -i -r "s/#Network/Wireless:\${alignr}\${addr $i}\n#Network/" $HOME/.conkyrc + fi + done -# Remove '#Network' line to prevent duplicating lines if this script is re-run -sed -i -r "s/#Network//" ~/.conkyrc + # Remove '#Network' line to prevent duplicating lines if this script is re-run + sed -i -r "s/#Network//" $HOME/.conkyrc +fi diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index 78bddfe7..2827fe58 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -16,5 +16,4 @@ connect-to-network & (sleep 5s && killall dunst) & $HOME/.urxvt_default_res & $HOME/.update_wallpaper & -$HOME/.update_conky & exec openbox-session diff --git a/.linux_items/include/airootfs/etc/skel/.zlogin b/.linux_items/include/airootfs/etc/skel/.zlogin index 26463919..0898d1e2 100644 --- a/.linux_items/include/airootfs/etc/skel/.zlogin +++ b/.linux_items/include/airootfs/etc/skel/.zlogin @@ -1,9 +1,15 @@ setterm -blank 0 -powerdown 0 if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then + # Update settings if using i3 if fgrep -q "i3" /proc/cmdline; then sed -i -r 's/#(own_window_type override)/\1/' ~/.conkyrc sed -i -r 's/openbox-session/i3/' ~/.xinitrc fi + + # Update Conky + $HOME/.update_conky + + # Start X or HW-diags if ! fgrep -q "nox" /proc/cmdline; then startx >/dev/null else From 5ef7c9b16e61b5610754558d8ee70f911e19af60 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 4 Sep 2018 22:35:39 -0600 Subject: [PATCH 136/293] Updated functions/network.py --- .bin/Scripts/functions/network.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/network.py b/.bin/Scripts/functions/network.py index 0d6beb3a..3f3480f5 100644 --- a/.bin/Scripts/functions/network.py +++ b/.bin/Scripts/functions/network.py @@ -3,6 +3,7 @@ ## Wizard Kit: Functions - Network import os +import shutil import sys # Init @@ -26,13 +27,8 @@ def connect_to_network(): if is_connected(): return - # LAN - if 'en' in net_ifs: - # Reload the tg3/broadcom driver (known fix for some Dell systems) - try_and_print(message='Reloading drivers...', function=reload_tg3) - # WiFi - if not is_connected() and 'wl' in net_ifs: + if 'wl' in net_ifs: cmd = [ 'nmcli', 'dev', 'wifi', 'connect', WIFI_SSID, @@ -42,6 +38,18 @@ def connect_to_network(): function = run_program, cmd = cmd) + # LAN + if not is_connected(): + # Reload the tg3/broadcom driver (known fix for some Dell systems) + try_and_print(message='Reloading drivers...', function=reload_tg3) + + # Rebuild conkyrc + shutil.copyfile( + '/etc/skel/.conkyrc', + '{HOME}/.conkyrc'.format(**global_vars['Env'])) + cmd = ['{HOME}/.update_conky'.format(**global_vars['Env'])] + run_program(cmd, check=False) + def is_connected(): """Check for a valid private IP.""" devs = psutil.net_if_addrs() From 793581ac22af7116d2cff03076b5db09f64b2eea Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 9 Sep 2018 19:41:46 -0600 Subject: [PATCH 137/293] Rewrote I/O benchmark sections * Displays graph during test and in summary * Reduce test area to speedup the benchmark * Addresses issues #48 & #49 --- .bin/Scripts/functions/hw_diags.py | 216 ++++++++++++++++++++++++++--- 1 file changed, 195 insertions(+), 21 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index dce6f140..f173b6f6 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -27,6 +27,30 @@ ATTRIBUTES = { 201: {'Warning': 1}, }, } +IO_VARS = { + 'Block Size': 512*1024, + 'Chunk Size': 16*1024**2, + 'Minimum Dev Size': 8*1024**3, + 'Minimum Test Size': 10*1024**3, + 'Alt Test Size Factor': 0.01, + 'Progress Refresh Rate': 5, + 'Scale 16': [2**(0.6*x)+(16*x) for x in range(1,17)], + 'Scale 32': [2**(0.6*x/2)+(16*x/2) for x in range(1,33)], + 'Threshold Fail': 65*1024**2, + 'Threshold Warn': 135*1024**2, + 'Threshold Great': 750*1024**2, + 'Graph Horizontal': ('▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'), + 'Graph Horizontal Width': 40, + 'Graph Vertical': ( + '▏', '▎', '▍', '▌', + '▋', '▊', '▉', '█', + '█▏', '█▎', '█▍', '█▌', + '█▋', '█▊', '█▉', '██', + '██▏', '██▎', '██▍', '██▌', + '██▋', '██▊', '██▉', '███', + '███▏', '███▎', '███▍', '███▌', + '███▋', '███▊', '███▉', '████'), + } TESTS = { 'Prime95': { 'Enabled': False, @@ -49,6 +73,45 @@ TESTS = { }, } +def generate_horizontal_graph(rates): + """Generate two-line horizontal graph from rates, returns str.""" + line_top = '' + line_bottom = '' + for r in rates: + step = get_graph_step(r, scale=16) + + # Set color + r_color = COLORS['CLEAR'] + if r < IO_VARS['Threshold Fail']: + r_color = COLORS['RED'] + elif r < IO_VARS['Threshold Warn']: + r_color = COLORS['YELLOW'] + elif r > IO_VARS['Threshold Great']: + r_color = COLORS['GREEN'] + + # Build graph + if step < 8: + line_top += ' ' + line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + else: + line_top += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) + line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) + line_top += COLORS['CLEAR'] + line_bottom += COLORS['CLEAR'] + return '{}\n{}'.format(line_top, line_bottom) + +def get_graph_step(rate, scale=16): + """Get graph step based on rate and scale, returns int.""" + m_rate = rate / (1024**2) + step = 0 + scale_name = 'Scale {}'.format(scale) + for x in range(scale-1, -1, -1): + # Iterate over scale backwards + if m_rate >= IO_VARS[scale_name][x]: + step = x + break + return step + def get_read_rate(s): """Get read rate in bytes/s from dd progress output.""" real_rate = None @@ -254,28 +317,113 @@ def run_iobenchmark(): 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') + + # Get dev size + cmd = 'sudo lsblk -bdno size /dev/{}'.format(name) + try: + result = run_program(cmd.split()) + dev_size = result.stdout.decode().strip() + dev_size = int(dev_size) + except: + # Failed to get dev size, requires manual testing instead + TESTS['iobenchmark']['Status'][name] = 'Unknown' + continue + if dev_size < IO_VARS['Minimum Dev Size']: + TESTS['iobenchmark']['Status'][name] = 'Unknown' + continue + + # Calculate dd values + ## test_size is the area to be read in bytes + ## If the dev is < 10Gb then it's the whole dev + ## Otherwise it's the smaller of 10Gb and 1% of the dev + ## + ## test_chunks is the number of groups of "Chunk Size" in test_size + ## This number is reduced to a multiple of the graph width in + ## order to allow for the data to be condensed cleanly + ## + ## skip_blocks is the number of "Block Size" groups not tested + ## skip_count is the number of blocks to skip per test_chunk + ## skip_extra is how often to add an additional skip block + ## This is needed to ensure an even testing across the dev + ## This is calculated by using the fractional amount left off + ## of the skip_count variable + test_size = min(IO_VARS['Minimum Test Size'], dev_size) + test_size = max( + test_size, dev_size*IO_VARS['Alt Test Size Factor']) + test_chunks = int(test_size // IO_VARS['Chunk Size']) + test_chunks -= test_chunks % IO_VARS['Graph Horizontal Width'] + test_size = test_chunks * IO_VARS['Chunk Size'] + skip_blocks = int((dev_size - test_size) // IO_VARS['Block Size']) + skip_count = int((skip_blocks / test_chunks) // 1) + skip_extra = 0 + try: + skip_extra = 1 + int(1 / ((skip_blocks / test_chunks) % 1)) + except ZeroDivisionError: + # skip_extra == 0 is fine + pass + + # Open dd progress pane after initializing file + with open(progress_file, 'w') as f: + f.write('') + sleep(1) + cmd = 'tmux split-window -dp 75 -PF #D tail -f {}'.format( + progress_file) + result = run_program(cmd.split()) + bottom_pane = result.stdout.decode().strip() + + # Run dd read tests + offset = 0 + read_rates = [] + for i in range(test_chunks): + i += 1 + s = skip_count + c = int(IO_VARS['Chunk Size'] / IO_VARS['Block Size']) + if skip_extra and i % skip_extra == 0: + s += 1 + cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o}'.format( + b=IO_VARS['Block Size'], + s=offset+s, + c=c, + n=name, + o='/dev/null') + result = run_program(cmd.split()) + result_str = result.stderr.decode().replace('\n', '') + read_rates.append(get_read_rate(result_str)) + if i % IO_VARS['Progress Refresh Rate'] == 0: + # Update vertical graph + update_io_progress( + percent=i/test_chunks*100, + rate=read_rates[-1], + progress_file=progress_file) + # Update offset + offset += s + c 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 = [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' + # Close bottom pane + run_program(['tmux', 'kill-pane', '-t', bottom_pane]) + + # Build report + h_graph_rates = [] + pos = 0 + width = int(test_chunks / IO_VARS['Graph Horizontal Width']) + for i in range(IO_VARS['Graph Horizontal Width']): + # Append average rate for WIDTH number of rates to new array + h_graph_rates.append(sum(read_rates[pos:pos+width])/width) + pos += width + report = generate_horizontal_graph(h_graph_rates) + report += '\nRead speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( + sum(read_rates)/len(read_rates)/1024**2, + min(read_rates)/1024**2, + max(read_rates)/1024**2) + TESTS['iobenchmark']['Results'][name] = report + + # Set CS/NS + if min(read_rates) <= IO_VARS['Threshold Fail']: + TESTS['iobenchmark']['Status'][name] = 'NS' + elif min(read_rates) <= IO_VARS['Threshold Warn']: + TESTS['iobenchmark']['Status'][name] = 'Unknown' + else: + TESTS['iobenchmark']['Status'][name] = 'CS' # Move temp file shutil.move(progress_file, '{}/iobenchmark-{}.log'.format( @@ -759,13 +907,38 @@ def show_results(): and io_status not in ['Denied', 'OVERRIDE', 'Skipped']): print_info('Benchmark:') result = TESTS['iobenchmark']['Results'].get(name, '') - print_standard(' {}'.format(result)) + for line in result.split('\n'): + print_standard(' {}'.format(line)) print_standard(' ') # Done pause('Press Enter to return to main menu... ') run_program('tmux kill-pane -a'.split()) +def update_io_progress(percent, rate, progress_file): + """Update I/O progress file.""" + bar_color = COLORS['CLEAR'] + rate_color = COLORS['CLEAR'] + step = get_graph_step(rate, scale=32) + if rate < IO_VARS['Threshold Fail']: + bar_color = COLORS['RED'] + rate_color = COLORS['YELLOW'] + elif rate < IO_VARS['Threshold Warn']: + bar_color = COLORS['YELLOW'] + rate_color = COLORS['YELLOW'] + elif rate > IO_VARS['Threshold Great']: + bar_color = COLORS['GREEN'] + rate_color = COLORS['GREEN'] + line = ' {p:5.1f}% {b_color}{b:<4} {r_color}{r:6.1f} Mb/s{c}\n'.format( + p=percent, + b_color=bar_color, + b=IO_VARS['Graph Vertical'][step], + r_color=rate_color, + r=rate/(1024**2), + c=COLORS['CLEAR']) + with open(progress_file, 'a') as f: + f.write(line) + def update_progress(): """Update progress file.""" if 'Progress Out' not in TESTS: @@ -821,3 +994,4 @@ def update_progress(): if __name__ == '__main__': print("This file is not meant to be called directly.") +# vim: sts=4 sw=4 ts=4 From 8fec6fc5b9a825ffa99dc649aa3c775818bb7b2d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 14:46:04 -0600 Subject: [PATCH 138/293] Save raw I/O read rates in log --- .bin/Scripts/functions/hw_diags.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index f173b6f6..8898c79c 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -135,9 +135,9 @@ def get_smart_details(dev): def get_status_color(s): """Get color based on status, returns str.""" color = COLORS['CLEAR'] - if s in ['Denied', 'NS', 'OVERRIDE', 'Unknown']: + if s in ['Denied', 'NS', 'OVERRIDE']: color = COLORS['RED'] - elif s in ['Aborted', 'Working', 'Skipped']: + elif s in ['Aborted', 'Unknown', 'Working', 'Skipped']: color = COLORS['YELLOW'] elif s in ['CS']: color = COLORS['GREEN'] @@ -335,7 +335,7 @@ def run_iobenchmark(): # Calculate dd values ## test_size is the area to be read in bytes ## If the dev is < 10Gb then it's the whole dev - ## Otherwise it's the smaller of 10Gb and 1% of the dev + ## Otherwise it's the larger of 10Gb or 1% of the dev ## ## test_chunks is the number of groups of "Chunk Size" in test_size ## This number is reduced to a multiple of the graph width in @@ -412,9 +412,9 @@ def run_iobenchmark(): pos += width report = generate_horizontal_graph(h_graph_rates) report += '\nRead speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( - sum(read_rates)/len(read_rates)/1024**2, - min(read_rates)/1024**2, - max(read_rates)/1024**2) + sum(read_rates)/len(read_rates)/(1024**2), + min(read_rates)/(1024**2), + max(read_rates)/(1024**2)) TESTS['iobenchmark']['Results'][name] = report # Set CS/NS @@ -425,9 +425,12 @@ def run_iobenchmark(): else: TESTS['iobenchmark']['Status'][name] = 'CS' - # Move temp file - shutil.move(progress_file, '{}/iobenchmark-{}.log'.format( - global_vars['LogDir'], name)) + # Save logs + dest_filename = '{}/iobenchmark-{}.log'.format(global_vars['LogDir'], name) + shutil.move(progress_file, dest_filename) + with open(dest_filename.replace('.', '-raw.'), 'a') as f: + for rate in read_rates: + f.write('{} MB/s\n'.format(rate/(1024**2))) update_progress() # Done From 9f12f2c8560f2449123a380a19caf264a733bdf9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 15:39:28 -0600 Subject: [PATCH 139/293] Added SMART 199/C7 warning/override to HW-Diags --- .bin/Scripts/functions/hw_diags.py | 43 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 8898c79c..586efbd6 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -132,6 +132,15 @@ def get_smart_details(dev): # Let other sections deal with the missing data return {} +def get_smart_value(smart_data, smart_id): + """Get SMART value from table, returns int or None.""" + value = None + table = smart_data.get('ata_smart_attributes', {}).get('table', []) + for row in table: + if str(row.get('id', '?')) == str(smart_id): + value = row.get('raw', {}).get('value', None) + return value + def get_status_color(s): """Get color based on status, returns str.""" color = COLORS['CLEAR'] @@ -737,19 +746,29 @@ def scan_disks(full_paths=False, only_path=None): data['SMART Support'] = False # Ask for manual overrides if necessary - if not data['Quick Health OK'] and (TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']): + if TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: show_disk_details(data) - print_warning("WARNING: Health can't be confirmed for: {}".format( - '/dev/{}'.format(dev))) - dev_name = data['lsblk']['name'] - print_standard(' ') - if ask('Run tests on this device anyway?'): - TESTS['NVMe/SMART']['Status'][dev_name] = 'OVERRIDE' - 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 + needs_override = False + if not data['Quick Health OK']: + needs_override = True + print_warning( + "WARNING: Health can't be confirmed for: /dev/{}".format(dev)) + if get_smart_value(data['smartctl'], '199'): + # SMART attribute present and it's value is non-zero + needs_override = True + print_warning( + 'WARNING: SMART 199/C7 error detected on /dev/{}'.format(dev)) + print_standard(' (Have you tried swapping the drive cable?)') + if needs_override: + dev_name = data['lsblk']['name'] + print_standard(' ') + if ask('Run tests on this device anyway?'): + TESTS['NVMe/SMART']['Status'][dev_name] = 'OVERRIDE' + 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 From 83064d7c9038c30f710d5de949be62276399a80f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 15:54:36 -0600 Subject: [PATCH 140/293] Fix issue #46 --- .bin/Scripts/functions/hw_diags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 586efbd6..91ebdef2 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -677,6 +677,8 @@ def run_tests(tests): def scan_disks(full_paths=False, only_path=None): """Scan for disks eligible for hardware testing.""" clear_screen() + print_standard(' ') + print_standard('Scanning disks...') # Get eligible disk list cmd = ['lsblk', '-J', '-O'] From 56e354f124b5aeeab8de0115e5156417dba5f8e5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 16:15:15 -0600 Subject: [PATCH 141/293] Avoid crash described in issue #39 --- .bin/Scripts/functions/hw_diags.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 91ebdef2..49f2960d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -271,18 +271,21 @@ def run_badblocks(): print_standard('Done', timestamp=False) # Check results - with open(progress_file, 'r') as f: - text = f.read() - TESTS['badblocks']['Results'][name] = text - r = re.search(r'Pass completed.*0/0/0 errors', text) - if r: - TESTS['badblocks']['Status'][name] = 'CS' - else: - TESTS['badblocks']['Status'][name] = 'NS' + if os.path.exists(progress_file): + with open(progress_file, 'r') as f: + text = f.read() + TESTS['badblocks']['Results'][name] = text + r = re.search(r'Pass completed.*0/0/0 errors', text) + if r: + TESTS['badblocks']['Status'][name] = 'CS' + else: + TESTS['badblocks']['Status'][name] = 'NS' - # Move temp file - shutil.move(progress_file, '{}/badblocks-{}.log'.format( - global_vars['LogDir'], name)) + # Move temp file + shutil.move(progress_file, '{}/badblocks-{}.log'.format( + global_vars['LogDir'], name)) + else: + TESTS['badblocks']['Status'][name] = 'NS' update_progress() # Done From 34925a72c0c2b25db4b112cd6a97eede9afbef9c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 17:44:23 -0600 Subject: [PATCH 142/293] Update hostname via reverse DNS lookup Should help differentiate systems --- .../include/airootfs/etc/skel/.update_hostname | 15 +++++++++++++++ .linux_items/include/airootfs/etc/skel/.xinitrc | 1 + 2 files changed, 16 insertions(+) create mode 100755 .linux_items/include/airootfs/etc/skel/.update_hostname diff --git a/.linux_items/include/airootfs/etc/skel/.update_hostname b/.linux_items/include/airootfs/etc/skel/.update_hostname new file mode 100755 index 00000000..da563ab6 --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.update_hostname @@ -0,0 +1,15 @@ +#!/bin/bash + +IP="$(ip a show scope global \ + | grep inet \ + | head -1 \ + | sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')" +HOSTNAME="$(dig +noall +answer +short -x "$IP" \ + | sed 's/\.$//')" + +# Set hostname and renew DHCP lease +sudo hostnamectl set-hostname "${HOSTNAME}" +sudo dhclient -r +sleep 1 +sudo dhclient + diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index 2827fe58..573aed1d 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -12,6 +12,7 @@ conky -d nm-applet & cbatticon & volumeicon & +$HOME/.update_hostname connect-to-network & (sleep 5s && killall dunst) & $HOME/.urxvt_default_res & From deec1746e42637d5c1251452785bfe7c15f4dbba Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 18:20:16 -0600 Subject: [PATCH 143/293] Removed pydf to fix issue #44 --- .linux_items/include/airootfs/etc/skel/.aliases | 1 - .linux_items/packages/live_add | 1 - 2 files changed, 2 deletions(-) diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index 7566e42c..03d15315 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -4,7 +4,6 @@ alias 7z3='7z a -t7z -mx=3' alias 7z5='7z a -t7z -mx=5' alias 7z7='7z a -t7z -mx=7' alias 7z9='7z a -t7z -mx=9' -alias df='pydf' alias ddrescue='sudo ddrescue --ask --min-read-rate=64k -vvvv' alias diff='colordiff -ur' alias du='du -sch --apparent-size' diff --git a/.linux_items/packages/live_add b/.linux_items/packages/live_add index ade34eb5..a297ca05 100644 --- a/.linux_items/packages/live_add +++ b/.linux_items/packages/live_add @@ -61,7 +61,6 @@ otf-font-awesome-4 p7zip papirus-icon-theme progsreiserfs -pydf python python-psutil python-requests From d9a9ce0a86e76184ea6d9b19a1b8d2bef6f33e51 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 18:56:39 -0600 Subject: [PATCH 144/293] Allow hw-diags to reattach to the tmux session * The option to kill the current session and start a new was left in place --- .bin/Scripts/hw-diags | 9 ++++++--- .linux_items/packages/live_add | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/hw-diags b/.bin/Scripts/hw-diags index e8d838df..d3a1cb21 100755 --- a/.bin/Scripts/hw-diags +++ b/.bin/Scripts/hw-diags @@ -8,7 +8,7 @@ MENU="hw-diags-menu" function ask() { while :; do - read -p "$1 " -r answer + read -p "$1 [Y/N] " -r answer if echo "$answer" | egrep -iq '^(y|yes|sure)$'; then return 0 elif echo "$answer" | egrep -iq '^(n|no|nope)$'; then @@ -26,7 +26,10 @@ die () { if tmux list-session | grep -q "$SESSION_NAME"; then echo "WARNING: tmux session $SESSION_NAME already exists." echo "" - if ask "Kill current session?"; then + if ask "Connect to current session?"; then + # Do nothing, the command below will attach/connect + echo "" + elif ask "Kill current session and start new session?"; then tmux kill-session -t "$SESSION_NAME" || \ die "Failed to kill session: $SESSION_NAME" else @@ -39,5 +42,5 @@ if tmux list-session | grep -q "$SESSION_NAME"; then fi # Start session -tmux new-session -s "$SESSION_NAME" -n "$WINDOW_NAME" "$MENU" $* +tmux new-session -A -s "$SESSION_NAME" -n "$WINDOW_NAME" "$MENU" $* diff --git a/.linux_items/packages/live_add b/.linux_items/packages/live_add index a297ca05..ea784699 100644 --- a/.linux_items/packages/live_add +++ b/.linux_items/packages/live_add @@ -76,6 +76,7 @@ spice-vdagent terminus-font testdisk-wip thunar +tigervnc tint2 tk tmux From cb5ff20378637e09c1f52ff68d121eebfcbf5d8d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 20:54:49 -0600 Subject: [PATCH 145/293] Start a VNC server during startup --- .linux_items/include/airootfs/etc/skel/.xinitrc | 1 + .linux_items/include/airootfs/etc/ufw/user.rules | 3 +++ .linux_items/include/airootfs/etc/ufw/user6.rules | 3 +++ Build Linux | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index 573aed1d..fefe60f2 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -17,4 +17,5 @@ connect-to-network & (sleep 5s && killall dunst) & $HOME/.urxvt_default_res & $HOME/.update_wallpaper & +x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared & exec openbox-session diff --git a/.linux_items/include/airootfs/etc/ufw/user.rules b/.linux_items/include/airootfs/etc/ufw/user.rules index aa30960c..3dbf5cf4 100644 --- a/.linux_items/include/airootfs/etc/ufw/user.rules +++ b/.linux_items/include/airootfs/etc/ufw/user.rules @@ -21,6 +21,9 @@ -A ufw-user-input -p tcp --dport 22 -j ACCEPT -A ufw-user-input -p udp --dport 22 -j ACCEPT +### tuple ### allow tcp 5900 0.0.0.0/0 any 0.0.0.0/0 VNC - in +-A ufw-user-input -p tcp --dport 5900 -j ACCEPT -m comment --comment 'dapp_VNC' + ### END RULES ### ### LOGGING ### diff --git a/.linux_items/include/airootfs/etc/ufw/user6.rules b/.linux_items/include/airootfs/etc/ufw/user6.rules index 47d96108..13084be4 100644 --- a/.linux_items/include/airootfs/etc/ufw/user6.rules +++ b/.linux_items/include/airootfs/etc/ufw/user6.rules @@ -21,6 +21,9 @@ -A ufw6-user-input -p tcp --dport 22 -j ACCEPT -A ufw6-user-input -p udp --dport 22 -j ACCEPT +### tuple ### allow tcp 5900 ::/0 any ::/0 VNC - in +-A ufw6-user-input -p tcp --dport 5900 -j ACCEPT -m comment --comment 'dapp_VNC' + ### END RULES ### ### LOGGING ### diff --git a/Build Linux b/Build Linux index 6ee0f169..2973174c 100755 --- a/Build Linux +++ b/Build Linux @@ -251,6 +251,10 @@ function update_live_env() { # udevil fix echo "mkdir /media" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + # VNC password + echo "mkdir '/home/$username/.vnc'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + echo "echo '$TECH_PASSWORD' | vncpasswd -f > '/home/$username/.vnc/passwd'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + # Wallpaper mkdir -p "$LIVE_DIR/airootfs/usr/share/wallpaper" cp "$ROOT_DIR/Images/Linux.png" "$LIVE_DIR/airootfs/usr/share/wallpaper/burned.in" From 821cb5cd462e90790f9ac2a728bbd303d2d2446e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 12 Sep 2018 21:02:24 -0600 Subject: [PATCH 146/293] Super+t URxvt windows auto-connect to tmux session --- .linux_items/include/airootfs/etc/skel/.config/i3/config | 2 +- .linux_items/include/airootfs/etc/skel/.config/openbox/rc.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.linux_items/include/airootfs/etc/skel/.config/i3/config b/.linux_items/include/airootfs/etc/skel/.config/i3/config index de3c6fa8..cf09a2ca 100644 --- a/.linux_items/include/airootfs/etc/skel/.config/i3/config +++ b/.linux_items/include/airootfs/etc/skel/.config/i3/config @@ -73,7 +73,7 @@ bindsym $mod+f exec "thunar ~" bindsym $mod+i exec "hardinfo" bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes gui" bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags quick" -bindsym $mod+t exec "urxvt" +bindsym $mod+t exec "urxvt -e zsh -c 'tmux new-session -A -t general; zsh'" bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors" bindsym $mod+w exec "firefox" diff --git a/.linux_items/include/airootfs/etc/skel/.config/openbox/rc.xml b/.linux_items/include/airootfs/etc/skel/.config/openbox/rc.xml index 43656613..90c7b0e0 100644 --- a/.linux_items/include/airootfs/etc/skel/.config/openbox/rc.xml +++ b/.linux_items/include/airootfs/etc/skel/.config/openbox/rc.xml @@ -329,7 +329,7 @@ - urxvt + urxvt -e zsh -c 'tmux new-session -A -t general; zsh' From 879927c37ca169b5ef45c55eaa63eb5807a45884 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 14 Sep 2018 17:53:35 -0600 Subject: [PATCH 147/293] Add CoreStorage support to mount-all-volumes * Checks for any CoreStorage partitions * If found scans partition with testdisk to find inner volume(s) * If found mapper devices are added with dmsetup * Then the device list is built in mount_volumes() --- .bin/Scripts/functions/data.py | 72 ++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 340dc529..63a19519 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -153,6 +153,67 @@ def cleanup_transfer(dest_path): except Exception: pass +def find_core_storage_volumes(): + """Try to create block devices for any Apple CoreStorage volumes.""" + corestorage_uuid = '53746f72-6167-11aa-aa11-00306543ecac' + dmsetup_cmd_file = '{TmpDir}/dmsetup_command' + + # Get CoreStorage devices + cmd = [ + 'lsblk', '--json', '--list', '--paths', + '--output', 'NAME,PARTTYPE'] + result = run_program(cmd) + json_data = json.loads(result.stdout.decode()) + devs = json_data.get('blockdevices', []) + devs = [d for d in devs if d.get('parttype', '') == corestorage_uuid] + if devs: + print_standard(' ') + print_standard('Detected CoreStorage partition{}'.format( + '' if len(devs) == 1 else 's')) + print_standard(' Scanning for inner volume(s)....') + + # Search for inner volumes and setup dev mappers + for dev in devs: + dev_path = dev.get('name', '') + if not dev_path: + # Can't setup block device without the dev path + continue + dev_name = re.sub(r'.*/', '', dev_path) + log_path = '{LogDir}/testdisk_{dev_name}.log'.format( + dev_name=dev_name, **global_vars) + + # Run TestDisk + cmd = [ + 'sudo', 'testdisk', + '/logname', log_path, '/debug', '/log', + '/cmd', dev_path, 'partition_none,analyze'] + result = run_program(cmd, check=False) + if result.returncode: + # i.e. return code is non-zero + continue + if not os.path.exists(log_path): + # TestDisk failed to write log + continue + + # Check log for found volumes + cs_vols = {} + with open(log_path, 'r') as f: + for line in f.readlines(): + r = re.match( + r'^.*echo "([^"]+)" . dmsetup create test(\d)$', + line.strip(), + re.IGNORECASE) + if r: + cs_name = 'CoreStorage_{}_{}'.format(dev_name, r.group(2)) + cs_vols[cs_name] = r.group(1) + + # Create mapper device(s) + for name, dm_cmd in sorted(cs_vols.items()): + with open(dmsetup_cmd_file, 'w') as f: + f.write(dm_cmd) + cmd = ['sudo', 'dmsetup', 'create', name, dmsetup_cmd_file] + run_program(cmd, check=False) + def fix_path_sep(path_str): """Replace non-native and duplicate dir separators, returns str.""" return re.sub(r'(\\|/)+', lambda s: os.sep, path_str) @@ -190,14 +251,17 @@ def get_mounted_volumes(): def mount_volumes(all_devices=True, device_path=None, read_write=False): """Mount all detected filesystems.""" report = {} - - # Get list of block devices cmd = [ - 'lsblk', '-J', '-p', - '-o', 'NAME,FSTYPE,LABEL,UUID,PARTTYPE,TYPE,SIZE'] + 'lsblk', '--json', '--paths', + '--output', 'NAME,FSTYPE,LABEL,UUID,PARTTYPE,TYPE,SIZE'] if not all_devices and device_path: # Only mount volumes for specific device cmd.append(device_path) + else: + # Check for Apple CoreStorage volumes first + find_core_storage_volumes() + + # Get list of block devices result = run_program(cmd) json_data = json.loads(result.stdout.decode()) devs = json_data.get('blockdevices', []) From cdef33d7743ff13998bc11c872d7872f194fcf99 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 12:38:27 -0600 Subject: [PATCH 148/293] cbatticon removed from i3, notifications disabled --- .linux_items/include/airootfs/etc/skel/.config/openbox/autostart | 1 + .linux_items/include/airootfs/etc/skel/.xinitrc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart b/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart index 21fd52e5..6eaa6cc3 100644 --- a/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart +++ b/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart @@ -17,3 +17,4 @@ #xfce-mcs-manager & tint2 & +cbatticon --hide-notification & diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index fefe60f2..ddc70863 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -10,7 +10,6 @@ compton --backend xrender --xrender-sync --xrender-sync-fence & sleep 1s conky -d nm-applet & -cbatticon & volumeicon & $HOME/.update_hostname connect-to-network & From 3a801ba72de1be2d56c4c8c383c874a0d89ee66f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 15:08:47 -0600 Subject: [PATCH 149/293] Updated startup settings * Added support for HiDPI devices * Only affects devices with a DPI >= 192 * Most screen objects are doubled in size * Updated .conkyrc * Vertical offset now set to 24 or 48 (to match URxvt) * Removed extra line after network adapters * Updated .xinitrc * Removed dunst logic since `cbatticon` no longer sends notifications * Update .Xresources for all programs before `xrdb -merge` * Update hostname after `connect-to-network` * URxvt windows are now based on a 16:9 ratio (instead of 4:3) * Removed * .update_wallpaper (integrated with .xinitrc) * .urxvt_default_res (integrated with .update_dpi_settings) * Fixes issue #45 --- .../include/airootfs/etc/skel/.Xresources | 3 +- .../include/airootfs/etc/skel/.conkyrc | 9 ++- .../airootfs/etc/skel/.update_dpi_settings | 68 +++++++++++++++++++ .../airootfs/etc/skel/.update_hostname | 1 + .../airootfs/etc/skel/.update_wallpaper | 21 ------ .../airootfs/etc/skel/.urxvt_default_res | 10 --- .../include/airootfs/etc/skel/.wallpaper | 1 + .../include/airootfs/etc/skel/.xinitrc | 7 +- 8 files changed, 79 insertions(+), 41 deletions(-) create mode 100755 .linux_items/include/airootfs/etc/skel/.update_dpi_settings delete mode 100755 .linux_items/include/airootfs/etc/skel/.update_wallpaper delete mode 100755 .linux_items/include/airootfs/etc/skel/.urxvt_default_res create mode 120000 .linux_items/include/airootfs/etc/skel/.wallpaper diff --git a/.linux_items/include/airootfs/etc/skel/.Xresources b/.linux_items/include/airootfs/etc/skel/.Xresources index 68054af5..d659b735 100755 --- a/.linux_items/include/airootfs/etc/skel/.Xresources +++ b/.linux_items/include/airootfs/etc/skel/.Xresources @@ -21,7 +21,7 @@ URxvt*externalBorder: 0 !URxvt.colorIT: #87af5f !URxvt.colorBD: #c5c8c6 !URxvt.colorUL: #87afd7 -URxvt.geometry: 92x16 +URxvt.geometry: 92x16 URxvt.internalBorder: 8 URxvt.shading: 10 URxvt.transparent: true @@ -53,6 +53,7 @@ URxvt.transparent: true *.color15: #ffffff ! fonts +!Xft.dpi: 192 Xft.autohint: 0 Xft.antialias: 1 Xft.hinting: true diff --git a/.linux_items/include/airootfs/etc/skel/.conkyrc b/.linux_items/include/airootfs/etc/skel/.conkyrc index adfd5cbb..af09dd8f 100644 --- a/.linux_items/include/airootfs/etc/skel/.conkyrc +++ b/.linux_items/include/airootfs/etc/skel/.conkyrc @@ -37,7 +37,7 @@ minimum_size 180 0 ### width | height maximum_width 180 gap_x 20 ### left | right -gap_y 45 ### up | down +gap_y 24 ### up | down alignment tr ####################### End Window Settings ### @@ -143,15 +143,14 @@ Uptime:${alignr}${uptime_short} CPU: ${if_match ${cpu cpu0}<10} ${cpu cpu0}\ ${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\ ${else}${cpu cpu0}${endif}${endif}% Used${alignr}${freq_g} GHz -${cpugraph cpu0 20,180 ${color} ${color}} +${cpugraph cpu0 ${gap_x},${width} ${color} ${color}} RAM: ${mem} Used${alignr}${memmax} -${memgraph 20,180 ${color} ${color}} +${memgraph ${gap_x},${width} ${color} ${color}} Disk I/O: -${diskiograph 20,180 ${color} ${color}} +${diskiograph ${gap_x},${width} ${color} ${color}} Down: ${downspeed}${goto 115}Up:${alignr}${upspeed} #Network - ${alignc}S H O R T C U T K E Y S ${hr} [Super] + d${alignr}HW Diagnostics diff --git a/.linux_items/include/airootfs/etc/skel/.update_dpi_settings b/.linux_items/include/airootfs/etc/skel/.update_dpi_settings new file mode 100755 index 00000000..2287508c --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.update_dpi_settings @@ -0,0 +1,68 @@ +#!/bin/env bash +# +## Calculate DPI and adjust display settings if necesary + +REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$' +REGEX_URXVT='(URxvt.geometry:\s+).*' + +# Get screen data +xrandr_str="$(xrandr | grep mm | head -1)" +width_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\1/")" +height_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\2/")" +width_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\3/")" +height_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\4/")" + +# Convert to in +width_in="$(echo "${width_mm} * 0.03937" | bc)" +height_in="$(echo "${height_mm} * 0.03937" | bc)" + +# Calculate diagonals +diag_px="$(echo "sqrt(${width_px}^2 + ${height_px}^2)" | bc)" +diag_in="$(echo "sqrt(${width_in}^2 + ${height_in}^2)" | bc)" + +# Calculate DPI +dpi="$(echo "${diag_px} / ${diag_in}" | bc 2>/dev/null || True)" +dpi="${dpi:-0}" + +# Calculate URxvt default window size +width_urxvt="$(echo "${width_px} * 112/1280" | bc)" +height_urxvt="$(echo "${height_px} * 33/720" | bc)" +offset_urxvt="24" + +# Update settings if necessary +if [[ "${dpi}" -ge 192 ]]; then + # Conky + sed -i 's/minimum_size 180 0/minimum_size 360 0/' "${HOME}/.conkyrc" + sed -i 's/maximum_width 180/maximum_width 360/' "${HOME}/.conkyrc" + sed -i 's/gap_x 20/gap_x 40/' "${HOME}/.conkyrc" + sed -i 's/gap_y 24/gap_y 48/' "${HOME}/.conkyrc" + + # Fonts + sed -i 's/!Xft.dpi: 192/Xft.dpi: 192/' "${HOME}/.Xresources" + + # GDK + export GDK_SCALE=2 + export GDK_DPI_SCALE=0.5 + + # i3 + sed -i -r 's/(height\s+) 26/\1 52/' "${HOME}/.config/i3/config" + + # Tint2 + sed -i 's/panel_size = 100% 30/panel_size = 100% 60/' \ + "${HOME}/.config/tint2/tint2rc" + sed -i 's/Inconsolata 10/Inconsolata 20/g' \ + "${HOME}/.config/tint2/tint2rc" + sed -i 's/Inconsolata 12/Inconsolata 24/g' \ + "${HOME}/.config/tint2/tint2rc" + sed -i 's/systray_icon_size = 24/systray_icon_size = 48/' \ + "${HOME}/.config/tint2/tint2rc" + + # URxvt + width_urxvt="$(echo "${width_urxvt} / 2" | bc)" + height_urxvt="$(echo "${height_urxvt} / 2" | bc)" + offset_urxvt="$(echo "${offset_urxvt} * 2" | bc)" +fi + +# Update URxvt (Always) +urxvt_geometry="${width_urxvt}x${height_urxvt}+${offset_urxvt}+${offset_urxvt}" +sed -i -r "s/${REGEX_URXVT}/\1${urxvt_geometry}/" "${HOME}/.Xresources" diff --git a/.linux_items/include/airootfs/etc/skel/.update_hostname b/.linux_items/include/airootfs/etc/skel/.update_hostname index da563ab6..3c1bd7c2 100755 --- a/.linux_items/include/airootfs/etc/skel/.update_hostname +++ b/.linux_items/include/airootfs/etc/skel/.update_hostname @@ -5,6 +5,7 @@ IP="$(ip a show scope global \ | head -1 \ | sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')" HOSTNAME="$(dig +noall +answer +short -x "$IP" \ + | head -1 \ | sed 's/\.$//')" # Set hostname and renew DHCP lease diff --git a/.linux_items/include/airootfs/etc/skel/.update_wallpaper b/.linux_items/include/airootfs/etc/skel/.update_wallpaper deleted file mode 100755 index 7bffa12b..00000000 --- a/.linux_items/include/airootfs/etc/skel/.update_wallpaper +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -BOOT_PATH="/run/archiso/bootmnt/arch/" -BURNED_IN="/usr/share/wallpaper/burned.in" -WALLPAPER="$HOME/.wallpaper.png" - -function link_wall() { - sudo rm "$WALLPAPER" - sudo ln -s "$1" "$WALLPAPER" -} - -# Check for wallpaper -## Checks BOOT_PATH and uses the BURNED_IN file if nothing is found -for f in "$BOOT_PATH"/{Arch,arch}.{jpg,png} "$BURNED_IN"; do - if [[ -f "$f" ]]; then - link_wall "$f" - break - fi -done - -feh --bg-fill "$WALLPAPER" diff --git a/.linux_items/include/airootfs/etc/skel/.urxvt_default_res b/.linux_items/include/airootfs/etc/skel/.urxvt_default_res deleted file mode 100755 index 1e146090..00000000 --- a/.linux_items/include/airootfs/etc/skel/.urxvt_default_res +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -XWIDTH="$(xrandr 2>/dev/null | grep '*' | sed -r 's/^\s+([0-9]+)x.*/\1/')" -XHEIGHT="$(xrandr 2>/dev/null | grep '*' | sed -r 's/^\s+[0-9]+x([0-9]+).*/\1/')" - -WIDTH="$(echo "${XWIDTH}*92/1024" | bc)" -HEIGHT="$(echo "${XHEIGHT}*32/768" | bc)" - -sed -i -r "s/(URxvt.geometry:\s+).*/\1${WIDTH}x${HEIGHT}+24+24/" ~/.Xresources -xrdb -merge ~/.Xresources diff --git a/.linux_items/include/airootfs/etc/skel/.wallpaper b/.linux_items/include/airootfs/etc/skel/.wallpaper new file mode 120000 index 00000000..f2a3d5e1 --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.wallpaper @@ -0,0 +1 @@ +/usr/share/wallpaper/burned.in \ No newline at end of file diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index ddc70863..abb71f45 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -1,6 +1,7 @@ #!/bin/sh dbus-update-activation-environment --systemd DISPLAY +$HOME/.update_dpi_settings xrdb -merge $HOME/.Xresources xset s off xset -dpms @@ -11,10 +12,8 @@ sleep 1s conky -d nm-applet & volumeicon & -$HOME/.update_hostname connect-to-network & -(sleep 5s && killall dunst) & -$HOME/.urxvt_default_res & -$HOME/.update_wallpaper & +$HOME/.update_hostname & +feh --bg-fill "$HOME/.wallpaper" & x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared & exec openbox-session From d31991a67f16f9b371d239e1cfae2ac9941bce9d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 15:24:59 -0600 Subject: [PATCH 150/293] Always load broadcom before tg3 * Hopefully won't cause any problems. --- .bin/Scripts/functions/network.py | 19 ------------------- .../airootfs/etc/modprobe.d/broadcom.conf | 1 + 2 files changed, 1 insertion(+), 19 deletions(-) create mode 100644 .linux_items/include/airootfs/etc/modprobe.d/broadcom.conf diff --git a/.bin/Scripts/functions/network.py b/.bin/Scripts/functions/network.py index 3f3480f5..d040e343 100644 --- a/.bin/Scripts/functions/network.py +++ b/.bin/Scripts/functions/network.py @@ -37,18 +37,6 @@ def connect_to_network(): message = 'Connecting to {}...'.format(WIFI_SSID), function = run_program, cmd = cmd) - - # LAN - if not is_connected(): - # Reload the tg3/broadcom driver (known fix for some Dell systems) - try_and_print(message='Reloading drivers...', function=reload_tg3) - - # Rebuild conkyrc - shutil.copyfile( - '/etc/skel/.conkyrc', - '{HOME}/.conkyrc'.format(**global_vars['Env'])) - cmd = ['{HOME}/.update_conky'.format(**global_vars['Env'])] - run_program(cmd, check=False) def is_connected(): """Check for a valid private IP.""" @@ -79,13 +67,6 @@ def speedtest(): output = [(a, float(b), c) for a, b, c in output] return ['{:10}{:6.2f} {}'.format(*line) for line in output] -def reload_tg3(): - """Reload tg3 module as a workaround for some Dell systems.""" - run_program(['sudo', 'modprobe', '-r', 'tg3']) - run_program(['sudo', 'modprobe', 'broadcom']) - run_program(['sudo', 'modprobe', 'tg3']) - sleep(5) - if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf b/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf new file mode 100644 index 00000000..1c85cd7b --- /dev/null +++ b/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf @@ -0,0 +1 @@ +softdep tg3 pre: broadcom From 1ee4a611b9c76b5d5adeed8f3d5691b43c29f45a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 15:42:40 -0600 Subject: [PATCH 151/293] Hide UFD-only boot options from Linux ISOs * Fixes issue #41 --- .bin/Scripts/build-ufd | 2 ++ .linux_items/include/EFI/boot/refind.conf | 10 +++++----- .linux_items/include/syslinux/wk_pxe.cfg | 2 +- .linux_items/include/syslinux/wk_pxe_extras.cfg | 2 +- .linux_items/include/syslinux/wk_sys.cfg | 2 +- .linux_items/include/syslinux/wk_sys_extras.cfg | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/build-ufd b/.bin/Scripts/build-ufd index faae7867..c606892b 100755 --- a/.bin/Scripts/build-ufd +++ b/.bin/Scripts/build-ufd @@ -557,7 +557,9 @@ mount "${WINPE_ISO}" /mnt/WinPE -r >> "${LOG_FILE}" 2>&1 echo "Copying Linux files..." rsync ${RSYNC_ARGS} /mnt/Linux/* /mnt/Dest/ >> "${LOG_FILE}" 2>&1 sed -i "s/${ISO_LABEL}/${UFD_LABEL}/" /mnt/Dest/EFI/boot/refind.conf +sed -i "s/#UFD#//" /mnt/Dest/EFI/boot/refind.conf sed -i "s/${ISO_LABEL}/${UFD_LABEL}/" /mnt/Dest/arch/boot/syslinux/*cfg +sed -i "s/#UFD#//" /mnt/Dest/arch/boot/syslinux/*cfg echo "Copying WinPE files..." rsync ${RSYNC_ARGS} /mnt/WinPE/{Boot,bootmgr{,.efi},en-us,sources} /mnt/Dest/ >> "${LOG_FILE}" 2>&1 diff --git a/.linux_items/include/EFI/boot/refind.conf b/.linux_items/include/EFI/boot/refind.conf index 075f6e46..de83e78c 100644 --- a/.linux_items/include/EFI/boot/refind.conf +++ b/.linux_items/include/EFI/boot/refind.conf @@ -32,8 +32,8 @@ menuentry "Linux" { add_options "nox" } } -menuentry "WindowsPE" { - ostype windows - icon /EFI/boot/icons/wk_win.png - loader /EFI/microsoft/bootx64.efi -} +#UFD#menuentry "WindowsPE" { +#UFD# ostype windows +#UFD# icon /EFI/boot/icons/wk_win.png +#UFD# loader /EFI/microsoft/bootx64.efi +#UFD#} diff --git a/.linux_items/include/syslinux/wk_pxe.cfg b/.linux_items/include/syslinux/wk_pxe.cfg index d5efabb4..92af00e3 100644 --- a/.linux_items/include/syslinux/wk_pxe.cfg +++ b/.linux_items/include/syslinux/wk_pxe.cfg @@ -2,7 +2,7 @@ INCLUDE boot/syslinux/wk_head.cfg MENU BACKGROUND pxelinux.png INCLUDE boot/syslinux/wk_pxe_linux.cfg -INCLUDE boot/syslinux/wk_pxe_winpe.cfg +#UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg INCLUDE boot/syslinux/wk_pxe_extras_entry.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_pxe_extras.cfg b/.linux_items/include/syslinux/wk_pxe_extras.cfg index 04cd2ce1..d677b4b0 100644 --- a/.linux_items/include/syslinux/wk_pxe_extras.cfg +++ b/.linux_items/include/syslinux/wk_pxe_extras.cfg @@ -3,7 +3,7 @@ MENU BACKGROUND pxelinux.png INCLUDE boot/syslinux/wk_pxe_linux.cfg INCLUDE boot/syslinux/wk_pxe_linux_extras.cfg -INCLUDE boot/syslinux/wk_pxe_winpe.cfg +#UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys.cfg b/.linux_items/include/syslinux/wk_sys.cfg index beefb77d..0d375cf3 100644 --- a/.linux_items/include/syslinux/wk_sys.cfg +++ b/.linux_items/include/syslinux/wk_sys.cfg @@ -1,7 +1,7 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg -INCLUDE boot/syslinux/wk_sys_winpe.cfg +#UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg INCLUDE boot/syslinux/wk_sys_extras_entry.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys_extras.cfg b/.linux_items/include/syslinux/wk_sys_extras.cfg index 422bd053..3e5af215 100644 --- a/.linux_items/include/syslinux/wk_sys_extras.cfg +++ b/.linux_items/include/syslinux/wk_sys_extras.cfg @@ -2,7 +2,7 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg INCLUDE boot/syslinux/wk_sys_linux_extras.cfg -INCLUDE boot/syslinux/wk_sys_winpe.cfg +#UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg From 9a093ace9ce763b112cd6517836dfc7fbab9f737 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 15:47:47 -0600 Subject: [PATCH 152/293] Moved 'Scanning disks...' message in hw_diags.py * (Re)fixes issue #46 --- .bin/Scripts/functions/hw_diags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 49f2960d..585bff0b 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -647,6 +647,8 @@ def run_tests(tests): # Initialize if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: + print_standard(' ') + print_standard('Scanning disks...') scan_disks() update_progress() @@ -680,8 +682,6 @@ def run_tests(tests): def scan_disks(full_paths=False, only_path=None): """Scan for disks eligible for hardware testing.""" clear_screen() - print_standard(' ') - print_standard('Scanning disks...') # Get eligible disk list cmd = ['lsblk', '-J', '-O'] From da92cee33822f69bbd1e8e238e6eabfb2369d830 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 16:00:24 -0600 Subject: [PATCH 153/293] Fix issue #51 * The curly braces were being interpreted incorrectly by print_standard() --- .bin/Scripts/functions/browsers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index b969a59c..c6d39db9 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -285,6 +285,9 @@ def get_ie_homepages(): homepages.append(main_page) if len(extra_pages) > 0: homepages.extend(extra_pages) + + # Remove all curly braces + homepages = [h.replace('{', '').replace('}', '') for h in homepages] return homepages def get_mozilla_homepages(prefs_path): From 1e21c04a3eff8fbb9d108f98e3c0a8ce37f9b96e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 17:46:05 -0600 Subject: [PATCH 154/293] Address shutdown slowdowns * Unmount filesystem(s) and flush write cache before poweroff/reboot * Also adjusted timouts to maybe fix issue #52 --- .bin/Scripts/wk-power-command | 21 +++++++++++++++++++ .../include/airootfs/etc/oblogout.conf | 6 +++--- Build Linux | 4 ++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 .bin/Scripts/wk-power-command diff --git a/.bin/Scripts/wk-power-command b/.bin/Scripts/wk-power-command new file mode 100755 index 00000000..92af02fb --- /dev/null +++ b/.bin/Scripts/wk-power-command @@ -0,0 +1,21 @@ +#!/bin/bash +# +## Wizard Kit: Wrapper for logout, reboot, & poweroff + +# Unmount filesystems +find /media -maxdepth 1 -mindepth 1 -type d \ + -exec udevil umount "{}" \; + +# Flush write cache +sudo sync + +# Perform requested action +case "${1:-x}" in + poweroff) + sudo systemctl poweroff;; + reboot) + sudo systemctl reboot;; + *) + openbox --exit;; +esac +exit 0 diff --git a/.linux_items/include/airootfs/etc/oblogout.conf b/.linux_items/include/airootfs/etc/oblogout.conf index 4595c766..ea5606ef 100644 --- a/.linux_items/include/airootfs/etc/oblogout.conf +++ b/.linux_items/include/airootfs/etc/oblogout.conf @@ -15,6 +15,6 @@ restart = R logout = L [commands] -shutdown = systemctl poweroff -restart = systemctl reboot -logout = openbox --exit +shutdown = /usr/local/bin/wk-power-command poweroff +restart = /usr/local/bin/wk-power-command reboot +logout = /usr/local/bin/wk-power-command logout diff --git a/Build Linux b/Build Linux index 2973174c..94556c2a 100755 --- a/Build Linux +++ b/Build Linux @@ -219,6 +219,10 @@ function update_live_env() { # Services sed -i -r 's/^(.*pacman-init.*)$/#NOPE#\1/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" sed -i -r 's/^(.*choose-mirror.*)$/#NOPE#\1/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + + # Shutdown stall fix + echo "sed -i -r 's/^.*(DefaultTimeoutStartSec)=.*$/\1=15s/' /etc/systemd/system.conf" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + echo "sed -i -r 's/^.*(DefaultTimeoutStopSec)=.*$/\1=15s/' /etc/systemd/system.conf" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" # SSH mkdir -p "$SKEL_DIR/.ssh" From 35fd50771cc27dd5b92b79171e50ce86b9da1ed3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 17:50:54 -0600 Subject: [PATCH 155/293] Update hw_diags.py systemctl command syntax * Now it matches the wk-power-command style --- .bin/Scripts/functions/hw_diags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 585bff0b..61530e5b 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -224,9 +224,9 @@ def menu_diags(*args): 'pipes -t 0 -t 1 -t 2 -t 3 -p 5 -R -r 4000'.split(), check=False, pipe=False) elif selection == 'R': - run_program(['reboot']) + run_program(['systemctl', 'reboot']) elif selection == 'S': - run_program(['poweroff']) + run_program(['systemctl', 'poweroff']) elif selection == 'Q': break From 91f7628081c818849f18ce5463ce6ce261995a3a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 18:17:58 -0600 Subject: [PATCH 156/293] Updated sources * Dropping 2008 --- .bin/Scripts/settings/sources.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 3560b092..5ba2323e 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -48,10 +48,6 @@ SOURCE_URLS = { 'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip', } VCREDIST_SOURCES = { - '2008sp1': { - '32': 'https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe', - '64': 'https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe', - }, '2010sp1': { '32': 'https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe', '64': 'https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe', @@ -65,8 +61,8 @@ VCREDIST_SOURCES = { '64': 'https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x64.exe', }, '2017': { - '32': 'https://download.visualstudio.microsoft.com/download/pr/100349138/88b50ce70017bf10f2d56d60fcba6ab1/VC_redist.x86.exe', - '64': 'https://download.visualstudio.microsoft.com/download/pr/100349091/2cd2dba5748dc95950a5c42c2d2d78e4/VC_redist.x64.exe', + '32': 'https://aka.ms/vs/15/release/vc_redist.x86.exe', + '64': 'https://aka.ms/vs/15/release/vc_redist.x64.exe', }, } NINITE_SOURCES = { From a213ba5d32534fbb1bc220826b5748badda785dc Mon Sep 17 00:00:00 2001 From: Alan Mason <2xShirt@gmail.com> Date: Sat, 15 Sep 2018 21:20:52 -0600 Subject: [PATCH 157/293] Bugfix for mount-all-volumes --- .bin/Scripts/functions/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 63a19519..c8eec384 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -156,7 +156,7 @@ def cleanup_transfer(dest_path): def find_core_storage_volumes(): """Try to create block devices for any Apple CoreStorage volumes.""" corestorage_uuid = '53746f72-6167-11aa-aa11-00306543ecac' - dmsetup_cmd_file = '{TmpDir}/dmsetup_command' + dmsetup_cmd_file = '{TmpDir}/dmsetup_command'.format(**global_vars) # Get CoreStorage devices cmd = [ From 6cdf2a421168bec5d7b9bd72d22d344f931ec658 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 15:41:14 -0600 Subject: [PATCH 158/293] Added authorized_keys file for SSH connections --- .linux_items/authorized_keys | 1 + Build Linux | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .linux_items/authorized_keys diff --git a/.linux_items/authorized_keys b/.linux_items/authorized_keys new file mode 100644 index 00000000..be79388e --- /dev/null +++ b/.linux_items/authorized_keys @@ -0,0 +1 @@ +#Put SSH keys here diff --git a/Build Linux b/Build Linux index 94556c2a..512aa982 100755 --- a/Build Linux +++ b/Build Linux @@ -229,7 +229,8 @@ function update_live_env() { ssh-keygen -b 4096 -C "$username@$hostname" -N "" -f "$SKEL_DIR/.ssh/id_rsa" echo 'rm /root/.ssh/id*' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'rm /root/.zlogin' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - sed -i -r 's/^(.*PermitRootLogin.*)$/#NOPE#\1/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + sed -i -r 's/^(.*PermitRootLogin.*)$/PermitRootLogin no/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + cp "$ROOT_DIR/.linux_items/authorized_keys" "$SKEL_DIR/.ssh/authorized_keys" # Root user echo "echo 'root:$ROOT_PASSWORD' | chpasswd" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" From a71f7648c29fd659d6c6217f74652119a088132e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 18:45:10 -0600 Subject: [PATCH 159/293] Bugfixes for Build Linux script --- Build Linux | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Build Linux b/Build Linux index 512aa982..af01c928 100755 --- a/Build Linux +++ b/Build Linux @@ -190,9 +190,9 @@ function update_live_env() { # Live packages while read -r p; do - sed -i "/$p/d" "$LIVE_DIR/packages.both" + sed -i "/$p/d" "$LIVE_DIR/packages.x86_64" done < "$ROOT_DIR/.linux_items/packages/live_remove" - cat "$ROOT_DIR/.linux_items/packages/live_add" >> "$LIVE_DIR/packages.both" + cat "$ROOT_DIR/.linux_items/packages/live_add" >> "$LIVE_DIR/packages.x86_64" echo "[custom]" >> "$LIVE_DIR/pacman.conf" echo "SigLevel = Optional TrustAll" >> "$LIVE_DIR/pacman.conf" echo "Server = file://$REPO_DIR" >> "$LIVE_DIR/pacman.conf" @@ -229,7 +229,7 @@ function update_live_env() { ssh-keygen -b 4096 -C "$username@$hostname" -N "" -f "$SKEL_DIR/.ssh/id_rsa" echo 'rm /root/.ssh/id*' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'rm /root/.zlogin' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - sed -i -r 's/^(.*PermitRootLogin.*)$/PermitRootLogin no/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + sed -r '/.*PermitRootLogin.*/d' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" cp "$ROOT_DIR/.linux_items/authorized_keys" "$SKEL_DIR/.ssh/authorized_keys" # Root user @@ -326,9 +326,11 @@ function build_iso() { # Removing cached (and possibly outdated) custom repo packages for package in $(cat "$ROOT_DIR/.linux_items/packages/aur"); do - if [[ -f /var/cache/pacman/pkg/${package}* ]]; then - rm /var/cache/pacman/pkg/${package}* - fi + for p in /var/cache/pacman/pkg/*${package}*; do + if [[ -f "${p}" ]]; then + rm "${p}" + fi + done done # Build ISO From b79cd5d65afac4fc30d79346c2199c414d61307a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 18:46:02 -0600 Subject: [PATCH 160/293] Updated tool versions * Adjusted bundles * Dropped Office 2013 * Moved to Python 3.7 * Replaced TreeSizeFree with WizTree --- .bin/Scripts/build_kit.ps1 | 12 ++++----- .bin/Scripts/build_pe.ps1 | 19 +++++++------- .bin/Scripts/settings/sources.py | 44 +++++++++++++++----------------- 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/.bin/Scripts/build_kit.ps1 b/.bin/Scripts/build_kit.ps1 index dafaa2c8..bba52a66 100644 --- a/.bin/Scripts/build_kit.ps1 +++ b/.bin/Scripts/build_kit.ps1 @@ -82,25 +82,25 @@ if ($MyInvocation.InvocationName -ne ".") { DownloadFile -Path $Path -Name "7z-extra.7z" -Url "https://www.7-zip.org/a/7z1805-extra.7z" # ConEmu - $Url = "https://github.com/Maximus5/ConEmu/releases/download/v18.05.06/ConEmuPack.180506.7z" + $Url = "https://github.com/Maximus5/ConEmu/releases/download/v18.06.26/ConEmuPack.180626.7z" DownloadFile -Path $Path -Name "ConEmuPack.7z" -Url $Url # Notepad++ - $Url = "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z" + $Url = "https://notepad-plus-plus.org/repository/7.x/7.5.8/npp.7.5.8.bin.minimalist.7z" DownloadFile -Path $Path -Name "npp.7z" -Url $Url # Python - $Url = "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-win32.zip" + $Url = "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-win32.zip" DownloadFile -Path $Path -Name "python32.zip" -Url $Url - $Url = "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-amd64.zip" + $Url = "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-amd64.zip" DownloadFile -Path $Path -Name "python64.zip" -Url $Url # Python: psutil $DownloadPage = "https://pypi.org/project/psutil/" - $RegEx = "href=.*-cp36-cp36m-win32.whl" + $RegEx = "href=.*-cp37-cp37m-win32.whl" $Url = FindDynamicUrl $DownloadPage $RegEx DownloadFile -Path $Path -Name "psutil32.whl" -Url $Url - $RegEx = "href=.*-cp36-cp36m-win_amd64.whl" + $RegEx = "href=.*-cp37-cp37m-win_amd64.whl" $Url = FindDynamicUrl $DownloadPage $RegEx DownloadFile -Path $Path -Name "psutil64.whl" -Url $Url diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index 0e19050a..3fb1bcc9 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -136,20 +136,19 @@ if ($MyInvocation.InvocationName -ne ".") { @("bluescreenview32.zip", "http://www.nirsoft.net/utils/bluescreenview.zip"), @("bluescreenview64.zip", "http://www.nirsoft.net/utils/bluescreenview-x64.zip"), # ConEmu - @("ConEmuPack.7z", "https://github.com/Maximus5/ConEmu/releases/download/v18.05.06/ConEmuPack.180506.7z"), + @("ConEmuPack.7z", "https://github.com/Maximus5/ConEmu/releases/download/v18.06.26/ConEmuPack.180626.7z"), # Fast Copy - @("fastcopy32.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip"), - @("fastcopy64.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip"), + @("fastcopy.zip", "http://ftp.vector.co.jp/70/64/2323/FastCopy354_installer.zip"), # HWiNFO - @("hwinfo.zip", "http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip"), + @("hwinfo.zip", "http://app.oldfoss.com:81/download/HWiNFO/hwi_588.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_x86.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.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.8/npp.7.5.8.bin.minimalist.7z"), + @("npp_amd64.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.8/npp.7.5.8.bin.minimalist.x64.7z"), # NT Password Editor @("ntpwed.zip", "http://cdslow.org.ru/files/ntpwedit/ntpwed07.zip"), # Prime95 @@ -159,16 +158,16 @@ if ($MyInvocation.InvocationName -ne ".") { @("produkey32.zip", "http://www.nirsoft.net/utils/produkey.zip"), @("produkey64.zip", "http://www.nirsoft.net/utils/produkey-x64.zip"), # Python - @("python32.zip", "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-win32.zip"), - @("python64.zip", "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-amd64.zip"), + @("python32.zip", "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-win32.zip"), + @("python64.zip", "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-amd64.zip"), # Python: psutil @( "psutil64.whl", - (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win_amd64.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp37-cp37m-win_amd64.whl") ), @( "psutil32.whl", - (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win32.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp37-cp37m-win32.whl") ), # Q-Dir @("qdir32.zip", "https://www.softwareok.com/Download/Q-Dir_Portable.zip"), diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 5ba2323e..903c46fb 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -1,9 +1,10 @@ # Wizard Kit: Settings - Sources SOURCE_URLS = { + 'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120058/AcroRdrDC1801120058_en_US.exe', + 'AdwCleaner': 'https://downloads.malwarebytes.com/file/adwcleaner', 'AIDA64': 'http://download.aida64.com/aida64engineer597.zip', - 'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120040/AcroRdrDC1801120040_en_US.exe', - 'AdwCleaner': 'https://toolslib.net/downloads/finish/1-adwcleaner/', + 'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip', 'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip', 'BleachBit': 'https://download.bleachbit.org/BleachBit-2.0-portable.zip', 'BlueScreenView32': 'http://www.nirsoft.net/utils/bluescreenview.zip', @@ -14,38 +15,35 @@ SOURCE_URLS = { 'ERUNT': 'http://www.aumha.org/downloads/erunt.zip', 'Everything32': 'https://www.voidtools.com/Everything-1.4.1.895.x86.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.895.x64.zip', - '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.mozilla.org/firefox/downloads/file/956394/ublock_origin-1.16.6-an+fx.xpi', - 'HWiNFO': 'http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip', + 'FastCopy': 'http://ftp.vector.co.jp/70/64/2323/FastCopy354_installer.zip', + 'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/1056733/ublock_origin-1.16.20-an+fx.xpi', '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', + 'HWiNFO': 'http://app.oldfoss.com:81/download/HWiNFO/hwi_588.zip', 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27656/eng/Intel%20SSD%20Toolbox%20-%20v3.5.2.exe', + 'IOBit_Uninstaller': 'https://portableapps.duckduckgo.com/IObitUninstallerPortable_7.5.0.7.paf.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', - '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_9326.3600.exe', + 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.8/npp.7.5.8.bin.minimalist.7z', + 'Office Deployment Tool 2016': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_10810.33603.exe', 'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip', 'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip', 'PuTTY': 'https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip', 'RKill': 'https://www.bleepingcomputer.com/download/rkill/dl/10/', + 'Samsung Magician': 'https://s3.ap-northeast-2.amazonaws.com/global.semi.static/SAMSUNG_SSD_v5_2_1_180523/CD0CFAC4675B9E502899B41BE00525C3909ECE3AD57CC1A2FB6B74A766B2A1EA/Samsung_Magician_Installer.zip', 'SDIO Themes': 'http://snappy-driver-installer.org/downloads/SDIO_Themes.zip', 'SDIO Torrent': 'http://snappy-driver-installer.org/downloads/SDIO_Update.torrent', - 'Samsung Magician': 'http://downloadcenter.samsung.com/content/SW/201801/20180123130636806/Samsung_Magician_Installer.exe', 'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe', 'TestDisk': 'https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip', - 'TreeSizeFree': 'https://www.jam-software.com/treesize_free/TreeSizeFree-Portable.zip', 'wimlib32': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip', 'wimlib64': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip', 'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip', - 'XMPlay 7z': 'http://support.xmplay.com/files/16/xmp-7z.zip?v=800962', - 'XMPlay Game': 'http://support.xmplay.com/files/12/xmp-gme.zip?v=515637', - 'XMPlay RAR': 'http://support.xmplay.com/files/16/xmp-rar.zip?v=409646', - 'XMPlay WAModern': 'http://support.xmplay.com/files/10/WAModern.zip?v=207099', - 'XMPlay': 'http://support.xmplay.com/files/20/xmplay383.zip?v=298195', + 'WizTree': 'https://antibody-software.com/files/wiztree_3_26_portable.zip', + '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 RAR': 'https://support.xmplay.com/files/16/xmp-rar.zip?v=409646', + 'XMPlay WAModern': 'https://support.xmplay.com/files/10/WAModern.zip?v=207099', + 'XMPlay': 'https://support.xmplay.com/files/20/xmplay383.zip?v=298195', 'XYplorerFree': 'https://www.xyplorer.com/download/xyplorer_free_noinstall.zip', - 'aria2': 'https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip', } VCREDIST_SOURCES = { '2010sp1': { @@ -67,9 +65,8 @@ VCREDIST_SOURCES = { } NINITE_SOURCES = { 'Bundles': { - 'Runtimes.exe': '.net4.7.1-air-java8-silverlight', - 'Legacy.exe': '.net4.7.1-7zip-air-chrome-firefox-java8-silverlight-vlc', - 'Modern.exe': '.net4.7.1-7zip-air-chrome-classicstart-firefox-java8-silverlight-vlc', + 'Legacy.exe': '.net4.7.2-7zip-chrome-firefox-vlc', + 'Modern.exe': '.net4.7.2-7zip-chrome-classicstart-firefox-vlc', }, 'Audio-Video': { 'AIMP.exe': 'aimp', @@ -94,6 +91,7 @@ NINITE_SOURCES = { 'SugarSync.exe': 'sugarsync', }, 'Communication': { + 'Discord': 'discord', 'Pidgin.exe': 'pidgin', 'Skype.exe': 'skype', 'Trillian.exe': 'trillian', @@ -105,7 +103,6 @@ NINITE_SOURCES = { }, 'Developer': { 'Eclipse.exe': 'eclipse', - 'FileZilla.exe': 'filezilla', 'JDK 8.exe': 'jdk8', 'JDK 8 (x64).exe': 'jdkx8', 'Notepad++.exe': 'notepadplusplus', @@ -149,7 +146,7 @@ NINITE_SOURCES = { }, 'Runtimes': { 'Adobe Air.exe': 'air', - 'dotNET.exe': '.net4.7.1', + 'dotNET.exe': '.net4.7.2', 'Java 8.exe': 'java8', 'Shockwave.exe': 'shockwave', 'Silverlight.exe': 'silverlight', @@ -193,6 +190,7 @@ RST_SOURCES = { 'SetupRST_15.8.exe': 'https://downloadmirror.intel.com/27442/eng/SetupRST.exe', 'SetupRST_15.9.exe': 'https://downloadmirror.intel.com/27400/eng/SetupRST.exe', 'SetupRST_16.0.exe': 'https://downloadmirror.intel.com/27681/eng/SetupRST.exe', + 'SetupRST_16.5.exe': 'https://downloadmirror.intel.com/27984/eng/SetupRST.exe', } From 4e9cd1f1147c3d31389e0dab19074b934129c191 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 19:21:36 -0600 Subject: [PATCH 161/293] Update FastCopy using new installer --- .bin/Scripts/functions/update.py | 33 +++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 6825f9ba..9e1c3e34 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -235,19 +235,34 @@ def update_fastcopy(): remove_from_kit('FastCopy') # Download - download_to_temp('FastCopy32.zip', SOURCE_URLS['FastCopy32']) - download_to_temp('FastCopy64.zip', SOURCE_URLS['FastCopy64']) - - # Extract - extract_temp_to_bin('FastCopy64.zip', 'FastCopy', sz_args=['FastCopy.exe']) + download_to_temp('FastCopy.zip', SOURCE_URLS['FastCopy']) + + # Extract installer + extract_temp_to_bin('FastCopy.zip', 'FastCopy') + _path = r'{}\FastCopy'.format(global_vars['BinDir']) + _installer = 'FastCopy354_installer.exe' + + # Extract 64-bit + cmd = [ + r'{}\{}'.format(_path, _installer), + '/NOSUBDIR', '/DIR={}'.format(_path), + '/EXTRACT64'] + run_program(cmd) shutil.move( r'{}\FastCopy\FastCopy.exe'.format(global_vars['BinDir']), r'{}\FastCopy\FastCopy64.exe'.format(global_vars['BinDir'])) - extract_temp_to_bin('FastCopy32.zip', 'FastCopy', sz_args=[r'-x!setup.exe', r'-x!*.dll']) - + + # Extract 32-bit + cmd = [ + r'{}\{}'.format(_path, _installer), + '/NOSUBDIR', '/DIR={}'.format(_path), + '/EXTRACT32'] + run_program(cmd) + # Cleanup - remove_from_temp('FastCopy32.zip') - remove_from_temp('FastCopy64.zip') + os.remove(r'{}\{}'.format(_path, _installer)) + os.remove(r'{}\setup.exe'.format(_path, _installer)) + remove_from_temp('FastCopy.zip') def update_wimlib(): # Stop running processes From e4bcf88fe5596779efb1fbc05a41450e31f5ea0d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 19:23:36 -0600 Subject: [PATCH 162/293] Update Intel RST (Current Release) --- .bin/Scripts/settings/launchers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 6e011691..0e819553 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -282,8 +282,8 @@ LAUNCHERS = { 'Intel RST (Current Release)': { 'L_TYPE': 'Executable', 'L_PATH': '_Drivers\Intel RST', - 'L_ITEM': 'SetupRST_16.0.exe', - 'L_7ZIP': 'SetupRST_16.0.exe', + 'L_ITEM': 'SetupRST_16.5.exe', + 'L_7ZIP': 'SetupRST_16.5.exe', }, 'Intel RST (Previous Releases)': { 'L_TYPE': 'Folder', From f3885f25d67a5dd9ecd55ca3da780d41b986cf12 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 19:39:05 -0600 Subject: [PATCH 163/293] Update FastCopy using new installer --- .bin/Scripts/build_pe.ps1 | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index 3fb1bcc9..a16edb03 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -254,20 +254,30 @@ if ($MyInvocation.InvocationName -ne ".") { # Fast Copy Write-Host "Extracting: FastCopy" try { + # Extract Installer $ArgumentList = @( - "x", "$Temp\fastcopy64.zip", "-o$Build\bin\amd64\FastCopy", - "-aoa", "-bso0", "-bse0", "-bsp0", - "-x!setup.exe", "-x!*.dll") + "e", "$Temp\fastcopy.zip", "-o$Temp", + "-aoa", "-bso0", "-bse0", "-bsp0") Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait + + # Extract 64-bit $ArgumentList = @( - "e", "$Temp\fastcopy32.zip", "-o$Build\bin\x86\FastCopy", - "-aoa", "-bso0", "-bse0", "-bsp0", - "-x!setup.exe", "-x!*.dll") - Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait + "/NOSUBDIR", "/DIR=$Build\bin\amd64\FastCopy", + "/EXTRACT64") + Start-Process -FilePath "$TEMP\FastCopy354_installer.exe" -ArgumentList $ArgumentList -NoNewWindow -Wait + Remove-Item "$Build\bin\amd64\FastCopy\setup.exe" -Force + + # Extract 32-bit + $ArgumentList = @( + "/NOSUBDIR", "/DIR=$Build\bin\x86\FastCopy", + "/EXTRACT32") + Start-Process -FilePath "$TEMP\FastCopy354_installer.exe" -ArgumentList $ArgumentList -NoNewWindow -Wait + Remove-Item "$Build\bin\x86\FastCopy\setup.exe" -Force } catch { Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" } + # Killer Network Driver Write-Host "Extracting: Killer Network Driver" From bc572304186bf867f6c1b69313b9f77e0752e4e9 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 19:44:41 -0600 Subject: [PATCH 164/293] Replaced TreeSizeFree with WizTree --- .bin/Scripts/functions/update.py | 13 +++++++------ .bin/Scripts/settings/launchers.py | 6 +++--- .bin/Scripts/update_kit.py | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 9e1c3e34..809f98e0 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -760,22 +760,23 @@ def update_putty(): # Cleanup remove_from_temp('putty.zip') -def update_treesizefree(): +def update_wiztree(): # Stop running processes - kill_process('TreeSizeFree.exe') + for process in ['WizTree.exe', 'WizTree64.exe']: + kill_process(process) # Remove existing folders - remove_from_kit('TreeSizeFree') + remove_from_kit('WizTree') # Download download_to_temp( - 'treesizefree.zip', SOURCE_URLS['TreeSizeFree']) + 'wiztree.zip', SOURCE_URLS['WizTree']) # Extract files - extract_temp_to_cbin('treesizefree.zip', 'TreeSizeFree') + extract_temp_to_cbin('wiztree.zip', 'WizTree') # Cleanup - remove_from_temp('treesizefree.zip') + remove_from_temp('wiztree.zip') def update_xmplay(): # Stop running processes diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 0e819553..e2d74832 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -475,10 +475,10 @@ LAUNCHERS = { 'L_PATH': 'PuTTY', 'L_ITEM': 'PUTTY.EXE', }, - 'TreeSizeFree': { + 'WizTree': { 'L_TYPE': 'Executable', - 'L_PATH': 'TreeSizeFree', - 'L_ITEM': 'TreeSizeFree.exe', + 'L_PATH': 'WizTree', + 'L_ITEM': 'WizTree.exe', 'L_ELEV': 'True', }, 'Update Kit': { diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 6a5cdf82..7f9b251d 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -70,7 +70,7 @@ if __name__ == '__main__': try_and_print(message='FirefoxExtensions...', function=update_firefox_ublock_origin, other_results=other_results, width=40) try_and_print(message='PuTTY...', function=update_putty, other_results=other_results, width=40) try_and_print(message='Notepad++...', function=update_notepadplusplus, other_results=other_results, width=40) - try_and_print(message='TreeSizeFree...', function=update_treesizefree, other_results=other_results, width=40) + try_and_print(message='WizTree...', function=update_wiztree, other_results=other_results, width=40) try_and_print(message='XMPlay...', function=update_xmplay, other_results=other_results, width=40) # Repairs From d502f769ea6154f1d438ad6b46696794374cd494 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 19:58:36 -0600 Subject: [PATCH 165/293] Updated update_samsung_magician() --- .bin/Scripts/functions/update.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 809f98e0..54e64aad 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -489,10 +489,21 @@ def update_samsung_magician(): remove_from_kit('Samsung Magician.exe') # Download - download_generic( - r'{}\_Drivers\Samsung Magician'.format(global_vars['CBinDir']), - 'Samsung Magician.exe', - SOURCE_URLS['Samsung Magician']) + download_to_temp('Samsung Magician.zip', SOURCE_URLS['Samsung Magician']) + + # Extract + extract_generic( + source=r'{}\Samsung Magician.zip'.format(global_vars['TmpDir']), + dest=r'{}\_Drivers'.format(global_vars['CBinDir']), + mode='e') + shutil.move( + r'{}\_Drivers\Samsung_Magician_Installer.exe'.format( + global_vars['CBinDir']), + r'{}\_Drivers\Samsung Magician.exe'.format( + global_vars['CBinDir'])) + + # Cleanup + remove_from_temp('Samsung Magician.zip') def update_sdi_origin(): # Download aria2 From 1e6eb26c779c8e54a3e94fd216ccefe4c541e739 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 20:02:15 -0600 Subject: [PATCH 166/293] Removed Office 2013 sections --- .bin/Scripts/Launch.cmd | 3 +-- .bin/Scripts/functions/update.py | 9 ++++----- .bin/Scripts/settings/launchers.py | 26 -------------------------- 3 files changed, 5 insertions(+), 33 deletions(-) diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index 2364dcc8..f7080adb 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -150,7 +150,6 @@ goto Exit :LaunchOffice call "%bin%\Scripts\init_client_dir.cmd" /Office set "_odt=False" -if %L_PATH% equ 2013 (set "_odt=True") if %L_PATH% equ 2016 (set "_odt=True") if "%_odt%" == "True" ( goto LaunchOfficeODT @@ -493,4 +492,4 @@ goto Exit :Exit popd endlocal -exit /b %errorlevel% \ No newline at end of file +exit /b %errorlevel% diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 54e64aad..3389d3f4 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -587,8 +587,8 @@ def update_office(): if os.path.exists(include_path): shutil.copytree(include_path, dest) - # Download and extract - for year in ['2013', '2016']: + for year in ['2016']: + # Download and extract name = 'odt{}.exe'.format(year) url = 'Office Deployment Tool {}'.format(year) download_to_temp(name, SOURCE_URLS[url]) @@ -602,9 +602,8 @@ def update_office(): r'{}\{}'.format(global_vars['TmpDir'], year), r'{}\_Office\{}'.format(global_vars['CBinDir'], year)) - # Cleanup - remove_from_temp('odt2013.exe') - remove_from_temp('odt2016.exe') + # Cleanup + remove_from_temp('odt{}.exe'.format(year)) def update_classic_start_skin(): # Remove existing folders diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index e2d74832..a125a1f8 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -356,32 +356,6 @@ LAUNCHERS = { 'L_ELEV': 'True', }, }, - r'Installers\Extras\Office\2013': { - 'Home and Business 2013 (x32)': { - 'L_TYPE': 'Office', - 'L_PATH': '2013', - 'L_ITEM': 'hb_32.xml', - 'L_NCMD': 'True', - }, - 'Home and Business 2013 (x64)': { - 'L_TYPE': 'Office', - 'L_PATH': '2013', - 'L_ITEM': 'hb_64.xml', - 'L_NCMD': 'True', - }, - 'Home and Student 2013 (x32)': { - 'L_TYPE': 'Office', - 'L_PATH': '2013', - 'L_ITEM': 'hs_32.xml', - 'L_NCMD': 'True', - }, - 'Home and Student 2013 (x64)': { - 'L_TYPE': 'Office', - 'L_PATH': '2013', - 'L_ITEM': 'hs_64.xml', - 'L_NCMD': 'True', - }, - }, r'Installers\Extras\Office\2016': { 'Home and Business 2016 (x32)': { 'L_TYPE': 'Office', From 902a6398caf37f3dd73a2af8d24d02e466634cef Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 20:58:25 -0600 Subject: [PATCH 167/293] Bugfix update_samsung_magician() --- .bin/Scripts/functions/update.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 3389d3f4..ab2ffa80 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -492,14 +492,11 @@ def update_samsung_magician(): download_to_temp('Samsung Magician.zip', SOURCE_URLS['Samsung Magician']) # Extract - extract_generic( - source=r'{}\Samsung Magician.zip'.format(global_vars['TmpDir']), - dest=r'{}\_Drivers'.format(global_vars['CBinDir']), - mode='e') + extract_temp_to_cbin('Samsung Magician.zip', '_Drivers\Samsung Magician') shutil.move( - r'{}\_Drivers\Samsung_Magician_Installer.exe'.format( + r'{}\_Drivers\Samsung Magician\Samsung_Magician_Installer.exe'.format( global_vars['CBinDir']), - r'{}\_Drivers\Samsung Magician.exe'.format( + r'{}\_Drivers\Samsung Magician\Samsung Magician.exe'.format( global_vars['CBinDir'])) # Cleanup From 9c0262693777eda0b2c0e3e85dcb00a2162b7e25 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 21:03:49 -0600 Subject: [PATCH 168/293] Updated update_adwcleaner() --- .bin/Scripts/functions/update.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index ab2ffa80..50386673 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -849,11 +849,10 @@ def update_adwcleaner(): remove_from_kit('AdwCleaner') # Download - url = resolve_dynamic_url( - SOURCE_URLS['AdwCleaner'], - 'id="downloadLink"') download_generic( - r'{}\AdwCleaner'.format(global_vars['CBinDir']), 'AdwCleaner.exe', url) + r'{}\AdwCleaner'.format(global_vars['CBinDir']), + 'AdwCleaner.exe', + SOURCE_URLS['AdwCleaner']) def update_kvrt(): # Stop running processes From ae8993821f4cce16f61e25f9273e6a418f6861bc Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 21:05:09 -0600 Subject: [PATCH 169/293] Missed a VCR 2008 section --- .cbin/_include/_vcredists/InstallAll.bat | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.cbin/_include/_vcredists/InstallAll.bat b/.cbin/_include/_vcredists/InstallAll.bat index 597cd60e..5d935b34 100644 --- a/.cbin/_include/_vcredists/InstallAll.bat +++ b/.cbin/_include/_vcredists/InstallAll.bat @@ -1,9 +1,6 @@ @echo off setlocal -start "" /wait "2008sp1\x32\vcredist.exe" /qb! /norestart -start "" /wait "2008sp1\x64\vcredist.exe" /qb! /norestart - start "" /wait "2010\x32\vcredist.exe" /passive /norestart start "" /wait "2010\x64\vcredist.exe" /passive /norestart @@ -19,4 +16,4 @@ start "" /wait "2015u3\x64\vcredist.exe" /install /passive /norestart start "" /wait "2017\x32\vcredist.exe" /install /passive /norestart start "" /wait "2017\x64\vcredist.exe" /install /passive /norestart -endlocal \ No newline at end of file +endlocal From 50a503240d63d1e3350f8eddc3c95d0d57489ea3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 16 Sep 2018 23:08:11 -0600 Subject: [PATCH 170/293] Downgrading Python to 3.6 in WinPE * Python wouldn't load --- .bin/Scripts/build_pe.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index a16edb03..0476e8fe 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -158,16 +158,16 @@ if ($MyInvocation.InvocationName -ne ".") { @("produkey32.zip", "http://www.nirsoft.net/utils/produkey.zip"), @("produkey64.zip", "http://www.nirsoft.net/utils/produkey-x64.zip"), # Python - @("python32.zip", "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-win32.zip"), - @("python64.zip", "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-amd64.zip"), + @("python32.zip", "https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-win32.zip"), + @("python64.zip", "https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-amd64.zip"), # Python: psutil @( "psutil64.whl", - (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp37-cp37m-win_amd64.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win_amd64.whl") ), @( "psutil32.whl", - (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp37-cp37m-win32.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win32.whl") ), # Q-Dir @("qdir32.zip", "https://www.softwareok.com/Download/Q-Dir_Portable.zip"), From e3aaa887c53582dd9fadde783173bc54f935c4dd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 17 Sep 2018 14:15:19 -0600 Subject: [PATCH 171/293] Countdown the minutes remaining during Prime95 * Fixes issue #54 --- .bin/Scripts/functions/hw_diags.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 61530e5b..3b8bd354 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -452,7 +452,6 @@ def run_iobenchmark(): def run_mprime(): """Run Prime95 for MPRIME_LIMIT minutes while showing the temps.""" aborted = False - clear_screen() print_log('\nStart Prime95 test') TESTS['Prime95']['Status'] = 'Working' update_progress() @@ -467,12 +466,15 @@ def run_mprime(): # Start test run_program(['apple-fans', 'max']) - print_standard('Running Prime95 for {} minutes'.format(MPRIME_LIMIT)) - print_warning('If running too hot, press CTL+c to abort the test') try: - sleep(int(MPRIME_LIMIT)*60) + for i in range(int(MPRIME_LIMIT)): + clear_screen() + print_standard('Running Prime95 ({} minutes left)'.format( + int(MPRIME_LIMIT)-i)) + print_warning('If running too hot, press CTRL+c to abort the test') + sleep(60) except KeyboardInterrupt: - # Catch CTL+C + # Catch CTRL+C aborted = True # Save "final" temps From 79fc40e57a7596dbbf1d17d4509a6dcae2377848 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 17 Sep 2018 18:50:55 -0600 Subject: [PATCH 172/293] Fixed Python 3.7 dependencies * This re-upgrades Python to 3.7 in WinPE --- .bin/Scripts/build_kit.ps1 | 21 +++++++++++++++++++++ .bin/Scripts/build_pe.ps1 | 31 +++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/build_kit.ps1 b/.bin/Scripts/build_kit.ps1 index bba52a66..bd213578 100644 --- a/.bin/Scripts/build_kit.ps1 +++ b/.bin/Scripts/build_kit.ps1 @@ -11,6 +11,7 @@ $Bin = (Get-Item $WD).Parent.FullName $Root = (Get-Item $Bin -Force).Parent.FullName $Temp = "$Bin\tmp" $System32 = "{0}\System32" -f $Env:SystemRoot +$SysWOW64 = "{0}\SysWOW64" -f $Env:SystemRoot Push-Location "$WD" $Host.UI.RawUI.BackgroundColor = "black" $Host.UI.RawUI.ForegroundColor = "white" @@ -112,12 +113,25 @@ if ($MyInvocation.InvocationName -ne ".") { $Url = FindDynamicUrl -SourcePage $DownloadPage -RegEx $RegEx DownloadFile -Path $Path -Name $Name -Url $Url } + + # Visual C++ Runtimes + $Url = "https://aka.ms/vs/15/release/vc_redist.x86.exe" + DownloadFile -Path $Path -Name "vcredist_x86.exe" -Url $Url + $Url = "https://aka.ms/vs/15/release/vc_redist.x64.exe" + DownloadFile -Path $Path -Name "vcredist_x64.exe" -Url $Url ## Bail ## # If errors were encountered during downloads if ($DownloadErrors -gt 0) { Abort } + + ## Install ## + # Visual C++ Runtimes + $ArgumentList = @("/install", "/passive", "/norestart") + Start-Process -FilePath "$Temp\vcredist_x86.exe" -ArgumentList $ArgumentList -Wait + Start-Process -FilePath "$Temp\vcredist_x64.exe" -ArgumentList $ArgumentList -Wait + Remove-Item "$Temp\vcredist*.exe" ## Extract ## # 7-Zip @@ -192,6 +206,13 @@ if ($MyInvocation.InvocationName -ne ".") { Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" } } + try { + Copy-Item -Path "$System32\vcruntime140.dll" -Destination "$Bin\Python\x64\vcruntime140.dll" -Force + Copy-Item -Path "$SysWOW64\vcruntime140.dll" -Destination "$Bin\Python\x32\vcruntime140.dll" -Force + } + catch { + Write-Host (" ERROR: Failed to copy Visual C++ Runtime DLLs." ) -ForegroundColor "Red" + } Remove-Item "$Temp\python*.zip" Remove-Item "$Temp\*.whl" diff --git a/.bin/Scripts/build_pe.ps1 b/.bin/Scripts/build_pe.ps1 index 0476e8fe..560d570d 100644 --- a/.bin/Scripts/build_pe.ps1 +++ b/.bin/Scripts/build_pe.ps1 @@ -17,6 +17,7 @@ $Date = Get-Date -UFormat "%Y-%m-%d" $Host.UI.RawUI.BackgroundColor = "Black" $Host.UI.RawUI.ForegroundColor = "White" $HostSystem32 = "{0}\System32" -f $Env:SystemRoot +$HostSysWOW64 = "{0}\SysWOW64" -f $Env:SystemRoot $DISM = "{0}\DISM.exe" -f $Env:DISMRoot #Enable TLS 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 @@ -158,16 +159,16 @@ if ($MyInvocation.InvocationName -ne ".") { @("produkey32.zip", "http://www.nirsoft.net/utils/produkey.zip"), @("produkey64.zip", "http://www.nirsoft.net/utils/produkey-x64.zip"), # Python - @("python32.zip", "https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-win32.zip"), - @("python64.zip", "https://www.python.org/ftp/python/3.6.0/python-3.6.0-embed-amd64.zip"), + @("python32.zip", "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-win32.zip"), + @("python64.zip", "https://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-amd64.zip"), # Python: psutil @( "psutil64.whl", - (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win_amd64.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp37-cp37m-win_amd64.whl") ), @( "psutil32.whl", - (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win32.whl") + (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp37-cp37m-win32.whl") ), # Q-Dir @("qdir32.zip", "https://www.softwareok.com/Download/Q-Dir_Portable.zip"), @@ -177,6 +178,9 @@ if ($MyInvocation.InvocationName -ne ".") { @("testdisk64.zip", "https://www.cgsecurity.org/testdisk-7.1-WIP.win64.zip"), # VirtIO drivers @("virtio-win.iso", "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso"), + # Visual C++ Runtimes + @("vcredist_x86.exe", "https://aka.ms/vs/15/release/vc_redist.x86.exe"), + @("vcredist_x64.exe", "https://aka.ms/vs/15/release/vc_redist.x64.exe"), # wimlib-imagex @("wimlib32.zip", "https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip"), @("wimlib64.zip", "https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip") @@ -190,6 +194,13 @@ if ($MyInvocation.InvocationName -ne ".") { if ($DownloadErrors -gt 0) { Abort } + + ## Install ## + # Visual C++ Runtimes + Write-Host "Installing: Visual C++ Runtimes" + $ArgumentList = @("/install", "/passive", "/norestart") + Start-Process -FilePath "$Temp\vcredist_x86.exe" -ArgumentList $ArgumentList -Wait + Start-Process -FilePath "$Temp\vcredist_x64.exe" -ArgumentList $ArgumentList -Wait ## Extract ## # 7-Zip @@ -423,6 +434,12 @@ if ($MyInvocation.InvocationName -ne ".") { catch { Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" } + try { + Copy-Item -Path "$HostSystem32\vcruntime140.dll" -Destination "$Build\bin\amd64\python\vcruntime140.dll" -Force + } + catch { + Write-Host (" ERROR: Failed to copy Visual C++ Runtime DLL." ) -ForegroundColor "Red" + } # Python (x32) Write-Host "Extracting: Python (x32)" @@ -440,6 +457,12 @@ if ($MyInvocation.InvocationName -ne ".") { catch { Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" } + try { + Copy-Item -Path "$HostSysWOW64\vcruntime140.dll" -Destination "$Build\bin\x86\python\vcruntime140.dll" -Force + } + catch { + Write-Host (" ERROR: Failed to copy Visual C++ Runtime DLL." ) -ForegroundColor "Red" + } # Q-Dir Write-Host "Extracting: Q-Dir" From b34187b86a496998e6a7ef53599b056a718ed63d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 17 Sep 2018 20:04:47 -0600 Subject: [PATCH 173/293] Use new Firefox 62 method to install uBlock Origin --- .bin/Scripts/functions/browsers.py | 20 +++++++++++++------- .bin/Scripts/functions/setup.py | 29 +++++++++++++++++++++++------ .bin/Scripts/functions/update.py | 14 ++++---------- 3 files changed, 40 insertions(+), 23 deletions(-) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index c6d39db9..99086f18 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -46,6 +46,9 @@ UBO_CHROME_REG = r'Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdl UBO_EXTRA_CHROME = 'https://chrome.google.com/webstore/detail/ublock-origin-extra/pgdnlhfefecpicbbihgmbmffkjpaplco?hl=en' UBO_EXTRA_CHROME_REG = r'Software\Wow6432Node\Google\Chrome\Extensions\pgdnlhfefecpicbbihgmbmffkjpaplco' UBO_MOZILLA = 'https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/' +UBO_MOZZILA_PATH = r'{}\Mozilla Firefox\distribution\extensions\ublock_origin.xpi'.format(os.environ.get('PROGRAMFILES')) +UBO_MOZILLA_REG = r'Software\Mozilla\Firefox\Extensions' +UBO_MOZILLA_REG_NAME = 'uBlock0@raymondhill.net' UBO_OPERA = 'https://addons.opera.com/en/extensions/details/ublock/?display=en' SUPPORTED_BROWSERS = { 'Internet Explorer': { @@ -369,14 +372,17 @@ def install_adblock(indent=8, width=32): urls.append(UBO_EXTRA_CHROME) elif browser_data[browser]['base'] == 'mozilla': - # Assume UBO is not installed first and change if it is - urls.append(UBO_MOZILLA) - if browser == 'Mozilla Firefox': - ubo = browser_data[browser]['exe_path'].replace( - 'firefox.exe', - r'distribution\extensions\uBlock0@raymondhill.net') - if os.path.exists(ubo): + # Check for system extensions + try: + with winreg.OpenKey(HKLM, UBO_MOZILLA_REG) as key: + winreg.QueryValueEx(key, UBO_MOZILLA_REG_NAME) + except FileNotFoundError: + urls = [UBO_MOZILLA] + else: + if os.path.exists(UBO_MOZZILA_PATH): urls = ['about:addons'] + else: + urls = [UBO_MOZILLA] elif browser_data[browser]['base'] == 'ie': urls.append(IE_GALLERY) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index d08692b5..4fca0303 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -5,6 +5,9 @@ from functions.common import * # STATIC VARIABLES HKCU = winreg.HKEY_CURRENT_USER HKLM = winreg.HKEY_LOCAL_MACHINE +MOZILLA_FIREFOX_UBO_PATH = r'{}\{}\ublock_origin.xpi'.format( + os.environ.get('PROGRAMFILES'), + r'Mozilla Firefox\distribution\extensions') OTHER_RESULTS = { 'Error': { 'CalledProcessError': 'Unknown Error', @@ -76,9 +79,6 @@ SETTINGS_EXPLORER_USER = { }, } SETTINGS_GOOGLE_CHROME = { - r'Software\Google\Chrome\Extensions': { - 'WOW64_32': True, - }, r'Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm': { 'SZ Items': { 'update_url': 'https://clients2.google.com/service/update2/crx'}, @@ -90,6 +90,19 @@ SETTINGS_GOOGLE_CHROME = { 'WOW64_32': True, }, } +SETTINGS_MOZILLA_FIREFOX_32 = { + r'Software\Mozilla\Firefox\Extensions': { + 'SZ Items': { + 'uBlock0@raymondhill.net': MOZILLA_FIREFOX_UBO_PATH}, + 'WOW64_32': True, + }, + } +SETTINGS_MOZILLA_FIREFOX_64 = { + r'Software\Mozilla\Firefox\Extensions': { + 'SZ Items': { + 'uBlock0@raymondhill.net': MOZILLA_FIREFOX_UBO_PATH}, + }, + } VCR_REDISTS = [ {'Name': 'Visual C++ 2008 SP1 x32...', 'Cmd': [r'2008sp1\x32\vcredist.exe', '/qb! /norestart']}, @@ -221,7 +234,7 @@ def install_adobe_reader(): run_program(cmd) def install_chrome_extensions(): - """Update registry to 'install' Google Chrome extensions for all users.""" + """Update registry to install Google Chrome extensions for all users.""" write_registry_settings(SETTINGS_GOOGLE_CHROME, all_users=True) def install_classicstart_skin(): @@ -238,16 +251,20 @@ def install_classicstart_skin(): shutil.copy(source, dest) def install_firefox_extensions(): - """Extract Firefox extensions to installation folder.""" + """Update registry to install Firefox extensions for all users.""" dist_path = r'{PROGRAMFILES}\Mozilla Firefox\distribution\extensions'.format( **global_vars['Env']) source_path = r'{CBinDir}\FirefoxExtensions.7z'.format(**global_vars) if not os.path.exists(source_path): raise FileNotFoundError + + # Update registry + write_registry_settings(SETTINGS_MOZILLA_FIREFOX_32, all_users=True) + write_registry_settings(SETTINGS_MOZILLA_FIREFOX_64, all_users=True) # Extract extension(s) to distribution folder cmd = [ - global_vars['Tools']['SevenZip'], 'x', '-aos', '-bso0', '-bse0', + global_vars['Tools']['SevenZip'], 'e', '-aos', '-bso0', '-bse0', '-p{ArchivePassword}'.format(**global_vars), '-o{dist_path}'.format(dist_path=dist_path), source_path] diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 50386673..9c9cfec0 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -720,16 +720,10 @@ def update_firefox_ublock_origin(): remove_from_kit('FirefoxExtensions') # Download - download_to_temp('ff-uBO.xpi', SOURCE_URLS['Firefox uBO']) - - # Extract files - extract_generic( - r'{}\ff-uBO.xpi'.format(global_vars['TmpDir']), - r'{}\FirefoxExtensions\uBlock0@raymondhill.net'.format( - global_vars['CBinDir'])) - - # Cleanup - remove_from_temp('ff-uBO.xpi') + download_generic( + r'{}\FirefoxExtensions'.format(global_vars['CBinDir']), + 'ublock_origin.xpi', + SOURCE_URLS['Firefox uBO']) def update_notepadplusplus(): # Stop running processes From 48f789c5b43bc40e2cd81653d4c58a0b2d3396e6 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 13:12:17 -0600 Subject: [PATCH 174/293] (re)Disable root SSH logins --- Build Linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build Linux b/Build Linux index af01c928..ec136c6e 100755 --- a/Build Linux +++ b/Build Linux @@ -229,7 +229,7 @@ function update_live_env() { ssh-keygen -b 4096 -C "$username@$hostname" -N "" -f "$SKEL_DIR/.ssh/id_rsa" echo 'rm /root/.ssh/id*' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'rm /root/.zlogin' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - sed -r '/.*PermitRootLogin.*/d' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + sed -i -r 's/^(.*PermitRootLogin.*)$/PermitRootLogin no/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" cp "$ROOT_DIR/.linux_items/authorized_keys" "$SKEL_DIR/.ssh/authorized_keys" # Root user From 883305ca6b1d45182975d02638324556404dec0f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 13:42:51 -0600 Subject: [PATCH 175/293] Replaced pacinit alias with full script --- .bin/Scripts/pacinit | 15 +++++++++++++++ .linux_items/include/airootfs/etc/skel/.aliases | 1 - 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 .bin/Scripts/pacinit diff --git a/.bin/Scripts/pacinit b/.bin/Scripts/pacinit new file mode 100755 index 00000000..eda3f960 --- /dev/null +++ b/.bin/Scripts/pacinit @@ -0,0 +1,15 @@ +#!/bin/bash +# +## Wizard Kit: Update pacman settings to usage in live sessions + +# Disable custom repo (used at build-time) +sudo sed -i -r "s/^(\[custom\])/#\1/" /etc/pacman.conf +sudo sed -i -r "s/^(SigLevel = Optional TrustAll)/#\1/" /etc/pacman.conf +sudo sed -i -r "s/^(Server = )/#\1/" /etc/pacman.conf + +# Disable signature checks +sudo sed -i -r "s/^SigLevel.*/SigLevel = Never/" /etc/pacman.conf + +# Refresh package databases +sudo pacman -Sy + diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index 03d15315..bf7507bc 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -16,7 +16,6 @@ alias ls='ls --color=auto' alias mkdir='mkdir -p' alias mount='sudo mount' alias mv='mv -nv' -alias pacinit='sudo sed -i -r "s/^SigLevel.*/SigLevel = Never/" /etc/pacman.conf; sudo pacman -Sy' alias photorec-sort='sudo photorec-sort' alias photorec='sudo photorec' alias q1='clear && ls -1' From 555a661e92338675713bf7d46ea64ae2283ded79 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 16:14:46 -0600 Subject: [PATCH 176/293] Added connet_to_db() function to hw-diags.py * Uses new main.py variables * Only runs if non-quick drive test(s) are selected --- .bin/Scripts/functions/hw_diags.py | 32 ++++++++++++++++++++++++++---- .bin/Scripts/settings/main.py | 5 +++++ .linux_items/packages/live_add | 2 ++ 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 3b8bd354..cc10ae40 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -2,9 +2,14 @@ import json import time +import mysql.connector as mariadb from functions.common import * +# osTicket Database +db_connection = None +db_cursor = None + # STATIC VARIABLES ATTRIBUTES = { 'NVMe': { @@ -73,6 +78,17 @@ TESTS = { }, } +def connect_to_db(): + """Connect to osTicket database.""" + try: + db_connection = mariadb.connect( + user=DB_USER, password=DB_PASS, database=DB_NAME, host=DB_HOST) + db_cursor = db_connection.cursor() + except: + db_connection = None + db_cursor = None + raise + def generate_horizontal_graph(rates): """Generate two-line horizontal graph from rates, returns str.""" line_top = '' @@ -640,8 +656,10 @@ def run_nvme_smart(): def run_tests(tests): """Run selected hardware test(s).""" - print_log('Starting Hardware Diagnostics') - print_log('\nRunning tests: {}'.format(', '.join(tests))) + clear_screen() + print_standard('Starting Hardware Diagnostics') + print_standard(' ') + print_standard('Running tests: {}'.format(', '.join(tests))) # Enable selected tests for t in ['Prime95', 'NVMe/SMART', 'badblocks', 'iobenchmark']: TESTS[t]['Enabled'] = t in tests @@ -649,10 +667,17 @@ def run_tests(tests): # Initialize if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: + if not TESTS['NVMe/SMART']['Quick']: + print_standard(' ') + try_and_print( + message='Connecting to osTicket database...', + function=connect_to_db, + width=40) print_standard(' ') - print_standard('Scanning disks...') scan_disks() update_progress() + pause() + exit_script() # Run mprime_aborted = False @@ -683,7 +708,6 @@ def run_tests(tests): def scan_disks(full_paths=False, only_path=None): """Scan for disks eligible for hardware testing.""" - clear_screen() # Get eligible disk list cmd = ['lsblk', '-J', '-O'] diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index c49da96e..4e6d4083 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -11,6 +11,11 @@ ARCHIVE_PASSWORD='Abracadabra' KIT_NAME_FULL='Wizard Kit' KIT_NAME_SHORT='WK' SUPPORT_MESSAGE='Please let 2Shirt know by opening an issue on GitHub' +# osTicket +DB_HOST='127.0.0.1' +DB_NAME='osticket' +DB_USER='wizardkit' +DB_PASS='Abracadabra' # Live Linux MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags ROOT_PASSWORD='Abracadabra' diff --git a/.linux_items/packages/live_add b/.linux_items/packages/live_add index ea784699..57782fe9 100644 --- a/.linux_items/packages/live_add +++ b/.linux_items/packages/live_add @@ -43,6 +43,7 @@ libinput linux-firmware lm_sensors lzip +mariadb-clients mdadm mediainfo mesa-demos @@ -62,6 +63,7 @@ p7zip papirus-icon-theme progsreiserfs python +python-mysql-connector python-psutil python-requests qemu-guest-agent From 58dead2382fecb82583c1be81a7c8e9bee0c4c23 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 19:55:36 -0600 Subject: [PATCH 177/293] Added osTicket DB functions * osticket_needs_attention() * osticket_reply() * osticket_set_drive_result() --- .bin/Scripts/functions/hw_diags.py | 95 ++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 11 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index cc10ae40..cd6e91b4 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -6,9 +6,12 @@ import mysql.connector as mariadb from functions.common import * -# osTicket Database -db_connection = None -db_cursor = None +# Database connection +ost_db = { + 'Connection': None, + 'Cursor': None, + 'Errors': False + } # STATIC VARIABLES ATTRIBUTES = { @@ -56,6 +59,16 @@ IO_VARS = { '███▏', '███▎', '███▍', '███▌', '███▋', '███▊', '███▉', '████'), } +OST_STAFF_ID = '23' +OST_STAFF_NAME = 'Wizard Kit' +OST_SQL_SET_HOLD = "UPDATE `{db_name}`.`ost_ticket` SET `hold` = '{hold_type}' WHERE `ost_ticket`.`ticket_id` = {ticket_id};" +OST_SQL_SET_FLAG = "UPDATE `{db_name}`.`ost_ticket` SET `{flag}` = '{value}' WHERE `ost_ticket`.`ticket_id` = {ticket_id};" +OST_SQL_POST_REPLY = ("INSERT INTO `{db_name}`.`ost_ticket_response` (ticket_id, staff_id, staff_name, response, created) " + "VALUES ('{ticket_id}', '{staff_id}', '{staff_name}', '{response}', '{created}');") +OST_DRIVE_FLAG = 'zHDTune' +OST_DRIVE_PASSED = 1 +OST_DRIVE_FAILED = 2 +OST_NEEDS_ATTENTION = 4 TESTS = { 'Prime95': { 'Enabled': False, @@ -80,14 +93,10 @@ TESTS = { def connect_to_db(): """Connect to osTicket database.""" - try: - db_connection = mariadb.connect( - user=DB_USER, password=DB_PASS, database=DB_NAME, host=DB_HOST) - db_cursor = db_connection.cursor() - except: - db_connection = None - db_cursor = None - raise + ost_db['Connection'] = mariadb.connect( + user=DB_USER, password=DB_PASS, database=DB_NAME, host=DB_HOST) + ost_db['Cursor'] = ost_db['Connection'].cursor() + ost_db['Errors'] = False def generate_horizontal_graph(rates): """Generate two-line horizontal graph from rates, returns str.""" @@ -246,6 +255,70 @@ def menu_diags(*args): elif selection == 'Q': break +def osticket_needs_attention(ticket_id): + """Marks the ticket as "NEEDS ATTENTION" in osTicket.""" + if not ticket_id: + raise GenericError + if not ost_db['Cursor']: + # Skip section + return + + # Set command + sql_cmd = OST_SQL_SET_HOLD.format( + db_name=DB_NAME, + hold_type=OST_NEEDS_ATTENTION, + ticket_id=ticket_id) + + # Run command + try: + ost_db['Cursor'].execute(sql_cmd) + except: + sql_errors = True + +def osticket_reply(ticket_id, response): + """Post a reply to a ticket in osTicket.""" + if not ticket_id: + raise GenericError + if not ost_db['Cursor']: + # Skip section + return + + # Set command + sql_cmd = OST_SQL_POST_REPLY.format( + db_name=DB_NAME, + ticket_id=ticket_id, + staff_id=OST_STAFF_ID, + staff_name=OST_STAFF_NAME, + response=response, + created=time.strftime("%Y-%m-%d %H:%M:%S")) + + # Run command + try: + ost_db['Cursor'].execute(sql_cmd) + except: + sql_errors = True + +def osticket_set_drive_result(ticket_id, passed): + """Marks the pass/fail box for the drive(s) in osTicket.""" + if not ticket_id: + raise GenericError + if not ost_db['Cursor']: + # Skip section + return + + # Set command + sql_cmd = OST_SQL_SET_FLAG.format( + db_name=DB_NAME, + flag=OST_DRIVE_FLAG, + value=OST_DRIVE_PASSED if passed else OST_DRIVE_FAILED, + ticket_id=ticket_id) + + # Run command + try: + ost_db['Cursor'].execute(sql_cmd) + except: + sql_errors = True + def run_badblocks(): """Run a read-only test for all detected disks.""" aborted = False From 5edde45f0eb87a62ab543466ebd2c90b8b98ff10 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 20:33:33 -0600 Subject: [PATCH 178/293] Get osTicket number and verify with name in ticket --- .bin/Scripts/functions/hw_diags.py | 65 +++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index cd6e91b4..089e51a7 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -137,6 +137,22 @@ def get_graph_step(rate, scale=16): break return step +def get_osticket_number(): + """Get ticket number and confirm with name from osTicket DB.""" + ticket_number = None + while ticket_number is None: + print_standard(' ') + _input = input('Enter ticket number: ') + if not re.match(r'^([0-9]+)$', _input): + continue + _name = osticket_get_ticket_name(_input) + if _name: + print_standard('You have selected ticket #{} ({})'.format( + _input, _name)) + if ask('Is this correct?'): + ticket_number = _input + return ticket_number + def get_read_rate(s): """Get read rate in bytes/s from dd progress output.""" real_rate = None @@ -226,10 +242,11 @@ def menu_diags(*args): if selection.isnumeric(): if diag_modes[int(selection)-1]['Name'] != 'Quick drive test': # Save log for non-quick tests - ticket_number = get_ticket_number() - global_vars['LogDir'] = '{}/Logs/{}'.format( + ticket_number = get_osticket_number() + global_vars['LogDir'] = '{}/Logs/{}_{}'.format( global_vars['Env']['HOME'], - ticket_number if ticket_number else global_vars['Date-Time']) + ticket_number, + global_vars['Date-Time']) os.makedirs(global_vars['LogDir'], exist_ok=True) global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( global_vars['LogDir']) @@ -255,6 +272,28 @@ def menu_diags(*args): elif selection == 'Q': break +def osticket_get_ticket_name(ticket_id): + """Lookup ticket and return name as str.""" + ticket_name = 'Unknown' + if not ticket_id: + raise GenericError + if not ost_db['Cursor']: + # Skip section + return + + # Set command + sql_cmd = "SELECT name FROM `ost_ticket` WHERE `ticket_id` = {}".format( + ticket_id) + + # Run command + try: + ost_db['Cursor'].execute(sql_cmd) + for name in ost_db['Cursor']: + ticket_name = name[0] + return ticket_name + except: + ost_db['Errors'] = True + def osticket_needs_attention(ticket_id): """Marks the ticket as "NEEDS ATTENTION" in osTicket.""" if not ticket_id: @@ -273,7 +312,7 @@ def osticket_needs_attention(ticket_id): try: ost_db['Cursor'].execute(sql_cmd) except: - sql_errors = True + ost_db['Errors'] = True def osticket_reply(ticket_id, response): """Post a reply to a ticket in osTicket.""" @@ -296,7 +335,7 @@ def osticket_reply(ticket_id, response): try: ost_db['Cursor'].execute(sql_cmd) except: - sql_errors = True + ost_db['Errors'] = True def osticket_set_drive_result(ticket_id, passed): """Marks the pass/fail box for the drive(s) in osTicket.""" @@ -317,7 +356,7 @@ def osticket_set_drive_result(ticket_id, passed): try: ost_db['Cursor'].execute(sql_cmd) except: - sql_errors = True + ost_db['Errors'] = True def run_badblocks(): """Run a read-only test for all detected disks.""" @@ -739,18 +778,16 @@ def run_tests(tests): TESTS['NVMe/SMART']['Quick'] = 'Quick' in tests # Initialize + if not TESTS['NVMe/SMART']['Quick']: + print_standard(' ') + try_and_print( + message='Connecting to osTicket database...', + function=connect_to_db, + width=40) if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: - if not TESTS['NVMe/SMART']['Quick']: - print_standard(' ') - try_and_print( - message='Connecting to osTicket database...', - function=connect_to_db, - width=40) print_standard(' ') scan_disks() update_progress() - pause() - exit_script() # Run mprime_aborted = False From 1d88c57be8a27de4af9bd63a2f1a2f6c836de90f Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 20:43:09 -0600 Subject: [PATCH 179/293] Adjust Prime95 countown message --- .bin/Scripts/functions/hw_diags.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 089e51a7..e9e8109a 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -93,6 +93,7 @@ TESTS = { def connect_to_db(): """Connect to osTicket database.""" + #TODO# Open SSH tunnel to DB server ost_db['Connection'] = mariadb.connect( user=DB_USER, password=DB_PASS, database=DB_NAME, host=DB_HOST) ost_db['Cursor'] = ost_db['Connection'].cursor() @@ -597,8 +598,10 @@ def run_mprime(): try: for i in range(int(MPRIME_LIMIT)): clear_screen() - print_standard('Running Prime95 ({} minutes left)'.format( - int(MPRIME_LIMIT)-i)) + min_left = int(MPRIME_LIMIT)-i) + print_standard('Running Prime95 ({} minute{} left)'.format( + min_left, + 's' if min_left != 1 else '') print_warning('If running too hot, press CTRL+c to abort the test') sleep(60) except KeyboardInterrupt: From 580d1de9158607431741cca90301396ea654027e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 18 Sep 2018 21:48:15 -0600 Subject: [PATCH 180/293] Finished Prime95 osTicket reply section * NOTE: A reply is not posted for Aborted tests or Unknown results --- .bin/Scripts/functions/hw_diags.py | 76 ++++++++++++++++++++++-------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index e9e8109a..627ffa6d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -141,6 +141,9 @@ def get_graph_step(rate, scale=16): def get_osticket_number(): """Get ticket number and confirm with name from osTicket DB.""" ticket_number = None + if not ost_db['Cursor']: + # No DB access, just set it to 0 + return 0 while ticket_number is None: print_standard(' ') _input = input('Enter ticket number: ') @@ -242,6 +245,12 @@ def menu_diags(*args): spacer = '──────────────────────────') if selection.isnumeric(): if diag_modes[int(selection)-1]['Name'] != 'Quick drive test': + clear_screen() + print_standard(' ') + try_and_print( + message='Connecting to osTicket database...', + function=connect_to_db, + width=40) # Save log for non-quick tests ticket_number = get_osticket_number() global_vars['LogDir'] = '{}/Logs/{}_{}'.format( @@ -251,7 +260,7 @@ def menu_diags(*args): os.makedirs(global_vars['LogDir'], exist_ok=True) global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( global_vars['LogDir']) - run_tests(diag_modes[int(selection)-1]['Tests']) + run_tests(diag_modes[int(selection)-1]['Tests'], ticket_number) elif selection == 'A': run_program(['hw-diags-audio'], check=False, pipe=False) pause('Press Enter to return to main menu... ') @@ -315,7 +324,7 @@ def osticket_needs_attention(ticket_id): except: ost_db['Errors'] = True -def osticket_reply(ticket_id, response): +def osticket_post_reply(ticket_id, response): """Post a reply to a ticket in osTicket.""" if not ticket_id: raise GenericError @@ -359,7 +368,7 @@ def osticket_set_drive_result(ticket_id, passed): except: ost_db['Errors'] = True -def run_badblocks(): +def run_badblocks(ticket_number): """Run a read-only test for all detected disks.""" aborted = False clear_screen() @@ -421,7 +430,7 @@ def run_badblocks(): run_program('tmux kill-pane -a'.split(), check=False) pass -def run_iobenchmark(): +def run_iobenchmark(ticket_number): """Run a read-only test for all detected disks.""" aborted = False clear_screen() @@ -578,7 +587,7 @@ def run_iobenchmark(): run_program('tmux kill-pane -a'.split(), check=False) pass -def run_mprime(): +def run_mprime(ticket_number): """Run Prime95 for MPRIME_LIMIT minutes while showing the temps.""" aborted = False print_log('\nStart Prime95 test') @@ -598,10 +607,10 @@ def run_mprime(): try: for i in range(int(MPRIME_LIMIT)): clear_screen() - min_left = int(MPRIME_LIMIT)-i) + min_left = int(MPRIME_LIMIT) - i print_standard('Running Prime95 ({} minute{} left)'.format( min_left, - 's' if min_left != 1 else '') + 's' if min_left != 1 else '')) print_warning('If running too hot, press CTRL+c to abort the test') sleep(60) except KeyboardInterrupt: @@ -671,10 +680,45 @@ def run_mprime(): TESTS['Prime95']['Status'] = 'Unknown' update_progress() + # Build osTicket report + if TESTS['Prime95']['Status'] not in ['Unknown', 'Aborted']: + report = ['System {} Prime95 testing.'.format( + 'FAILED' if TESTS['Prime95']['NS'] else 'passed')] + report.append('') + report.append('Prime95 log:') + log_path = '{}/prime.log'.format(global_vars['LogDir']) + try: + with open(log_path, 'r') as f: + for line in f.readlines(): + line = line.strip() + r = re.search('(completed \d+ tests.*)', line, re.IGNORECASE) + if r: + report.append(r.group(1)) + except: + report.append(' ERROR: Failed to read log.') + report.append('') + report.append('Final temps:') + log_path = '{}/Final Temps.log'.format(global_vars['LogDir']) + try: + with open(log_path, 'r') as f: + for line in f.readlines(): + line = line.strip() + if not line: + # Stop after CPU temp(s) + break + report.append(line) + except: + report.append(' ERROR: Failed to read log.') + + # Upload osTicket report + osticket_post_reply( + ticket_id=ticket_number, + response='\n'.join(report)) + # Done run_program('tmux kill-pane -a'.split()) -def run_nvme_smart(): +def run_nvme_smart(ticket_number): """Run the built-in NVMe or SMART test for all detected disks.""" aborted = False clear_screen() @@ -769,7 +813,7 @@ def run_nvme_smart(): # Done run_program('tmux kill-pane -a'.split(), check=False) -def run_tests(tests): +def run_tests(tests, ticket_number=None): """Run selected hardware test(s).""" clear_screen() print_standard('Starting Hardware Diagnostics') @@ -781,12 +825,6 @@ def run_tests(tests): TESTS['NVMe/SMART']['Quick'] = 'Quick' in tests # Initialize - if not TESTS['NVMe/SMART']['Quick']: - print_standard(' ') - try_and_print( - message='Connecting to osTicket database...', - function=connect_to_db, - width=40) if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: print_standard(' ') scan_disks() @@ -796,16 +834,16 @@ def run_tests(tests): mprime_aborted = False if TESTS['Prime95']['Enabled']: try: - run_mprime() + run_mprime(ticket_number) except GenericError: mprime_aborted = True if not mprime_aborted: if TESTS['NVMe/SMART']['Enabled']: - run_nvme_smart() + run_nvme_smart(ticket_number) if TESTS['badblocks']['Enabled']: - run_badblocks() + run_badblocks(ticket_number) if TESTS['iobenchmark']['Enabled']: - run_iobenchmark() + run_iobenchmark(ticket_number) # Show results show_results() From 9698cfbf6d7d52518b7a3e8f4a371da8030a4140 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 00:35:05 -0600 Subject: [PATCH 181/293] Initial osTicket drive report section * Formatting is off, need to remove ASCII color escapes --- .bin/Scripts/functions/hw_diags.py | 156 ++++++++++++++++++++++++++++- 1 file changed, 153 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 627ffa6d..2deecbd0 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -368,6 +368,155 @@ def osticket_set_drive_result(ticket_id, passed): except: ost_db['Errors'] = True +def post_drive_results(ticket_number): + """Post drive test results to osTicket.""" + tested = False + + # Check if test(s) were run + for t in ['NVMe/SMART', 'badblocks', 'iobenchmark']: + tested |= TESTS[t]['Enabled'] + if not tested or TESTS['NVMe/SMART']['Quick']: + # No tests were run so no post necessary + return + + # Build reports for all tested devices + for name, dev in sorted(TESTS['NVMe/SMART']['Devices'].items()): + dev_failed = False + dev_passed = True + dev_unknown = False + report = [] + + # Check all test results for dev + for t in ['NVMe/SMART', 'badblocks', 'iobenchmark']: + if not TESTS[t]['Enabled']: + continue + status = TESTS[t]['Status'].get(name, 'Unknown') + dev_failed |= status == 'NS' + dev_passed &= status == 'CS' + dev_unknown |= status in ('Working', 'Unknown') + if not dev_failed and not dev_passed and not dev_unknown: + # Assuming drive was skipped so no reply is needed + continue + + # Start drive report + if dev_failed: + report.append('Drive hardware diagnostics tests: FAILED') + elif dev_unknown: + report.append('Drive hardware diagnostics tests: UNKNOWN') + elif dev_passed: + report.append('Drive hardware diagnostics tests: Passed') + report.append('') + + # Drive description + report.append('{size} ({tran}) {model} {serial}'.format( + size=dev['lsblk'].get('size', '???b'), + tran=dev['lsblk'].get('tran', '???'), + model=dev['lsblk'].get('model', 'Unknown Model'), + serial=dev['lsblk'].get('serial', 'Unknown Serial'), + )) + report.append('') + + # Warnings (if any) + if dev.get('NVMe Disk', False): + if dev['Quick Health Ok']: + report.append('WARNING: NVMe support is still experimental') + else: + report.append('ERROR: NVMe disk is reporting critical warnings') + report.append('') + elif not dev['SMART Support']: + report.append('ERROR: Unable to retrieve SMART data') + report.append('') + elif not dev['SMART Pass']: + report.append('ERROR: SMART overall-health assessment result: FAILED') + report.append('') + + # NVMe/SMART Attributes + if dev.get('NVMe Disk', False): + report.append('NVMe Attributes:') + for attrib in sorted(ATTRIBUTES['NVMe'].keys()): + if attrib in dev['nvme-cli']: + report.append('{attrib:30}{value}'.format( + attrib=attrib, + value=dev['nvme-cli'][attrib], + )) + report[-1] = report[-1].strip().replace(' ', '.') + report[-1] = report[-1].replace('_', ' ') + elif dev['smartctl'].get('ata_smart_attributes', None): + report.append('SMART Attributes:') + s_table = dev['smartctl'].get('ata_smart_attributes', {}).get( + 'table', {}) + s_table = {a.get('id', 'Unknown'): a for a in s_table} + for attrib in sorted(ATTRIBUTES['SMART'].keys()): + if attrib in s_table: + report.append('{:0>2}/{:24}{} ({})'.format( + str(hex(int(attrib))).upper()[2:], + attrib, + s_table[attrib]['raw']['string'], + s_table[attrib]['name'], + )) + report[-1] = report[-1].strip().replace(' ', '.') + report[-1] = report[-1].replace('_', ' ') + report.append('') + + # badblocks + bb_status = TESTS['badblocks']['Status'].get(name, None) + if TESTS['badblocks']['Enabled'] and bb_status not in ['Denied', 'Skipped']: + report.append('badblocks:') + bb_result = TESTS['badblocks']['Results'].get( + name, + 'ERROR: Failed to read log.') + for line in bb_result.splitlines(): + line = line.strip() + if not line: + continue + if re.search('Pass completed', line, re.IGNORECASE): + line = re.sub( + r'Pass completed,?\s+', + r'', + line, + re.IGNORECASE) + report.append(line) + report.append('') + + # I/O Benchmark + io_status = TESTS['iobenchmark']['Status'].get(name, None) + if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'Skipped']: + report.append('I/O Benchmark:') + io_result = TESTS['iobenchmark']['Results'].get( + name, + 'ERROR: Failed to read log.') + for line in io_result.splitlines(): + line = line.strip() + if not line: + continue + report.append(line) + report.append('') + + # TODO-REMOVE TESTING + with open('/home/twoshirt/__ost_report_{}.txt'.format(name), 'w') as f: + for line in report: + f.write('{}\n'.format(line.strip())) + + # Post reply for drive + osticket_post_reply( + ticket_id=ticket_number, + response='\n'.join(report)) + + # Mark ticket HDD/SSD pass/fail checkbox (as needed) + if dev_failed: + osticket_set_drive_result( + ticket_id=ticket_number, + passed=False) + elif dev_unknown: + pass + elif dev_passed: + osticket_set_drive_result( + ticket_id=ticket_number, + passed=True) + + # Mark ticket as NEEDS ATTENTION + osticket_needs_attention(ticket_id=ticket_number) + def run_badblocks(ticket_number): """Run a read-only test for all detected disks.""" aborted = False @@ -695,7 +844,7 @@ def run_mprime(ticket_number): if r: report.append(r.group(1)) except: - report.append(' ERROR: Failed to read log.') + report.append('ERROR: Failed to read log.') report.append('') report.append('Final temps:') log_path = '{}/Final Temps.log'.format(global_vars['LogDir']) @@ -708,7 +857,7 @@ def run_mprime(ticket_number): break report.append(line) except: - report.append(' ERROR: Failed to read log.') + report.append('ERROR: Failed to read log.') # Upload osTicket report osticket_post_reply( @@ -846,6 +995,7 @@ def run_tests(tests, ticket_number=None): run_iobenchmark(ticket_number) # Show results + post_drive_results(ticket_number) show_results() # Open log @@ -947,7 +1097,7 @@ def scan_disks(full_paths=False, only_path=None): if ask('Run tests on this device anyway?'): TESTS['NVMe/SMART']['Status'][dev_name] = 'OVERRIDE' else: - TESTS['NVMe/SMART']['Status'][dev_name] = 'NS' + TESTS['NVMe/SMART']['Status'][dev_name] = 'Skipped' TESTS['badblocks']['Status'][dev_name] = 'Denied' TESTS['iobenchmark']['Status'][dev_name] = 'Denied' print_standard(' ') # In case there's more than one "OVERRIDE" disk From dd13f7bd2437b76dc968a3b5e0b95b14dc49f6aa Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 00:50:32 -0600 Subject: [PATCH 182/293] Adjusted osTicket drive report formatting --- .bin/Scripts/functions/hw_diags.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 2deecbd0..45cb8575 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -448,10 +448,20 @@ def post_drive_results(ticket_number): s_table = {a.get('id', 'Unknown'): a for a in s_table} for attrib in sorted(ATTRIBUTES['SMART'].keys()): if attrib in s_table: - report.append('{:0>2}/{:24}{} ({})'.format( - str(hex(int(attrib))).upper()[2:], - attrib, + # Pad attributewith dots for osTicket + hex_str = '{:>2}'.format(str(hex(int(attrib))).upper()[2:]) + hex_str = hex_str.replace(' ', '..') + if '.' in hex_str: + hex_str = '.' + hex_str + dec_str = '{:>3}'.format(attrib) + dec_str = dec_str.replace(' ', '..') + if '.' in dec_str: + dec_str = '.' + dec_str + report.append('{:>2}/{:>3}: {} {} ({})'.format( + hex_str, + dec_str, s_table[attrib]['raw']['string'], + '..'*24+'.', s_table[attrib]['name'], )) report[-1] = report[-1].strip().replace(' ', '.') @@ -489,6 +499,9 @@ def post_drive_results(ticket_number): line = line.strip() if not line: continue + # Strip colors from line + for c in COLORS.values(): + line = line.replace(c, '') report.append(line) report.append('') From aae7c1d54320f40d459afcda387a1877f84232bc Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 00:58:21 -0600 Subject: [PATCH 183/293] Allow diabling osTicket integration per run --- .bin/Scripts/functions/hw_diags.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 45cb8575..0653203b 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -142,11 +142,16 @@ def get_osticket_number(): """Get ticket number and confirm with name from osTicket DB.""" ticket_number = None if not ost_db['Cursor']: - # No DB access, just set it to 0 - return 0 + # No DB access, return None to disable integration + return None while ticket_number is None: print_standard(' ') - _input = input('Enter ticket number: ') + _input = input('Enter ticket number (or leave blank to disable): ') + if re.match(r'^\s*$', _input): + if ask('Disable osTicket integration for this run?'): + return None + else: + continue if not re.match(r'^([0-9]+)$', _input): continue _name = osticket_get_ticket_name(_input) From 146244d3fd5132293119506ae743a06b644b6890 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 12:02:08 -0600 Subject: [PATCH 184/293] Adjusted osTicket post formatting --- .bin/Scripts/functions/hw_diags.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 0653203b..d56ab469 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -373,6 +373,16 @@ def osticket_set_drive_result(ticket_id, passed): except: ost_db['Errors'] = True +def pad_with_dots(s, left_pad=True): + """Replace ' ' padding with '..' for osTicket posts.""" + s = str(s).replace(' ', '..') + if '.' in s: + if left_pad: + s = '.' + s + else: + s = s + '.' + return s + def post_drive_results(ticket_number): """Post drive test results to osTicket.""" tested = False @@ -454,22 +464,17 @@ def post_drive_results(ticket_number): for attrib in sorted(ATTRIBUTES['SMART'].keys()): if attrib in s_table: # Pad attributewith dots for osTicket - hex_str = '{:>2}'.format(str(hex(int(attrib))).upper()[2:]) - hex_str = hex_str.replace(' ', '..') - if '.' in hex_str: - hex_str = '.' + hex_str - dec_str = '{:>3}'.format(attrib) - dec_str = dec_str.replace(' ', '..') - if '.' in dec_str: - dec_str = '.' + dec_str - report.append('{:>2}/{:>3}: {} {} ({})'.format( + hex_str = str(hex(int(attrib))).upper()[2:] + hex_str = pad_with_dots('{:>2}'.format(hex_str)) + dec_str = pad_with_dots('{:>3}'.format(attrib)) + val_str = '{:<20}'.format(s_table[attrib]['raw']['string']) + val_str = pad_with_dots(val_str, left_pad=False) + report.append('{:>2}/{:>3}: {} ({})'.format( hex_str, dec_str, - s_table[attrib]['raw']['string'], - '..'*24+'.', + val_str, s_table[attrib]['name'], )) - report[-1] = report[-1].strip().replace(' ', '.') report[-1] = report[-1].replace('_', ' ') report.append('') From 462a87b1ce46b0ec72c3ea5eee61b130c7d49ec7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 12:50:13 -0600 Subject: [PATCH 185/293] Adjusted ticket selection confirmation --- .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 d56ab469..d42f3a31 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -156,7 +156,7 @@ def get_osticket_number(): continue _name = osticket_get_ticket_name(_input) if _name: - print_standard('You have selected ticket #{} ({})'.format( + print_standard('You have selected ticket #{} {}'.format( _input, _name)) if ask('Is this correct?'): ticket_number = _input From d46ae180459d07221e3073090fdf56ff3bbe3161 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 14:53:17 -0600 Subject: [PATCH 186/293] Establish SSH tunnel before connecting to SQL DB * Also added disconnect_from_db() function. --- .bin/Scripts/functions/hw_diags.py | 40 ++++++++++++++++++++++++++---- .bin/Scripts/settings/main.py | 1 + 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index d42f3a31..467d3563 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -10,7 +10,8 @@ from functions.common import * ost_db = { 'Connection': None, 'Cursor': None, - 'Errors': False + 'Errors': False, + 'Tunnel': None, } # STATIC VARIABLES @@ -92,13 +93,39 @@ TESTS = { } def connect_to_db(): - """Connect to osTicket database.""" - #TODO# Open SSH tunnel to DB server - ost_db['Connection'] = mariadb.connect( - user=DB_USER, password=DB_PASS, database=DB_NAME, host=DB_HOST) + """Connect to osTicket database via SSH tunnel.""" + cmd = [ + 'ssh', '-N', '-p', '2222', '-L3306:127.0.0.1:3306', + '{user}@{host}'.format(user=SSH_USER, host=DB_HOST), + ] + + # Establish SSH tunnel unless one already exists + if not ost_db['Tunnel']: + ost_db['Tunnel'] = popen_program(cmd) + + # Establish SQL connection (try a few times in case SSH is slow) + for x in range(5): + sleep(3) + try: + ost_db['Connection'] = mariadb.connect( + user=DB_USER, password=DB_PASS, database=DB_NAME) + except: + # Just try again + pass + else: + break ost_db['Cursor'] = ost_db['Connection'].cursor() ost_db['Errors'] = False +def disconnect_from_db(): + """Disconnect from SQL DB and close SSH tunnel.""" + if ost_db['Cursor']: + ost_db['Cursor'].close() + if ost_db['Connection']: + ost_db['Connection'].close() + if ost_db['Tunnel']: + ost_db['Tunnel'].kill() + def generate_horizontal_graph(rates): """Generate two-line horizontal graph from rates, returns str.""" line_top = '' @@ -287,6 +314,9 @@ def menu_diags(*args): elif selection == 'Q': break + # Done + disconnect_from_db() + def osticket_get_ticket_name(ticket_id): """Lookup ticket and return name as str.""" ticket_name = 'Unknown' diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 4e6d4083..0d5944a2 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -16,6 +16,7 @@ DB_HOST='127.0.0.1' DB_NAME='osticket' DB_USER='wizardkit' DB_PASS='Abracadabra' +SSH_USER='sql_tunnel' # Live Linux MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags ROOT_PASSWORD='Abracadabra' From ba06b7d63502e5356b11d9ddd81b2d7d90736cc5 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 20 Sep 2018 15:57:53 -0600 Subject: [PATCH 187/293] Increased height of horizontal I/O graph * Allows for 32 steps of accuracy * Adjusted curve to max out around 750 Mb/s --- .bin/Scripts/functions/hw_diags.py | 49 +++++++++++++++++++++--------- .bin/Scripts/settings/main.py | 1 + 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 467d3563..018d54c8 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -43,8 +43,8 @@ IO_VARS = { 'Minimum Test Size': 10*1024**3, 'Alt Test Size Factor': 0.01, 'Progress Refresh Rate': 5, - 'Scale 16': [2**(0.6*x)+(16*x) for x in range(1,17)], - 'Scale 32': [2**(0.6*x/2)+(16*x/2) for x in range(1,33)], + 'Scale 16': [2**(0.56*x)+(16*x) for x in range(1,17)], + 'Scale 32': [2**(0.56*x/2)+(16*x/2) for x in range(1,33)], 'Threshold Fail': 65*1024**2, 'Threshold Warn': 135*1024**2, 'Threshold Great': 750*1024**2, @@ -95,7 +95,7 @@ TESTS = { def connect_to_db(): """Connect to osTicket database via SSH tunnel.""" cmd = [ - 'ssh', '-N', '-p', '2222', '-L3306:127.0.0.1:3306', + 'ssh', '-N', '-p', SSH_PORT, '-L3306:127.0.0.1:3306', '{user}@{host}'.format(user=SSH_USER, host=DB_HOST), ] @@ -128,10 +128,12 @@ def disconnect_from_db(): def generate_horizontal_graph(rates): """Generate two-line horizontal graph from rates, returns str.""" - line_top = '' - line_bottom = '' + line_1 = '' + line_2 = '' + line_3 = '' + line_4 = '' for r in rates: - step = get_graph_step(r, scale=16) + step = get_graph_step(r, scale=32) # Set color r_color = COLORS['CLEAR'] @@ -143,15 +145,32 @@ def generate_horizontal_graph(rates): r_color = COLORS['GREEN'] # Build graph - if step < 8: - line_top += ' ' - line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + full_block = '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) + if step >= 24: + line_1 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-24]) + line_2 += full_block + line_3 += full_block + line_4 += full_block + elif step >= 16: + line_1 += ' ' + line_2 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-16]) + line_3 += full_block + line_4 += full_block + elif step >= 8: + line_1 += ' ' + line_2 += ' ' + line_3 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) + line_4 += full_block else: - line_top += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) - line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) - line_top += COLORS['CLEAR'] - line_bottom += COLORS['CLEAR'] - return '{}\n{}'.format(line_top, line_bottom) + line_1 += ' ' + line_2 += ' ' + line_3 += ' ' + line_4 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + line_1 += COLORS['CLEAR'] + line_2 += COLORS['CLEAR'] + line_3 += COLORS['CLEAR'] + line_4 += COLORS['CLEAR'] + return '\n'.join([line_1, line_2, line_3, line_4]) def get_graph_step(rate, scale=16): """Get graph step based on rate and scale, returns int.""" @@ -763,7 +782,7 @@ def run_iobenchmark(ticket_number): h_graph_rates.append(sum(read_rates[pos:pos+width])/width) pos += width report = generate_horizontal_graph(h_graph_rates) - report += '\nRead speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( + report += '\nAverage read speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( sum(read_rates)/len(read_rates)/(1024**2), min(read_rates)/(1024**2), max(read_rates)/(1024**2)) diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 0d5944a2..349723d1 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -16,6 +16,7 @@ DB_HOST='127.0.0.1' DB_NAME='osticket' DB_USER='wizardkit' DB_PASS='Abracadabra' +SSH_PORT='22' SSH_USER='sql_tunnel' # Live Linux MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags From aec3e8208c9866fb37a38562ca7f3df92a13623c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 24 Sep 2018 02:27:02 -0600 Subject: [PATCH 188/293] New osTicket report layout * Block character graph has been reduced to one line * A PNG graph is exported using gnuplot * The graph is uploaded to imgur and a link is included in the report * The graph is also uploaded to the BENCHMARK_SERVER for redundancy --- .bin/Scripts/functions/hw_diags.py | 186 ++++++++++++++++++++++++----- .bin/Scripts/settings/main.py | 9 ++ 2 files changed, 167 insertions(+), 28 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 018d54c8..0525d323 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1,10 +1,14 @@ # Wizard Kit: Functions - HW Diagnostics +import base64 +import Gnuplot import json +import math import time import mysql.connector as mariadb from functions.common import * +from numpy import * # Database connection ost_db = { @@ -43,8 +47,9 @@ IO_VARS = { 'Minimum Test Size': 10*1024**3, 'Alt Test Size Factor': 0.01, 'Progress Refresh Rate': 5, - 'Scale 16': [2**(0.56*x)+(16*x) for x in range(1,17)], - 'Scale 32': [2**(0.56*x/2)+(16*x/2) for x in range(1,33)], + 'Scale 8': [2**(0.56*(x+1))+(16*(x+1)) for x in range(8)], + 'Scale 16': [2**(0.56*(x+1))+(16*(x+1)) for x in range(16)], + 'Scale 32': [2**(0.56*(x+1)/2)+(16*(x+1)/2) for x in range(32)], 'Threshold Fail': 65*1024**2, 'Threshold Warn': 135*1024**2, 'Threshold Great': 750*1024**2, @@ -87,6 +92,7 @@ TESTS = { }, 'iobenchmark': { 'Enabled': False, + 'Rates': {}, 'Results': {}, 'Status': {}, }, @@ -126,7 +132,37 @@ def disconnect_from_db(): if ost_db['Tunnel']: ost_db['Tunnel'].kill() -def generate_horizontal_graph(rates): +def export_png_graph(name, dev): + """Exports PNG graph using gnuplot, returns file path as str.""" + max_rate = max(800, max(rates)) + out_path = '{}/iobenchmark.png'.format(global_vars['TmpDir']) + plot_data = '{}/iobenchmark-{}-raw.log'.format(global_vars['LogDir'], name) + + # Adjust Y-axis range to either 1000 or roughly max rate + 200 + y_range = math.ceil(max_rate/100)*100 + 200 + + # Run gnuplot commands + g = Gnuplot.Gnuplot() + g('set output "{}"'.format(out_path)) + g('set terminal png large size 660,300 truecolor font "Noto Sans,11"') + g('set title "I/O Benchmark"') + g('set yrange [0:{}]'.format(y_range)) + g('set style data lines') + g('plot "{data}" title "{size} ({tran}) {model} {serial}"'.format( + data=plot_data, + size=dev['lsblk'].get('size', '???b'), + tran=dev['lsblk'].get('tran', '???'), + model=dev['lsblk'].get('model', 'Unknown Model'), + serial=dev['lsblk'].get('serial', 'Unknown Serial'), + )) + + # Cleanup + g.close() + del(g) + + return out_path + +def generate_horizontal_graph(rates, oneline=False): """Generate two-line horizontal graph from rates, returns str.""" line_1 = '' line_2 = '' @@ -134,6 +170,8 @@ def generate_horizontal_graph(rates): line_4 = '' for r in rates: step = get_graph_step(r, scale=32) + if oneline: + step = get_graph_step(r, scale=8) # Set color r_color = COLORS['CLEAR'] @@ -170,7 +208,10 @@ def generate_horizontal_graph(rates): line_2 += COLORS['CLEAR'] line_3 += COLORS['CLEAR'] line_4 += COLORS['CLEAR'] - return '\n'.join([line_1, line_2, line_3, line_4]) + if oneline: + return line_4 + else: + return '\n'.join([line_1, line_2, line_3, line_4]) def get_graph_step(rate, scale=16): """Get graph step based on rate and scale, returns int.""" @@ -550,19 +591,39 @@ def post_drive_results(ticket_number): # I/O Benchmark io_status = TESTS['iobenchmark']['Status'].get(name, None) if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'Skipped']: + one_line_graph = generate_horizontal_graph( + rates=TESTS['iobenchmark']['Data'][name]['Read Rates'], + oneline=True) + for c in COLORS.values(): + one_line_graph = one_line_graph.replace(c, '') report.append('I/O Benchmark:') - io_result = TESTS['iobenchmark']['Results'].get( - name, - 'ERROR: Failed to read log.') - for line in io_result.splitlines(): - line = line.strip() - if not line: - continue - # Strip colors from line - for c in COLORS.values(): - line = line.replace(c, '') - report.append(line) - report.append('') + report.append(one_line_graph) + report.append('{}'.format( + TESTS['iobenchmark']['Data'][name]['Avg/Min/Max'])) + + # Export PNG + try: + png_path = export_png_graph(name, dev) + except: + png_path = None + + # imgur + try: + url = upload_to_imgur(image_path) + except: + # Oh well + pass + else: + report.append('Imgur: {}'.format(url)) + + # Nextcloud + try: + url = upload_to_nextcloud(image_path, ticket_number, name) + except: + # Oh well + pass + else: + report.append('Nextcloud: {}'.format(url)) # TODO-REMOVE TESTING with open('/home/twoshirt/__ost_report_{}.txt'.format(name), 'w') as f: @@ -744,7 +805,9 @@ def run_iobenchmark(ticket_number): # Run dd read tests offset = 0 - read_rates = [] + TESTS['iobenchmark']['Data'][name] = { + 'Graph': [], + 'Read Rates': []} for i in range(test_chunks): i += 1 s = skip_count @@ -759,12 +822,18 @@ def run_iobenchmark(ticket_number): o='/dev/null') result = run_program(cmd.split()) result_str = result.stderr.decode().replace('\n', '') - read_rates.append(get_read_rate(result_str)) + cur_rate = get_read_rate(result_str) + TESTS['iobenchmark']['Data'][name]['Read Rates'].append( + cur_rate) + TESTS['iobenchmark']['Data'][name]['Graph'].append( + '{percent} {rate}'.format( + percent=i/test_chunks*100, + rate=cur_rate/(1024**2))) if i % IO_VARS['Progress Refresh Rate'] == 0: # Update vertical graph update_io_progress( percent=i/test_chunks*100, - rate=read_rates[-1], + rate=cur_rate, progress_file=progress_file) # Update offset offset += s + c @@ -774,24 +843,28 @@ def run_iobenchmark(ticket_number): run_program(['tmux', 'kill-pane', '-t', bottom_pane]) # Build report + avg_min_max = 'Average read speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( + sum(TESTS['iobenchmark']['Data'][name]['Read Rates'])/len( + TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), + min(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), + max(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2)) + TESTS['iobenchmark']['Data'][name]['Avg/Min/Max'] = avg_min_max h_graph_rates = [] pos = 0 width = int(test_chunks / IO_VARS['Graph Horizontal Width']) for i in range(IO_VARS['Graph Horizontal Width']): # Append average rate for WIDTH number of rates to new array - h_graph_rates.append(sum(read_rates[pos:pos+width])/width) + h_graph_rates.append(sum( + TESTS['iobenchmark']['Data'][name]['Read Rates'][pos:pos+width])/width) pos += width report = generate_horizontal_graph(h_graph_rates) - report += '\nAverage read speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( - sum(read_rates)/len(read_rates)/(1024**2), - min(read_rates)/(1024**2), - max(read_rates)/(1024**2)) + report += '\n{}'.format(avg_min_max) TESTS['iobenchmark']['Results'][name] = report # Set CS/NS - if min(read_rates) <= IO_VARS['Threshold Fail']: + if min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Fail']: TESTS['iobenchmark']['Status'][name] = 'NS' - elif min(read_rates) <= IO_VARS['Threshold Warn']: + elif min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Warn']: TESTS['iobenchmark']['Status'][name] = 'Unknown' else: TESTS['iobenchmark']['Status'][name] = 'CS' @@ -800,8 +873,7 @@ def run_iobenchmark(ticket_number): dest_filename = '{}/iobenchmark-{}.log'.format(global_vars['LogDir'], name) shutil.move(progress_file, dest_filename) with open(dest_filename.replace('.', '-raw.'), 'a') as f: - for rate in read_rates: - f.write('{} MB/s\n'.format(rate/(1024**2))) + f.write('\n'.join(TESTS['iobenchmark']['Data'][name]['Graph'])) update_progress() # Done @@ -1417,6 +1489,64 @@ def update_progress(): with open(TESTS['Progress Out'], 'w') as f: f.writelines(output) +def upload_to_imgur(image_path): + """Upload image to Imgur and return image url as str.""" + image_data = None + image_link = None + + # Bail early + if not image_path: + raise GenericError + + # Read image file and convert to base64 + with open(image_path, 'rb') as f: + image_data = base64.b64encode(f.read()) + + # POST image + url = "https://api.imgur.com/3/image" + boundary = '----WebKitFormBoundary7MA4YWxkTrZu0gW' + payload = ('--{boundary}\r\nContent-Disposition: form-data; ' + 'name="image"\r\n\r\n{data}\r\n--{boundary}--') + payload = payload.format(boundary=boundary, data=image_data) + headers = { + 'content-type': 'multipart/form-data; boundary={}'.format(boundary), + 'Authorization': 'Client-ID {}'.format(IMGUR_CLIENT_ID), + } + response = requests.request("POST", url, data=payload, headers=headers) + + # Return image link + if response.ok: + json_data = json.loads(response.text) + image_link = json_data['data']['link'] + return image_link + +def upload_to_nextcloud(image_path, ticket_number, dev_name): + """Upload image to Nextcloud server and return folder url as str.""" + image_data = None + + # Bail early + if not image_path: + raise GenericError + + # Read image file and convert to base64 + with open(image_path, 'rb') as f: + image_data = f.read() + + # PUT image + url = '{base_url}/{ticket_number}_iobenchmark_{dev_name}_{date}'.format( + base_url=BENCHMARK_SERVER['Url'], + ticket_number=ticket_number, + dev_name=dev_name, + date=global_vars.get('Date-Time', 'Unknown Date-Time')) + requests.put( + url, + data=image_data, + headers = {'X-Requested-With': 'XMLHttpRequest'}, + auth = (BENCHMARK_SERVER['User'], BENCHMARK_SERVER['Pass'])) + + # Return folder link + return BENCHMARK_SERVER['Short Url'] + if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 349723d1..4ce4e533 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -18,6 +18,8 @@ DB_USER='wizardkit' DB_PASS='Abracadabra' SSH_PORT='22' SSH_USER='sql_tunnel' +# imgur +IMGUR_CLIENT_ID='' # Live Linux MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags ROOT_PASSWORD='Abracadabra' @@ -56,6 +58,13 @@ BACKUP_SERVERS = [ 'RW-Pass': 'Abracadabra', }, ] +BENCHMARK_SERVER = { + 'Name': 'BenchmarkServer', + 'Short Url': '', + 'Url': '', + 'User': '', + 'Pass': '', +} CRASH_SERVER = { 'Name': 'CrashServer', 'Url': '', From 4206afe0c36d96ae1a77e0bc80974caaf550b7d2 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 24 Sep 2018 15:45:52 -0600 Subject: [PATCH 189/293] Disabled osticket_needs_attention() * The flag has been repurposed in osTicket --- .bin/Scripts/functions/hw_diags.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 0525d323..7817cde2 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -400,7 +400,9 @@ def osticket_get_ticket_name(ticket_id): ost_db['Errors'] = True def osticket_needs_attention(ticket_id): - """Marks the ticket as "NEEDS ATTENTION" in osTicket.""" + """[DISABLED] Marks the ticket as "NEEDS ATTENTION" in osTicket.""" + return # This function has been DISABLED due to a repurposing of that flag + if not ticket_id: raise GenericError if not ost_db['Cursor']: From 8d5a4b4079bb99aa5aea0c7922f1647ab8f3a459 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 24 Sep 2018 16:07:23 -0600 Subject: [PATCH 190/293] Add python-gnuplot package --- .linux_items/packages/live_add | 1 + 1 file changed, 1 insertion(+) diff --git a/.linux_items/packages/live_add b/.linux_items/packages/live_add index 57782fe9..7ac1faf5 100644 --- a/.linux_items/packages/live_add +++ b/.linux_items/packages/live_add @@ -63,6 +63,7 @@ p7zip papirus-icon-theme progsreiserfs python +python-gnuplot python-mysql-connector python-psutil python-requests From 7506cd017b2789ee0897f278287d71f5425abe0b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 24 Sep 2018 17:47:52 -0600 Subject: [PATCH 191/293] PNG graph export and uploads working --- .bin/Scripts/functions/hw_diags.py | 50 ++++++++++++++---------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 7817cde2..d6ca9535 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -4,8 +4,9 @@ import base64 import Gnuplot import json import math -import time import mysql.connector as mariadb +import requests +import time from functions.common import * from numpy import * @@ -92,7 +93,7 @@ TESTS = { }, 'iobenchmark': { 'Enabled': False, - 'Rates': {}, + 'Data': {}, 'Results': {}, 'Status': {}, }, @@ -134,15 +135,19 @@ def disconnect_from_db(): def export_png_graph(name, dev): """Exports PNG graph using gnuplot, returns file path as str.""" - max_rate = max(800, max(rates)) - out_path = '{}/iobenchmark.png'.format(global_vars['TmpDir']) + max_rate = max(TESTS['iobenchmark']['Data'][name]['Read Rates']) + max_rate /= (1024**2) + max_rate = max(800, max_rate) + out_path = '{}/iobenchmark-{}.png'.format(global_vars['LogDir'], name) plot_data = '{}/iobenchmark-{}-raw.log'.format(global_vars['LogDir'], name) # Adjust Y-axis range to either 1000 or roughly max rate + 200 - y_range = math.ceil(max_rate/100)*100 + 200 + ## Round up to the nearest 100 and then add 200 + y_range = (math.ceil(max_rate/100)*100) + 200 # Run gnuplot commands g = Gnuplot.Gnuplot() + g('reset') g('set output "{}"'.format(out_path)) g('set terminal png large size 660,300 truecolor font "Noto Sans,11"') g('set title "I/O Benchmark"') @@ -402,7 +407,6 @@ def osticket_get_ticket_name(ticket_id): def osticket_needs_attention(ticket_id): """[DISABLED] Marks the ticket as "NEEDS ATTENTION" in osTicket.""" return # This function has been DISABLED due to a repurposing of that flag - if not ticket_id: raise GenericError if not ost_db['Cursor']: @@ -594,7 +598,7 @@ def post_drive_results(ticket_number): io_status = TESTS['iobenchmark']['Status'].get(name, None) if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'Skipped']: one_line_graph = generate_horizontal_graph( - rates=TESTS['iobenchmark']['Data'][name]['Read Rates'], + rates=TESTS['iobenchmark']['Data'][name]['Merged Rates'], oneline=True) for c in COLORS.values(): one_line_graph = one_line_graph.replace(c, '') @@ -611,26 +615,19 @@ def post_drive_results(ticket_number): # imgur try: - url = upload_to_imgur(image_path) + url = upload_to_imgur(png_path) + report.append('Imgur: {}'.format(url)) except: # Oh well pass - else: - report.append('Imgur: {}'.format(url)) # Nextcloud try: - url = upload_to_nextcloud(image_path, ticket_number, name) + url = upload_to_nextcloud(png_path, ticket_number, name) + report.append('Nextcloud: {}'.format(url)) except: # Oh well pass - else: - report.append('Nextcloud: {}'.format(url)) - - # TODO-REMOVE TESTING - with open('/home/twoshirt/__ost_report_{}.txt'.format(name), 'w') as f: - for line in report: - f.write('{}\n'.format(line.strip())) # Post reply for drive osticket_post_reply( @@ -828,9 +825,9 @@ def run_iobenchmark(ticket_number): TESTS['iobenchmark']['Data'][name]['Read Rates'].append( cur_rate) TESTS['iobenchmark']['Data'][name]['Graph'].append( - '{percent} {rate}'.format( + '{percent:0.1f} {rate}'.format( percent=i/test_chunks*100, - rate=cur_rate/(1024**2))) + rate=int(cur_rate/(1024**2)))) if i % IO_VARS['Progress Refresh Rate'] == 0: # Update vertical graph update_io_progress( @@ -851,15 +848,16 @@ def run_iobenchmark(ticket_number): min(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), max(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2)) TESTS['iobenchmark']['Data'][name]['Avg/Min/Max'] = avg_min_max - h_graph_rates = [] + TESTS['iobenchmark']['Data'][name]['Merged Rates'] = [] pos = 0 width = int(test_chunks / IO_VARS['Graph Horizontal Width']) for i in range(IO_VARS['Graph Horizontal Width']): # Append average rate for WIDTH number of rates to new array - h_graph_rates.append(sum( + TESTS['iobenchmark']['Data'][name]['Merged Rates'].append(sum( TESTS['iobenchmark']['Data'][name]['Read Rates'][pos:pos+width])/width) pos += width - report = generate_horizontal_graph(h_graph_rates) + report = generate_horizontal_graph( + TESTS['iobenchmark']['Data'][name]['Merged Rates']) report += '\n{}'.format(avg_min_max) TESTS['iobenchmark']['Results'][name] = report @@ -1500,9 +1498,9 @@ def upload_to_imgur(image_path): if not image_path: raise GenericError - # Read image file and convert to base64 + # Read image file and convert to base64 then convert to str with open(image_path, 'rb') as f: - image_data = base64.b64encode(f.read()) + image_data = base64.b64encode(f.read()).decode() # POST image url = "https://api.imgur.com/3/image" @@ -1535,7 +1533,7 @@ def upload_to_nextcloud(image_path, ticket_number, dev_name): image_data = f.read() # PUT image - url = '{base_url}/{ticket_number}_iobenchmark_{dev_name}_{date}'.format( + url = '{base_url}/{ticket_number}_iobenchmark_{dev_name}_{date}.png'.format( base_url=BENCHMARK_SERVER['Url'], ticket_number=ticket_number, dev_name=dev_name, From e9d65fe29be2d1d9e7b5d3906232f6a1a2cb1c07 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 24 Sep 2018 17:49:20 -0600 Subject: [PATCH 192/293] Enable direct I/O for I/O Benchmark * Really this should've been enabled earlier * Also increased chunk size --- .bin/Scripts/functions/hw_diags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index d6ca9535..3c7df905 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -43,7 +43,7 @@ ATTRIBUTES = { } IO_VARS = { 'Block Size': 512*1024, - 'Chunk Size': 16*1024**2, + 'Chunk Size': 32*1024**2, 'Minimum Dev Size': 8*1024**3, 'Minimum Test Size': 10*1024**3, 'Alt Test Size Factor': 0.01, @@ -813,7 +813,7 @@ def run_iobenchmark(ticket_number): c = int(IO_VARS['Chunk Size'] / IO_VARS['Block Size']) if skip_extra and i % skip_extra == 0: s += 1 - cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o}'.format( + cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o} iflag=direct'.format( b=IO_VARS['Block Size'], s=offset+s, c=c, From a4d559f4064cf6acb3ae9e28ba917920b1c38ec3 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 11:46:15 -0600 Subject: [PATCH 193/293] Removed more VCR 2008 references --- .bin/Scripts/functions/setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index 4fca0303..c5c10a48 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -104,10 +104,6 @@ SETTINGS_MOZILLA_FIREFOX_64 = { }, } VCR_REDISTS = [ - {'Name': 'Visual C++ 2008 SP1 x32...', - 'Cmd': [r'2008sp1\x32\vcredist.exe', '/qb! /norestart']}, - {'Name': 'Visual C++ 2008 SP1 x64...', - 'Cmd': [r'2008sp1\x64\vcredist.exe', '/qb! /norestart']}, {'Name': 'Visual C++ 2010 x32...', 'Cmd': [r'2010sp1\x32\vcredist.exe', '/passive', '/norestart']}, {'Name': 'Visual C++ 2010 x64...', From 9689f5aa15dabc7d5557527070eba872e2c132a8 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 11:51:22 -0600 Subject: [PATCH 194/293] Adjusted I/O chunk size and graph scale --- .bin/Scripts/functions/hw_diags.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 3b8bd354..97409f32 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -29,13 +29,14 @@ ATTRIBUTES = { } IO_VARS = { 'Block Size': 512*1024, - 'Chunk Size': 16*1024**2, + 'Chunk Size': 32*1024**2, 'Minimum Dev Size': 8*1024**3, 'Minimum Test Size': 10*1024**3, 'Alt Test Size Factor': 0.01, 'Progress Refresh Rate': 5, - 'Scale 16': [2**(0.6*x)+(16*x) for x in range(1,17)], - 'Scale 32': [2**(0.6*x/2)+(16*x/2) for x in range(1,33)], + 'Scale 8': [2**(0.56*(x+1))+(16*(x+1)) for x in range(8)], + 'Scale 16': [2**(0.56*(x+1))+(16*(x+1)) for x in range(16)], + 'Scale 32': [2**(0.56*(x+1)/2)+(16*(x+1)/2) for x in range(32)], 'Threshold Fail': 65*1024**2, 'Threshold Warn': 135*1024**2, 'Threshold Great': 750*1024**2, From 4979fbe9278dab18d82ae3d26dcdb25c60073e8e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 11:52:24 -0600 Subject: [PATCH 195/293] Taller I/O horizontal graph * Inceases fidelity to 32 steps --- .bin/Scripts/functions/hw_diags.py | 48 ++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 97409f32..a9c171b8 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -74,12 +74,16 @@ TESTS = { }, } -def generate_horizontal_graph(rates): +def generate_horizontal_graph(rates, oneline=False): """Generate two-line horizontal graph from rates, returns str.""" - line_top = '' - line_bottom = '' + line_1 = '' + line_2 = '' + line_3 = '' + line_4 = '' for r in rates: - step = get_graph_step(r, scale=16) + step = get_graph_step(r, scale=32) + if oneline: + step = get_graph_step(r, scale=8) # Set color r_color = COLORS['CLEAR'] @@ -91,15 +95,35 @@ def generate_horizontal_graph(rates): r_color = COLORS['GREEN'] # Build graph - if step < 8: - line_top += ' ' - line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + full_block = '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) + if step >= 24: + line_1 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-24]) + line_2 += full_block + line_3 += full_block + line_4 += full_block + elif step >= 16: + line_1 += ' ' + line_2 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-16]) + line_3 += full_block + line_4 += full_block + elif step >= 8: + line_1 += ' ' + line_2 += ' ' + line_3 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) + line_4 += full_block else: - line_top += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step-8]) - line_bottom += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][-1]) - line_top += COLORS['CLEAR'] - line_bottom += COLORS['CLEAR'] - return '{}\n{}'.format(line_top, line_bottom) + line_1 += ' ' + line_2 += ' ' + line_3 += ' ' + line_4 += '{}{}'.format(r_color, IO_VARS['Graph Horizontal'][step]) + line_1 += COLORS['CLEAR'] + line_2 += COLORS['CLEAR'] + line_3 += COLORS['CLEAR'] + line_4 += COLORS['CLEAR'] + if oneline: + return line_4 + else: + return '\n'.join([line_1, line_2, line_3, line_4]) def get_graph_step(rate, scale=16): """Get graph step based on rate and scale, returns int.""" From 6c4381c3a56ce554c864738de8a160c003ed5b8e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:15:28 -0600 Subject: [PATCH 196/293] Include percent with rates in "raw" I/O log --- .bin/Scripts/functions/hw_diags.py | 41 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index a9c171b8..c8e2228d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -68,6 +68,7 @@ TESTS = { 'Status': {}, }, 'iobenchmark': { + 'Data': {}, 'Enabled': False, 'Results': {}, 'Status': {}, @@ -410,7 +411,9 @@ def run_iobenchmark(): # Run dd read tests offset = 0 - read_rates = [] + TESTS['iobenchmark']['Data'][name] = { + 'Graph': [], + 'Read Rates': []} for i in range(test_chunks): i += 1 s = skip_count @@ -425,12 +428,18 @@ def run_iobenchmark(): o='/dev/null') result = run_program(cmd.split()) result_str = result.stderr.decode().replace('\n', '') - read_rates.append(get_read_rate(result_str)) + cur_rate = get_read_rate(result_str) + TESTS['iobenchmark']['Data'][name]['Read Rates'].append( + cur_rate) + TESTS['iobenchmark']['Data'][name]['Graph'].append( + '{percent:0.1f} {rate}'.format( + percent=i/test_chunks*100, + rate=int(cur_rate/(1024**2)))) if i % IO_VARS['Progress Refresh Rate'] == 0: # Update vertical graph update_io_progress( percent=i/test_chunks*100, - rate=read_rates[-1], + rate=cur_rate, progress_file=progress_file) # Update offset offset += s + c @@ -440,24 +449,29 @@ def run_iobenchmark(): run_program(['tmux', 'kill-pane', '-t', bottom_pane]) # Build report - h_graph_rates = [] + avg_min_max = 'Average read speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( + sum(TESTS['iobenchmark']['Data'][name]['Read Rates'])/len( + TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), + min(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2), + max(TESTS['iobenchmark']['Data'][name]['Read Rates'])/(1024**2)) + TESTS['iobenchmark']['Data'][name]['Avg/Min/Max'] = avg_min_max + TESTS['iobenchmark']['Data'][name]['Merged Rates'] = [] pos = 0 width = int(test_chunks / IO_VARS['Graph Horizontal Width']) for i in range(IO_VARS['Graph Horizontal Width']): # Append average rate for WIDTH number of rates to new array - h_graph_rates.append(sum(read_rates[pos:pos+width])/width) + TESTS['iobenchmark']['Data'][name]['Merged Rates'].append(sum( + TESTS['iobenchmark']['Data'][name]['Read Rates'][pos:pos+width])/width) pos += width - report = generate_horizontal_graph(h_graph_rates) - report += '\nRead speed: {:3.1f} MB/s (Min: {:3.1f}, Max: {:3.1f})'.format( - sum(read_rates)/len(read_rates)/(1024**2), - min(read_rates)/(1024**2), - max(read_rates)/(1024**2)) + report = generate_horizontal_graph( + TESTS['iobenchmark']['Data'][name]['Merged Rates']) + report += '\n{}'.format(avg_min_max) TESTS['iobenchmark']['Results'][name] = report # Set CS/NS - if min(read_rates) <= IO_VARS['Threshold Fail']: + if min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Fail']: TESTS['iobenchmark']['Status'][name] = 'NS' - elif min(read_rates) <= IO_VARS['Threshold Warn']: + elif min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Warn']: TESTS['iobenchmark']['Status'][name] = 'Unknown' else: TESTS['iobenchmark']['Status'][name] = 'CS' @@ -466,8 +480,7 @@ def run_iobenchmark(): dest_filename = '{}/iobenchmark-{}.log'.format(global_vars['LogDir'], name) shutil.move(progress_file, dest_filename) with open(dest_filename.replace('.', '-raw.'), 'a') as f: - for rate in read_rates: - f.write('{} MB/s\n'.format(rate/(1024**2))) + f.write('\n'.join(TESTS['iobenchmark']['Data'][name]['Graph'])) update_progress() # Done From d4f24eafb67ac789c6cf08b8eb5a5a305930a2d4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:17:38 -0600 Subject: [PATCH 197/293] Fix issue #55 --- .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 c8e2228d..205171ae 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -420,7 +420,7 @@ def run_iobenchmark(): c = int(IO_VARS['Chunk Size'] / IO_VARS['Block Size']) if skip_extra and i % skip_extra == 0: s += 1 - cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o}'.format( + cmd = 'sudo dd bs={b} skip={s} count={c} if=/dev/{n} of={o} iflag=direct'.format( b=IO_VARS['Block Size'], s=offset+s, c=c, From 4b16ec60954a2d678ef7c2180a900748973d51d0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:24:47 -0600 Subject: [PATCH 198/293] Adjusted Prime95 countdown --- .bin/Scripts/functions/hw_diags.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 205171ae..a5866c37 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -507,8 +507,10 @@ def run_mprime(): try: for i in range(int(MPRIME_LIMIT)): clear_screen() - print_standard('Running Prime95 ({} minutes left)'.format( - int(MPRIME_LIMIT)-i)) + min_left = int(MPRIME_LIMIT) - i + print_standard('Running Prime95 ({} minute{} left)'.format( + min_left, + 's' if min_left != 1 else '')) print_warning('If running too hot, press CTRL+c to abort the test') sleep(60) except KeyboardInterrupt: From 5e73583e000ee3f0a18d34cbfc6c855592763739 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 12:33:11 -0600 Subject: [PATCH 199/293] Mark declined overrides as "Skipped" * NS should be reserved for known failures not unknown/questionable states --- .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 a5866c37..b492c22f 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -812,7 +812,7 @@ def scan_disks(full_paths=False, only_path=None): if ask('Run tests on this device anyway?'): TESTS['NVMe/SMART']['Status'][dev_name] = 'OVERRIDE' else: - TESTS['NVMe/SMART']['Status'][dev_name] = 'NS' + TESTS['NVMe/SMART']['Status'][dev_name] = 'Skipped' TESTS['badblocks']['Status'][dev_name] = 'Denied' TESTS['iobenchmark']['Status'][dev_name] = 'Denied' print_standard(' ') # In case there's more than one "OVERRIDE" disk From 402d73c395ea24c01a019a1927ddc7b8bc7267ee Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 13:57:28 -0600 Subject: [PATCH 200/293] Add osticket.1201.com to known_hosts --- .linux_items/include/airootfs/etc/skel/.ssh/known_hosts | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .linux_items/include/airootfs/etc/skel/.ssh/known_hosts diff --git a/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts b/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts new file mode 100644 index 00000000..b2cbbaee --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts @@ -0,0 +1,2 @@ +osticket.1201.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWO +fJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4= From 251bc37fb649057ed2efcaa4ec52dec918cd7e74 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 13:57:43 -0600 Subject: [PATCH 201/293] Updated main.py --- .bin/Scripts/settings/main.py | 93 ++++++++++++++++------------------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 4ce4e533..f08d6077 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -1,105 +1,96 @@ # Wizard Kit: Settings - Main / Branding # Features -ENABLED_UPLOAD_DATA = False +ENABLED_UPLOAD_DATA = True ENABLED_TICKET_NUMBERS = False # STATIC VARIABLES (also used by BASH and BATCH files) ## NOTE: There are no spaces around the = for easier parsing in BASH and BATCH # Main Kit -ARCHIVE_PASSWORD='Abracadabra' -KIT_NAME_FULL='Wizard Kit' -KIT_NAME_SHORT='WK' -SUPPORT_MESSAGE='Please let 2Shirt know by opening an issue on GitHub' +ARCHIVE_PASSWORD='Sorted1201' +KIT_NAME_FULL='1201-WizardKit' +KIT_NAME_SHORT='1201' +SUPPORT_MESSAGE='Please let us know by opening an issue on Gogs' # osTicket -DB_HOST='127.0.0.1' +DB_HOST='osticket.1201.com' DB_NAME='osticket' DB_USER='wizardkit' -DB_PASS='Abracadabra' +DB_PASS='U9bJnF9eamVkfsVw' SSH_PORT='22' SSH_USER='sql_tunnel' # imgur -IMGUR_CLIENT_ID='' +IMGUR_CLIENT_ID='3d1ee1d38707b85' # Live Linux MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags -ROOT_PASSWORD='Abracadabra' -TECH_PASSWORD='Abracadabra' +ROOT_PASSWORD='1201 loves computers!' +TECH_PASSWORD='Sorted1201' # Server IP addresses -OFFICE_SERVER_IP='10.0.0.10' -QUICKBOOKS_SERVER_IP='10.0.0.10' +OFFICE_SERVER_IP='10.11.1.20' +QUICKBOOKS_SERVER_IP='10.11.1.20' # Time Zones LINUX_TIME_ZONE='America/Los_Angeles' # See 'timedatectl list-timezones' for valid values WINDOWS_TIME_ZONE='Pacific Standard Time' # See 'tzutil /l' for valid values # WiFi -WIFI_SSID='SomeWifi' -WIFI_PASSWORD='Abracadabra' +WIFI_SSID='HamsterFi' +WIFI_PASSWORD='16Hamsters' # SERVER VARIABLES ## NOTE: Windows can only use one user per server. This means that if ## one server serves multiple shares then you have to use the same ## user/password for all of those shares. BACKUP_SERVERS = [ - { 'IP': '10.0.0.10', - 'Name': 'ServerOne', + { 'IP': '10.11.1.20', + 'Name': 'Anaconda', 'Mounted': False, 'Share': 'Backups', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', - }, - { 'IP': '10.0.0.11', - 'Name': 'ServerTwo', - 'Mounted': False, - 'Share': 'Backups', - 'User': 'restore', - 'Pass': 'Abracadabra', - 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', }, ] BENCHMARK_SERVER = { - 'Name': 'BenchmarkServer', - 'Short Url': '', - 'Url': '', - 'User': '', + 'Name': 'Nextcloud', + 'Short Url': 'https://1201north.ddns.net:8001/index.php/f/27892', + 'Url': 'https://1201north.ddns.net:8001/public.php/webdav/Benchmarks', + 'User': 'RAE7ajRk25CBnW6', 'Pass': '', } CRASH_SERVER = { - 'Name': 'CrashServer', - 'Url': '', - 'User': '', + 'Name': 'Nextcloud', + 'Url': 'https://1201north.ddns.net:8001/public.php/webdav/WizardKit_Issues', + 'User': 'LoQ97J3r6CFGT2T', 'Pass': '', } OFFICE_SERVER = { 'IP': OFFICE_SERVER_IP, - 'Name': 'ServerOne', + 'Name': 'Anaconda', 'Mounted': False, - 'Share': 'Office', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'Share': r'Public\Office\MS Office', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', } QUICKBOOKS_SERVER = { 'IP': QUICKBOOKS_SERVER_IP, - 'Name': 'ServerOne', + 'Name': 'Anaconda', 'Mounted': False, - 'Share': 'QuickBooks', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'Share': r'Public\QuickBooks', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', } WINDOWS_SERVER = { - 'IP': '10.0.0.10', - 'Name': 'ServerOne', + 'IP': '10.11.1.20', + 'Name': 'Anaconda', 'Mounted': False, - 'Share': 'Windows', - 'User': 'restore', - 'Pass': 'Abracadabra', + 'Share': r'Public\Windows', + 'User': 'cx', + 'Pass': 'cx', 'RW-User': 'backup', - 'RW-Pass': 'Abracadabra', + 'RW-Pass': '1201 loves computers!', } if __name__ == '__main__': From 787e944cd116a6b0a814277e42ab7fff297fe417 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 14:18:44 -0600 Subject: [PATCH 202/293] Add 1201 Root CA --- .../trust-source/anchors/1201_Root_CA.crt | 36 +++++++++++++++++++ Build Linux | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 .linux_items/include/airootfs/etc/ca-certificates/trust-source/anchors/1201_Root_CA.crt diff --git a/.linux_items/include/airootfs/etc/ca-certificates/trust-source/anchors/1201_Root_CA.crt b/.linux_items/include/airootfs/etc/ca-certificates/trust-source/anchors/1201_Root_CA.crt new file mode 100644 index 00000000..7d8ae206 --- /dev/null +++ b/.linux_items/include/airootfs/etc/ca-certificates/trust-source/anchors/1201_Root_CA.crt @@ -0,0 +1,36 @@ +-----BEGIN CERTIFICATE----- +MIIGTzCCBDegAwIBAgIBfDANBgkqhkiG9w0BAQsFADCBsDELMAkGA1UEBhMCVVMx +DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxHTAbBgNVBAoTFDEy +MDEgQ29tcHV0ZXIgUmVwYWlyMSMwIQYDVQQLExoxMjAxIENlcnRpZmljYXRlIEF1 +dGhvcml0eTEVMBMGA1UEAxMMMTIwMSBSb290IENBMSIwIAYJKoZIhvcNAQkBFhNt +YW5hZ2VtZW50QDEyMDEuY29tMB4XDTE4MDgyMDA2MDEwMFoXDTM4MDgyMDA2MDEw +MFowgbAxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAPBgNVBAcTCFBv +cnRsYW5kMR0wGwYDVQQKExQxMjAxIENvbXB1dGVyIFJlcGFpcjEjMCEGA1UECxMa +MTIwMSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxFTATBgNVBAMTDDEyMDEgUm9vdCBD +QTEiMCAGCSqGSIb3DQEJARYTbWFuYWdlbWVudEAxMjAxLmNvbTCCAiIwDQYJKoZI +hvcNAQEBBQADggIPADCCAgoCggIBANGYohJk5/CC/p14R7EpnhdEUF7Wvlnt8yuF +dtuyStlIGkLxPMlj9hQfoLDplQqlKBefTaI3WwrI/Hndso+jStLKgtRWRdyNB34K +AWqT04zXYGicdi3fqaMhEC4SPyX1tRXU2e9kjtIJ21AZx2F40NUjfOMKLVymZgXm +gkG1oA/BSzE8vIidrd/lJPwo0u+EYFa87y+9SHS93Ze1AVoTVqUzSMkjqt+6YIzJ +4XBD7UBvps0Mnd18HMUlXHFXusUL1K921W3wDVcMlNIIA8MJjQk+aVS/1EGSn+81 +C+r40x64lYkyh0ZUAHkVXUC/BUfa0SKx1Nfa4mSvtyPnUCb7Dir8MkTDKgopGCok +KmW+VvE2H8AEPCbcctFmhdip19laYxzyDhZ5wiQN6AOg64cWvDf6/uT9hyPvxkj1 +ps5vWElryzawTE7h1BI8liMqwsG1Y7cc6D0PABxPsp4iR8pde0oZtpLnEvejRodo +zz3BGvZjq+pHtRMjL+yiDtdAL+K+7/e7gNCQBIGsphahWIOf7TczWVgMNclTNxl3 +WZjKkOEs7j+prRTDvffV6H32+Tk5TwgMsfvnY4a37CkJ0L0d1JhWj9wO+gESfg3W +8yvt3hfcj3NOUMJWhJstqlIeX8dj7vVcMhjNvYJxabJmJgk+DNlHe55fXDGJ1CLO +E0EbRTyBAgMBAAGjcjBwMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFM+hXjFx +6BldZFBQW1Pn/Yp3vbw+MAsGA1UdDwQEAwIBBjARBglghkgBhvhCAQEEBAMCAAcw +HgYJYIZIAYb4QgENBBEWD3hjYSBjZXJ0aWZpY2F0ZTANBgkqhkiG9w0BAQsFAAOC +AgEALWcnu3auMSnSSF/kOiLvJ4RAnHZebGYNcUWM14u1K1/XtTB7AFzQIHX7BcDH +m/z4UEyhl9EdR5Bgf2Szuk+8+LyGqcdAdbPoK+bmcwwL8lufDnlIYBThKIBfU2Xw +vw41972B+HH5r1TZXve1EdJaLyImbxmq5s41oH7djGC+sowtyGuVqP7RBguXBGiJ +At1yfdPWVaxLmE8QFknkIvpgTmELpxasTfvgnQBenA3Ts0Z2hwN4796hLbRzGsb8 +4hKWAfQDP0klzXKRRyVeAueXxj/FcNZilYxv15MqMc4qrUiW0hXHluQM1yceNjNZ +SE4Igi1Ap71L4PpgkHIDfZD908UexGGkql+p4EWrpnXUYWTa0sHg1bFKQntgpyFg +86Ug0Q7ZNhImENzeigZknL0ceIdaNUCs7UPrkqpUSJR2yujp1JC3tX1LgKZw8B3J +fQx/8h3zzNuz5dVtr1wUJaUD0nGhMIRBEXb2t4jupEISSTN1pkHPcbNzhAQXjVUA +CJxnnz3jmyGsNCoQf7NWfaN6RSRTWehsC6m7JvPvoU2EZoQkSlNOv4xZuFpEx0u7 +MFDtC1cSGPH7YwYXPVc45xAMC6Ni8mvq93oT89XZNHIqE8/T8aPHLwYFgu1b1r/A +L8oMEnG5s8tG3n0DcFoOYsaIzVeP0r7B7e3zKui6DQLuu9E= +-----END CERTIFICATE----- diff --git a/Build Linux b/Build Linux index af01c928..c65ffed0 100755 --- a/Build Linux +++ b/Build Linux @@ -253,6 +253,10 @@ function update_live_env() { echo "ln -sf '/usr/share/zoneinfo/$LINUX_TIME_ZONE' '/etc/localtime'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'sed -i "s/#FallbackNTP/NTP/" /etc/systemd/timesyncd.conf' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + # Trust root CA(s) + echo "trust extract" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + echo "trust extract-compat" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + # udevil fix echo "mkdir /media" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" From a3c82023e8b66aa428f06f8fd06d57dc9c341731 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 15:17:44 -0600 Subject: [PATCH 203/293] Removed unused file --- .linux_items/.gitignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .linux_items/.gitignore diff --git a/.linux_items/.gitignore b/.linux_items/.gitignore deleted file mode 100644 index 5495eced..00000000 --- a/.linux_items/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -wk_tmp -wk-repo From 3b27d05fd6c1013f8017e500482ffd8eff8efb45 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 20:51:40 -0600 Subject: [PATCH 204/293] Disabled HDT menu entry * See issue #57 --- .linux_items/include/syslinux/wk_pxe_extras.cfg | 2 +- .linux_items/include/syslinux/wk_sys_extras.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.linux_items/include/syslinux/wk_pxe_extras.cfg b/.linux_items/include/syslinux/wk_pxe_extras.cfg index d677b4b0..f4118570 100644 --- a/.linux_items/include/syslinux/wk_pxe_extras.cfg +++ b/.linux_items/include/syslinux/wk_pxe_extras.cfg @@ -4,6 +4,6 @@ MENU BACKGROUND pxelinux.png INCLUDE boot/syslinux/wk_pxe_linux.cfg INCLUDE boot/syslinux/wk_pxe_linux_extras.cfg #UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg -INCLUDE boot/syslinux/wk_hdt.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys_extras.cfg b/.linux_items/include/syslinux/wk_sys_extras.cfg index 3e5af215..7f6b92cd 100644 --- a/.linux_items/include/syslinux/wk_sys_extras.cfg +++ b/.linux_items/include/syslinux/wk_sys_extras.cfg @@ -3,6 +3,6 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg INCLUDE boot/syslinux/wk_sys_linux_extras.cfg #UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg -INCLUDE boot/syslinux/wk_hdt.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg From 79ad9f1412c63a7752a6e5dc617ae0ff496cfdf6 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 25 Sep 2018 21:06:23 -0600 Subject: [PATCH 205/293] Added 1201 specific boot entries --- .../include/EFI/boot/icons/1201_eset.png | Bin 0 -> 7848 bytes .../include/EFI/boot/icons/1201_hdclone.png | Bin 0 -> 3133 bytes .../include/EFI/boot/icons/1201_mac-dgpu.png | Bin 0 -> 3086 bytes .linux_items/include/EFI/boot/refind.conf | 15 +++++++++++++++ .linux_items/include/syslinux/1201_eset.cfg | 9 +++++++++ .linux_items/include/syslinux/1201_hdclone.cfg | 9 +++++++++ .linux_items/include/syslinux/wk.cfg | 2 +- .linux_items/include/syslinux/wk_head.cfg | 14 +++++++------- .linux_items/include/syslinux/wk_sys.cfg | 4 +++- .linux_items/include/syslinux/wk_sys_extras.cfg | 2 ++ 10 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 .linux_items/include/EFI/boot/icons/1201_eset.png create mode 100644 .linux_items/include/EFI/boot/icons/1201_hdclone.png create mode 100644 .linux_items/include/EFI/boot/icons/1201_mac-dgpu.png create mode 100644 .linux_items/include/syslinux/1201_eset.cfg create mode 100644 .linux_items/include/syslinux/1201_hdclone.cfg diff --git a/.linux_items/include/EFI/boot/icons/1201_eset.png b/.linux_items/include/EFI/boot/icons/1201_eset.png new file mode 100644 index 0000000000000000000000000000000000000000..5f41417f7d3b3dfc61775f12a770b2b7c34d1fc7 GIT binary patch literal 7848 zcmV;Z9#`RsP)0b000McNliru;t3fSFfZDt)Di#y02y>e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{03HxYL_t(|+U=cpa2(g2=RdEz zCt)zifye+!fS{O3F^Wl4)+$-SmUXh$F8jQ-vd^LH^?A>AEAV!`TX#-%wYGMBc6lAN zmQ2gCL`9pTNK2w5<^(X40Ej>ULxjQPp6TxUV}`U$2{V|P1_q??t$Hd^BJjF@zwi5{ z_uj8z8q=7@G^R0)X-s1p)0oCb3nJ5B(9+T(rp1^&w6wGslS+WN!UZ73hcJUk(?|mn??pNafO&>22L<-7R zo_OMk#lXJIrfkl-QUB_JA47gHjD1XzLPQ{`6+jDnTG(7+GCX?Wy$HK}P%qcIYsVrtGCYcIWKnA3imKO10*+8;Npfp)e zIvfmgs&9bTj-TP3u5ONcee^{&va9YCEfx?k3<8k|U6Ba;4jsdF_&BvTD~pN>xqrc2 zRy5R7m7j++c~&9eL`u3pXqHdE=<~7TbUVL0+Qz%?A$p?PH5H0`4TH8&n6} za+i}kXEku&!nrh-mSVRkS$)2&%x(bwaF{IzkMPXlHntCW&<%rY9UAbS$IE*Mj_{MC z$9be_CV#zhDUD^ND3bKiAb@Td?Cm(u5B{`^=XwXS?$fh{E>-3Kw4G$jnRdRpatV*F zSVoT3dTkTH8xFH&-yy!eYY!cf$fW!C@%XgKd?v#%Xb*+>@|*ARPJ0*MxMc%#XOvHB zpg3s+7zqS;;^l4p;`BK@nm!@Ql>`(h7Rqc^O05TNdaolffV^QbN=psBo+ImJcfI~-Uo3N}T- zBFiX}gorC!2oXzbu1Lp>_&*E`48uS-Vy;Tpb)vdXI2uKbL9!NJ`TV3}6E3JKUwr;$e)frv zv81kc!rpyC2%sAVTlVhf7bi{=(Z{cTnaaJ!Kfb!1A3c0Ol?C||^Q;q5@ zZ@j22F5!Y);e`*n+t*eKlLnBEa{$sQ1Sv`B!HJRsUilSU653O2`OA-lXsA?L| z>_1FY)20Riblu=cdk1~0nlOqjkOX%vTZG-3y_@7l++7**{eM0F@0UlGNpQoQ*{rW9 zPnr=NJbMne&u2~`nsM<**Lc0{Bu0|$&xK`0tZ$w(DdpWu3Jpg!F8X|U0zv$t5P@)* zkQzbNqG+0qVSo^^luVW+tQLhFn~fZsja-MFVyBaQhds6tH3>VAh0a_)wrDn1@iv0ZS6JXdMpl!fSqRoCuzypisO{nkJ4TFKvQO*xswWfux=1B3^WWb8PGqsIuXbMtU};WWO6MQ3hXv2^7C0dU(PFbeemCK5{T0XvdIg1?MZWZcEN?220!DoM@?6;?KvdT`)7?WPiT__QtDfRqr>W-t;JJ4GVaxA%t*Zxp zlA|||8sR@$Pw-Ah7yoeg?L4r01vZo1f+Pg<>uRZ1WIDoQNBSKDZu&f<851BQn;eZs zId#eZk1;F)HqL1>E%h@DgFUCu@V7tx1+R8?qwC2_&l5FHdVPHLx6kv;Tf0zAtj^Vz zl`=EWm2mD+P2qTfrv5meOJOXU1wm#!~c8b5B%`WcNj@AviGYxdylqp`_jc3*9P)(98@}U zV&;AfoEseGRPO~!^767^0d#{vAeit03+y)XotgW8-7wg3xHabcQ^d03BL4Nieug=< zH6OkYAuj&|MV6^4E#bd^`~gC$%J<%SCndfaz>)S&e8C`vxw#p=vqhH4%X1}^Z%|bU zhSluE0I{95#3@pl-G#*~wn>I4bnUnII zhX&k?c)g|sg86xQN#`@Nl?7;;#%L&%FiI`8+fAvEdHjBQhlWy)%<~nQ8|Kf$l15*@ z+VV1%S5?MO<&J+&cPPY}3nt{}l03mnB zG$#iHY5Pf=)ryE$-BN*jXc$e?GCug4W3!?_!d*eKRR>5)03onj6%$SX8H81pNK{Mt zWqXE(*s^^G)->JFo)httPASgo^?FUI2->Yy6p=*E*&~3FaB^W7SQW*TUBJ;mAm!B$ zu)F61`+xpa+Vg5gde$Qx2*fI+nG(Qa`SXR52|{KTAjyMSBspUO7{HLvmzEF=AfiqF zQO`&?jBaFZ0W7kNY$TC$R$V}nmsDhPx_X4t2mrGQP18(q0g5akVI+C?ti}LF!Z21c zqf@p4;Yfr@KlYOWq9zd_R7GSzZ3VY6B+|(nq~qC;$PuNL!gQzQS7i!`c*Wm&1TA+ zQB6bF^(2-ys}{gWs5spOKZqcovRTMO+(X-shkEHiF5EsBx3>yh@E{;ry!Gs zj^t)SjYMK+Af|R9NQ_AVGfu4nBGQAIg# zpYI;??~De5rgX9>$a7I*x6|hjr1W#6p)jYqx~M8EO>5p$o#*-T_y2FoZmhnfgztU* zD->pMA;vHaJU-u_FTi}5@`RwOp*~9luqc!zdBKZ5A7NF^m;iaXxy&fYr!~c!H(pic zz_H`3Tf7J*jZ?bE+dFvk)R~k&a&fO=WW4%y!@xZ>oG^xwfwID)jOI!EDJ3DWBzZ}< zFMyh&+5RvTx?I%GC{Ig>+uz;IP?D2NV+CM)4jm?%MiA+6I@2QDU)BH&Mn*=Gy2nh9 z++{#hk(A{Fem@}-I$PQ-7OtN+FRh<_{cJlw{rwC00^@fdny&NKfrC8v&U3Zy=)C0pKys>)^Km6@;oE`P1^{jIm z>N8%M{!oaEN%{fS6cwgr8BHO8&0?XVtPCMZWBMrrINs68t*cgMYz3;y%2+ph7Qb&j zmh#UIMI!vm%YWcM-`vI0hI;1J)lyMhM2^*p9=~Pl_Kecr-_N0Q9h?|&6V`Roxzko) zw{!iR%$s5P{C>`RMiV|mac(YUg@xIx1IV%*^F(6o3PER2FHud)*d!L_xw!p?HN1H2 zL|T5?06M)sI*+vS{E^lV3iir2acL@Wb!|0`bu}3i-sAPs?eiym4vQ>jeD5-&P<2^z zbL`TE5Mz$6{{GmRz6>Et68CIa$Ew=ug!7GO7(#roD}RQ+6Csc#iCb2$q#!r5eh7wP zaPoXNqtR%>`PR>!lkv@~j0n(NSBpbVOn}Y-Hy)F&OqUiF^2G=5r@&&#SXmP>*4EW< z-=-UpEjPlTV9rV30PG*diqSl`4maQV#2o;G9rM*V&RsB^WzUCedricBeb4v zH*HhKX}9yGPkw^G*{~LyqKrB3WR7B+jh06~&K)aW#@4hd+c`ZU2q+rx$hoUT-R*MC0K|Z1AF^u8$Ml+ zt@bf6x1o;elG5xF0HC_OoMO9;K!O6z+0jwj&YY#GrrOkI(GHu9J65e=_5ADDbL<3L z-+G$^Cr@!~*n=+`HRUYA`>kD}MPWg4F-zyo<({=`SlrZz%i%Ef%;Ck+QC>fE1VfCS ziV9#+eSOBkrYQtiIIDqjR~}uVu~(m8H+XgTUhZCZgDDLouB^Njx?J44ayc88EMj1I zn63+b95{29*3R>E_6;yRGJ-!C!mnwBbsbeV&9vG^?~P+8Xzl1^Y2)k(5u6})nXnf<1OPS5`l1-ZM*m3Nm7NJ>vB<1Sz*eY ziW#PH;p|zstd@j_L(T_-Y}>t;1t!$V$4g9`B)zXgNg-1mr@MQ2;n0zIQEKeJ*Hl+c zd4W0ald%&KLNKSkj#{TPVcMc0c>3*k=^q+q8XrU?s`1jBZ*$J)ODIPn$*i3}50^>J zH%)2a-&9+}lKNVZq=ch&c!XbV+iq$~c&*@AXD3g;w+BNcmSLIQ#+@sdo92#8A%FlL z*th{X2>~=A_{Gk*INjYdt??^-|4(0fg*J~j=^|QRQ%z|}iFvNltVn!Wa}&$U%aWE% zPx=FV@7dooXhJKsYXQ1p@Q1zo`R&0Y$v2y1nOoMaAwMT)Y7qdSs-&1Zmn}}pV1(e= zqsMr`t^V7fOy`iC`G82--eM=WoWb*fxP5p{fV^tN8thgQ_$&h56 z3x@cgPe04f!$;$nA3j1W-!Ql^G|ay|^DNICJAp2wr1EOa&*%P4H>Tb2YElSbw_5q@ z+is@b=}hhlB#HgQBRu}IU-Immy9k8C9|`5_y3Vn#ZodB0pYx+V`-qC( zQ<_aLCyf9Ajn!3r^RI5hKF}0~+16tWsF6P_I0QN;JP)eo!d;YD>qhOxJvW;lf4&s@txf~bKo$? zFQvZYd>^MI@ppIJ%95tW346u~E6UHUspdP6eUi`r>{qm=a3;{J>pXq7ovj_`Syxrb z{Yw|Idfr?bN=tFrtdsKX;Y`xHXjJ2(&&$EH?QA=Em=}(pqQf7+z!&U_7uwzwX{fRI2C=@0r`O>H6HC@LaR`CUcjQD(3@3R_F!yuea z(`X?v(aTU4f=x5Z`KNpCV9D&66B_Vkl>nDkWo2Oj-@N~B)-^ZsgE!vfjov;2AHn?q zAq0&%4!*E_2@l?|n##h0tUQO3jY(~a!ls4uSv0eOZAV*qVgDgs?(I)_r0iOOECh@5 zT--Nj7Wc1NMN@g%gjD#ZGyyK5IM>N1R;}R9#f#Y2(ZS365Ajw<7l#AE4+d9P^J)i5 z6ovK0h1|AmF?TPVN0G}FyWW;%C|MVd5ac=RY?|B5n#S3rs#@wQi=i+f zP2=3Cm!KAlBQ(V2%O9BvNEVl_~UIen$LREDYWqEnAva=+pEi9nST!L3P=-lXe-zj{Eyt@C zTjM$$(+VUbfa-R;w*yC~WqH-%h}-RcBOb%)=@7sGB2PZ~WB~YkATTY{s|Eq!@1K0~ zNq?LGV_JYQBbc2#cd~KgMgZeafBKVWX(Qd_bh7r6ny3 zaM=w2-p!jgZv!3yTBl_^Wzh;evU&67*W=1p6Pf=ja-k1LOG}H0XA3!iD>pYc?`vQC z+Ks@Sz(SyW+A3r<&mRDe0I#^+?j27)`J^YV`~VOgEBYTd0j?l{6>!AKV2}S<2E?>3 zvH~NX=BYp^uJmC1&qF>K8`9a}vk) z{;|F5ouBk6BzR|czxnOVd^6*30S1G?U@#aA27_TP2s)9$P!1{tX+)lP-9c3HFp4r2 zZ;=?+4B$HePo>{^6mC3~bkQRHZpnpJ764cQ{1LzePr7c$LrF(gElD5%umL#26Kt6A z7fEMAHpEH| z-_$Dq!Gj0bzJ0r?9=m8Xit6fWOioS~`cldz|G$(fACPks-_z4$I^_ev_U+rz)6=7u z%PE`%2!%p$I2@*QzTt2fPN!237GM>?Vk!%ea{>?%%nU&gbWH$`@_C8CFf**h5^)a> z4k8c;ARG=O6bdDN0)W%$gu~%T{H&>|!O^2fO&OfZi5g1*Y=g?$bgmE#2C1*FkD8jA z$Y!(2zAl^1Mompk)YsQX!C)|F*NMXS25ggbDHH_(g25npyoapDBUVlgH_J_!(u#puwXL%Qj*J#^@h zViGU`6hIG8ekx1A1jqvcd_JFU`|Xv)1ajvh6bg~w?=F*7rx`yBbq%nW*ad-HOx z#>Pf-)B=LRU`{i9xyTr1n>JP(5SzjRT)uo6u~^J7m9khYhRc^P7fsb~tH0-^BPbLK zp|Y|PtE;Q(Yui>U+-^4x9z2Meni|y9)BpeifdB%507gegF*G!Um6a9M=dxHVn3|f( z*z%R!5u~I$N`sD~v>ibOcL9BUeVUl%J$v@h{rmSbp6~ws`?P1z9!<{K*Vkuw7f^5l zG&MD;k}n7XwYRs^{QP{@lR7^?PwnmPBnX14b2l|LF#*&NAQFivYUW5D?d|P~^YrcQ z?W)dgv)L#Ti7)|_65!gkYpTt@oF_k(B~a@Qu3fvvs{o}41Olo8zN=TSqO`Ph)Bg<( z4WYHQ6=h{**tKgHjvqgcAAa~@)8|S{OL6t;RamXog4~1Ydje0MJgHdjv17+l%KYMs zFH-vUboKpX$Brq!j*}-(vIS6zwXR(ySX<&HV|aKNmo8mOx!j7!A(-6=^RiXytZyHQ_XpB0&MVF3VOYHA9dot+#65)t+G_9~WZ zwOY3<{)~)_P+MCYIh{^&I-S(k)EBU=`StX8Yy>$q^?g6tr!q@;wVrlvR*+~41C z_*8Izf4?FHe){RBOn_i8sQOEug)9bHtyY?yomHg3($Z3zo}T7%u-ol6Y&p20p+S`b zySuxY0N;G`jbR%?zWnk_RSJCXz4r=EfP%M#EiNv?;c#Gfc2;%dn$MOno6UxaiHVFW znRG2(R;v{=Gc##-Dk=JwFe0LlKmOQoZ{;|D{=6nZ+>IMI%R+<$m8)Smh;LhuTVG~)~uRWS69a_U=4vl zKvh;Q)!4mzH(kGeJ#mh)u`$J8Kov!iZr{GGX*sv5s)`Aaj7yg;Y3ApBJ|8VCEUc5? z(9ob*=9Mc~G_U7x+qR7fkc_3JC2DPLRrM9_vuDqy%(7j-eqFKL=H_OK$Ky=KKS4R+2?9(Y)tt1jaXP%pxwK7E4qi4mKJ*c{CQ5AI@twmfp|PlpMCaOR_Cay zs#@pgwcL5+!w)}H)XK#{phnxoUAb~4t)K7d>DlDxH)48vnkp(PWMBKmix(A{eK`tj zYinZyq{GO_$fmsmL{TKK*PB%}jfm*%*|V~)xvHv)hK7dnvQcEA6G6Hrz}(y%RaRE6 zlXv*=VHzJF&sv6@WuMJvqt4DwRr>7t$KYut~MjeuAPW!1v#OzfR7bJ9lKu$h7RMt*xc6zy6w@J$pvELb~(U*Vh-k z9IV?HMhp!NCI0R4cyQ#%5n0DCE-tRCFTDQx>v-p#cd&o|e(c}BA8)<&7G8bz)q>um z+wC@YQ)oK0w6r8-3=R&;KE9`?XWiCrnM`fIEkH?02|arBh&zI|g57RU$dFTfNww_D zW-FI`6X4vrbKDe~D*|}E-o&wc_wJ>Yl@(nPz+$n`!-o%<0O`=&+^on2jE|46TlUGV z-sOV;r%s*H&6h)UOMtGfu7nJa$CLGOhYuf49QXeF?^B_%aX##JJN^3WuS|eUxO?}m z>}BAM8#mSkSrZczx*~ue2z2Y#Elm?iMV$ybbLPyt@Aao6!JRvI$l-7#KHt&NL3%*) zTqwCFQxhN(iO{ZHyVl9`csw*XI7s1en8M*O4Gs=&YVoq$?V7&%ODh5_EiEwtlw<@q zk|5ovtgNITfBcd30=08tdIGFjf@F7)u2+9y%WGtua6%d9>%R(w=gy~hVk)n z0KkC*2XNrP0l3|6y!-CE`b(+me6wgn5x|JhI|2Ch@g@fofC<200^|_Ix|62dd(ZS{ zk)kEQ-Me>9OMv8iudS^$CjmM;I}wdWO{e^5G`em(xVpMJW367aN(2EQm&-+dzdz;v zzQu-AuYPs8T#EY+4W9|*0lInfX3pBmnE*N-E|*J{@=e_pY*aX%PSn=cqOPtE7cN{t zd3m`pGnjg@0BUgb=+T6n*Is)qV?Tk@>C|Kc%6xsVz!WY(4IV#!yy+zp+4d7;dL0}S zzyJgwBD#0)UeWXuFab>7PXHtK1E>Y}6BxW7Ku-iPWHiqG01QLd0vJpH1`|LzxSzn} z1mJ#x+^2kXy$W!-TzK%{LE4up6eFV1D5|TgF*!MD?p46#;SORat-%yr>rb28NMQ4qyeqk`fCb@cbDbg3=&xjV;f34h@TE8+4g90oDo$RscWo zJQ@~1NjjvhNRW*M_?G9ID91OZ#kU>uw)RjcHmP0{{`UYc{K$70pPZ@gkMra07#~T0Q?8QD1ds&Eim+l zX#jr*a8p_VENo@^<*f4sDUw`^2YwIWIDl3Fe_}G|VyX8p00RKNldSbK$?vZq!~24> zP4ozowRlM)!pnHkYqkw9GKO4ME)3$5iGMDQ1pqO;$osEmQobAltbJCLh+xD2Q^g`U zV^}DVM1r+c@3N%$cs9z1Ld6M5WDqtCMt+r_JmN@`@X?Y0xsbt7M+63g!C){L3|aUe XvbZLKwJhH#00000NkvXXu0mjf{e95N literal 0 HcmV?d00001 diff --git a/.linux_items/include/EFI/boot/icons/1201_mac-dgpu.png b/.linux_items/include/EFI/boot/icons/1201_mac-dgpu.png new file mode 100644 index 0000000000000000000000000000000000000000..e9770abd1ba2487b1e3d08e9a643004f94d019c3 GIT binary patch literal 3086 zcmV+p4Ds`cP)Tvy7{wCK`mp%wa=cJ5>U=$&R3OXpGM z&Y8LAo7|+G%$>*nxBwb z4BQ{8JP-;11=u3fGGVnf$j6AY0JjCm05D&s+Kt+$ewm&ekjOF4Y_FfA=D zBHiK;kZolF+T~0R6#=CA!3pMevuxQicI?=}qD6}^O%p{?Fin#mfBaE6MngpacL?)k zi(eo?6otaVLdwd@n3$MAQIzS=gW(Xgh0wJ8G$V}w5&+=(>#wJ#riS$NbS5V!|IhSb zUA%ZvQ~-=fBS1J+L`Uf9r=Mocnl+ea=suUTXU`^HmL@H}ysE0I$j!|S%Y1;7Cr=8S zgGm4)kjLX;-@bk1l6#XP|YeZoJ#;{kZ+p@$+q z=iIq-l$4Yt#q&EJfWpGUh`v8OJj}xnKb$nr?`QxrGBWV_d|_AjdU|@;ym@nS)qtD~ zz`S|$!v1bULjzS+RmoQcb}|4Sk0<0?-{0R)MMVXjot;UU295^c(q`X4zrV-hp|`h} z{rmUR)YO#JY2au8d_Et#uH*On(KLYP-%jc;~%`_cBYW9+} zs$!aE*dvE*)*k>Jm>|MIp+aiy+O@1$v4UG}xrMZ}wCN^Xzu(WVzy3;ldpnJdjp(`_ zlk4Am@4XZi6>;sg*Wz}&al75PTrLd5z%UGST}RV2Mn^|!Yir}cfddQ=56cJ;td(Y2tFZICbh2pMU;2 zpMLsj*ypZVwThymB37iRR?%eUWtOLcWM-QC?1fSKg=dU@=z$5^vw%@zG! z(=_pVy&O1jfVQ@_8LM@R7A@kAJMLi9rcHP}o;jO7+r2b5H&aiju1R$W>Zo7?& ziVFOGe@w4qnkH#!X&gOzl>YvH($mwq{r1~uob40KdjQzJeLFopJraPOJ9n~i<3?K& zU$h!Td3ibQ?d{G5prWFJB}ebTuAnCf!d+)uM`~YNU zXR~|vZbygxnbh6g%>xfSko*9=^2#eQYpP9DwYIjhbLUPpO|$j7w)X|BU%#G(3l~bq zgYy2my1KYcF0s8Dc<9ifkOMKCWPWXJEp>HuvAm2p)xgc0H;cNCPF&2dudk1_`C^p; z)~#D73w}WbzM7hvxZj6u0OaTAla-YvooA|xc=ztzLfngO06hBWqfyPkNk+Z)+G~uA zj5rH`8*jW(hJRpUVuCNe_(GWbu?2v6^X75&)mO_`A9&-9H-w6Wwg9kU!v@*#1B{Q4 z$Fkd3TmaUuUoWeDrfKIeFmV7-Rh5j4495eYC<^bt|GqN;aJgKL2f#24A=eU&IRGw~ zE2`yJl1&2x147IB`O{Z|R5#aRFxJ$h6+A5<22^2sNi1wda!olRwBr85Bd;DZljIba3|^7Hd~_uY5nRx_{-fZu-mjlsb|>G}*1+;GDUG&VMp zlarIY004ad{r55(xC{g?my6okT8fK{Z5>5zD*%TM9g=Q`0Ab6PEi^SXv2x|gU_9$BrG7i$>0%ufP7<)|td{1HkY1vuDp9>G&mYzujpP*OeO%A3iL{ z3kK<%Z@#g8{lK^{-SN^(FG=SCP1EACdT87M`0A^#=r+_S-^adBSZUA9y<&8X8DVO-)Jwe*XDqwr<^O*X0st`}km`rl!)^ z*qC(7%xap(#*G{8+#fJ;$^gNdn3!PKu3bq5fN7d++O)~`%^?%23=pjD?rzG<%VRd7 z#5BzrkC^1Oio%W^JA~OQXga$U{jF(lZ%0uS%F4>-{N|XZNlHozr%s)sv$K;kXU_1; zFTYH$C>l$OW)bb04WwALLj?j$r4_D z^;O(%cSMGmrishtqNk^a=H_NT`Q($Zm#oRm%%r%um^<&hGpaR@P19s>aF8dSc!K`^ z{&*$b9{>%QjIa(=>cOA9Zzg?BBotieKC7^|EW%E(!_?@OV6^s*0+r)4=)tewv$`*}HeI2uXDj z$g#}#M*;vA09OI^K%t1`165T?PfsT+D+`~`$Kc=~nx@&ZE}^0*(}&ybM%Q%=!-#1? zG77Z<{{TiU03s>`2A<+$Q2{UvgOQPuxRk7ejTU$rypJ#Ol1L(e3V5yX-vKN{Dv@*+ z_zQ3W7zd0<+W|}~Y-qrCnVt!!?UsN3*&;xw7M8$?=Ycc8UuC)`g#HP%SXKDRxd4C_ zI!vGkI1UtuRx6O2RzI)}IAYZRe3uLT;gkV_zvB)n4`c%O14Tf-gh7a^-oJr^K!X*n zFIxG&Hrv}DE&ze=xtQu9^jgPN){%nXeF{k|!wT`E*5L!jnCkh{Lzy250DL};3{{R3007*qoM6N<$f`+B;Bme*a literal 0 HcmV?d00001 diff --git a/.linux_items/include/EFI/boot/refind.conf b/.linux_items/include/EFI/boot/refind.conf index de83e78c..8a5cb3e2 100644 --- a/.linux_items/include/EFI/boot/refind.conf +++ b/.linux_items/include/EFI/boot/refind.conf @@ -37,3 +37,18 @@ menuentry "Linux" { #UFD# icon /EFI/boot/icons/wk_win.png #UFD# loader /EFI/microsoft/bootx64.efi #UFD#} +#UFD#menuentry "ESET SysRescue Live" { +#UFD# icon /EFI/boot/icons/1201_eset.png +#UFD# loader /EFI/ESET/grubx64.efi +#UFD#} +#UFD#menuentry "HDClone" { +#UFD# icon /EFI/boot/icons/1201_hdclone.png +#UFD# loader /EFI/HDClone/grub.efi +#UFD#} +#UFD#menuentry "Mac dGPU Disable Tool" { +#UFD# icon /EFI/boot/icons/1201_mac-dgpu.png +#UFD# loader /dgpu/boot/x86_64/vmlinuz +#UFD# initrd /dgpu/boot/intel_ucode.img +#UFD# initrd /dgpu/boot/x86_64/archiso.img +#UFD# options "archisobasedir=dgpu archisolabel=1201_UFD nomodeset" +#UFD#} diff --git a/.linux_items/include/syslinux/1201_eset.cfg b/.linux_items/include/syslinux/1201_eset.cfg new file mode 100644 index 00000000..59f2de32 --- /dev/null +++ b/.linux_items/include/syslinux/1201_eset.cfg @@ -0,0 +1,9 @@ +LABEL eset +TEXT HELP +ESET SysRescue Live + * Offline AV scanner +ENDTEXT +MENU LABEL ESET SysRescue Live +LINUX ../casper/vmlinuz +INITRD ../casper/initrd.lz +APPEND boot=casper live-media=/dev/disk/by-label/1201_UFD splash diff --git a/.linux_items/include/syslinux/1201_hdclone.cfg b/.linux_items/include/syslinux/1201_hdclone.cfg new file mode 100644 index 00000000..a97b3db9 --- /dev/null +++ b/.linux_items/include/syslinux/1201_hdclone.cfg @@ -0,0 +1,9 @@ +LABEL hdclone +TEXT HELP +HDClone by Miray Software + * Backups, cloning, etc +ENDTEXT +MENU LABEL HDClone 6 +LINUX boot/syslinux/memdisk +INITRD ../sources/hdclone.iso +APPEND iso diff --git a/.linux_items/include/syslinux/wk.cfg b/.linux_items/include/syslinux/wk.cfg index b9163e25..14e95ca2 100644 --- a/.linux_items/include/syslinux/wk.cfg +++ b/.linux_items/include/syslinux/wk.cfg @@ -8,4 +8,4 @@ LABEL pxe CONFIG boot/syslinux/wk_pxe.cfg LABEL sys -CONFIG boot/syslinux/wk_sys.cfg +CONFIG boot/syslinux/wk_sys_extras.cfg diff --git a/.linux_items/include/syslinux/wk_head.cfg b/.linux_items/include/syslinux/wk_head.cfg index 7562755a..d2f1ee9f 100644 --- a/.linux_items/include/syslinux/wk_head.cfg +++ b/.linux_items/include/syslinux/wk_head.cfg @@ -15,15 +15,15 @@ MENU TABMSG # Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu -MENU COLOR screen 30;44 #a0000000 #a0000000 none -MENU COLOR border 30;44 #a0000000 #a0000000 none -MENU COLOR title 1;36;44 #9033ccff #a0000000 none +MENU COLOR screen 30;41 #a0000000 #a0000000 none +MENU COLOR border 30;41 #a0000000 #a0000000 none +MENU COLOR title 1;35;41 #90ff6666 #a0000000 none MENU COLOR sel 7;37;40 #e0ffffff #a0000000 std -MENU COLOR disabled 37;44 #50ffffff #a0000000 none -MENU COLOR unsel 37;44 #50ffffff #a0000000 none +MENU COLOR disabled 37;41 #50ffffff #a0000000 none +MENU COLOR unsel 37;41 #50ffffff #a0000000 none MENU COLOR help 37;40 #c0ffffff #a0000000 none -MENU COLOR tabmsg 30;44 #a0000000 #a0000000 none -menu color cmdmark 1;36;44 #9033ccff #a0000000 none +MENU COLOR tabmsg 30;41 #a0000000 #a0000000 none +menu color cmdmark 1;35;41 #90ff6666 #a0000000 none menu color cmdline 37;40 #c0ffffff #a0000000 none MENU COLOR timeout_msg 37;40 #80ffffff #a0000000 none MENU COLOR timeout 1;37;40 #c0ffffff #a0000000 none diff --git a/.linux_items/include/syslinux/wk_sys.cfg b/.linux_items/include/syslinux/wk_sys.cfg index 0d375cf3..e8d1393c 100644 --- a/.linux_items/include/syslinux/wk_sys.cfg +++ b/.linux_items/include/syslinux/wk_sys.cfg @@ -2,6 +2,8 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg #UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg -INCLUDE boot/syslinux/wk_sys_extras_entry.cfg +#UFD#INCLUDE boot/syslinux/1201_hdclone.cfg +#UFD#INCLUDE boot/syslinux/1201_eset.cfg +INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys_extras.cfg b/.linux_items/include/syslinux/wk_sys_extras.cfg index 3e5af215..9d77c1d8 100644 --- a/.linux_items/include/syslinux/wk_sys_extras.cfg +++ b/.linux_items/include/syslinux/wk_sys_extras.cfg @@ -3,6 +3,8 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg INCLUDE boot/syslinux/wk_sys_linux_extras.cfg #UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg +#UFD#INCLUDE boot/syslinux/1201_hdclone.cfg +#UFD#INCLUDE boot/syslinux/1201_eset.cfg INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg From 08e8396c27bdf7243768d835bf2bcb2b38555103 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 26 Sep 2018 13:51:29 -0600 Subject: [PATCH 206/293] Updated WiFi creds --- .bin/Scripts/settings/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 13ed594b..3810066a 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -32,8 +32,8 @@ QUICKBOOKS_SERVER_IP='10.11.1.20' LINUX_TIME_ZONE='America/Los_Angeles' # See 'timedatectl list-timezones' for valid values WINDOWS_TIME_ZONE='Pacific Standard Time' # See 'tzutil /l' for valid values # WiFi -WIFI_SSID='1201 Computers' -WIFI_PASSWORD='12011201' +WIFI_SSID='1201Computers' +WIFI_PASSWORD='justintime!' # SERVER VARIABLES ## NOTE: Windows can only use one user per server. This means that if From 7da01be7ab2c6bdf1075882f4a53e040980bd624 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 26 Sep 2018 16:16:58 -0600 Subject: [PATCH 207/293] Removed inxi --- .linux_items/include/airootfs/etc/skel/.aliases | 1 - .linux_items/packages/aur | 1 - .linux_items/packages/live_add | 1 - README.md | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.linux_items/include/airootfs/etc/skel/.aliases b/.linux_items/include/airootfs/etc/skel/.aliases index bf7507bc..d6486258 100644 --- a/.linux_items/include/airootfs/etc/skel/.aliases +++ b/.linux_items/include/airootfs/etc/skel/.aliases @@ -10,7 +10,6 @@ alias du='du -sch --apparent-size' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' alias hexedit='hexedit --color' alias hw-info='sudo hw-info | less -S' -alias inxi='echo -e "\e[33mWARNING: inxi is being replaced and will be removed in a future WizardKit release\e[0m"; echo -e " \e[32mReplacements include:\e[0m 'hw-drive-info', 'hw-info', & 'hw-sensors'"; echo ""; inxi' alias less='less -S' alias ls='ls --color=auto' alias mkdir='mkdir -p' diff --git a/.linux_items/packages/aur b/.linux_items/packages/aur index 11874fa5..326ca732 100644 --- a/.linux_items/packages/aur +++ b/.linux_items/packages/aur @@ -2,7 +2,6 @@ aic94xx-firmware bash-pipes hfsprogs i3lock-fancy-git -inxi mprime nvme-cli openbox-patched diff --git a/.linux_items/packages/live_add b/.linux_items/packages/live_add index ea784699..4a7245b4 100644 --- a/.linux_items/packages/live_add +++ b/.linux_items/packages/live_add @@ -34,7 +34,6 @@ htop i3-gaps i3lock-fancy-git i3status -inxi ldns leafpad lha diff --git a/README.md b/README.md index 37c7f431..84e9a6cb 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ There's a `build-ufd` script which does the following: * Mount the device(s) or network share(s) that contain the Linux ISO, WinPE ISO, and Main Kit folder. * Connect the UFD but don't mount it. * Get the device name of the UFD. - * You can use $ `inxi -Dxx` or $ `lsblk --fs` to help. + * You can use $ `hw-drive-info` to help. * $ `sudo build-ufd --ufd-device [device] --linux-iso [path] --main-kit [path] --winpe-iso [path]` * **2nd Warning**: All data will be erased from the UFD resulting in **DATA LOSS**. * NOTE: The Main Kit folder will be renamed on the UFD using `$KIT_NAME_FULL` From cd1017b5221298ca4764de2e7bd79a124657c524 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 26 Sep 2018 18:03:12 -0600 Subject: [PATCH 208/293] Removed typo'd linebreak --- .linux_items/include/airootfs/etc/skel/.ssh/known_hosts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts b/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts index b2cbbaee..70ddf9f2 100644 --- a/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts +++ b/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts @@ -1,2 +1 @@ -osticket.1201.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWO -fJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4= +osticket.1201.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWOfJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4= From 26eadebf2188a0f8541aa889200091bddaf67b2a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 27 Sep 2018 13:13:42 -0600 Subject: [PATCH 209/293] ddrescue-tui: Support devices with '/' in the name --- .bin/Scripts/functions/ddrescue.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index cf518ea0..4af88e84 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -219,6 +219,7 @@ class DevObj(BaseObj): sep='_' if self.label else '', c_label=self.label) self.prefix = self.prefix.strip().replace(' ', '_') + self.prefix = self.prefix.strip().replace('/', '_') class DirObj(BaseObj): From c43ba34cbf94633c0e228da956ce355b1b0c5e53 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 27 Sep 2018 21:00:00 -0600 Subject: [PATCH 210/293] Differentiate between not-run and unknown results --- .bin/Scripts/functions/hw_diags.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index b492c22f..d2282692 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -170,7 +170,7 @@ def get_smart_value(smart_data, smart_id): def get_status_color(s): """Get color based on status, returns str.""" color = COLORS['CLEAR'] - if s in ['Denied', 'NS', 'OVERRIDE']: + if s in ['Denied', 'ERROR', 'NS', 'OVERRIDE']: color = COLORS['RED'] elif s in ['Aborted', 'Unknown', 'Working', 'Skipped']: color = COLORS['YELLOW'] @@ -364,10 +364,10 @@ def run_iobenchmark(): dev_size = int(dev_size) except: # Failed to get dev size, requires manual testing instead - TESTS['iobenchmark']['Status'][name] = 'Unknown' + TESTS['iobenchmark']['Status'][name] = 'ERROR' continue if dev_size < IO_VARS['Minimum Dev Size']: - TESTS['iobenchmark']['Status'][name] = 'Unknown' + TESTS['iobenchmark']['Status'][name] = 'ERROR' continue # Calculate dd values From 79b64e4f23d3cee25198622ddc2701e49bb65864 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 27 Sep 2018 23:00:17 -0600 Subject: [PATCH 211/293] (re)disable root logins (again) --- Build Linux | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Build Linux b/Build Linux index ec136c6e..56233d51 100755 --- a/Build Linux +++ b/Build Linux @@ -229,7 +229,8 @@ function update_live_env() { ssh-keygen -b 4096 -C "$username@$hostname" -N "" -f "$SKEL_DIR/.ssh/id_rsa" echo 'rm /root/.ssh/id*' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'rm /root/.zlogin' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - sed -i -r 's/^(.*PermitRootLogin.*)$/PermitRootLogin no/' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + sed -i -r '/.*PermitRootLogin.*/d' "$LIVE_DIR/airootfs/root/customize_airootfs.sh" + echo "sed -i -r '/.*PermitRootLogin.*/d' /etc/ssh/sshd_config" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" cp "$ROOT_DIR/.linux_items/authorized_keys" "$SKEL_DIR/.ssh/authorized_keys" # Root user From 1e6f486865af85d850f2d6eac97b979e8b27eefb Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 27 Sep 2018 23:10:30 -0600 Subject: [PATCH 212/293] Adjusted X startup sequence * Moved most X startup logic to ~/.update_x * This is called by both i3 and openbox * Network logic moved to .zlogin * This avoids a bug where apps can no longer connect to the $DISPLAY --- .../airootfs/etc/skel/.config/i3/config | 2 + .../etc/skel/.config/openbox/autostart | 21 +---- .../include/airootfs/etc/skel/.update_network | 22 +++++ .../include/airootfs/etc/skel/.update_x | 94 +++++++++++++++++++ .../include/airootfs/etc/skel/.xinitrc | 14 +-- .../include/airootfs/etc/skel/.zlogin | 4 +- 6 files changed, 124 insertions(+), 33 deletions(-) mode change 100644 => 100755 .linux_items/include/airootfs/etc/skel/.config/openbox/autostart create mode 100755 .linux_items/include/airootfs/etc/skel/.update_network create mode 100755 .linux_items/include/airootfs/etc/skel/.update_x diff --git a/.linux_items/include/airootfs/etc/skel/.config/i3/config b/.linux_items/include/airootfs/etc/skel/.config/i3/config index cf09a2ca..ca1a5439 100644 --- a/.linux_items/include/airootfs/etc/skel/.config/i3/config +++ b/.linux_items/include/airootfs/etc/skel/.config/i3/config @@ -319,3 +319,5 @@ bar { status_command i3status height 26 } + +exec --no-startup-id /home/tech/.update_x diff --git a/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart b/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart old mode 100644 new mode 100755 index 6eaa6cc3..13b9088c --- a/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart +++ b/.linux_items/include/airootfs/etc/skel/.config/openbox/autostart @@ -1,20 +1,3 @@ -# -# These things are run when an Openbox X Session is started. -# You may place a similar script in $HOME/.config/openbox/autostart -# to run user-specific things. -# +#openbox-autostart -# If you want to use GNOME config tools... -# -#if test -x /usr/lib/openbox/gnome-settings-daemon >/dev/null; then -# /usr/lib/openbox/gnome-settings-daemon & -#elif which gnome-settings-daemon >/dev/null 2>&1; then -# gnome-settings-daemon & -#fi - -# If you want to use XFCE config tools... -# -#xfce-mcs-manager & - -tint2 & -cbatticon --hide-notification & +$HOME/.update_x & diff --git a/.linux_items/include/airootfs/etc/skel/.update_network b/.linux_items/include/airootfs/etc/skel/.update_network new file mode 100755 index 00000000..97b5783b --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.update_network @@ -0,0 +1,22 @@ +## .update_network ## +#!/bin/env bash +# +## Connect to network and update hostname + +# Connect +connect-to-network + +IP="$(ip a show scope global \ + | grep inet \ + | head -1 \ + | sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')" +HOSTNAME="$(dig +noall +answer +short -x "$IP" \ + | grep -v ';' \ + | head -1 \ + | sed 's/\.$//')" + +# Set hostname +if [[ "${HOSTNAME:+x}" ]]; then + sudo hostnamectl set-hostname "${HOSTNAME}" +fi + diff --git a/.linux_items/include/airootfs/etc/skel/.update_x b/.linux_items/include/airootfs/etc/skel/.update_x new file mode 100755 index 00000000..4763a175 --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.update_x @@ -0,0 +1,94 @@ +#!/bin/env bash +# +## Calculate DPI, update settings if necessary, then start desktop apps + +REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$' +REGEX_URXVT='(URxvt.geometry:\s+).*' + +# Get screen data +xrandr_str="$(xrandr | grep mm | head -1)" +width_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\1/")" +height_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\2/")" +width_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\3/")" +height_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\4/")" + +# Convert to in +width_in="$(echo "${width_mm} * 0.03937" | bc)" +height_in="$(echo "${height_mm} * 0.03937" | bc)" + +# Calculate diagonals +diag_px="$(echo "sqrt(${width_px}^2 + ${height_px}^2)" | bc)" +diag_in="$(echo "sqrt(${width_in}^2 + ${height_in}^2)" | bc)" + +# Calculate DPI +dpi="$(echo "${diag_px} / ${diag_in}" | bc 2>/dev/null || True)" +dpi="${dpi:-0}" + +# Calculate URxvt default window size +width_urxvt="$(echo "${width_px} * 112/1280" | bc)" +height_urxvt="$(echo "${height_px} * 33/720" | bc)" +offset_urxvt="24" + +# Update settings if necessary +if [[ "${dpi}" -ge 192 ]]; then + # Conky + sed -i 's/minimum_size 180 0/minimum_size 360 0/' "${HOME}/.conkyrc" + sed -i 's/maximum_width 180/maximum_width 360/' "${HOME}/.conkyrc" + sed -i 's/gap_x 20/gap_x 40/' "${HOME}/.conkyrc" + sed -i 's/gap_y 24/gap_y 48/' "${HOME}/.conkyrc" + + # Fonts + sed -i 's/!Xft.dpi: 192/Xft.dpi: 192/' "${HOME}/.Xresources" + + # GDK + export GDK_SCALE=2 + export GDK_DPI_SCALE=0.5 + + # i3 + sed -i -r 's/(height\s+) 26/\1 52/' "${HOME}/.config/i3/config" + + # Tint2 + sed -i 's/panel_size = 100% 30/panel_size = 100% 60/' \ + "${HOME}/.config/tint2/tint2rc" + sed -i 's/Inconsolata 10/Inconsolata 20/g' \ + "${HOME}/.config/tint2/tint2rc" + sed -i 's/Inconsolata 12/Inconsolata 24/g' \ + "${HOME}/.config/tint2/tint2rc" + sed -i 's/systray_icon_size = 24/systray_icon_size = 48/' \ + "${HOME}/.config/tint2/tint2rc" + + # URxvt + width_urxvt="$(echo "${width_urxvt} / 2" | bc)" + height_urxvt="$(echo "${height_urxvt} / 2" | bc)" + offset_urxvt="$(echo "${offset_urxvt} * 2" | bc)" +fi + +# Update URxvt (Always) +urxvt_geometry="${width_urxvt}x${height_urxvt}+${offset_urxvt}+${offset_urxvt}" +sed -i -r "s/${REGEX_URXVT}/\1${urxvt_geometry}/" "${HOME}/.Xresources" + +# Update X +xset s off +xset -dpms +xrdb -merge $HOME/.Xresources + +# Start common desktop apps +feh --bg-fill "$HOME/.wallpaper" +compton --backend xrender --xrender-sync --xrender-sync-fence & +sleep 1s +x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared & +conky & +nm-applet & +volumeicon & + +# Start WM specific apps +if fgrep -q "i3" /proc/cmdline; then + # i3 + i3-msg restart +else + # openbox + openbox --restart + tint2 & + cbatticon --hide-notification & +fi + diff --git a/.linux_items/include/airootfs/etc/skel/.xinitrc b/.linux_items/include/airootfs/etc/skel/.xinitrc index abb71f45..7085a4df 100755 --- a/.linux_items/include/airootfs/etc/skel/.xinitrc +++ b/.linux_items/include/airootfs/etc/skel/.xinitrc @@ -1,19 +1,7 @@ #!/bin/sh dbus-update-activation-environment --systemd DISPLAY -$HOME/.update_dpi_settings -xrdb -merge $HOME/.Xresources -xset s off -xset -dpms eval $(ssh-agent) export SSH_AUTH_SOCK -compton --backend xrender --xrender-sync --xrender-sync-fence & -sleep 1s -conky -d -nm-applet & -volumeicon & -connect-to-network & -$HOME/.update_hostname & -feh --bg-fill "$HOME/.wallpaper" & -x0vncserver -display :0 -passwordfile $HOME/.vnc/passwd -AlwaysShared & exec openbox-session + diff --git a/.linux_items/include/airootfs/etc/skel/.zlogin b/.linux_items/include/airootfs/etc/skel/.zlogin index 0898d1e2..338a8198 100644 --- a/.linux_items/include/airootfs/etc/skel/.zlogin +++ b/.linux_items/include/airootfs/etc/skel/.zlogin @@ -1,5 +1,8 @@ setterm -blank 0 -powerdown 0 if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then + # Connect to network and update hostname + $HOME/.update_network + # Update settings if using i3 if fgrep -q "i3" /proc/cmdline; then sed -i -r 's/#(own_window_type override)/\1/' ~/.conkyrc @@ -16,4 +19,3 @@ if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then hw-diags cli fi fi - From 10f1982c23f28014820c3fe7272418f0e5e22a50 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 11:43:02 -0600 Subject: [PATCH 213/293] Removed unused startup scripts --- .../airootfs/etc/skel/.update_dpi_settings | 68 ------------------- .../airootfs/etc/skel/.update_hostname | 16 ----- 2 files changed, 84 deletions(-) delete mode 100755 .linux_items/include/airootfs/etc/skel/.update_dpi_settings delete mode 100755 .linux_items/include/airootfs/etc/skel/.update_hostname diff --git a/.linux_items/include/airootfs/etc/skel/.update_dpi_settings b/.linux_items/include/airootfs/etc/skel/.update_dpi_settings deleted file mode 100755 index 2287508c..00000000 --- a/.linux_items/include/airootfs/etc/skel/.update_dpi_settings +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/env bash -# -## Calculate DPI and adjust display settings if necesary - -REGEX_XRANDR='^.* ([0-9]+)x([0-9]+)\+[0-9]+\+[0-9]+.* ([0-9]+)mm x ([0-9]+)mm.*$' -REGEX_URXVT='(URxvt.geometry:\s+).*' - -# Get screen data -xrandr_str="$(xrandr | grep mm | head -1)" -width_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\1/")" -height_px="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\2/")" -width_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\3/")" -height_mm="$(echo "${xrandr_str}" | sed -r "s/${REGEX_XRANDR}/\4/")" - -# Convert to in -width_in="$(echo "${width_mm} * 0.03937" | bc)" -height_in="$(echo "${height_mm} * 0.03937" | bc)" - -# Calculate diagonals -diag_px="$(echo "sqrt(${width_px}^2 + ${height_px}^2)" | bc)" -diag_in="$(echo "sqrt(${width_in}^2 + ${height_in}^2)" | bc)" - -# Calculate DPI -dpi="$(echo "${diag_px} / ${diag_in}" | bc 2>/dev/null || True)" -dpi="${dpi:-0}" - -# Calculate URxvt default window size -width_urxvt="$(echo "${width_px} * 112/1280" | bc)" -height_urxvt="$(echo "${height_px} * 33/720" | bc)" -offset_urxvt="24" - -# Update settings if necessary -if [[ "${dpi}" -ge 192 ]]; then - # Conky - sed -i 's/minimum_size 180 0/minimum_size 360 0/' "${HOME}/.conkyrc" - sed -i 's/maximum_width 180/maximum_width 360/' "${HOME}/.conkyrc" - sed -i 's/gap_x 20/gap_x 40/' "${HOME}/.conkyrc" - sed -i 's/gap_y 24/gap_y 48/' "${HOME}/.conkyrc" - - # Fonts - sed -i 's/!Xft.dpi: 192/Xft.dpi: 192/' "${HOME}/.Xresources" - - # GDK - export GDK_SCALE=2 - export GDK_DPI_SCALE=0.5 - - # i3 - sed -i -r 's/(height\s+) 26/\1 52/' "${HOME}/.config/i3/config" - - # Tint2 - sed -i 's/panel_size = 100% 30/panel_size = 100% 60/' \ - "${HOME}/.config/tint2/tint2rc" - sed -i 's/Inconsolata 10/Inconsolata 20/g' \ - "${HOME}/.config/tint2/tint2rc" - sed -i 's/Inconsolata 12/Inconsolata 24/g' \ - "${HOME}/.config/tint2/tint2rc" - sed -i 's/systray_icon_size = 24/systray_icon_size = 48/' \ - "${HOME}/.config/tint2/tint2rc" - - # URxvt - width_urxvt="$(echo "${width_urxvt} / 2" | bc)" - height_urxvt="$(echo "${height_urxvt} / 2" | bc)" - offset_urxvt="$(echo "${offset_urxvt} * 2" | bc)" -fi - -# Update URxvt (Always) -urxvt_geometry="${width_urxvt}x${height_urxvt}+${offset_urxvt}+${offset_urxvt}" -sed -i -r "s/${REGEX_URXVT}/\1${urxvt_geometry}/" "${HOME}/.Xresources" diff --git a/.linux_items/include/airootfs/etc/skel/.update_hostname b/.linux_items/include/airootfs/etc/skel/.update_hostname deleted file mode 100755 index 3c1bd7c2..00000000 --- a/.linux_items/include/airootfs/etc/skel/.update_hostname +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -IP="$(ip a show scope global \ - | grep inet \ - | head -1 \ - | sed -r 's#.*inet ([0-9]+.[0-9]+.[0-9]+.[0-9]+.)/.*#\1#')" -HOSTNAME="$(dig +noall +answer +short -x "$IP" \ - | head -1 \ - | sed 's/\.$//')" - -# Set hostname and renew DHCP lease -sudo hostnamectl set-hostname "${HOSTNAME}" -sudo dhclient -r -sleep 1 -sudo dhclient - From e6d7d8699a2f15aa524615a23b86676352ce38fa Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 12:50:09 -0600 Subject: [PATCH 214/293] Restored missing photorec-sort script --- .bin/Scripts/photorec-sort | 150 +++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100755 .bin/Scripts/photorec-sort diff --git a/.bin/Scripts/photorec-sort b/.bin/Scripts/photorec-sort new file mode 100755 index 00000000..6f11b0a6 --- /dev/null +++ b/.bin/Scripts/photorec-sort @@ -0,0 +1,150 @@ +#!/bin/bash +# +## sort photorec results into something usefull + +## Set paths +recup_dir="${1%/}" +[ -n "$recup_dir" ] || recup_dir="." +recup_dir="$(realpath "$recup_dir")" +out_dir="$recup_dir/Recovered" +bad_dir="$recup_dir/Corrupt" + +## Test path before starting (using current dir if not specified) +for d in $recup_dir/recup*; do + ### Source: http://stackoverflow.com/a/6364244 + ## Check if the glob gets expanded to existing files. + ## If not, f here will be exactly the pattern above + ## and the exists test will evaluate to false. + [ -e "$d" ] && echo "Found recup folder(s)" || { + echo "ERROR: No recup folders found" + echo "Usage: $0 recup_dir" + exit 1 + } + + ## This is all we needed to know, so we can break after the first iteration + break +done + +# Hard link files into folders by type +for d in $recup_dir/recup*; do + if [ -d "$d" ]; then + echo "Linking $d" + pushd $d >/dev/null + find -type f | while read k; do + file="$(basename "$k")" + src="$(realpath "$k")" + ext="$(echo "${file##*.}" | tr '[:upper:]' '[:lower:]')" + ext_dir="$out_dir/$ext" + if [ "${file##*.}" = "$file" ]; then + ext_dir="$out_dir/_MISC_" + elif [ "$ext" = "jpg" ] && [ "${file:0:1}" = "t" ]; then + ext_dir="$out_dir/jpg-thumbnail" + fi + #echo " $file -> $ext_dir" + [ -d "$ext_dir" ] || mkdir -p "$ext_dir" + ln "$src" "$ext_dir" + done + popd >/dev/null + else + echo "ERROR: '$d' not a directory" + fi +done + +## Check the files output by photorec for corruption +pushd "$out_dir" >/dev/null + +# Check archives with 7-Zip +#for d in 7z bz2 gz lzh lzo rar tar xz zip; do +# if [ -d "$d" ]; then +# echo "Checking $d files" +# pushd "$d" >/dev/null +# for f in *; do +# if ! 7z t "$f" >/dev/null 2>&1; then +# #echo " BAD: $f" +# [ -d "$bad_dir/$d" ] || mkdir -p "$bad_dir/$d" +# mv -n "$f" "$bad_dir/$d/$f" +# fi +# done +# popd >/dev/null +# fi +#done + +# Check Audio/Video files with ffprobe +for d in avi flac flv m4a m4p m4v mkv mid mov mp2 mp3 mp4 mpg mpg2 ogg ts vob wav; do + if [ -d "$d" ]; then + echo "Checking $d files" + pushd "$d" >/dev/null + for f in *; do + if ! ffprobe "$f" >/dev/null 2>&1; then + #echo " BAD: $f" + [ -d "$bad_dir/$d" ] || mkdir -p "$bad_dir/$d" + mv -n "$f" "$bad_dir/$d/$f" + fi + done + popd >/dev/null + fi +done + +# Check .doc files with antiword +if [ -d "doc" ]; then + echo "Checking doc files" + pushd "doc" >/dev/null + for f in *doc; do + if ! antiword "$f" >/dev/null 2>&1; then + #echo " BAD: $f" + [ -d "$bad_dir/doc" ] || mkdir -p "$bad_dir/doc" + mv -n "$f" "$bad_dir/doc/$f" + fi + done + popd >/dev/null +fi + +# Check .docx files with 7z and grep +if [ -d "docx" ]; then + echo "Checking docx files" + pushd "docx" >/dev/null + for f in *docx; do + if ! 7z l "$f" | grep -q -s "word/document.xml"; then + #echo " BAD: $f" + [ -d "$bad_dir/docx" ] || mkdir -p "$bad_dir/docx" + mv -n "$f" "$bad_dir/docx/$f" + fi + done + popd >/dev/null +fi + +# Sort pictures by date (only for common camera formats) +for d in jpg mrw orf raf raw rw2 tif x3f; do + if [ -d "$d" ]; then + echo "Sorting $d files by date" + pushd "$d" >/dev/null + for f in *; do + date_dir="$(date -d "$(stat -c %y "$f")" +"%F")" + [ -d "$date_dir" ] || mkdir "$date_dir" + mv -n "$f" "$date_dir/" + done + popd >/dev/null + fi +done + +# Sort mov files by encoded date +if [ -d "mov" ]; then + echo "Sorting mov files by date" + pushd "mov" >/dev/null + for f in *mov; do + enc_date="$(mediainfo "$f" | grep -i "Encoded date" | head -1 | sed -r 's/.*: //')" + date_dir="$(date -d "$enc_date" +"%F")" + echo "$date_dir" | grep -E -q -s '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' || date_dir="Unknown Date" + [ -d "$date_dir" ] || mkdir "$date_dir" + mv -n "$f" "$date_dir/" + done + popd >/dev/null +fi + +## sort audio files by tags + +## sort matroska files by metadata + +## return to original dir +popd >/dev/null + From 66cfe2b246ac7faefbf12a2da45944de844820e7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 13:11:28 -0600 Subject: [PATCH 215/293] Update CA trust during startup --- .linux_items/include/airootfs/etc/skel/.zlogin | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.linux_items/include/airootfs/etc/skel/.zlogin b/.linux_items/include/airootfs/etc/skel/.zlogin index 0898d1e2..f592c932 100644 --- a/.linux_items/include/airootfs/etc/skel/.zlogin +++ b/.linux_items/include/airootfs/etc/skel/.zlogin @@ -1,5 +1,8 @@ setterm -blank 0 -powerdown 0 if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then + # Trust added root CAs + sudo trust extract-compat + # Update settings if using i3 if fgrep -q "i3" /proc/cmdline; then sed -i -r 's/#(own_window_type override)/\1/' ~/.conkyrc From 6cf74c03619d6620eee3643faf9464acf53afc09 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 13:12:46 -0600 Subject: [PATCH 216/293] Removed trust commands from Build Linux --- Build Linux | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Build Linux b/Build Linux index e6fe5d17..ec136c6e 100755 --- a/Build Linux +++ b/Build Linux @@ -253,10 +253,6 @@ function update_live_env() { echo "ln -sf '/usr/share/zoneinfo/$LINUX_TIME_ZONE' '/etc/localtime'" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" echo 'sed -i "s/#FallbackNTP/NTP/" /etc/systemd/timesyncd.conf' >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - # Trust root CA(s) - echo "trust extract" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - echo "trust extract-compat" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" - # udevil fix echo "mkdir /media" >> "$LIVE_DIR/airootfs/root/customize_airootfs.sh" From dc8f48a6b462a8eceea0946186303c5993fe9191 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 13:32:48 -0600 Subject: [PATCH 217/293] Update post_drive_results() to use new I/O Status --- .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 3b98e708..7647b56d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -596,7 +596,7 @@ def post_drive_results(ticket_number): # I/O Benchmark io_status = TESTS['iobenchmark']['Status'].get(name, None) - if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'Skipped']: + if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'ERROR', 'Skipped']: one_line_graph = generate_horizontal_graph( rates=TESTS['iobenchmark']['Data'][name]['Merged Rates'], oneline=True) From aa1fda8ac4d8626ba1fa586533be393b04bbfefe Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 13:43:18 -0600 Subject: [PATCH 218/293] Show test results in osTicket report * Fixes issue #19 --- .bin/Scripts/functions/hw_diags.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 7647b56d..d0b8b476 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -543,7 +543,8 @@ def post_drive_results(ticket_number): # NVMe/SMART Attributes if dev.get('NVMe Disk', False): - report.append('NVMe Attributes:') + report.append('NVMe Attributes ({}):'.format( + TESTS['NVMe/SMART']['Status'][name])) for attrib in sorted(ATTRIBUTES['NVMe'].keys()): if attrib in dev['nvme-cli']: report.append('{attrib:30}{value}'.format( @@ -553,7 +554,8 @@ def post_drive_results(ticket_number): report[-1] = report[-1].strip().replace(' ', '.') report[-1] = report[-1].replace('_', ' ') elif dev['smartctl'].get('ata_smart_attributes', None): - report.append('SMART Attributes:') + report.append('SMART Attributes ({}):'.format( + TESTS['NVMe/SMART']['Status'][name])) s_table = dev['smartctl'].get('ata_smart_attributes', {}).get( 'table', {}) s_table = {a.get('id', 'Unknown'): a for a in s_table} @@ -577,7 +579,8 @@ def post_drive_results(ticket_number): # badblocks bb_status = TESTS['badblocks']['Status'].get(name, None) if TESTS['badblocks']['Enabled'] and bb_status not in ['Denied', 'Skipped']: - report.append('badblocks:') + report.append('badblocks ({}):'.format( + TESTS['badblocks']['Status'][name])) bb_result = TESTS['badblocks']['Results'].get( name, 'ERROR: Failed to read log.') @@ -602,7 +605,8 @@ def post_drive_results(ticket_number): oneline=True) for c in COLORS.values(): one_line_graph = one_line_graph.replace(c, '') - report.append('I/O Benchmark:') + report.append('I/O Benchmark ({}):'.format( + TESTS['iobenchmark']['Status'][name])) report.append(one_line_graph) report.append('{}'.format( TESTS['iobenchmark']['Data'][name]['Avg/Min/Max'])) From f35869b2b07a114a95a1160d957b47cdaa8973cd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 14:03:55 -0600 Subject: [PATCH 219/293] Fix crash when running the quick drive test --- .bin/Scripts/functions/hw_diags.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index d0b8b476..41b93081 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -341,6 +341,7 @@ def menu_diags(*args): action_entries = actions, spacer = '──────────────────────────') if selection.isnumeric(): + ticket_number = None if diag_modes[int(selection)-1]['Name'] != 'Quick drive test': clear_screen() print_standard(' ') From c7da54d86ae0fd7cbc928905abaf953d35657979 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 14:37:23 -0600 Subject: [PATCH 220/293] Disable blank warning --- .linux_items/include/airootfs/etc/skel/.zlogin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.linux_items/include/airootfs/etc/skel/.zlogin b/.linux_items/include/airootfs/etc/skel/.zlogin index 338a8198..bd736280 100644 --- a/.linux_items/include/airootfs/etc/skel/.zlogin +++ b/.linux_items/include/airootfs/etc/skel/.zlogin @@ -1,4 +1,4 @@ -setterm -blank 0 -powerdown 0 +setterm -blank 0 -powerdown 0 2>/dev/null if [ "$(fgconsole 2>/dev/null)" -eq "1" ]; then # Connect to network and update hostname $HOME/.update_network From 1a007e37ade28caf3adec580f81698bcf0f359a7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 28 Sep 2018 15:39:50 -0600 Subject: [PATCH 221/293] Adjusted osticket.1201.com SSH host key --- .linux_items/include/airootfs/etc/skel/.ssh/known_hosts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts b/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts index 70ddf9f2..8bf8054e 100644 --- a/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts +++ b/.linux_items/include/airootfs/etc/skel/.ssh/known_hosts @@ -1 +1 @@ -osticket.1201.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWOfJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4= +osticket.1201.com,165.227.31.131 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJDDXtNvh4Vd3q3qZkZbIcnDWWOfJPZb6LVCFptr4awYjlZNL5ieWIUW080IUgtnzWNR7UvetQRtGDsyGu65L+4= From 824c184d594728b757d18dbe0b926240c97fc196 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Sep 2018 12:55:02 -0600 Subject: [PATCH 222/293] Fix issue #20 --- .linux_items/include/airootfs/etc/skel/.ssh/config | 1 + 1 file changed, 1 insertion(+) create mode 100644 .linux_items/include/airootfs/etc/skel/.ssh/config diff --git a/.linux_items/include/airootfs/etc/skel/.ssh/config b/.linux_items/include/airootfs/etc/skel/.ssh/config new file mode 100644 index 00000000..182589ef --- /dev/null +++ b/.linux_items/include/airootfs/etc/skel/.ssh/config @@ -0,0 +1 @@ +ServerAliveInterval 120 From 0fae4128ed58251451b24aa2e1ea63b43eece174 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Sep 2018 13:25:10 -0600 Subject: [PATCH 223/293] Adjusted Prime95 osTicket report * Post report regardless of result --- .bin/Scripts/functions/hw_diags.py | 60 ++++++++++++++---------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 41b93081..ed775a0e 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -979,39 +979,35 @@ def run_mprime(ticket_number): update_progress() # Build osTicket report - if TESTS['Prime95']['Status'] not in ['Unknown', 'Aborted']: - report = ['System {} Prime95 testing.'.format( - 'FAILED' if TESTS['Prime95']['NS'] else 'passed')] - report.append('') - report.append('Prime95 log:') - log_path = '{}/prime.log'.format(global_vars['LogDir']) - try: - with open(log_path, 'r') as f: - for line in f.readlines(): - line = line.strip() - r = re.search('(completed \d+ tests.*)', line, re.IGNORECASE) - if r: - report.append(r.group(1)) - except: - report.append('ERROR: Failed to read log.') - report.append('') - report.append('Final temps:') - log_path = '{}/Final Temps.log'.format(global_vars['LogDir']) - try: - with open(log_path, 'r') as f: - for line in f.readlines(): - line = line.strip() - if not line: - # Stop after CPU temp(s) - break - report.append(line) - except: - report.append('ERROR: Failed to read log.') + report = ['Prime95 ({}):'.format(TESTS['Prime95']['Status'])] + log_path = '{}/prime.log'.format(global_vars['LogDir']) + try: + with open(log_path, 'r') as f: + for line in f.readlines(): + line = line.strip() + r = re.search('(completed \d+ tests.*)', line, re.IGNORECASE) + if r: + report.append(r.group(1)) + except: + report.append('ERROR: Failed to read log.') + report.append('') + report.append('Final temps:') + log_path = '{}/Final Temps.log'.format(global_vars['LogDir']) + try: + with open(log_path, 'r') as f: + for line in f.readlines(): + line = line.strip() + if not line: + # Stop after CPU temp(s) + break + report.append(line) + except: + report.append('ERROR: Failed to read log.') - # Upload osTicket report - osticket_post_reply( - ticket_id=ticket_number, - response='\n'.join(report)) + # Upload osTicket report + osticket_post_reply( + ticket_id=ticket_number, + response='\n'.join(report)) # Done run_program('tmux kill-pane -a'.split()) From 162712871ea45b9e10733eabac4d8ffbce572dfc Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Sep 2018 14:31:16 -0600 Subject: [PATCH 224/293] Add option to mount all volumes for a specific dev --- .bin/Scripts/functions/data.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index c8eec384..4acf0b8a 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -153,7 +153,7 @@ def cleanup_transfer(dest_path): except Exception: pass -def find_core_storage_volumes(): +def find_core_storage_volumes(device_path=None): """Try to create block devices for any Apple CoreStorage volumes.""" corestorage_uuid = '53746f72-6167-11aa-aa11-00306543ecac' dmsetup_cmd_file = '{TmpDir}/dmsetup_command'.format(**global_vars) @@ -162,6 +162,8 @@ def find_core_storage_volumes(): cmd = [ 'lsblk', '--json', '--list', '--paths', '--output', 'NAME,PARTTYPE'] + if device: + cmd.append(device_path) result = run_program(cmd) json_data = json.loads(result.stdout.decode()) devs = json_data.get('blockdevices', []) @@ -257,9 +259,9 @@ def mount_volumes(all_devices=True, device_path=None, read_write=False): if not all_devices and device_path: # Only mount volumes for specific device cmd.append(device_path) - else: - # Check for Apple CoreStorage volumes first - find_core_storage_volumes() + + # Check for Apple CoreStorage volumes first + find_core_storage_volumes(device_path) # Get list of block devices result = run_program(cmd) @@ -269,8 +271,11 @@ def mount_volumes(all_devices=True, device_path=None, read_write=False): # Get list of volumes volumes = {} for dev in devs: + if not dev.get('children', []): + volumes.update({dev['name']: dev}) for child in dev.get('children', []): - volumes.update({child['name']: child}) + if not child.get('children', []): + volumes.update({child['name']: child}) for grandchild in child.get('children', []): volumes.update({grandchild['name']: grandchild}) From 30141916b4bd005fbbb5fed730eba21f47c38156 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Sep 2018 14:36:31 -0600 Subject: [PATCH 225/293] Typo --- .bin/Scripts/functions/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 4acf0b8a..7f50610f 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -162,7 +162,7 @@ def find_core_storage_volumes(device_path=None): cmd = [ 'lsblk', '--json', '--list', '--paths', '--output', 'NAME,PARTTYPE'] - if device: + if device_path: cmd.append(device_path) result = run_program(cmd) json_data = json.loads(result.stdout.decode()) From ecb9364bd285af2d63f54a2f4b7466a472713d93 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Sep 2018 15:22:01 -0600 Subject: [PATCH 226/293] Updated Syslinux menus * Added AMD microcode (fixes issue #61) * Disabled copytoram when booting from an ISO/DVD * Removed Extras menu and instead list all options from the start --- .linux_items/include/syslinux/wk.cfg | 5 ++- .linux_items/include/syslinux/wk_iso.cfg | 6 ++++ .../include/syslinux/wk_iso_linux.cfg | 31 +++++++++++++++++++ .linux_items/include/syslinux/wk_pxe.cfg | 2 +- .../include/syslinux/wk_pxe_extras.cfg | 9 ------ .../include/syslinux/wk_pxe_extras_entry.cfg | 7 ----- .../include/syslinux/wk_pxe_linux.cfg | 28 +++++++++++++++-- .../include/syslinux/wk_pxe_linux_extras.cfg | 21 ------------- .../include/syslinux/wk_pxe_winpe.cfg | 2 +- .linux_items/include/syslinux/wk_sys.cfg | 2 +- .../include/syslinux/wk_sys_extras.cfg | 8 ----- .../include/syslinux/wk_sys_extras_entry.cfg | 7 ----- .../include/syslinux/wk_sys_linux.cfg | 24 +++++++++++++- .../include/syslinux/wk_sys_linux_extras.cfg | 21 ------------- 14 files changed, 92 insertions(+), 81 deletions(-) create mode 100644 .linux_items/include/syslinux/wk_iso.cfg create mode 100644 .linux_items/include/syslinux/wk_iso_linux.cfg delete mode 100644 .linux_items/include/syslinux/wk_pxe_extras.cfg delete mode 100644 .linux_items/include/syslinux/wk_pxe_extras_entry.cfg delete mode 100644 .linux_items/include/syslinux/wk_pxe_linux_extras.cfg delete mode 100644 .linux_items/include/syslinux/wk_sys_extras.cfg delete mode 100644 .linux_items/include/syslinux/wk_sys_extras_entry.cfg delete mode 100644 .linux_items/include/syslinux/wk_sys_linux_extras.cfg diff --git a/.linux_items/include/syslinux/wk.cfg b/.linux_items/include/syslinux/wk.cfg index b9163e25..f37655df 100644 --- a/.linux_items/include/syslinux/wk.cfg +++ b/.linux_items/include/syslinux/wk.cfg @@ -2,7 +2,10 @@ DEFAULT select LABEL select COM32 boot/syslinux/whichsys.c32 -APPEND -pxe- pxe -sys- sys -iso- sys +APPEND -pxe- pxe -sys- sys -iso- iso + +LABEL iso +CONFIG boot/syslinux/wk_iso.cfg LABEL pxe CONFIG boot/syslinux/wk_pxe.cfg diff --git a/.linux_items/include/syslinux/wk_iso.cfg b/.linux_items/include/syslinux/wk_iso.cfg new file mode 100644 index 00000000..fa35a1b6 --- /dev/null +++ b/.linux_items/include/syslinux/wk_iso.cfg @@ -0,0 +1,6 @@ +INCLUDE boot/syslinux/wk_head.cfg + +INCLUDE boot/syslinux/wk_iso_linux.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg + +INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_iso_linux.cfg b/.linux_items/include/syslinux/wk_iso_linux.cfg new file mode 100644 index 00000000..3f2c3556 --- /dev/null +++ b/.linux_items/include/syslinux/wk_iso_linux.cfg @@ -0,0 +1,31 @@ +LABEL wk_iso_linux +TEXT HELP +A live Linux environment + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet loglevel=3 + +LABEL wk_iso_linux_i3 +TEXT HELP +A live Linux environment (i3) + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux (i3) +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet loglevel=3 i3 +SYSAPPEND 3 + +LABEL wk_iso_linux_cli +TEXT HELP +A live Linux environment (CLI) + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux (CLI) +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% nox nomodeset +SYSAPPEND 3 diff --git a/.linux_items/include/syslinux/wk_pxe.cfg b/.linux_items/include/syslinux/wk_pxe.cfg index 92af00e3..f8a78220 100644 --- a/.linux_items/include/syslinux/wk_pxe.cfg +++ b/.linux_items/include/syslinux/wk_pxe.cfg @@ -3,6 +3,6 @@ MENU BACKGROUND pxelinux.png INCLUDE boot/syslinux/wk_pxe_linux.cfg #UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg -INCLUDE boot/syslinux/wk_pxe_extras_entry.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_pxe_extras.cfg b/.linux_items/include/syslinux/wk_pxe_extras.cfg deleted file mode 100644 index f4118570..00000000 --- a/.linux_items/include/syslinux/wk_pxe_extras.cfg +++ /dev/null @@ -1,9 +0,0 @@ -INCLUDE boot/syslinux/wk_head.cfg -MENU BACKGROUND pxelinux.png - -INCLUDE boot/syslinux/wk_pxe_linux.cfg -INCLUDE boot/syslinux/wk_pxe_linux_extras.cfg -#UFD#INCLUDE boot/syslinux/wk_pxe_winpe.cfg -#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg - -INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_pxe_extras_entry.cfg b/.linux_items/include/syslinux/wk_pxe_extras_entry.cfg deleted file mode 100644 index ec76c263..00000000 --- a/.linux_items/include/syslinux/wk_pxe_extras_entry.cfg +++ /dev/null @@ -1,7 +0,0 @@ -LABEL wk_pxe_extras -TEXT HELP -Show extra boot options -ENDTEXT -MENU LABEL Extras -KERNEL vesamenu.c32 -APPEND boot/syslinux/wk_pxe_extras.cfg diff --git a/.linux_items/include/syslinux/wk_pxe_linux.cfg b/.linux_items/include/syslinux/wk_pxe_linux.cfg index f7bf816d..d2468e03 100644 --- a/.linux_items/include/syslinux/wk_pxe_linux.cfg +++ b/.linux_items/include/syslinux/wk_pxe_linux.cfg @@ -3,8 +3,30 @@ TEXT HELP A live Linux environment * HW diagnostics, file-based backups, data recovery, etc ENDTEXT -MENU LABEL Linux +MENU LABEL Linux (PXE) LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img -APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ quiet +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ quiet loglevel=3 +SYSAPPEND 3 + +LABEL wk_http_linux_i3 +TEXT HELP +A live Linux environment (i3) + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux (PXE) (i3) +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ quiet loglevel=3 i3 +SYSAPPEND 3 + +LABEL wk_http_linux_cli +TEXT HELP +A live Linux environment (CLI) + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux (PXE) (CLI) +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ nox nomodeset SYSAPPEND 3 diff --git a/.linux_items/include/syslinux/wk_pxe_linux_extras.cfg b/.linux_items/include/syslinux/wk_pxe_linux_extras.cfg deleted file mode 100644 index f29b2724..00000000 --- a/.linux_items/include/syslinux/wk_pxe_linux_extras.cfg +++ /dev/null @@ -1,21 +0,0 @@ -LABEL wk_http_linux_i3 -TEXT HELP -A live Linux environment (i3) - * HW diagnostics, file-based backups, data recovery, etc -ENDTEXT -MENU LABEL Linux (i3) -LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img -APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ quiet i3 -SYSAPPEND 3 - -LABEL wk_http_linux_cli -TEXT HELP -A live Linux environment (CLI) - * HW diagnostics, file-based backups, data recovery, etc -ENDTEXT -MENU LABEL Linux (CLI) -LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img -APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ nox nomodeset -SYSAPPEND 3 diff --git a/.linux_items/include/syslinux/wk_pxe_winpe.cfg b/.linux_items/include/syslinux/wk_pxe_winpe.cfg index 91d615d7..097df277 100644 --- a/.linux_items/include/syslinux/wk_pxe_winpe.cfg +++ b/.linux_items/include/syslinux/wk_pxe_winpe.cfg @@ -3,6 +3,6 @@ TEXT HELP A live Windows environment * Create partition backups, Install Windows, etc ENDTEXT -MENU LABEL Windows PE +MENU LABEL Windows PE (PXE) COM32 boot/syslinux/linux.c32 APPEND boot/wimboot gui initrdfile=winpe/x86_64/bootmgr,winpe/x86_64/BCD,winpe/x86_64/boot.sdi,winpe/x86_64/boot.wim diff --git a/.linux_items/include/syslinux/wk_sys.cfg b/.linux_items/include/syslinux/wk_sys.cfg index 0d375cf3..55a47e7f 100644 --- a/.linux_items/include/syslinux/wk_sys.cfg +++ b/.linux_items/include/syslinux/wk_sys.cfg @@ -2,6 +2,6 @@ INCLUDE boot/syslinux/wk_head.cfg INCLUDE boot/syslinux/wk_sys_linux.cfg #UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg -INCLUDE boot/syslinux/wk_sys_extras_entry.cfg +#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys_extras.cfg b/.linux_items/include/syslinux/wk_sys_extras.cfg deleted file mode 100644 index 7f6b92cd..00000000 --- a/.linux_items/include/syslinux/wk_sys_extras.cfg +++ /dev/null @@ -1,8 +0,0 @@ -INCLUDE boot/syslinux/wk_head.cfg - -INCLUDE boot/syslinux/wk_sys_linux.cfg -INCLUDE boot/syslinux/wk_sys_linux_extras.cfg -#UFD#INCLUDE boot/syslinux/wk_sys_winpe.cfg -#DISABLED_UPSTREAM_BUG#INCLUDE boot/syslinux/wk_hdt.cfg - -INCLUDE boot/syslinux/wk_tail.cfg diff --git a/.linux_items/include/syslinux/wk_sys_extras_entry.cfg b/.linux_items/include/syslinux/wk_sys_extras_entry.cfg deleted file mode 100644 index ce8fd3ac..00000000 --- a/.linux_items/include/syslinux/wk_sys_extras_entry.cfg +++ /dev/null @@ -1,7 +0,0 @@ -LABEL wk_sys_extras -TEXT HELP -Show extra boot options -ENDTEXT -MENU LABEL Extras -KERNEL vesamenu.c32 -APPEND boot/syslinux/wk_sys_extras.cfg diff --git a/.linux_items/include/syslinux/wk_sys_linux.cfg b/.linux_items/include/syslinux/wk_sys_linux.cfg index 4b3b08c9..55b5f239 100644 --- a/.linux_items/include/syslinux/wk_sys_linux.cfg +++ b/.linux_items/include/syslinux/wk_sys_linux.cfg @@ -5,5 +5,27 @@ A live Linux environment ENDTEXT MENU LABEL Linux LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet copytoram loglevel=3 + +LABEL wk_linux_i3 +TEXT HELP +A live Linux environment (i3) + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux (i3) +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet copytoram loglevel=3 i3 +SYSAPPEND 3 + +LABEL wk_linux_cli +TEXT HELP +A live Linux environment (CLI) + * HW diagnostics, file-based backups, data recovery, etc +ENDTEXT +MENU LABEL Linux (CLI) +LINUX boot/x86_64/vmlinuz +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram nox nomodeset +SYSAPPEND 3 diff --git a/.linux_items/include/syslinux/wk_sys_linux_extras.cfg b/.linux_items/include/syslinux/wk_sys_linux_extras.cfg deleted file mode 100644 index 882c705e..00000000 --- a/.linux_items/include/syslinux/wk_sys_linux_extras.cfg +++ /dev/null @@ -1,21 +0,0 @@ -LABEL wk_linux_i3 -TEXT HELP -A live Linux environment (i3) - * HW diagnostics, file-based backups, data recovery, etc -ENDTEXT -MENU LABEL Linux (i3) -LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img -APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet copytoram loglevel=3 i3 -SYSAPPEND 3 - -LABEL wk_linux_cli -TEXT HELP -A live Linux environment (CLI) - * HW diagnostics, file-based backups, data recovery, etc -ENDTEXT -MENU LABEL Linux (CLI) -LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img -APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram nox nomodeset -SYSAPPEND 3 From 6f5a25d65dd6855c8a35cc6e5d0748130bef1596 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 29 Sep 2018 15:26:28 -0600 Subject: [PATCH 227/293] Load AMD microcode when booting Linux in rEFInd --- .linux_items/include/EFI/boot/refind.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.linux_items/include/EFI/boot/refind.conf b/.linux_items/include/EFI/boot/refind.conf index de83e78c..f4a128e2 100644 --- a/.linux_items/include/EFI/boot/refind.conf +++ b/.linux_items/include/EFI/boot/refind.conf @@ -22,7 +22,8 @@ menuentry "MemTest86" { menuentry "Linux" { icon /EFI/boot/icons/wk_arch.png loader /arch/boot/x86_64/vmlinuz - initrd /arch/boot/intel_ucode.img + initrd /arch/boot/intel_ucode.img + initrd /arch/boot/amd_ucode.img initrd /arch/boot/x86_64/archiso.img options "archisobasedir=arch archisolabel=%ARCHISO_LABEL% quiet copytoram loglevel=3" submenuentry "Linux (i3)" { From 0d35d81b97bee5839488fd26553f9fc7cfa1c126 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 13:00:21 -0600 Subject: [PATCH 228/293] Include used space in disk reports for osTicket * Used space info is not included if the drive failed the test(s) --- .bin/Scripts/functions/hw_diags.py | 89 +++++++++++++++++++----------- 1 file changed, 57 insertions(+), 32 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index ed775a0e..25913963 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -8,7 +8,7 @@ import mysql.connector as mariadb import requests import time -from functions.common import * +from functions.data import * from numpy import * # Database connection @@ -345,12 +345,15 @@ def menu_diags(*args): if diag_modes[int(selection)-1]['Name'] != 'Quick drive test': clear_screen() print_standard(' ') - try_and_print( + result = try_and_print( message='Connecting to osTicket database...', function=connect_to_db, width=40) + if not result['CS']: + print_warning('osTicket integration disabled for this run.') + pause() # Save log for non-quick tests - ticket_number = get_osticket_number() + global_vars['Date-Time'] = time.strftime("%Y-%m-%d_%H%M_%z") global_vars['LogDir'] = '{}/Logs/{}_{}'.format( global_vars['Env']['HOME'], ticket_number, @@ -358,6 +361,7 @@ def menu_diags(*args): os.makedirs(global_vars['LogDir'], exist_ok=True) global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( global_vars['LogDir']) + ticket_number = get_osticket_number() run_tests(diag_modes[int(selection)-1]['Tests'], ticket_number) elif selection == 'A': run_program(['hw-diags-audio'], check=False, pipe=False) @@ -634,6 +638,25 @@ def post_drive_results(ticket_number): # Oh well pass + # Used space + report.append('') + report.append('Volumes:') + if dev_failed: + report.append('Skipped due to error(s) above.') + else: + volume_report = mount_volumes( + all_devices=False, + device_path='/dev/{}'.format(name)) + for vol_path, vol_data in sorted(volume_report.items()): + line = vol_path + if vol_data.get('label', False): + line += ' "{}"'.format(vol_data['label']) + line += ' Used: {}, Free: {}'.format( + vol_data.get('size_used', 'UNKNOWN'), + vol_data.get('size_avail', 'UNKNOWN'), + ) + report.append(line) + # Post reply for drive osticket_post_reply( ticket_id=ticket_number, @@ -979,35 +1002,36 @@ def run_mprime(ticket_number): update_progress() # Build osTicket report - report = ['Prime95 ({}):'.format(TESTS['Prime95']['Status'])] - log_path = '{}/prime.log'.format(global_vars['LogDir']) - try: - with open(log_path, 'r') as f: - for line in f.readlines(): - line = line.strip() - r = re.search('(completed \d+ tests.*)', line, re.IGNORECASE) - if r: - report.append(r.group(1)) - except: - report.append('ERROR: Failed to read log.') - report.append('') - report.append('Final temps:') - log_path = '{}/Final Temps.log'.format(global_vars['LogDir']) - try: - with open(log_path, 'r') as f: - for line in f.readlines(): - line = line.strip() - if not line: - # Stop after CPU temp(s) - break - report.append(line) - except: - report.append('ERROR: Failed to read log.') + if ticket_number: + report = ['Prime95 ({}):'.format(TESTS['Prime95']['Status'])] + log_path = '{}/prime.log'.format(global_vars['LogDir']) + try: + with open(log_path, 'r') as f: + for line in f.readlines(): + line = line.strip() + r = re.search('(completed \d+ tests.*)', line, re.IGNORECASE) + if r: + report.append(r.group(1)) + except: + report.append('ERROR: Failed to read log.') + report.append('') + report.append('Final temps:') + log_path = '{}/Final Temps.log'.format(global_vars['LogDir']) + try: + with open(log_path, 'r') as f: + for line in f.readlines(): + line = line.strip() + if not line: + # Stop after CPU temp(s) + break + report.append(line) + except: + report.append('ERROR: Failed to read log.') - # Upload osTicket report - osticket_post_reply( - ticket_id=ticket_number, - response='\n'.join(report)) + # Upload osTicket report + osticket_post_reply( + ticket_id=ticket_number, + response='\n'.join(report)) # Done run_program('tmux kill-pane -a'.split()) @@ -1140,7 +1164,8 @@ def run_tests(tests, ticket_number=None): run_iobenchmark(ticket_number) # Show results - post_drive_results(ticket_number) + if ticket_number: + post_drive_results(ticket_number) show_results() # Open log From 7e78eb5dcaea789d99f4ee0d7ba653ec4933ab1c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 19:35:46 -0600 Subject: [PATCH 229/293] Respect ENABLE_OPEN_LOGS global variable --- .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 25913963..b4924666 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1169,7 +1169,7 @@ def run_tests(tests, ticket_number=None): show_results() # Open log - if not TESTS['NVMe/SMART']['Quick']: + if not TESTS['NVMe/SMART']['Quick'] and ENABLED_OPEN_LOGS: try: popen_program(['nohup', 'leafpad', global_vars['LogFile']], pipe=True) except Exception: From 6c37c344ceee8c0d3245bced764651ad40da2dfe Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 19:36:19 -0600 Subject: [PATCH 230/293] Prevent crash in hw_diags when testing NVMe drives --- .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 b4924666..1239182d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -534,7 +534,7 @@ def post_drive_results(ticket_number): # Warnings (if any) if dev.get('NVMe Disk', False): - if dev['Quick Health Ok']: + if dev['Quick Health OK']: report.append('WARNING: NVMe support is still experimental') else: report.append('ERROR: NVMe disk is reporting critical warnings') From 6854d5bad7d53e563e4f0eb9af318127f70b3e82 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 19:40:21 -0600 Subject: [PATCH 231/293] Adjust NVMe test status logic * If the quick check is ok then the normal check is also ok * (Because there's no NVMe short test as there is in SMART) --- .bin/Scripts/functions/hw_diags.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 1239182d..90dcf671 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1237,6 +1237,12 @@ def scan_disks(full_paths=False, only_path=None): ] if data.get('NVMe Disk', False): crit_warn = data['nvme-cli'].get('critical_warning', 1) + if crit_warn == 0: + dev_name = data['lsblk']['name'] + data['Quick Health OK'] = True + TESTS['NVMe/SMART']['Status'][dev_name] = 'CS' + else: + data['Quick Health OK'] = False data['Quick Health OK'] = True if crit_warn == 0 else False elif set(wanted_smart_list).issubset(data['smartctl'].keys()): data['SMART Pass'] = data['smartctl'].get('smart_status', {}).get( From 83984cd6ee21f9c232a592a334675aa1209b2d4d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 19:43:02 -0600 Subject: [PATCH 232/293] Adjust used space report for osTicket * Include volume total, used, and free space * Space using dots for improved readability * Adjust total size notation to match other sizes --- .bin/Scripts/functions/hw_diags.py | 37 ++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 90dcf671..f8ca70a8 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -648,13 +648,36 @@ def post_drive_results(ticket_number): all_devices=False, device_path='/dev/{}'.format(name)) for vol_path, vol_data in sorted(volume_report.items()): - line = vol_path - if vol_data.get('label', False): - line += ' "{}"'.format(vol_data['label']) - line += ' Used: {}, Free: {}'.format( - vol_data.get('size_used', 'UNKNOWN'), - vol_data.get('size_avail', 'UNKNOWN'), - ) + vol_report = [ + vol_path, + '{q}{label}{q}'.format( + label=vol_data.get('label', ''), + q='"' if vol_data.get('label', '') else ''), + '{}'.format( + vol_data.get('size', 'UNKNOWN').upper()), + '{}'.format( + vol_data.get('size_used', 'UNKNOWN').upper()), + '{}'.format( + vol_data.get('size_avail', 'UNKNOWN').upper()), + ] + if vol_report[2][-1:] != 'N': + vol_report[2] = '{} {}B'.format( + vol_report[2][:-1], + vol_report[2][-1:]) + vol_report = [v.strip().replace(' ', '_') for v in vol_report] + for i in range(5): + pad = 8 + if i < 2: + pad += 4 * (2 - i) + vol_report[i] = pad_with_dots( + left_pad=False, + s='{s:<{p}}'.format( + s=vol_report[i], + p=pad)) + vol_report[-1] = re.sub(r'\.*$', '', vol_report[-1]) + vol_report = [v.replace('_', ' ') for v in vol_report] + line = '{}..{}..Total..{}..(Used..{}..Free..{})'.format( + *vol_report) report.append(line) # Post reply for drive From b7dc524096d0600886f67b4315ff62338dca7915 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 1 Oct 2018 19:46:08 -0600 Subject: [PATCH 233/293] Include ticket number in log --- .bin/Scripts/functions/hw_diags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index f8ca70a8..090d2740 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1158,6 +1158,8 @@ def run_tests(tests, ticket_number=None): """Run selected hardware test(s).""" clear_screen() print_standard('Starting Hardware Diagnostics') + if ticket_number: + print_standard(' For osTicket #{}'.format(ticket_number)) print_standard(' ') print_standard('Running tests: {}'.format(', '.join(tests))) # Enable selected tests From 7e17a93d423d43f163a3f540ede26a851ea7eb99 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 15:58:00 -0600 Subject: [PATCH 234/293] Unmute audio before opening XMPlay with NirCmd * Fixes issue #56 --- .bin/Scripts/functions/diags.py | 11 ++ .bin/Scripts/functions/update.py | 247 +++++++++++++++++-------------- .bin/Scripts/settings/sources.py | 3 +- .bin/Scripts/settings/tools.py | 3 + .bin/Scripts/update_kit.py | 33 +++-- 5 files changed, 168 insertions(+), 129 deletions(-) diff --git a/.bin/Scripts/functions/diags.py b/.bin/Scripts/functions/diags.py index 220eaff3..0deaead5 100644 --- a/.bin/Scripts/functions/diags.py +++ b/.bin/Scripts/functions/diags.py @@ -61,11 +61,22 @@ def run_hwinfo_sensors(): f.write('SummaryOnly=0\n') popen_program(global_vars['Tools']['HWiNFO']) +def run_nircmd(*cmd): + """Run custom NirCmd.""" + extract_item('NirCmd', silent=True) + cmd = [global_vars['Tools']['NirCmd'], *cmd] + run_program(cmd, check=False) + def run_xmplay(): """Run XMPlay to test audio.""" extract_item('XMPlay', silent=True) cmd = [global_vars['Tools']['XMPlay'], r'{BinDir}\XMPlay\music.7z'.format(**global_vars)] + + # Unmute audio first + run_nircmd(['mutesysvolume', '0']) + + # Open XMPlay popen_program(cmd) def run_hitmanpro(): diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 9c9cfec0..ca48ff3f 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -28,7 +28,7 @@ def compress_item(item): wd = os.path.abspath(r'{}\{}'.format(wd, os.path.pardir)) include_str = item.name os.chdir(wd) - + # Compress cmd = [ global_vars['Tools']['SevenZip'], @@ -38,7 +38,7 @@ def compress_item(item): include_str, ] run_program(cmd) - + # Done os.chdir(prev_dir) @@ -96,7 +96,7 @@ def generate_launcher(section, name, options): dest = global_vars['BaseDir'] full_path = r'{}\{}.cmd'.format(dest, name) template = r'{}\Scripts\Launcher_Template.cmd'.format(global_vars['BinDir']) - + # Format options f_options = {} for opt in options.keys(): @@ -106,7 +106,7 @@ def generate_launcher(section, name, options): elif re.search(r'^L_\w+', opt, re.IGNORECASE): new_opt = 'set {}='.format(opt) f_options[new_opt] = ['set {}={}'.format(opt, options[opt])] - + # Read template and update using f_options out_text = [] with open(template, 'r') as f: @@ -118,7 +118,7 @@ def generate_launcher(section, name, options): out_text.extend(f_options[line]) else: out_text.append(line) - + # Write file os.makedirs(dest, exist_ok=True) with open(full_path, 'w') as f: @@ -172,7 +172,7 @@ def scan_for_net_installers(server, family_name, min_year): """Scan network shares for installers.""" if not server['Mounted']: mount_network_share(server) - + if server['Mounted']: for year in os.scandir(r'\\{IP}\{Share}'.format(**server)): try: @@ -204,13 +204,13 @@ def update_testdisk(): for exe in ['fidentify_win.exe', 'photorec_win.exe', 'qphotorec_win.exe', 'testdisk_win.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('TestDisk') - + # Download download_to_temp('testdisk_wip.zip', SOURCE_URLS['TestDisk']) - + # Extract files extract_temp_to_cbin('testdisk_wip.zip', 'TestDisk') dest = r'{}\TestDisk'.format(global_vars['CBinDir']) @@ -220,7 +220,7 @@ def update_testdisk(): shutil.move(item.path, dest_item) shutil.rmtree( r'{}\TestDisk\testdisk-7.1-WIP'.format(global_vars['CBinDir'])) - + # Cleanup remove_from_temp('testdisk_wip.zip') @@ -230,10 +230,10 @@ def update_fastcopy(): # Stop running processes for process in ['FastCopy.exe', 'FastCopy64.exe']: kill_process(process) - + # Remove existing folders remove_from_kit('FastCopy') - + # Download download_to_temp('FastCopy.zip', SOURCE_URLS['FastCopy']) @@ -267,14 +267,14 @@ def update_fastcopy(): def update_wimlib(): # Stop running processes kill_process('wimlib-imagex.exe') - + # Remove existing folders remove_from_kit('wimlib') - + # Download download_to_temp('wimlib32.zip', SOURCE_URLS['wimlib32']) download_to_temp('wimlib64.zip', SOURCE_URLS['wimlib64']) - + # Extract extract_generic( r'{}\wimlib32.zip'.format(global_vars['TmpDir']), @@ -282,7 +282,7 @@ def update_wimlib(): extract_generic( r'{}\wimlib64.zip'.format(global_vars['TmpDir']), r'{}\wimlib\x64'.format(global_vars['CBinDir'])) - + # Cleanup remove_from_temp('wimlib32.zip') remove_from_temp('wimlib64.zip') @@ -290,16 +290,16 @@ def update_wimlib(): def update_xyplorer(): # Stop running processes kill_process('XYplorerFree.exe') - + # Remove existing folders remove_from_kit('XYplorerFree') - + # Download download_to_temp('xyplorer_free.zip', SOURCE_URLS['XYplorerFree']) - + # Extract files extract_temp_to_cbin('xyplorer_free.zip', 'XYplorerFree') - + # Cleanup remove_from_temp('xyplorer_free.zip') @@ -307,16 +307,16 @@ def update_xyplorer(): def update_aida64(): # Stop running processes kill_process('notepadplusplus.exe') - + # Remove existing folders remove_from_kit('AIDA64') - + # Download download_to_temp('aida64.zip', SOURCE_URLS['AIDA64']) - + # Extract files extract_temp_to_cbin('aida64.zip', 'AIDA64') - + # Cleanup remove_from_temp('aida64.zip') @@ -324,37 +324,37 @@ def update_autoruns(): # Stop running processes kill_process('Autoruns.exe') kill_process('Autoruns64.exe') - + # Remove existing folders remove_from_kit('Autoruns') - + # Download download_to_temp('Autoruns.zip', SOURCE_URLS['Autoruns']) - + # Extract files extract_temp_to_cbin('Autoruns.zip', 'Autoruns') - + # Cleanup remove_from_temp('Autoruns.zip') def update_bleachbit(): # Stop running processes kill_process('bleachbit.exe') - + # Remove existing folders remove_from_kit('BleachBit') - + # Download download_to_temp('bleachbit.zip', SOURCE_URLS['BleachBit']) download_to_temp('Winapp2.zip', SOURCE_URLS['Winapp2']) - + # Extract files extract_temp_to_cbin('bleachbit.zip', 'BleachBit') extract_generic( r'{}\Winapp2.zip'.format(global_vars['TmpDir']), r'{}\BleachBit\cleaners'.format(global_vars['CBinDir']), mode='e', sz_args=[r'Winapp2-master\Non-CCleaner\Winapp2.ini']) - + # Move files into place dest = r'{}\BleachBit'.format(global_vars['CBinDir']) for item in os.scandir(r'{}\BleachBit-Portable'.format(dest)): @@ -363,7 +363,7 @@ def update_bleachbit(): shutil.move(item.path, dest_item) shutil.rmtree( r'{}\BleachBit\BleachBit-Portable'.format(global_vars['CBinDir'])) - + # Cleanup remove_from_temp('bleachbit.zip') remove_from_temp('Winapp2.zip') @@ -372,21 +372,21 @@ def update_bluescreenview(): # Stop running processes for exe in ['BlueScreenView.exe', 'BlueScreenView64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('BlueScreenView') - + # Download download_to_temp('bluescreenview32.zip', SOURCE_URLS['BlueScreenView32']) download_to_temp('bluescreenview64.zip', SOURCE_URLS['BlueScreenView64']) - + # Extract files extract_temp_to_cbin('bluescreenview64.zip', 'BlueScreenView', sz_args=['BlueScreenView.exe']) shutil.move( r'{}\BlueScreenView\BlueScreenView.exe'.format(global_vars['CBinDir']), r'{}\BlueScreenView\BlueScreenView64.exe'.format(global_vars['CBinDir'])) extract_temp_to_cbin('bluescreenview32.zip', 'BlueScreenView') - + # Cleanup remove_from_temp('bluescreenview32.zip') remove_from_temp('bluescreenview64.zip') @@ -394,16 +394,16 @@ def update_bluescreenview(): def update_erunt(): # Stop running processes kill_process('ERUNT.EXE') - + # Remove existing folders remove_from_kit('ERUNT') - + # Download download_to_temp('erunt.zip', SOURCE_URLS['ERUNT']) - + # Extract files extract_temp_to_cbin('erunt.zip', 'ERUNT') - + # Cleanup remove_from_temp('erunt.zip') @@ -411,10 +411,10 @@ def update_hitmanpro(): # Stop running processes for exe in ['HitmanPro.exe', 'HitmanPro64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('HitmanPro') - + # Download dest = r'{}\HitmanPro'.format(global_vars['CBinDir']) download_generic(dest, 'HitmanPro.exe', SOURCE_URLS['HitmanPro32']) @@ -425,35 +425,58 @@ def update_hwinfo(): # Stop running processes for exe in ['HWiNFO32.exe', 'HWiNFO64.exe']: kill_process(exe) - + # Download download_to_temp('HWiNFO.zip', SOURCE_URLS['HWiNFO']) - + # Extract files extract_temp_to_bin('HWiNFO.zip', 'HWiNFO') - + # Cleanup remove_from_temp('HWiNFO.zip') +def update_nircmd(): + # Stop running processes + for exe in ['nircmdc.exe', 'nircmdc64.exe']: + kill_process(exe) + + # Remove existing folders + remove_from_kit('NirCmd') + + # Download + download_to_temp('nircmd32.zip', SOURCE_URLS['NirCmd32']) + download_to_temp('nircmd64.zip', SOURCE_URLS['NirCmd64']) + + # Extract files + extract_temp_to_cbin('nircmd64.zip', 'NirCmd', sz_args=['nircmdc.exe']) + shutil.move( + r'{}\NirCmd\nircmdc.exe'.format(global_vars['CBinDir']), + r'{}\NirCmd\nircmdc64.exe'.format(global_vars['CBinDir'])) + extract_temp_to_cbin('nircmd32.zip', 'NirCmd', sz_args=['nircmdc.exe']) + + # Cleanup + remove_from_temp('nircmd32.zip') + remove_from_temp('nircmd64.zip') + def update_produkey(): # Stop running processes for exe in ['ProduKey.exe', 'ProduKey64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('ProduKey') - + # Download download_to_temp('produkey32.zip', SOURCE_URLS['ProduKey32']) download_to_temp('produkey64.zip', SOURCE_URLS['ProduKey64']) - + # Extract files extract_temp_to_cbin('produkey64.zip', 'ProduKey', sz_args=['ProduKey.exe']) shutil.move( r'{}\ProduKey\ProduKey.exe'.format(global_vars['CBinDir']), r'{}\ProduKey\ProduKey64.exe'.format(global_vars['CBinDir'])) extract_temp_to_cbin('produkey32.zip', 'ProduKey') - + # Cleanup remove_from_temp('produkey32.zip') remove_from_temp('produkey64.zip') @@ -462,14 +485,14 @@ def update_produkey(): def update_intel_rst(): # Remove existing folders remove_from_kit('Intel RST') - + # Prep dest = r'{}\_Drivers\Intel RST'.format(global_vars['CBinDir']) include_path = r'{}\_include\_Drivers\Intel RST'.format( global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) - + # Download for name, url in RST_SOURCES.items(): download_generic(dest, name, url) @@ -477,7 +500,7 @@ def update_intel_rst(): def update_intel_ssd_toolbox(): # Remove existing folders remove_from_kit('Intel SSD Toolbox.exe') - + # Download download_generic( r'{}\_Drivers\Intel SSD Toolbox'.format(global_vars['CBinDir']), @@ -487,7 +510,7 @@ def update_intel_ssd_toolbox(): def update_samsung_magician(): # Remove existing folders remove_from_kit('Samsung Magician.exe') - + # Download download_to_temp('Samsung Magician.zip', SOURCE_URLS['Samsung Magician']) @@ -509,7 +532,7 @@ def update_sdi_origin(): aria_dest = r'{}\aria2'.format(global_vars['TmpDir']) aria = r'{}\aria2c.exe'.format(aria_dest) extract_generic(aria_source, aria_dest, mode='e') - + # Prep for torrent download download_to_temp('sdio.torrent', SOURCE_URLS['SDIO Torrent']) sdio_torrent = r'{}\sdio.torrent'.format(global_vars['TmpDir']) @@ -520,7 +543,7 @@ def update_sdi_origin(): if r and not re.search(r'(\.(bat|inf)|Video|Server|Printer|XP)', line, re.IGNORECASE): indexes.append(int(r.group(1))) indexes = [str(i) for i in sorted(indexes)] - + # Download SDI Origin cmd = [ aria, @@ -533,13 +556,13 @@ def update_sdi_origin(): run_program(cmd, pipe=False, check=False, shell=True) sleep(1) wait_for_process('aria2c') - + # Download SDI Origin extra themes download_to_temp('sdio_themes.zip', SOURCE_URLS['SDIO Themes']) theme_source = r'{}\sdio_themes.zip'.format(global_vars['TmpDir']) theme_dest = r'{}\SDIO_Update\tools\SDI\themes'.format(aria_dest) extract_generic(theme_source, theme_dest) - + # Move files into place for item in os.scandir(r'{}\SDIO_Update'.format(aria_dest)): dest_item = '{}\_Drivers\SDIO\{}'.format( @@ -551,7 +574,7 @@ def update_sdi_origin(): if (not os.path.exists(dest_item) and not re.search(r'\.(inf|bat)$', item.name, re.IGNORECASE)): shutil.move(item.path, dest_item) - + # Cleanup remove_from_temp('aria2') remove_from_temp('aria2.zip') @@ -563,13 +586,13 @@ def update_adobe_reader_dc(): # Prep dest = r'{}\Installers\Extras\Office'.format( global_vars['BaseDir']) - + # Remove existing installer try: os.remove(r'{}\Adobe Reader DC.exe'.format(dest)) except FileNotFoundError: pass - + # Download download_generic( dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC']) @@ -577,13 +600,13 @@ def update_adobe_reader_dc(): def update_office(): # Remove existing folders remove_from_kit('_Office') - + # Prep dest = r'{}\_Office'.format(global_vars['CBinDir']) include_path = r'{}\_include\_Office'.format(global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) - + for year in ['2016']: # Download and extract name = 'odt{}.exe'.format(year) @@ -598,14 +621,14 @@ def update_office(): shutil.move( r'{}\{}'.format(global_vars['TmpDir'], year), r'{}\_Office\{}'.format(global_vars['CBinDir'], year)) - + # Cleanup remove_from_temp('odt{}.exe'.format(year)) def update_classic_start_skin(): # Remove existing folders remove_from_kit('ClassicStartSkin') - + # Download download_generic( r'{}\ClassicStartSkin'.format(global_vars['CBinDir']), @@ -615,13 +638,13 @@ def update_classic_start_skin(): def update_vcredists(): # Remove existing folders remove_from_kit('_vcredists') - + # Prep dest = r'{}\_vcredists'.format(global_vars['CBinDir']) include_path = r'{}\_include\_vcredists'.format(global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) - + # Download for year in VCREDIST_SOURCES.keys(): for bit in ['32', '64']: @@ -635,10 +658,10 @@ def update_vcredists(): def update_one_ninite(section, dest, name, url, indent=8, width=40): # Prep url = 'https://ninite.com/{}/ninite.exe'.format(url) - + # Download download_generic(out_dir=dest, out_name=name, source_url=url) - + # Copy to Installers folder installer_parent = r'{}\Installers\Extras\{}'.format( global_vars['BaseDir'], section) @@ -662,16 +685,16 @@ def update_all_ninite(indent=8, width=40, other_results={}): def update_caffeine(): # Stop running processes kill_process('caffeine.exe') - + # Remove existing folders remove_from_kit('Caffeine') - + # Download download_to_temp('caffeine.zip', SOURCE_URLS['Caffeine']) - + # Extract files extract_temp_to_cbin('caffeine.zip', 'Caffeine') - + # Cleanup remove_from_temp('caffeine.zip') @@ -679,16 +702,16 @@ def update_du(): # Stop running processes kill_process('du.exe') kill_process('du64.exe') - + # Remove existing folders remove_from_kit('Du') - + # Download download_to_temp('du.zip', SOURCE_URLS['Du']) - + # Extract files extract_temp_to_cbin('du.zip', 'Du') - + # Cleanup remove_from_temp('du.zip') @@ -696,21 +719,21 @@ def update_everything(): # Stop running processes for exe in ['Everything.exe', 'Everything64.exe']: kill_process(exe) - + # Remove existing folders remove_from_kit('Everything') - + # Download download_to_temp('everything32.zip', SOURCE_URLS['Everything32']) download_to_temp('everything64.zip', SOURCE_URLS['Everything64']) - + # Extract files extract_temp_to_cbin('everything64.zip', 'Everything', sz_args=['Everything.exe']) shutil.move( r'{}\Everything\Everything.exe'.format(global_vars['CBinDir']), r'{}\Everything\Everything64.exe'.format(global_vars['CBinDir'])) extract_temp_to_cbin('everything32.zip', 'Everything') - + # Cleanup remove_from_temp('everything32.zip') remove_from_temp('everything64.zip') @@ -718,7 +741,7 @@ def update_everything(): def update_firefox_ublock_origin(): # Remove existing folders remove_from_kit('FirefoxExtensions') - + # Download download_generic( r'{}\FirefoxExtensions'.format(global_vars['CBinDir']), @@ -728,36 +751,36 @@ def update_firefox_ublock_origin(): def update_notepadplusplus(): # Stop running processes kill_process('notepadplusplus.exe') - + # Remove existing folders remove_from_kit('NotepadPlusPlus') - + # Download download_to_temp('npp.7z', SOURCE_URLS['NotepadPlusPlus']) - + # Extract files extract_temp_to_cbin('npp.7z', 'NotepadPlusPlus') shutil.move( r'{}\NotepadPlusPlus\notepad++.exe'.format(global_vars['CBinDir']), r'{}\NotepadPlusPlus\notepadplusplus.exe'.format(global_vars['CBinDir']) ) - + # Cleanup remove_from_temp('npp.7z') def update_putty(): # Stop running processes kill_process('PUTTY.EXE') - + # Remove existing folders remove_from_kit('PuTTY') - + # Download download_to_temp('putty.zip', SOURCE_URLS['PuTTY']) - + # Extract files extract_temp_to_cbin('putty.zip', 'PuTTY') - + # Cleanup remove_from_temp('putty.zip') @@ -765,34 +788,34 @@ def update_wiztree(): # Stop running processes for process in ['WizTree.exe', 'WizTree64.exe']: kill_process(process) - + # Remove existing folders remove_from_kit('WizTree') - + # Download download_to_temp( 'wiztree.zip', SOURCE_URLS['WizTree']) - + # Extract files extract_temp_to_cbin('wiztree.zip', 'WizTree') - + # Cleanup remove_from_temp('wiztree.zip') def update_xmplay(): # Stop running processes kill_process('xmplay.exe') - + # Remove existing folders remove_from_kit('XMPlay') - + # Download download_to_temp('xmplay.zip', SOURCE_URLS['XMPlay']) download_to_temp('xmp-7z.zip', SOURCE_URLS['XMPlay 7z']) download_to_temp('xmp-gme.zip', SOURCE_URLS['XMPlay Game']) download_to_temp('xmp-rar.zip', SOURCE_URLS['XMPlay RAR']) download_to_temp('WAModern.zip', SOURCE_URLS['XMPlay WAModern']) - + # Extract files extract_temp_to_cbin('xmplay.zip', 'XMPlay', mode='e', sz_args=['xmplay.exe', 'xmplay.txt']) @@ -804,7 +827,7 @@ def update_xmplay(): r'{}\{}.zip'.format(global_vars['TmpDir'], item), r'{}\XMPlay\plugins'.format(global_vars['CBinDir']), mode='e', sz_args=filter) - + # Download Music dest = r'{}\XMPlay\music_tmp\MOD'.format(global_vars['CBinDir']) for mod in MUSIC_MOD: @@ -816,7 +839,7 @@ def update_xmplay(): name = '{}.rsn'.format(game) url = 'http://snesmusic.org/v2/download.php?spcNow={}'.format(game) download_generic(dest, name, url) - + # Compress Music cmd = [ global_vars['Tools']['SevenZip'], @@ -825,7 +848,7 @@ def update_xmplay(): r'{}\XMPlay\music_tmp\*'.format(global_vars['CBinDir']), ] run_program(cmd) - + # Cleanup remove_item(r'{}\XMPlay\music_tmp'.format(global_vars['CBinDir'])) remove_from_temp('xmplay.zip') @@ -838,10 +861,10 @@ def update_xmplay(): def update_adwcleaner(): # Stop running processes kill_process('AdwCleaner.exe') - + # Remove existing folders remove_from_kit('AdwCleaner') - + # Download download_generic( r'{}\AdwCleaner'.format(global_vars['CBinDir']), @@ -851,10 +874,10 @@ def update_adwcleaner(): def update_kvrt(): # Stop running processes kill_process('KVRT.exe') - + # Remove existing folders remove_from_kit('KVRT') - + # Download download_generic( r'{}\KVRT'.format(global_vars['CBinDir']), @@ -864,10 +887,10 @@ def update_kvrt(): def update_rkill(): # Stop running processes kill_process('RKill.exe') - + # Remove existing folders remove_from_kit('RKill') - + # Download url = resolve_dynamic_url( SOURCE_URLS['RKill'], @@ -878,10 +901,10 @@ def update_rkill(): def update_tdsskiller(): # Stop running processes kill_process('TDSSKiller.exe') - + # Remove existing folders remove_from_kit('TDSSKiller') - + # Download download_generic( r'{}\TDSSKiller'.format(global_vars['CBinDir']), @@ -892,22 +915,22 @@ def update_tdsskiller(): def update_iobit_uninstaller(): # Stop running processes kill_process('IObitUninstallerPortable.exe') - + # Remove existing folders remove_from_kit('IObitUninstallerPortable') - + # Download download_generic( global_vars['CBinDir'], 'IObitUninstallerPortable.exe', SOURCE_URLS['IOBit_Uninstaller']) - + # "Install" cmd = r'{}\IObitUninstallerPortable.exe'.format(global_vars['CBinDir']) popen_program(cmd) sleep(1) wait_for_process('IObitUninstallerPortable') - + # Cleanup remove_from_kit('IObitUninstallerPortable.exe') diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 903c46fb..5f4947b4 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -23,6 +23,8 @@ SOURCE_URLS = { 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27656/eng/Intel%20SSD%20Toolbox%20-%20v3.5.2.exe', 'IOBit_Uninstaller': 'https://portableapps.duckduckgo.com/IObitUninstallerPortable_7.5.0.7.paf.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', + 'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip', + 'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip', 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.8/npp.7.5.8.bin.minimalist.7z', 'Office Deployment Tool 2016': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_10810.33603.exe', 'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip', @@ -193,6 +195,5 @@ RST_SOURCES = { 'SetupRST_16.5.exe': 'https://downloadmirror.intel.com/27984/eng/SetupRST.exe', } - if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/settings/tools.py b/.bin/Scripts/settings/tools.py index bb2cda60..b470603c 100644 --- a/.bin/Scripts/settings/tools.py +++ b/.bin/Scripts/settings/tools.py @@ -30,6 +30,9 @@ TOOLS = { '64': r'HWiNFO\HWiNFO64.exe'}, 'KVRT': { '32': r'KVRT\KVRT.exe'}, + 'NirCmd': { + '32': r'NirCmd\nircmdc.exe', + '64': r'NirCmd\nircmdc64.exe'}, 'NotepadPlusPlus': { '32': r'NotepadPlusPlus\notepadplusplus.exe'}, 'ProduKey': { diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 7f9b251d..075c699c 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -18,23 +18,23 @@ if __name__ == '__main__': 'Error': { 'CalledProcessError': 'Unknown Error', }} - + ## Prep ## update_sdio = ask('Update SDI Origin?') - + ## Download ## print_success('Downloading tools') - + # Data Recovery print_info(' Data Recovery') try_and_print(message='TestDisk / PhotoRec...', function=update_testdisk, other_results=other_results, width=40) - + # Data Transfers print_info(' Data Transfers') try_and_print(message='FastCopy...', function=update_fastcopy, other_results=other_results, width=40) try_and_print(message='wimlib...', function=update_wimlib, other_results=other_results, width=40) try_and_print(message='XYplorer...', function=update_xyplorer, other_results=other_results, width=40) - + # Diagnostics print_info(' Diagnostics') try_and_print(message='AIDA64...', function=update_aida64, other_results=other_results, width=40) @@ -44,8 +44,9 @@ if __name__ == '__main__': try_and_print(message='ERUNT...', function=update_erunt, other_results=other_results, width=40) try_and_print(message='HitmanPro...', function=update_hitmanpro, other_results=other_results, width=40) try_and_print(message='HWiNFO...', function=update_hwinfo, other_results=other_results, width=40) + try_and_print(message='NirCmd...', function=update_nircmd, other_results=other_results, width=40) try_and_print(message='ProduKey...', function=update_produkey, other_results=other_results, width=40) - + # Drivers print_info(' Drivers') try_and_print(message='Intel RST...', function=update_intel_rst, other_results=other_results, width=40) @@ -53,14 +54,14 @@ if __name__ == '__main__': try_and_print(message='Samsing Magician...', function=update_samsung_magician, other_results=other_results, width=40) if update_sdio: try_and_print(message='Snappy Driver Installer Origin...', function=update_sdi_origin, other_results=other_results, width=40) - + # Installers print_info(' Installers') try_and_print(message='Adobe Reader DC...', function=update_adobe_reader_dc, other_results=other_results, width=40) try_and_print(message='MS Office...', function=update_office, other_results=other_results, width=40) try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40) update_all_ninite(other_results=other_results, width=40) - + # Misc print_info(' Misc') try_and_print(message='Caffeine...', function=update_caffeine, other_results=other_results, width=40) @@ -72,22 +73,22 @@ if __name__ == '__main__': try_and_print(message='Notepad++...', function=update_notepadplusplus, other_results=other_results, width=40) try_and_print(message='WizTree...', function=update_wiztree, other_results=other_results, width=40) try_and_print(message='XMPlay...', function=update_xmplay, other_results=other_results, width=40) - + # Repairs print_info(' Repairs') try_and_print(message='AdwCleaner...', function=update_adwcleaner, other_results=other_results, width=40) try_and_print(message='KVRT...', function=update_kvrt, other_results=other_results, width=40) try_and_print(message='RKill...', function=update_rkill, other_results=other_results, width=40) try_and_print(message='TDSSKiller...', function=update_tdsskiller, other_results=other_results, width=40) - + # Uninstallers print_info(' Uninstallers') try_and_print(message='IObit Uninstaller...', function=update_iobit_uninstaller, other_results=other_results, width=40) - + ## Review ## print_standard('Please review the results and download/extract any missing items to .cbin') pause('Press Enter to compress the .cbin items') - + ## Compress ## print_success('Compressing tools') print_info(' _Drivers') @@ -108,12 +109,12 @@ if __name__ == '__main__': other_results = other_results, width=40, item = item) - + ## Search for network Office/QuickBooks installers & add to LAUNCHERS print_success('Scanning for network installers') scan_for_net_installers(OFFICE_SERVER, 'Office', min_year=2010) scan_for_net_installers(QUICKBOOKS_SERVER, 'QuickBooks', min_year=2015) - + ## Generate Launchers print_success('Generating launchers') for section in sorted(LAUNCHERS.keys()): @@ -122,7 +123,7 @@ if __name__ == '__main__': try_and_print(message=name, function=generate_launcher, section=section, name=name, options=options, other_results=other_results, width=40) - + # Rename "Copy WizardKit.cmd" (if necessary) source = r'{}\Scripts\Copy WizardKit.cmd'.format(global_vars['BinDir']) dest = r'{}\Copy {}.cmd'.format(global_vars['BaseDir'], KIT_NAME_FULL) @@ -132,7 +133,7 @@ if __name__ == '__main__': except Exception: print_error(' Failed to rename "{}.cmd" to "{}.cmd"'.format( 'Copy WizardKit', KIT_NAME_FULL)) - + # Done print_standard('\nDone.') pause("Press Enter to exit...") From 85e78135391c28c60a7d597eae2e9393eba4ed81 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 22:09:17 -0600 Subject: [PATCH 235/293] Check Secure Boot status during system checklist * Fixes issue #60 --- .bin/Scripts/functions/common.py | 26 ++++++++++---- .bin/Scripts/functions/diags.py | 59 +++++++++++++++++++++++++++++--- .bin/Scripts/system_checklist.py | 16 ++++++--- 3 files changed, 85 insertions(+), 16 deletions(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index dc427157..9bc4732d 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -64,12 +64,24 @@ class NotInstalledError(Exception): class NoProfilesError(Exception): pass +class OSInstalledLegacyError(Exception): + pass + class PathNotFoundError(Exception): pass class UnsupportedOSError(Exception): pass +class SecureBootDisabledError(Exception): + pass + +class SecureBootNotAvailError(Exception): + pass + +class SecureBootUnknownError(Exception): + pass + # General functions def abort(): """Abort script.""" @@ -271,7 +283,7 @@ def human_readable_size(size, decimals=0): units = 'Kb' else: units = ' b' - + # Return return '{size:>{width}.{decimals}f} {units}'.format( size=size, width=width, decimals=decimals, units=units) @@ -462,7 +474,7 @@ def run_program(cmd, args=[], check=True, pipe=True, shell=False): def set_title(title='~Some Title~'): """Set title. - + Used for window title and menu titles.""" global_vars['Title'] = title os.system('title {}'.format(title)) @@ -566,7 +578,7 @@ def try_and_print(message='Trying...', def upload_crash_details(): """Upload log and runtime data to the CRASH_SERVER. - + Intended for uploading to a public Nextcloud share.""" if not ENABLED_UPLOAD_DATA: raise GenericError @@ -648,7 +660,7 @@ def init_global_vars(): def check_os(): """Set OS specific variables.""" tmp = {} - + # Query registry path = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion' with winreg.OpenKey(HKLM, path) as key: @@ -697,7 +709,7 @@ def check_os(): tmp['DisplayName'] = '{} x{}'.format(tmp['Name'], tmp['Arch']) if tmp['Notes']: tmp['DisplayName'] += ' ({})'.format(tmp['Notes']) - + global_vars['OS'] = tmp def check_tools(): @@ -714,7 +726,7 @@ def check_tools(): def clean_env_vars(): """Remove conflicting global_vars and env variables. - + This fixes an issue where both global_vars and global_vars['Env'] are expanded at the same time.""" for key in global_vars.keys(): @@ -768,7 +780,7 @@ def set_common_vars(): def set_linux_vars(): """Set common variables in a Linux environment. - + These assume we're running under a WK-Linux build.""" result = run_program(['mktemp', '-d']) global_vars['TmpDir'] = result.stdout.decode().strip() diff --git a/.bin/Scripts/functions/diags.py b/.bin/Scripts/functions/diags.py index 0deaead5..47991680 100644 --- a/.bin/Scripts/functions/diags.py +++ b/.bin/Scripts/functions/diags.py @@ -1,5 +1,7 @@ # Wizard Kit: Functions - Diagnostics +import ctypes + from functions.common import * # STATIC VARIABLES @@ -30,12 +32,59 @@ def check_connection(): result = try_and_print(message='Ping test...', function=ping, cs='OK') if result['CS']: break + if not ask('ERROR: System appears offline, try again?'): + if ask('Continue anyway?'): + break + else: + abort() + +def check_secure_boot_status(): + """Checks UEFI Secure Boot status via PowerShell.""" + boot_mode = get_boot_mode() + cmd = ['PowerShell', '-Command', 'Confirm-SecureBootUEFI'] + result = run_program(cmd, check=False) + + # Check results + if result.returncode == 0: + out = result.stdout.decode() + if 'True' in out: + # It's on, do nothing + return + elif 'False' in out: + raise SecureBootDisabledError else: - if not ask('ERROR: System appears offline, try again?'): - if ask('Continue anyway?'): - break - else: - abort() + raise SecureBootUnknownError + else: + if boot_mode != 'UEFI': + raise OSInstalledLegacyError + else: + # Check error message + err = result.stderr.decode() + if 'Cmdlet not supported' in err: + raise SecureBootNotAvailError + else: + raise GenericError + +def get_boot_mode(): + """Check if Windows is booted in UEFI or Legacy mode, returns str.""" + kernel = ctypes.windll.kernel32 + firmware_type = ctypes.c_uint() + + # Get value from kernel32 API + try: + kernel.GetFirmwareType(ctypes.byref(firmware_type)) + except: + # Just set to zero + firmware_type = ctypes.c_uint(0) + + # Set return value + type_str = 'Unknown' + if firmware_type.value == 1: + type_str = 'Legacy' + elif firmware_type.value == 2: + type_str = 'UEFI' + + return type_str def run_autoruns(): """Run AutoRuns in the background with VirusTotal checks enabled.""" diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 73410d92..72bb82bf 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -24,11 +24,17 @@ if __name__ == '__main__': ticket_number = get_ticket_number() other_results = { 'Error': { - 'CalledProcessError': 'Unknown Error', - 'BIOSKeyNotFoundError': 'BIOS key not found', - 'FileNotFoundError': 'File not found', + 'BIOSKeyNotFoundError': 'BIOS key not found', + 'CalledProcessError': 'Unknown Error', + 'FileNotFoundError': 'File not found', + 'GenericError': 'Unknown Error', + 'SecureBootDisabledError': 'Disabled', }, - 'Warning': {}} + 'Warning': { + 'OSInstalledLegacyError': 'OS installed Legacy', + 'SecureBootNotAvailError': 'Not available', + 'SecureBootUnknownError': 'Unknown', + }} if ENABLED_TICKET_NUMBERS: print_info('Starting System Checklist for Ticket #{}\n'.format( ticket_number)) @@ -76,6 +82,8 @@ if __name__ == '__main__': try_and_print(message='BIOS Activation:', function=activate_with_bios, other_results=other_results) + try_and_print(message='Secure Boot Status:', + function=check_secure_boot_status, other_results=other_results) try_and_print(message='Installed RAM:', function=show_installed_ram, ns='Unknown', silent_function=False) show_free_space() From 087500c9b7d6dc903bcabc1c590a92ee5f9e5fa6 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:09:20 -0600 Subject: [PATCH 236/293] Fixed inconsistent indent length --- .bin/Scripts/functions/diags.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/diags.py b/.bin/Scripts/functions/diags.py index 47991680..f66d59e0 100644 --- a/.bin/Scripts/functions/diags.py +++ b/.bin/Scripts/functions/diags.py @@ -58,12 +58,12 @@ def check_secure_boot_status(): if boot_mode != 'UEFI': raise OSInstalledLegacyError else: - # Check error message - err = result.stderr.decode() - if 'Cmdlet not supported' in err: - raise SecureBootNotAvailError - else: - raise GenericError + # Check error message + err = result.stderr.decode() + if 'Cmdlet not supported' in err: + raise SecureBootNotAvailError + else: + raise GenericError def get_boot_mode(): """Check if Windows is booted in UEFI or Legacy mode, returns str.""" From a643b38bbe6121d9bb9b0bf65afd69bfa394c0bf Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:12:11 -0600 Subject: [PATCH 237/293] Also show alert box for Secure Boot issues --- .bin/Scripts/functions/diags.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/diags.py b/.bin/Scripts/functions/diags.py index f66d59e0..54c4105d 100644 --- a/.bin/Scripts/functions/diags.py +++ b/.bin/Scripts/functions/diags.py @@ -38,7 +38,7 @@ def check_connection(): else: abort() -def check_secure_boot_status(): +def check_secure_boot_status(show_alert=False): """Checks UEFI Secure Boot status via PowerShell.""" boot_mode = get_boot_mode() cmd = ['PowerShell', '-Command', 'Confirm-SecureBootUEFI'] @@ -51,18 +51,30 @@ def check_secure_boot_status(): # It's on, do nothing return elif 'False' in out: + if show_alert: + show_alert_box('Secure Boot DISABLED') raise SecureBootDisabledError else: + if show_alert: + show_alert_box('Secure Boot status UNKNOWN') raise SecureBootUnknownError else: if boot_mode != 'UEFI': + if (show_alert and + global_vars['OS']['Version'] in ('8', '8.1', '10')): + # OS supports Secure Boot + show_alert_box('Secure Boot DISABLED\n\nOS installed LEGACY') raise OSInstalledLegacyError else: # Check error message err = result.stderr.decode() if 'Cmdlet not supported' in err: + if show_alert: + show_alert_box('Secure Boot UNAVAILABLE?') raise SecureBootNotAvailError else: + if show_alert: + show_alert_box('Secure Boot ERROR') raise GenericError def get_boot_mode(): @@ -170,5 +182,10 @@ def run_rkill(): dest = non_clobber_rename(dest) shutil.move(item.path, dest) +def show_alert_box(message, title='Wizard Kit Warning'): + """Show Windows alert box with message.""" + message_box = ctypes.windll.user32.MessageBoxW + message_box(None, message, title, 0x00001030) + if __name__ == '__main__': print("This file is not meant to be called directly.") From 171eb0722f03a603dc27f0fd3bb7139dd538c194 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:35:15 -0600 Subject: [PATCH 238/293] Enable System Restore during system checklist * Fixes issue #14 --- .bin/Scripts/functions/setup.py | 57 +++++++++++++++++++++----------- .bin/Scripts/system_checklist.py | 2 ++ 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index 915e8407..c24a7cd3 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -180,6 +180,43 @@ def config_classicstart(): sleep(1) popen_program(cs_exe) +def config_explorer_system(): + """Configure Windows Explorer for all users via Registry settings.""" + write_registry_settings(SETTINGS_EXPLORER_SYSTEM, all_users=True) + +def config_explorer_user(): + """Configure Windows Explorer for current user via Registry settings.""" + write_registry_settings(SETTINGS_EXPLORER_USER, all_users=False) + +def enable_system_restore(): + """Enable System Restore and set disk usage to 5%""" + cmd = [ + 'PowerShell', + '-Command', 'Enable-ComputerRestore', + '-Drive', '{}\\'.format(global_vars['Env']['SYSTEMDRIVE'])] + run_program(cmd) + + # Set disk usage + cmd = [ + r'{}\System32\vssadmin.exe'.format(global_vars['Env']['SYSTEMROOT']), + 'resize', 'shadowstorage', + '/on={}'.format(global_vars['Env']['SYSTEMDRIVE']), + '/for={}'.format(global_vars['Env']['SYSTEMDRIVE']), + '/maxsize=5%'] + run_program(cmd) + +def update_clock(): + """Set Timezone and sync clock.""" + run_program(['tzutil' ,'/s', WINDOWS_TIME_ZONE], check=False) + run_program(['net', 'stop', 'w32ime'], check=False) + run_program( + ['w32tm', '/config', '/syncfromflags:manual', + '/manualpeerlist:"us.pool.ntp.org time.nist.gov time.windows.com"', + ], + check=False) + run_program(['net', 'start', 'w32ime'], check=False) + run_program(['w32tm', '/resync', '/nowait'], check=False) + def write_registry_settings(settings, all_users=False): """Write registry values from custom dict of dicts.""" hive = HKCU @@ -199,26 +236,6 @@ def write_registry_settings(settings, all_users=False): for name, value in v.get('SZ Items', {}).items(): winreg.SetValueEx(key, name, 0, winreg.REG_SZ, value) -def config_explorer_system(): - """Configure Windows Explorer for all users via Registry settings.""" - write_registry_settings(SETTINGS_EXPLORER_SYSTEM, all_users=True) - -def config_explorer_user(): - """Configure Windows Explorer for current user via Registry settings.""" - write_registry_settings(SETTINGS_EXPLORER_USER, all_users=False) - -def update_clock(): - """Set Timezone and sync clock.""" - run_program(['tzutil' ,'/s', WINDOWS_TIME_ZONE], check=False) - run_program(['net', 'stop', 'w32ime'], check=False) - run_program( - ['w32tm', '/config', '/syncfromflags:manual', - '/manualpeerlist:"us.pool.ntp.org time.nist.gov time.windows.com"', - ], - check=False) - run_program(['net', 'start', 'w32ime'], check=False) - run_program(['w32tm', '/resync', '/nowait'], check=False) - # Installations def install_adobe_reader(): """Install Adobe Reader.""" diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index a70d3e3d..fed6e458 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -47,6 +47,8 @@ if __name__ == '__main__': function=config_explorer_system, cs='Done') try_and_print(message='Updating Clock...', function=update_clock, cs='Done') + try_and_print(message='Enabling System Restore...', + function=enable_system_restore, cs='Done') # Cleanup print_info('Cleanup') From 80e903577e2de048399dcdbb63d6b0b5a71e1b28 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:40:51 -0600 Subject: [PATCH 239/293] Enable RegBack during system checklist * Fixes issue #18 --- .bin/Scripts/functions/setup.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index c24a7cd3..6507f43e 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -32,14 +32,14 @@ SETTINGS_CLASSIC_START = { } SETTINGS_EXPLORER_SYSTEM = { # Disable Telemetry - r'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { + r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { 'DWORD Items': {'AllowTelemetry': 0}, }, - r'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { + r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { 'DWORD Items': {'AllowTelemetry': 0}, 'WOW64_32': True, }, - r'SOFTWARE\Policies\Microsoft\Windows\DataCollection': { + r'Software\Policies\Microsoft\Windows\DataCollection': { 'DWORD Items': {'AllowTelemetry': 0}, }, # Disable Wi-Fi Sense @@ -50,12 +50,16 @@ SETTINGS_EXPLORER_SYSTEM = { 'DWORD Items': {'Value': 0}, }, # Disable Location Tracking - r'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': { + r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': { 'DWORD Items': {'SensorPermissionState': 0}, }, r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': { 'Status': {'Value': 0}, }, + # Enable RegBack + r'System\CurrentControlSet\Control\Session Manager\Configuration Manager': { + 'DWORD Items': {'EnablePeriodicBackup': 1}, + }, } SETTINGS_EXPLORER_USER = { # Disable Cortana From 6178ae81cdfd680bbab80fba27d11aa153eeb225 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:50:11 -0600 Subject: [PATCH 240/293] Actually show Secure Boot alerts --- .bin/Scripts/system_checklist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index fed6e458..016a0c60 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -121,6 +121,7 @@ if __name__ == '__main__': sleep(3) try_and_print(message='Running XMPlay...', function=run_xmplay, cs='Started', other_results=other_results) + check_secure_boot_status(show_alert=True) # Done print_standard('\nDone.') From 41b4a258f6dfc94f9cd813536332b3cf19c10024 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 2 Oct 2018 23:53:46 -0600 Subject: [PATCH 241/293] Added System Checklist (HW) * Only applies a minimal amount of changes to the system * Fixes issue #13 --- .bin/Scripts/functions/setup.py | 10 +++ .bin/Scripts/settings/launchers.py | 6 ++ .bin/Scripts/system_checklist_hw.py | 107 ++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 .bin/Scripts/system_checklist_hw.py diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index 6507f43e..dd546ed2 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -30,6 +30,12 @@ SETTINGS_CLASSIC_START = { }, }, } +SETTINGS_EXPLORER_SYSTEM_HW = { + # Enable RegBack + r'System\CurrentControlSet\Control\Session Manager\Configuration Manager': { + 'DWORD Items': {'EnablePeriodicBackup': 1}, + }, + } SETTINGS_EXPLORER_SYSTEM = { # Disable Telemetry r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { @@ -184,6 +190,10 @@ def config_classicstart(): sleep(1) popen_program(cs_exe) +def config_explorer_system_hw(): + """Configure Windows Explorer for all users via Registry settings (HW).""" + write_registry_settings(SETTINGS_EXPLORER_SYSTEM_HW, all_users=True) + def config_explorer_system(): """Configure Windows Explorer for all users via Registry settings.""" write_registry_settings(SETTINGS_EXPLORER_SYSTEM, all_users=True) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 4fceec6f..9f6e2c9f 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -25,6 +25,12 @@ LAUNCHERS = { 'L_ITEM': 'system_checklist.py', 'L_ELEV': 'True', }, + 'System Checklist (HW)': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'system_checklist_hw.py', + 'L_ELEV': 'True', + }, 'User Checklist': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', diff --git a/.bin/Scripts/system_checklist_hw.py b/.bin/Scripts/system_checklist_hw.py new file mode 100644 index 00000000..23c20179 --- /dev/null +++ b/.bin/Scripts/system_checklist_hw.py @@ -0,0 +1,107 @@ +# Wizard Kit: System HW Checklist + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.activation import * +from functions.cleanup import * +from functions.diags import * +from functions.info import * +from functions.product_keys import * +from functions.setup import * +init_global_vars() +os.system('title {}: System HW Checklist Tool'.format(KIT_NAME_FULL)) +global_vars['LogFile'] = r'{LogDir}\System HW Checklist.log'.format(**global_vars) + +if __name__ == '__main__': + try: + stay_awake() + clear_screen() + print_info('{}: System HW Checklist Tool\n'.format(KIT_NAME_FULL)) + ticket_number = get_ticket_number() + other_results = { + 'Error': { + 'BIOSKeyNotFoundError': 'BIOS key not found', + 'CalledProcessError': 'Unknown Error', + 'FileNotFoundError': 'File not found', + 'GenericError': 'Unknown Error', + 'SecureBootDisabledError': 'Disabled', + }, + 'Warning': { + 'OSInstalledLegacyError': 'OS installed Legacy', + 'SecureBootNotAvailError': 'Not available', + 'SecureBootUnknownError': 'Unknown', + }} + if ENABLED_TICKET_NUMBERS: + print_info('Starting System Checklist for Ticket #{}\n'.format( + ticket_number)) + + # Configure + print_info('Configure') + if global_vars['OS']['Version'] == '10': + try_and_print(message='Explorer...', + function=config_explorer_system_hw, cs='Done') + try_and_print(message='Enabling System Restore...', + function=enable_system_restore, cs='Done') + + # Export system info + print_info('Backup System Information') + try_and_print(message='AIDA64 reports...', + function=run_aida64, cs='Done', other_results=other_results) + try_and_print(message='File listing...', + function=backup_file_list, cs='Done', other_results=other_results) + try_and_print(message='Power plans...', + function=backup_power_plans, cs='Done') + try_and_print(message='Product Keys...', other_results=other_results, + function=run_produkey, cs='Done') + try_and_print(message='Registry...', + function=backup_registry, cs='Done', other_results=other_results) + + # User data + print_info('User Data') + show_user_data_summary() + + # Summary + print_info('Summary') + try_and_print(message='Operating System:', + function=show_os_name, ns='Unknown', silent_function=False) + try_and_print(message='Activation:', + function=show_os_activation, ns='Unknown', silent_function=False) + try_and_print(message='Secure Boot Status:', + function=check_secure_boot_status, other_results=other_results) + try_and_print(message='Installed RAM:', + function=show_installed_ram, ns='Unknown', silent_function=False) + show_free_space() + try_and_print(message='Installed Antivirus:', + function=get_installed_antivirus, ns='Unknown', + other_results=other_results, print_return=True) + try_and_print(message='Installed Office:', + function=get_installed_office, ns='Unknown', + other_results=other_results, print_return=True) + + # Play audio, show devices, open Windows updates, and open Activation + try_and_print(message='Opening Device Manager...', + function=open_device_manager, cs='Started') + try_and_print(message='Opening HWiNFO (Sensors)...', + function=run_hwinfo_sensors, cs='Started', other_results=other_results) + try_and_print(message='Opening Windows Updates...', + function=open_windows_updates, cs='Started') + if not windows_is_activated(): + try_and_print(message='Opening Windows Activation...', + function=open_windows_activation, cs='Started') + sleep(3) + try_and_print(message='Running XMPlay...', + function=run_xmplay, cs='Started', other_results=other_results) + check_secure_boot_status(show_alert=True) + + # Done + print_standard('\nDone.') + pause('Press Enter exit...') + exit_script() + except SystemExit: + pass + except: + major_exception() From e3d62eab150b295315dd79424d52ad05153235d9 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 00:18:41 -0600 Subject: [PATCH 242/293] Added network stability test * Fixes issue #17 --- .bin/Scripts/network_stability_test.py | 43 ++++++++++++++++++++++++++ .bin/Scripts/settings/launchers.py | 5 +++ 2 files changed, 48 insertions(+) create mode 100644 .bin/Scripts/network_stability_test.py diff --git a/.bin/Scripts/network_stability_test.py b/.bin/Scripts/network_stability_test.py new file mode 100644 index 00000000..6a7f4f56 --- /dev/null +++ b/.bin/Scripts/network_stability_test.py @@ -0,0 +1,43 @@ +# Wizard Kit: Network Stability Test + +import os +import sys + +# Init +os.chdir(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(os.getcwd()) +from functions.common import * +init_global_vars() +os.system('title {}: Network Stability Test'.format(KIT_NAME_FULL)) + +# STATIC VARIABLES +NETWORK_TEST_URL = 'https://testmy.net/auto?extraID=A&schType=&st=1&r_time=0.1666667&xtimes=12&minDFS=&minUFS=' +YOUTUBE_VID_URL = 'https://youtu.be/z7VYVjR_nwE' +PING_URL = 'google.com' + +if __name__ == '__main__': + try: + stay_awake() + clear_screen() + print_info('{}: Network Stability Test\n'.format(KIT_NAME_FULL)) + + # Open programs + print_success('Starting browser tests') + popen_program(['start', '', NETWORK_TEST_URL.replace('&', '^&')], shell=True) + popen_program(['start', '', YOUTUBE_VID_URL], shell=True) + + # Start pinging + try: + run_program(['ping', '/t', PING_URL], pipe=False) + except KeyboardInterrupt: + # Gracefully close on interrupt + pass + + # Done + print_standard('\nDone.') + pause('Press Enter to exit...') + exit_script() + except SystemExit: + pass + except: + major_exception() diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 9f6e2c9f..3034d044 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -502,6 +502,11 @@ LAUNCHERS = { 'L_ITEM': 'safemode_exit.py', 'L_ELEV': 'True', }, + 'Network Stability Test': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'network_stability_test.py', + }, 'Notepad++': { 'L_TYPE': 'Executable', 'L_PATH': 'notepadplusplus', From 4c0596b2dfd22025f3a14964ae3995c399b6b97d Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 01:16:11 -0600 Subject: [PATCH 243/293] Don't crash when showing Secure Boot alerts --- .bin/Scripts/system_checklist.py | 6 +++++- .bin/Scripts/system_checklist_hw.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 016a0c60..04fac9a0 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -121,7 +121,11 @@ if __name__ == '__main__': sleep(3) try_and_print(message='Running XMPlay...', function=run_xmplay, cs='Started', other_results=other_results) - check_secure_boot_status(show_alert=True) + try: + check_secure_boot_status(show_alert=True) + except: + # Only trying to open alert message boxes + pass # Done print_standard('\nDone.') diff --git a/.bin/Scripts/system_checklist_hw.py b/.bin/Scripts/system_checklist_hw.py index 23c20179..3e3ae4f1 100644 --- a/.bin/Scripts/system_checklist_hw.py +++ b/.bin/Scripts/system_checklist_hw.py @@ -95,7 +95,11 @@ if __name__ == '__main__': sleep(3) try_and_print(message='Running XMPlay...', function=run_xmplay, cs='Started', other_results=other_results) - check_secure_boot_status(show_alert=True) + try: + check_secure_boot_status(show_alert=True) + except: + # Only trying to open alert message boxes + pass # Done print_standard('\nDone.') From 904b41dbae7ab38300370af7abb1305a909c5df6 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 13:48:46 -0600 Subject: [PATCH 244/293] Disable PeopleBar and Tips and Tricks --- .bin/Scripts/functions/setup.py | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index dd546ed2..f2fee467 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -37,6 +37,13 @@ SETTINGS_EXPLORER_SYSTEM_HW = { }, } SETTINGS_EXPLORER_SYSTEM = { + # Disable Location Tracking + r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': { + 'DWORD Items': {'SensorPermissionState': 0}, + }, + r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': { + 'Status': {'Value': 0}, + }, # Disable Telemetry r'Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection': { 'DWORD Items': {'AllowTelemetry': 0}, @@ -55,31 +62,23 @@ SETTINGS_EXPLORER_SYSTEM = { r'Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots': { 'DWORD Items': {'Value': 0}, }, - # Disable Location Tracking - r'Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}': { - 'DWORD Items': {'SensorPermissionState': 0}, - }, - r'System\CurrentControlSet\Services\lfsvc\Service\Configuration': { - 'Status': {'Value': 0}, - }, # Enable RegBack r'System\CurrentControlSet\Control\Session Manager\Configuration Manager': { 'DWORD Items': {'EnablePeriodicBackup': 1}, }, } SETTINGS_EXPLORER_USER = { - # Disable Cortana - r'Software\Microsoft\Personalization\Settings': { - 'DWORD Items': {'AcceptedPrivacyPolicy': 0}, + # Disable silently installed apps + r'Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager': { + 'DWORD Items': {'SilentInstalledAppsEnabled': 0}, }, - r'Software\Microsoft\InputPersonalization': { - 'DWORD Items': { - 'RestrictImplicitTextCollection': 1, - 'RestrictImplicitInkCollection': 1 - }, + # Disable Tips and Tricks + r'Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager': { + 'DWORD Items': {'SoftLandingEnabled ': 0}, }, - r'Software\Microsoft\InputPersonalization\TrainedDataStore': { - 'DWORD Items': {'HarvestContacts': 1}, + # Hide People bar + r'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People': { + 'DWORD Items': {'PeopleBand': 0}, }, # Hide Search button / box r'Software\Microsoft\Windows\CurrentVersion\Search': { From 08768424f0ed049f971e9dd8c04df7f8ce8b42e7 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 13:54:58 -0600 Subject: [PATCH 245/293] Post Prime95 results for aborted tests --- .bin/Scripts/functions/hw_diags.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 090d2740..69958ba2 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -960,6 +960,9 @@ def run_mprime(ticket_number): except KeyboardInterrupt: # Catch CTRL+C aborted = True + TESTS['Prime95']['Status'] = 'Aborted' + print_warning('\nAborted.') + update_progress() # Save "final" temps run_program( @@ -1007,15 +1010,7 @@ def run_mprime(ticket_number): TESTS['Prime95']['CS'] = bool(r) # Update status - if aborted: - TESTS['Prime95']['Status'] = 'Aborted' - print_warning('\nAborted.') - update_progress() - if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled']: - if not ask('Proceed to next test?'): - run_program('tmux kill-pane -a'.split()) - raise GenericError - else: + if not aborted: if TESTS['Prime95']['NS']: TESTS['Prime95']['Status'] = 'NS' elif TESTS['Prime95']['CS']: @@ -1056,6 +1051,12 @@ def run_mprime(ticket_number): ticket_id=ticket_number, response='\n'.join(report)) + if aborted: + if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled']: + if not ask('Proceed to next test?'): + run_program('tmux kill-pane -a'.split()) + raise GenericError + # Done run_program('tmux kill-pane -a'.split()) From 7b57329dee781e8190dfd12ff9437799c0ed731a Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 13:55:30 -0600 Subject: [PATCH 246/293] Post drive details for skipped devices --- .bin/Scripts/functions/hw_diags.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 69958ba2..937c8fd9 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -510,9 +510,6 @@ def post_drive_results(ticket_number): dev_failed |= status == 'NS' dev_passed &= status == 'CS' dev_unknown |= status in ('Working', 'Unknown') - if not dev_failed and not dev_passed and not dev_unknown: - # Assuming drive was skipped so no reply is needed - continue # Start drive report if dev_failed: From 5c34ebf34bd9a7e86937ed841622ce4249d3fc46 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 14:02:20 -0600 Subject: [PATCH 247/293] Add WinAIO Repair presets * Fixes issue #21 --- .bin/Scripts/settings/launchers.py | 21 ++++++++++++++++++ .bin/WinAIO Repair/__associations.ini | Bin 0 -> 10412 bytes .../WinAIO Repair/__empty.ini | Bin 10338 -> 10438 bytes .bin/WinAIO Repair/__permissions.ini | Bin 0 -> 10432 bytes 4 files changed, 21 insertions(+) create mode 100644 .bin/WinAIO Repair/__associations.ini rename .cbin/_include/WinAIO Repair/settings.ini => .bin/WinAIO Repair/__empty.ini (98%) create mode 100644 .bin/WinAIO Repair/__permissions.ini diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 3034d044..c43eb674 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -630,6 +630,27 @@ LAUNCHERS = { 'L_PATH': 'WinAIO Repair', 'L_ITEM': 'Repair_Windows.exe', 'L_ELEV': 'True', + 'Extra Code': [ + r'copy /y "%bin%\WinAIORepair\__empty.ini" "%bin%\WinAIORepair\settings.ini"', + ], + }, + 'WinAIO Repair (Fix Associations)': { + 'L_TYPE': 'Executable', + 'L_PATH': 'WinAIO Repair', + 'L_ITEM': 'Repair_Windows.exe', + 'L_ELEV': 'True', + 'Extra Code': [ + r'copy /y "%bin%\WinAIORepair\__associations.ini" "%bin%\WinAIORepair\settings.ini"', + ], + }, + 'WinAIO Repair (Fix Permissions)': { + 'L_TYPE': 'Executable', + 'L_PATH': 'WinAIO Repair', + 'L_ITEM': 'Repair_Windows.exe', + 'L_ELEV': 'True', + 'Extra Code': [ + r'copy /y "%bin%\WinAIORepair\__permissions.ini" "%bin%\WinAIORepair\settings.ini"', + ], }, }, r'Uninstallers': { diff --git a/.bin/WinAIO Repair/__associations.ini b/.bin/WinAIO Repair/__associations.ini new file mode 100644 index 0000000000000000000000000000000000000000..e5e98326afaa0f0cf9420edc842b1a9bfe305643 GIT binary patch literal 10412 zcmbuFTTfic6@}|LQvSnHq=_6Q6WjPQP9z>|@P&*STW)MW%tRyHG#I&|85#yAKR(I& zYO$$07Y>F|i#C0__I>S3ZT!Fg{+JHZcG^#e>EG#(=@02$nx(z;J}vd{aaygOeXl3K zT|Akj6Hy)OeM|4#dcKjSX(2AF>0YK;OP}@pP`qa8wZ7TQ?^8WHk+k~cRo|k`({!ry zi?psEYxYbWrs<2GA6?3t%7z_j{8^{Y^z;Y)dz|f>XI=dLk)9!$_mgbND{1{Qy~=0M z0=`H&l8k+wd#(4S&aS5W`OGVQ-qH7KS>Bth+fjax6PEPpLdR8cw|B6`-|c1%X5#rQ z%`eV{-#_WQh2-5$6WN00JNkT9c@^#A)M|Pm`gx8N9QriG=2R5+YL+CiLM1dGkwB8s~KTo1*n?kIK9Y{YBa#x*n21Y-iWSEYYow+xxkX6dn^l^^j3Vq z49}K&2cdm!YaZc?+t5z3v|lA>n!WY)()Y54#N#-7mw0|%bOO~)`j|F_{GkZeXNZ{b z2V$_6$bzA{UgOjoqP32PqQT?O)48xVzrY8TrH`K?eN!0^e(p-siKzdTxs21i5^sDF z+Je&|iUXbdRo@Y}g)|}t`}zzWaY5T>853Bst0z-E8$(3Vd!m!Bi;Xm&iT+gFqBbG{ z1ce4Wze7^tIb>te=!b04S@!#vYy7d5bvu$)f$iZ8DBRx)6AML_46^U8&U7pA_Fd{q}vzR zZ-hdsWLS7C>^N)3{ob{2A}V?Zz2R6|zRVKnjv#iN7dfyYz3#}Sw%0%?n0HQ66aI1y zuP%p)IPA;5qs)0vQs@fg#kfv^kVbh*#iV=gOOHBJ>i*M?K3*V3!?gXnT_WW!dOONR z?qN5Vxh~77ebfQ^8(6pv7bXu^o|{w8lx1M^=9F~GdBz?cq8Ik9K!d1)^fW3)qgp(Zb=!Gvv&PX2J*)RM zE?M1`@kAB!zNR_iMQy_Vux{LEH{k>_sqXlSX@TA|&)H42TIMH18r-zT7HdKp(YQ95bF@2f3JJZC6_0*kmKcN=&pMQ|AmsdWoC2h$=N8%kEt=Cdd(TfT5Tm7H~ zcU{nB&8UJ*HpJ&#)GO&xz8#)r8%){$#+-dO`&m@W^s|179P@phzd6xFO<(^k&fj!q zmAVUkqo~yP$_LWpC;5?E{NJS^oesIdbuE9xZJey}PQrR^38h%{MLJoNm-@^p?%i{t zuRamCbkKbwO8oLAbM@R)c*V(XjU49pK|Gd<^3@Xi+P3wy?%WuNnkS4}^G5Lm&+eVn zTJHrKZ7=wZ8~tvMJa_hPop>tWl8ek~zUOS^do=Qbocy>rsa9)8@$QbxCOaFP=i4yI${kIOMMUFckUW&A(+ROd9ql` z8Ah#fkMW-7sc4~ghBa9`wDSD}WPo(v(2Bq5u=JcGANoMOvll!dlU`d&72*9RxmFf8?rZ%-1pWe>6XvtIUYJr#u1 zH(4sxu#p~*h2u}+O5by5=Q-$U#P23C3jS}UUqmg?*v1VSfJD5HHB9eRMj}d-hqC}4 zMl*AZt18$I8B}xol`4gIrsCGmJ*FbCO8oKpn6370WNPs5qG?l_ZHW{4u&tQ5JAySLlQv1%1cIn@SmkXcH0ZvgGZEo;IMc?r1rV+Z@&w* zJE6N!(KxEKt7RL>cZETs$Hw$fno=dATk_oatm`!qKh!JsY2M1%|Gux_TYILh7reZ8 zMg~(YKC9{b@mo`+qFa;qQE9;;USsMvny!;u*UUGPhuTHg3VPMu-U#uIjHwEYxFWj?+Kb386CK(fDh}*Ch*;E@ z(4y<>?zGYNOX+?@gF4xcTtVBGqC(8tdpkap19*|YN`=N7dIBz~Lf+YW>gH3~*ItE} zekKHVz1xdvlBb}}wH=x4@bDxEXC`ZVW9PD#z0#R^&igiJQ*CBkcw!8{cKt|=+L68V z#WnpN_F@zA>l^s6Ch^x0&sxr6aytHo;5l=c)_K|02?R!`0B64_qRe8hYVN9RDK~^d zHazfd+iIOkK6oP@yNZbJm`->c9S(&~Y9A4+clq@9G5Qx7g*8ST!@48IoP&>vIMJr= zB5%klduyV|tY-`laU9dBkH`8>;ks;|^;AhN5f4Z9OrPqF`q^dPxJGk!Km8}4Vv?gW zQ4ip7o;j6o1Cw2u%tH7hCjDjZsea-*;p&AZo*wWZyM)_t+>*z+LsP|Fxo^jp=^H!A zA^si%TFD9OEE_r3kw!R*3BfqLO6OAFm$@62zmiek0x#`&{61dXQt&LECs*tTaCtpn zCJbUttWIU4D@l{NaX+aufqMj>Ilrg#+_r}&q~e3xPJBoez@xn5VQ?7TdnfC%mn+a% z|DNPX1k$*-Q2*h5p!);&Fy5)dWzy~H;5#awqc$YLB>5yjcV*#-UkKzr`*eH(*SA6P9-}OOo0|~wnb#o~6rLJ2R zH@r{M-`j_f@5va9l>60nQmIB|Q-i;M6W53-R@7*AeQ=fRB4*gS^_Dhevq9%5Ju-62 zRUa$;ck!4y*o3fG@EtoM4Am1&_A7eb)4x!+Pm*=#vWb%qb@pC*kk5O^2PUG=lHcrS z;{3z(51qW1zRO&RCs8Qh-`AdyGf(vIint=%yN|^s0*Cagy+%Jcs!l(WyvKU+ZsfI3 zhi=GzAlZ-fdMxS44$W%cTzx7|4{6B!aFQ|5)o;k=a+)l~gRV%CZ%_FQcE`HFX<%=FrXOaSlUx9K!oJm$8^`YP-T+i`z}vYL!m%e~;|n AWB>pF literal 0 HcmV?d00001 diff --git a/.cbin/_include/WinAIO Repair/settings.ini b/.bin/WinAIO Repair/__empty.ini similarity index 98% rename from .cbin/_include/WinAIO Repair/settings.ini rename to .bin/WinAIO Repair/__empty.ini index 76a72c4f884c58ddce96a1552b5c26d91df66192..7f99a0b9728df7345a92765c3845e81d3b42b9c0 100644 GIT binary patch delta 73 zcmaD9a4c}c1|~&kh75*OhGd3p1~-O$h9U+hhD0#0l%as3n8B98VDoAwX3oiBEJBn0 an0Pjy;+A2a#Kkvx2cHC^%jS!G6D0xKITNJ- delta 32 ocmX>W_$Xk*2Byu|nEr9FhAoA5zFg{~~dLH)4XY;YKmI4~>&3)?@w?e#ks zH|IPrJm_pDjLb9Ve!uRQbL0R1`(rvzd+8{hq<^PBraz>&X_^kxyR^{1XKAf^_Pw6` zcKu|W&P8>m_g%g3>G@Wgq`A1Pr3aa2J$=&i6Y-j+*ZSr#zfbh+T+-^3w|$E?&(ej? z&(nr}tl4vMn555oetIKoA{+Ll@h6?S)YBjI?^(8MmUZ#>r+S8D-p{ioo6`DK+RSIr z0=`H&m5d{ud#(3{&aS10`OKz1@9X>ZEN>_4cADSgge85v)^SbT?Hz3KcL!O6sdzq5 zv+Hx=_mBE+E_wIUShisKzCK@8UPZe&wU%CrewHHzhb|4Vxe$dtITI%$wMe71Bc3D0 zZeDruot}NVws4ev$eD4bI2V^=eR`?yXZn31{hQL!3}4~jsZPFA?A9~=R8NUHSm@Fn z=$o@liLM1dQ+>ieYZ+l-1*n?lIK9l0YBa#x*n2Dcc0|{twT5Ujy2g^DdnOA<>5ce; z8J;cl4npBr`>^H^p7?soahCL}WK6QBzEtvI){RJ1FN;gyd6Yh+ZDGDIcJ&!z zW#oYsEG4F(XQtOM^_FO@m@5FUqz5_LPNnIB@?(65he(-Z-E4Af*u35zJ!?n%GIqbE(*zrCi;X;uC7u3+b zYwVANLh55!cqZ&PXNUdXwr?ydx&~e0Oj^Fm66lK{c9<7AuqD0j$)={)Kq#1ZPEr&8 zatE(Ahp{*u$-dLf`A|~m2js=DPJxh-@|0Rh-#n5YUz#cSfhhG;56gBBU6yv9d)P8^ zH)J6-ka|Fe0~5>fVft_lT84hAj0303(9$ty8Hx0dWjKJqgC%KaqWvt|dpXDO;kmrY zjI$7Om(%B1w38)ii6)p|#t%qc)`#6J+{>MYYBtZ&8O{LeE^#1(#>!o1tY`IZf1*Of zM7AaLa~{t#nY&Upt4eb==~k!cl3gp%AnGICj#@HOm7dDFy*$fVK8UM?R!$ZOA|alQ4A(ob7nM9J1n`M2Fd?SKP^eS(M!wi>PPXtkVnDev2aO!ptn-p ze6Pl0IyNUxS-9xFh-W80r z(cm|3`3E`j+~eDI;+cF)E;7OS2DF>+)=*O^xS?$5Ur#H=cJEkR*{S911E}{OGBuK( zOFCN&B7+an-IFz%mgk{w@Frv9e&h;44F;X)h&4t*lOQ$a}G$x^9? zBkA!(IQ}TE^gVZWo`ar|_?tPh&LAmnWkIkZlfY>q?Br-5=m&G?gqc;#V|>{Y^i-g7dB{KFdA?Zy>J8wP0vhTs>b!*4dtk zbmMMBtqZQta(vjNxD$a5DwOX~WceulNjoNN0zuR{tnvmE8g$>+nTYUPojBBqbK#C! z!JVF)36<6pjbqsMu{YhEEtL%`pG)7lo;ugqAb^p$-Hh@UnY&Lx2b*;C@*aw9BT=$N zFQmh{=wmNsY;0(^G1mEY*#f4BN?`Gkey8H&eY~?J4#p;SV>Mc?q~^KsZ?_9IJE6N! z(KxEKt7Q|(_k}^C#}@TOno=dATk_oatm`!qKhY~TZQj?||Gux_TYILd7reZSMg~(Y zKC9`w@mp7=qFa;qQE9;;USsMvn(mTY*UTMBL_RhVlctW`Y-1WTF6heC2B=<0W2`Gt zYtuUu$q{DDW*v$6wYBYf1-58jo>t|Fp4q!S)ThZCWb+DF9dEkFHzi2h|pVT}>TuNq>=hs-L({xO$<9rw2U9E@2styYe`9XsWm?_i}uhzOj=W;x9Fz zm7Ji?vXOHg83{)*AsC0Z>0IjjB6p+m_cQ8S;H4Rl-^Ytv3ZBLD;Aw!jCbmAnY7wit$AP(Q@H;w1GVp`=sLs!zjME3#-tiEBV&{2EboTn z=5?T_wmIg2u11C5x8lRS4SX{@fjn22yDg&+f&@AP7BQ!CBlDh(oOWICM2}w7FFKj~ z7*EPy2l)RH-X--%I;7eASU@boqj&=}j+94*D?W9lZ~Gv)fdt=(+Bp>ZQr9hu8{S9h z@9jg#_hbx4%KhptsZ^t~slngBiEG3ZD{3^mKDbJ@5z}woMnjvj*`RZj9vM01s*jca zi+M~PY(m&8_>LVBhU%#%`xU(&=wGOtC&{`i*~H05I{P54=JVe1fr;p|xy=?F!)u9f{1u37GuUC;N^Tva~6kJxBz2O{fy wxXKwxebLhikAKr(#48?R?+ZFCw+-}NNt8|k8132vBQUCw| literal 0 HcmV?d00001 From e2c07d5710e4b32b17fb404c75f6a052cce2011a Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 14:07:42 -0600 Subject: [PATCH 248/293] Add Macs Fan Control * Fixes issue #7 --- .bin/Scripts/functions/update.py | 15 +++++++++++++++ .bin/Scripts/settings/sources.py | 1 + .bin/Scripts/update_kit.py | 1 + 3 files changed, 17 insertions(+) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 58f92cde..893c7cdf 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -604,6 +604,21 @@ def update_eset_config(): if os.path.exists(include_path): shutil.copytree(include_path, dest) +def update_macs_fan_control(): + # Prep + dest = r'{}\Installers'.format( + global_vars['BaseDir']) + + # Remove existing installer + try: + os.remove(r'{}\Macs Fan Control.exe'.format(dest)) + except FileNotFoundError: + pass + + # Download + download_generic( + dest, 'Macs Fan Control.exe', SOURCE_URLS['Macs Fan Control']) + def update_office(): # Remove existing folders remove_from_kit('_Office') diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index c102a384..031e6757 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -24,6 +24,7 @@ SOURCE_URLS = { 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27656/eng/Intel%20SSD%20Toolbox%20-%20v3.5.2.exe', 'IOBit_Uninstaller': 'https://portableapps.duckduckgo.com/IObitUninstallerPortable_7.5.0.7.paf.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', + 'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe', 'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip', 'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip', 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.8/npp.7.5.8.bin.minimalist.7z', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 6e187671..10f481e3 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -58,6 +58,7 @@ if __name__ == '__main__': # Installers print_info(' Installers') try_and_print(message='Adobe Reader DC...', function=update_adobe_reader_dc, other_results=other_results, width=40) + try_and_print(message='Macs Fan Control...', function=update_macs_fan_control, other_results=other_results, width=40) try_and_print(message='MS Office...', function=update_office, other_results=other_results, width=40) try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40) update_all_ninite(other_results=other_results, width=40) From 6bd29e402c62fadfaaf2a109852823cd0212c60d Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 14:32:29 -0600 Subject: [PATCH 249/293] Add Furmark * Fixes issue #10 --- .bin/Scripts/functions/update.py | 40 ++++++++++++++++++++++++++++++++ .bin/Scripts/settings/sources.py | 1 + .bin/Scripts/update_kit.py | 1 + 3 files changed, 42 insertions(+) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 893c7cdf..35ed1255 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -407,6 +407,46 @@ def update_erunt(): # Cleanup remove_from_temp('erunt.zip') +def update_furmark(): + # Stop running processes + for exe in ['cpuburner.exe', 'FurMark.exe', 'gpushark.exe', 'gpuz.exe']: + kill_process(exe) + + # Remove existing folders + remove_from_kit('FurMark') + + # Prep + install_dir = r'{}\FurMarkTemp"'.format(global_vars['TmpDir']) + dest = r'{}\FurMark'.format(global_vars['CBinDir']) + uninstaller = None + + # Download + download_to_temp('furmark_setup.exe', SOURCE_URLS['FurMark']) + + # Install to temp + cmd = [ + r'{}\furmark_setup.exe'.format(global_vars['TmpDir']), + '/DIR="{}"'.format(install_dir), + '/SILENT'] + run_program(cmd) + + # Copy files + shutil.copytree(install_dir, dest) + for item in os.scandir(dest): + r = re.search(r'^unins\d+\.(dat|exe)$', item.name, re.IGNORECASE) + if r: + if 'exe' in item.name: + uninstaller = r'{}\{}'.format(dest, item.name) + remove_item(item.path) + + # Uninstall from temp + if uninstaller: + cmd = [uninstaller, '/SILENT'] + run_program(cmd) + + # Cleanup + remove_from_temp('furmark_setup.exe') + def update_hitmanpro(): # Stop running processes for exe in ['HitmanPro.exe', 'HitmanPro64.exe']: diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 031e6757..6eb8e0d2 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -17,6 +17,7 @@ SOURCE_URLS = { 'Everything32': 'https://www.voidtools.com/Everything-1.4.1.895.x86.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.895.x64.zip', 'FastCopy': 'http://ftp.vector.co.jp/70/64/2323/FastCopy354_installer.zip', + 'FurMark': 'https://geeks3d.com/dl/get/569', 'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/1056733/ublock_origin-1.16.20-an+fx.xpi', 'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe', 'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 10f481e3..88489181 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -42,6 +42,7 @@ if __name__ == '__main__': try_and_print(message='BleachBit...', function=update_bleachbit, other_results=other_results, width=40) try_and_print(message='BlueScreenView...', function=update_bluescreenview, other_results=other_results, width=40) try_and_print(message='ERUNT...', function=update_erunt, other_results=other_results, width=40) + try_and_print(message='FurMark...', function=update_furmark, other_results=other_results, width=40) try_and_print(message='HitmanPro...', function=update_hitmanpro, other_results=other_results, width=40) try_and_print(message='HWiNFO...', function=update_hwinfo, other_results=other_results, width=40) try_and_print(message='NirCmd...', function=update_nircmd, other_results=other_results, width=40) From e4410b1258cccf9c46e755c586d265539f28bbe6 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 16:19:42 -0600 Subject: [PATCH 250/293] Expanded Post-D7II Cleanup * Fixes issue #4 --- .bin/Scripts/functions/cleanup.py | 75 ++++++++++++++++++++++++------ .bin/Scripts/functions/common.py | 3 +- .bin/Scripts/functions/setup.py | 4 +- .bin/Scripts/post_d7.py | 2 +- .bin/Scripts/settings/launchers.py | 6 +++ 5 files changed, 73 insertions(+), 17 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index f2986571..11c940aa 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -2,11 +2,29 @@ from functions.common import * +# STATIC VARIABLES +D7_HKCR_CLEANUP = { + r'batfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True}, + r'cmdfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True}, + r'exefile\shell\ResourceHacker': {'Recurse': True}, + r'regfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True}, + } +D7_HKCU_CLEANUP = { + r'Software\Malwarebytes': {'Recurse': False}, + } +D7_HKLM_CLEANUP = { + r'Software\Emsisoft': {'Recurse': False}, + } +HKU = winreg.HKEY_USERS +HKCR = winreg.HKEY_CLASSES_ROOT +HKCU = winreg.HKEY_CURRENT_USER +HKLM = winreg.HKEY_LOCAL_MACHINE + def cleanup_adwcleaner(): """Move AdwCleaner folders into the ClientDir.""" source_path = r'{SYSTEMDRIVE}\AdwCleaner'.format(**global_vars['Env']) source_quarantine = r'{}\Quarantine'.format(source_path) - + # Quarantine if os.path.exists(source_quarantine): os.makedirs(global_vars['QuarantineDir'], exist_ok=True) @@ -14,13 +32,13 @@ def cleanup_adwcleaner(): **global_vars) dest_name = non_clobber_rename(dest_name) shutil.move(source_quarantine, dest_name) - + # Delete source folder if empty try: os.rmdir(source_path) except OSError: pass - + # Main folder if os.path.exists(source_path): os.makedirs(global_vars['LogDir'], exist_ok=True) @@ -31,10 +49,10 @@ def cleanup_adwcleaner(): def cleanup_cbs(dest_folder): """Safely cleanup a known CBS archive bug under Windows 7. - + If a CbsPersist file is larger than 2 Gb then the auto archive feature continually fails and will fill up the system drive with temp files. - + This function moves the temp files and CbsPersist file to a temp folder, compresses the CbsPersist files with 7-Zip, and then opens the temp folder for the user to manually save the backup files and delete the temp files. @@ -43,7 +61,7 @@ def cleanup_cbs(dest_folder): temp_folder = r'{backup_folder}\Temp'.format(backup_folder=backup_folder) os.makedirs(backup_folder, exist_ok=True) os.makedirs(temp_folder, exist_ok=True) - + # Move files into temp folder cbs_path = r'{SYSTEMROOT}\Logs\CBS'.format(**global_vars['Env']) for entry in os.scandir(cbs_path): @@ -59,7 +77,7 @@ def cleanup_cbs(dest_folder): dest_name = r'{}\{}'.format(temp_folder, entry.name) dest_name = non_clobber_rename(dest_name) shutil.move(entry.path, dest_name) - + # Compress CbsPersist files with 7-Zip cmd = [ global_vars['Tools']['SevenZip'], @@ -73,7 +91,7 @@ def cleanup_d7ii(): d7_path = r'{}\d7II'.format(global_vars['ClientDir']) d7_reports = r'{}_Reports'.format(d7_path) d7_temp = r'{}\Temp'.format(d7_path) - + # Logs & Reports if os.path.exists(d7_reports): for entry in os.scandir(d7_reports): @@ -94,7 +112,7 @@ def cleanup_d7ii(): pass except OSError: pass - + # Malware Logs if os.path.exists(d7_mlogs): for m_entry in os.scandir(d7_mlogs): @@ -126,6 +144,14 @@ def cleanup_d7ii(): except OSError: pass + # Registry Items + for key, settings in D7_HKCR_CLEANUP.items(): + delete_registry_key(HKCR, key, recurse=settings['Recurse']) + for key, settings in D7_HKCU_CLEANUP.items(): + delete_registry_key(HKCU, key, recurse=settings['Recurse']) + for key, settings in D7_HKLM_CLEANUP.items(): + delete_registry_key(HKLM, key, recurse=settings['Recurse']) + # Temp items if os.path.exists(d7_path): if os.path.exists(d7_temp): @@ -139,7 +165,7 @@ def cleanup_desktop(): """Move known backup files and reports into the ClientDir.""" dest_folder = r'{ProgBackupDir}\{Date}\Desktop'.format(**global_vars) os.makedirs(dest_folder, exist_ok=True) - + desktop_path = r'{USERPROFILE}\Desktop'.format(**global_vars['Env']) for entry in os.scandir(desktop_path): # JRT, RKill, Shortcut cleaner @@ -147,7 +173,7 @@ def cleanup_desktop(): dest_name = r'{}\{}'.format(dest_folder, entry.name) dest_name = non_clobber_rename(dest_name) shutil.move(entry.path, dest_name) - + # Remove dir if empty try: os.rmdir(dest_folder) @@ -166,7 +192,7 @@ def cleanup_emsisoft(): **global_vars) dest_name = non_clobber_rename(dest_name) shutil.move(source_quarantine, dest_name) - + # Remove program if os.path.exists(source_path): shutil.rmtree(source_path) @@ -179,7 +205,7 @@ def cleanup_regbackups(): # Bail early if not os.path.exists(source_path): return - + # Move to backup folder for entry in os.scandir(source_path): os.makedirs(global_vars['ProgBackupDir'], exist_ok=True) @@ -188,7 +214,7 @@ def cleanup_regbackups(): **global_vars) dest_path = non_clobber_rename(dest_path) shutil.move(entry.path, dest_path) - + # Delete source folders if empty try: os.rmdir(source_path) @@ -196,6 +222,27 @@ def cleanup_regbackups(): except OSError: pass +def delete_registry_key(hive, key, recurse=False): + """Delete a registry key and all it's subkeys.""" + access = winreg.KEY_ALL_ACCESS + + if recurse: + # Delete all subkeys first + with winreg.OpenKeyEx(hive, key, 0, access) as k: + key_info = winreg.QueryInfoKey(k) + for x in range(key_info[0]): + subkey = r'{}\{}'.format(key, winreg.EnumKey(k, 0)) + delete_registry_key(hive, subkey) + + # Delete key + winreg.DeleteKey(hive, key) + +def delete_registry_value(hive, key, value): + """Delete a registry value.""" + access = winreg.KEY_ALL_ACCESS + with winreg.OpenKeyEx(hive, key, 0, access) as k: + winreg.DeleteValue(k, value) + if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index 66a5f727..e3c7ac97 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -32,7 +32,8 @@ COLORS = { 'BLUE': '\033[34m' } try: - HKU = winreg.HKEY_USERS + HKU = winreg.HKEY_USERS + HKCR = winreg.HKEY_CLASSES_ROOT HKCU = winreg.HKEY_CURRENT_USER HKLM = winreg.HKEY_LOCAL_MACHINE except NameError: diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index f2fee467..a33672d9 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -5,6 +5,8 @@ from functions.update import * from settings.sources import * # STATIC VARIABLES +HKU = winreg.HKEY_USERS +HKCR = winreg.HKEY_CLASSES_ROOT HKCU = winreg.HKEY_CURRENT_USER HKLM = winreg.HKEY_LOCAL_MACHINE MOZILLA_FIREFOX_UBO_PATH = r'{}\{}\ublock_origin.xpi'.format( @@ -208,7 +210,7 @@ def enable_system_restore(): '-Command', 'Enable-ComputerRestore', '-Drive', '{}\\'.format(global_vars['Env']['SYSTEMDRIVE'])] run_program(cmd) - + # Set disk usage cmd = [ r'{}\System32\vssadmin.exe'.format(global_vars['Env']['SYSTEMROOT']), diff --git a/.bin/Scripts/post_d7.py b/.bin/Scripts/post_d7.py index 1bdfc4f3..5f47cee7 100644 --- a/.bin/Scripts/post_d7.py +++ b/.bin/Scripts/post_d7.py @@ -11,7 +11,7 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: Post-d7II Work'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\User Checklist ({USERNAME}).log'.format( +global_vars['LogFile'] = r'{LogDir}\Post-d7II Work.log'.format( **global_vars, **global_vars['Env']) if __name__ == '__main__': diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index c43eb674..ddb3f132 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -19,6 +19,12 @@ LAUNCHERS = { 'L_ITEM': 'install_eset_nod32_av.py', 'L_ELEV': 'True', }, + 'Post-d7II Work': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'post_d7.py', + 'L_ELEV': 'True', + }, 'System Checklist': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', From 1b5e05b81abfcee6c9ffc09aef7bdb445a18cce4 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 19:43:53 -0600 Subject: [PATCH 251/293] Use different thresholds for HDDs and SSDs * Fixes issue #22 --- .bin/Scripts/functions/hw_diags.py | 47 +++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 937c8fd9..1bd574d7 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -51,9 +51,15 @@ IO_VARS = { 'Scale 8': [2**(0.56*(x+1))+(16*(x+1)) for x in range(8)], 'Scale 16': [2**(0.56*(x+1))+(16*(x+1)) for x in range(16)], 'Scale 32': [2**(0.56*(x+1)/2)+(16*(x+1)/2) for x in range(32)], - 'Threshold Fail': 65*1024**2, - 'Threshold Warn': 135*1024**2, - 'Threshold Great': 750*1024**2, + 'Threshold Graph Fail': 65*1024**2, + 'Threshold Graph Warn': 135*1024**2, + 'Threshold Graph Great': 750*1024**2, + 'Threshold HDD Min': 50*1024**2, + 'Threshold HDD High Avg': 75*1024**2, + 'Threshold HDD Low Avg': 65*1024**2, + 'Threshold SSD Min': 90*1024**2, + 'Threshold SSD High Avg': 135*1024**2, + 'Threshold SSD Low Avg': 100*1024**2, 'Graph Horizontal': ('▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'), 'Graph Horizontal Width': 40, 'Graph Vertical': ( @@ -112,7 +118,7 @@ def connect_to_db(): # Establish SQL connection (try a few times in case SSH is slow) for x in range(5): - sleep(3) + sleep(1) try: ost_db['Connection'] = mariadb.connect( user=DB_USER, password=DB_PASS, database=DB_NAME) @@ -180,11 +186,11 @@ def generate_horizontal_graph(rates, oneline=False): # Set color r_color = COLORS['CLEAR'] - if r < IO_VARS['Threshold Fail']: + if r < IO_VARS['Threshold Graph Fail']: r_color = COLORS['RED'] - elif r < IO_VARS['Threshold Warn']: + elif r < IO_VARS['Threshold Graph Warn']: r_color = COLORS['YELLOW'] - elif r > IO_VARS['Threshold Great']: + elif r > IO_VARS['Threshold Graph Great']: r_color = COLORS['GREEN'] # Build graph @@ -910,10 +916,25 @@ def run_iobenchmark(ticket_number): TESTS['iobenchmark']['Results'][name] = report # Set CS/NS - if min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Fail']: + min_read = min(TESTS['iobenchmark']['Data'][name]['Read Rates']) + avg_read = sum( + TESTS['iobenchmark']['Data'][name]['Read Rates'])/len( + TESTS['iobenchmark']['Data'][name]['Read Rates']) + dev_rotational = dev['lsblk'].get('rota', None) + if dev_rotational == "0": + # Use SSD scale + thresh_min = IO_VARS['Threshold SSD Min'] + thresh_high_avg = IO_VARS['Threshold SSD High Avg'] + thresh_low_avg = IO_VARS['Threshold SSD Low Avg'] + else: + # Use HDD scale + thresh_min = IO_VARS['Threshold HDD Min'] + thresh_high_avg = IO_VARS['Threshold HDD High Avg'] + thresh_low_avg = IO_VARS['Threshold HDD Low Avg'] + if min_read <= thresh_min and avg_read <= thresh_high_avg: + TESTS['iobenchmark']['Status'][name] = 'NS' + elif avg_read <= thresh_low_avg: TESTS['iobenchmark']['Status'][name] = 'NS' - elif min(TESTS['iobenchmark']['Data'][name]['Read Rates']) <= IO_VARS['Threshold Warn']: - TESTS['iobenchmark']['Status'][name] = 'Unknown' else: TESTS['iobenchmark']['Status'][name] = 'CS' @@ -1473,13 +1494,13 @@ def update_io_progress(percent, rate, progress_file): bar_color = COLORS['CLEAR'] rate_color = COLORS['CLEAR'] step = get_graph_step(rate, scale=32) - if rate < IO_VARS['Threshold Fail']: + if rate < IO_VARS['Threshold Graph Fail']: bar_color = COLORS['RED'] rate_color = COLORS['YELLOW'] - elif rate < IO_VARS['Threshold Warn']: + elif rate < IO_VARS['Threshold Graph Warn']: bar_color = COLORS['YELLOW'] rate_color = COLORS['YELLOW'] - elif rate > IO_VARS['Threshold Great']: + elif rate > IO_VARS['Threshold Graph Great']: bar_color = COLORS['GREEN'] rate_color = COLORS['GREEN'] line = ' {p:5.1f}% {b_color}{b:<4} {r_color}{r:6.1f} Mb/s{c}\n'.format( From 2a1cc81e464d8e04a06b3376b503383c197208d2 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 20:06:41 -0600 Subject: [PATCH 252/293] Added O&O ShutUp10 --- .bin/Scripts/functions/setup.py | 9 +++ .bin/Scripts/functions/update.py | 26 +++++- .bin/Scripts/settings/launchers.py | 13 ++- .bin/Scripts/settings/sources.py | 1 + .bin/Scripts/system_checklist.py | 2 + .bin/Scripts/update_kit.py | 3 +- .cbin/_include/ShutUp10/1201.cfg | 124 +++++++++++++++++++++++++++++ 7 files changed, 169 insertions(+), 9 deletions(-) create mode 100644 .cbin/_include/ShutUp10/1201.cfg diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index a33672d9..af5b3791 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -203,6 +203,15 @@ def config_explorer_user(): """Configure Windows Explorer for current user via Registry settings.""" write_registry_settings(SETTINGS_EXPLORER_USER, all_users=False) +def config_privacy_settings(): + """Configure Windows 10 privacy settings with O&O ShutUp10.""" + extract_item('ShutUp10', silent=True) + cmd = [ + r'{BinDir}\ShutUp10\OOSU10.exe'.format(**global_vars), + r'{BinDir}\ShutUp10\1201.cfg'.format(**global_vars), + '/quiet'] + run_program(cmd) + def enable_system_restore(): """Enable System Restore and set disk usage to 5%""" cmd = [ diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 35ed1255..c7b30474 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -414,7 +414,7 @@ def update_furmark(): # Remove existing folders remove_from_kit('FurMark') - + # Prep install_dir = r'{}\FurMarkTemp"'.format(global_vars['TmpDir']) dest = r'{}\FurMark'.format(global_vars['CBinDir']) @@ -422,14 +422,14 @@ def update_furmark(): # Download download_to_temp('furmark_setup.exe', SOURCE_URLS['FurMark']) - + # Install to temp cmd = [ r'{}\furmark_setup.exe'.format(global_vars['TmpDir']), '/DIR="{}"'.format(install_dir), '/SILENT'] run_program(cmd) - + # Copy files shutil.copytree(install_dir, dest) for item in os.scandir(dest): @@ -438,7 +438,7 @@ def update_furmark(): if 'exe' in item.name: uninstaller = r'{}\{}'.format(dest, item.name) remove_item(item.path) - + # Uninstall from temp if uninstaller: cmd = [uninstaller, '/SILENT'] @@ -846,6 +846,24 @@ def update_putty(): # Cleanup remove_from_temp('putty.zip') +def update_shutup10(): + # Stop running processes + kill_process('OOSU10.exe') + + # Remove existing folders + remove_from_kit('ShutUp10') + + # Download + download_generic( + r'{}\ShutUp10'.format(global_vars['CBinDir']), + 'OOSU10.exe', + SOURCE_URLS['ShutUp10']) + + # Copy settings + include_path = r'{}\_include\ESETConfigs'.format(global_vars['CBinDir']) + if os.path.exists(include_path): + shutil.copytree(include_path, dest) + def update_wiztree(): # Stop running processes for process in ['WizTree.exe', 'WizTree64.exe']: diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index ddb3f132..34491575 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -523,17 +523,22 @@ LAUNCHERS = { 'L_PATH': 'PuTTY', 'L_ITEM': 'PUTTY.EXE', }, - 'WizTree': { + 'ShutUp10': { 'L_TYPE': 'Executable', - 'L_PATH': 'WizTree', - 'L_ITEM': 'WizTree.exe', - 'L_ELEV': 'True', + 'L_PATH': 'ShutUp10', + 'L_ITEM': 'OOSU10.exe', }, 'Update Kit': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', 'L_ITEM': 'update_kit.py', }, + 'WizTree': { + 'L_TYPE': 'Executable', + 'L_PATH': 'WizTree', + 'L_ITEM': 'WizTree.exe', + 'L_ELEV': 'True', + }, 'XMPlay': { 'L_TYPE': 'Executable', 'L_PATH': 'XMPlay', diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 6eb8e0d2..6bbe7e08 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -37,6 +37,7 @@ SOURCE_URLS = { 'Samsung Magician': 'https://s3.ap-northeast-2.amazonaws.com/global.semi.static/SAMSUNG_SSD_v5_2_1_180523/CD0CFAC4675B9E502899B41BE00525C3909ECE3AD57CC1A2FB6B74A766B2A1EA/Samsung_Magician_Installer.zip', 'SDIO Themes': 'http://snappy-driver-installer.org/downloads/SDIO_Themes.zip', 'SDIO Torrent': 'http://snappy-driver-installer.org/downloads/SDIO_Update.torrent', + 'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe', 'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe', 'TestDisk': 'https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip', 'wimlib32': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip', diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 04fac9a0..910b44f7 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -45,6 +45,8 @@ if __name__ == '__main__': if global_vars['OS']['Version'] == '10': try_and_print(message='Explorer...', function=config_explorer_system, cs='Done') + try_and_print(message='Privacy...', + function=config_privacy_settings, cs='Done') try_and_print(message='Updating Clock...', function=update_clock, cs='Done') try_and_print(message='Enabling System Restore...', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 88489181..945a473f 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -72,6 +72,7 @@ if __name__ == '__main__': try_and_print(message='Everything...', function=update_everything, other_results=other_results, width=40) try_and_print(message='FirefoxExtensions...', function=update_firefox_ublock_origin, other_results=other_results, width=40) try_and_print(message='PuTTY...', function=update_putty, other_results=other_results, width=40) + try_and_print(message='ShutUp10...', function=update_shutup10, other_results=other_results, width=40) try_and_print(message='Notepad++...', function=update_notepadplusplus, other_results=other_results, width=40) try_and_print(message='WizTree...', function=update_wiztree, other_results=other_results, width=40) try_and_print(message='XMPlay...', function=update_xmplay, other_results=other_results, width=40) @@ -83,7 +84,7 @@ if __name__ == '__main__': try_and_print(message='RKill...', function=update_rkill, other_results=other_results, width=40) try_and_print(message='TDSSKiller...', function=update_tdsskiller, other_results=other_results, width=40) try_and_print(message='WinAIO Repair...', function=update_winaiorepair, other_results=other_results, width=40) - + # Uninstallers print_info(' Uninstallers') try_and_print(message='IObit Uninstaller...', function=update_iobit_uninstaller, other_results=other_results, width=40) diff --git a/.cbin/_include/ShutUp10/1201.cfg b/.cbin/_include/ShutUp10/1201.cfg new file mode 100644 index 00000000..d3d6c67e --- /dev/null +++ b/.cbin/_include/ShutUp10/1201.cfg @@ -0,0 +1,124 @@ +############################################################################ +# This file was created with O&O ShutUp10 and can be imported onto another computer. +# +# Download the application at https://www.oo-software.com/en/shutup10 +# You can then import the file from within the program. +# +# Alternatively you can import it automatically over a command line. Simply use +# the following parameter: +# ooshutup10.exe +# +# Selecting the Option /quiet ends the app right after the import and the user does not +# get any feedback about the import. +# +# We are always happy to answer any questions you may have! +# (c) 2015-2018 O&O Software GmbH, Berlin. https://www.oo-software.com/ +############################################################################ + +P001 + +P002 + +P003 + +P004 - +P005 + +P006 + +P008 + +P017 + +P026 + +P027 + +P028 - +P009 - +P010 - +P015 - +P016 - +P007 - +P025 - +P023 - +P012 - +P013 - +P019 - +P020 - +P011 - +P018 - +P021 - +P022 - +P014 - +P029 - +P030 - +P031 - +P032 - +P024 - +S001 - +S002 - +S003 + +S004 + +S005 + +S008 - +S009 - +S010 - +E001 + +E002 - +E003 - +E007 - +E004 - +E005 - +E006 - +Y001 - +Y002 - +Y003 - +Y004 - +Y005 - +Y006 - +Y007 - +C012 - +C002 - +C004 - +C005 - +C006 - +C007 - +C008 - +C009 - +C010 - +C011 - +L001 - +L002 - +L003 - +L004 - +L005 - +L006 - +L007 - +L008 - +U001 + +U002 + +U003 + +U004 + +W001 + +W002 + +W003 + +W011 - +W004 - +W005 - +W010 - +W009 - +W006 - +W007 - +W008 - +M006 + +M011 - +M010 + +O003 - +O001 - +S012 + +S013 + +S014 + +S011 - +K001 - +K002 + +M001 + +M002 + +M003 + +M004 + +M005 + +M012 - +M013 - +M014 - +N001 - From 00b3c405d0a46eeb849f971e758a5cd6f6da8e25 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 20:10:43 -0600 Subject: [PATCH 253/293] Show more precice amount recovered --- .bin/Scripts/functions/ddrescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 4af88e84..a93f88e4 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -392,7 +392,7 @@ class RecoveryState(): self.status_percent = get_formatted_status( label='Recovered:', data=self.rescued_percent) self.status_amount = get_formatted_status( - label='', data=human_readable_size(self.rescued)) + label='', data=human_readable_size(self.rescued, decimals=2)) # Functions From 117a47e94cffafd52ce3c501ee3283f18c589c5f Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 23:25:15 -0600 Subject: [PATCH 254/293] Refactored DB connection sections * Connect for each post instead of once per session * Restart the SSH tunnel if it was closed * Avoid issue where the connection(s) were broken by aborting Prime95 --- .bin/Scripts/functions/hw_diags.py | 55 +++++++++++++++++++----------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 1bd574d7..0fd714bb 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -113,31 +113,33 @@ def connect_to_db(): ] # Establish SSH tunnel unless one already exists - if not ost_db['Tunnel']: + if not ost_db['Tunnel'] or ost_db['Tunnel'].poll() is not None: ost_db['Tunnel'] = popen_program(cmd) # Establish SQL connection (try a few times in case SSH is slow) for x in range(5): - sleep(1) + sleep(2) try: ost_db['Connection'] = mariadb.connect( user=DB_USER, password=DB_PASS, database=DB_NAME) + ost_db['Cursor'] = ost_db['Connection'].cursor() except: # Just try again pass else: break - ost_db['Cursor'] = ost_db['Connection'].cursor() - ost_db['Errors'] = False -def disconnect_from_db(): - """Disconnect from SQL DB and close SSH tunnel.""" - if ost_db['Cursor']: - ost_db['Cursor'].close() - if ost_db['Connection']: - ost_db['Connection'].close() - if ost_db['Tunnel']: - ost_db['Tunnel'].kill() +def disconnect_from_db(reset_errors=False): + """Disconnect from SQL DB.""" + for c in ['Cursor', 'Connection']: + try: + ost_db[c].close() + except: + # Ignore + pass + ost_db[c] = None + if reset_errors: + ost_db['Errors'] = False def export_png_graph(name, dev): """Exports PNG graph using gnuplot, returns file path as str.""" @@ -358,6 +360,8 @@ def menu_diags(*args): if not result['CS']: print_warning('osTicket integration disabled for this run.') pause() + ticket_number = get_osticket_number() + disconnect_from_db() # Save log for non-quick tests global_vars['Date-Time'] = time.strftime("%Y-%m-%d_%H%M_%z") global_vars['LogDir'] = '{}/Logs/{}_{}'.format( @@ -367,7 +371,6 @@ def menu_diags(*args): os.makedirs(global_vars['LogDir'], exist_ok=True) global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( global_vars['LogDir']) - ticket_number = get_osticket_number() run_tests(diag_modes[int(selection)-1]['Tests'], ticket_number) elif selection == 'A': run_program(['hw-diags-audio'], check=False, pipe=False) @@ -391,7 +394,7 @@ def menu_diags(*args): break # Done - disconnect_from_db() + disconnect_from_db(reset_errors=True) def osticket_get_ticket_name(ticket_id): """Lookup ticket and return name as str.""" @@ -420,6 +423,9 @@ def osticket_needs_attention(ticket_id): return # This function has been DISABLED due to a repurposing of that flag if not ticket_id: raise GenericError + + # Connect to DB + connect_to_db() if not ost_db['Cursor']: # Skip section return @@ -435,11 +441,15 @@ def osticket_needs_attention(ticket_id): ost_db['Cursor'].execute(sql_cmd) except: ost_db['Errors'] = True + disconnect_from_db() def osticket_post_reply(ticket_id, response): """Post a reply to a ticket in osTicket.""" if not ticket_id: raise GenericError + + # Connect to DB + connect_to_db() if not ost_db['Cursor']: # Skip section return @@ -458,11 +468,15 @@ def osticket_post_reply(ticket_id, response): ost_db['Cursor'].execute(sql_cmd) except: ost_db['Errors'] = True + disconnect_from_db() def osticket_set_drive_result(ticket_id, passed): """Marks the pass/fail box for the drive(s) in osTicket.""" if not ticket_id: raise GenericError + + # Connect to DB + connect_to_db() if not ost_db['Cursor']: # Skip section return @@ -479,6 +493,7 @@ def osticket_set_drive_result(ticket_id, passed): ost_db['Cursor'].execute(sql_cmd) except: ost_db['Errors'] = True + disconnect_from_db() def pad_with_dots(s, left_pad=True): """Replace ' ' padding with '..' for osTicket posts.""" @@ -963,7 +978,7 @@ def run_mprime(ticket_number): TESTS['Progress Out']).split()) run_program('tmux split-window -bd watch -c -n1 -t hw-sensors'.split()) run_program('tmux resize-pane -y 3'.split()) - + # Start test run_program(['apple-fans', 'max']) try: @@ -1130,7 +1145,7 @@ def run_nvme_smart(ticket_number): run_program( 'sudo smartctl -t short /dev/{}'.format(name).split(), check=False) - + # Wait and show progress (in 10 second increments) for iteration in range(int(test_length*60/10)): # Update SMART data @@ -1206,7 +1221,7 @@ def run_tests(tests, ticket_number=None): run_badblocks(ticket_number) if TESTS['iobenchmark']['Enabled']: run_iobenchmark(ticket_number) - + # Show results if ticket_number: post_drive_results(ticket_number) @@ -1248,7 +1263,7 @@ def scan_disks(full_paths=False, only_path=None): 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 run_program( @@ -1257,7 +1272,7 @@ def scan_disks(full_paths=False, only_path=None): dev).split(), check = False) data['smartctl'] = get_smart_details(dev) - + # Get NVMe attributes if data['lsblk']['tran'] == 'nvme': cmd = 'sudo nvme smart-log /dev/{} -o json'.format(dev).split() @@ -1296,7 +1311,7 @@ def scan_disks(full_paths=False, only_path=None): else: data['Quick Health OK'] = False data['SMART Support'] = False - + # Ask for manual overrides if necessary if TESTS['badblocks']['Enabled'] or TESTS['iobenchmark']['Enabled']: show_disk_details(data) From e56647ed48e04ead11259d0a79dda2316c2bfe03 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 23:30:21 -0600 Subject: [PATCH 255/293] Fix drive report for aborted tests --- .bin/Scripts/functions/hw_diags.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 0fd714bb..8c270e34 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -539,6 +539,8 @@ def post_drive_results(ticket_number): report.append('Drive hardware diagnostics tests: UNKNOWN') elif dev_passed: report.append('Drive hardware diagnostics tests: Passed') + else: + report.append('Drive hardware diagnostics tests: INCOMPLETE') report.append('') # Drive description @@ -601,7 +603,7 @@ def post_drive_results(ticket_number): # badblocks bb_status = TESTS['badblocks']['Status'].get(name, None) - if TESTS['badblocks']['Enabled'] and bb_status not in ['Denied', 'Skipped']: + if TESTS['badblocks']['Enabled'] and bb_status not in ['Denied', 'Skipped', 'Aborted']: report.append('badblocks ({}):'.format( TESTS['badblocks']['Status'][name])) bb_result = TESTS['badblocks']['Results'].get( @@ -622,7 +624,7 @@ def post_drive_results(ticket_number): # I/O Benchmark io_status = TESTS['iobenchmark']['Status'].get(name, None) - if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'ERROR', 'Skipped']: + if TESTS['iobenchmark']['Enabled'] and io_status not in ['Denied', 'ERROR', 'Skipped', 'Aborted']: one_line_graph = generate_horizontal_graph( rates=TESTS['iobenchmark']['Data'][name]['Merged Rates'], oneline=True) @@ -659,7 +661,7 @@ def post_drive_results(ticket_number): # Used space report.append('') report.append('Volumes:') - if dev_failed: + if dev_failed or dev_unknown: report.append('Skipped due to error(s) above.') else: volume_report = mount_volumes( @@ -1087,6 +1089,11 @@ def run_mprime(ticket_number): if aborted: if TESTS['NVMe/SMART']['Enabled'] or TESTS['badblocks']['Enabled']: if not ask('Proceed to next test?'): + for name in TESTS['NVMe/SMART']['Devices'].keys(): + for t in ['NVMe/SMART', 'badblocks', 'iobenchmark']: + cur_status = TESTS[t]['Status'][name] + if cur_status not in ['CS', 'Denied', 'NS']: + TESTS[t]['Status'][name] = 'Aborted' run_program('tmux kill-pane -a'.split()) raise GenericError From 5ad18a7fee64d57bab1f95072b0174ac21021111 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 23:30:55 -0600 Subject: [PATCH 256/293] Show warning if there were issue(s) posting --- .bin/Scripts/functions/hw_diags.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 8c270e34..807965ae 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1507,6 +1507,11 @@ def show_results(): print_standard(' {}'.format(line)) print_standard(' ') + # osTicket + if ost_db['Errors']: + print_warning('WARNING: Failed to post result(s) to osTicket') + print_standard(' ') + # Done pause('Press Enter to return to main menu... ') run_program('tmux kill-pane -a'.split()) From cdb096313991e6bb2cd62b5ba13f301395e280cc Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 23:32:04 -0600 Subject: [PATCH 257/293] Remove timeout for remount-rw --- .bin/Scripts/remount-rw | 2 -- 1 file changed, 2 deletions(-) diff --git a/.bin/Scripts/remount-rw b/.bin/Scripts/remount-rw index 4a0b833e..1ba4b41d 100755 --- a/.bin/Scripts/remount-rw +++ b/.bin/Scripts/remount-rw @@ -18,6 +18,4 @@ if udevil mount $DEVICE; then else echo "Failed" fi - -sleep 2s exit 0 From ba302f0c5b4678a0c995bcd5933bca01c5b1939f Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Wed, 3 Oct 2018 23:52:23 -0600 Subject: [PATCH 258/293] Add SMART short test results to osTicket report --- .bin/Scripts/functions/hw_diags.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 807965ae..b1284989 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -90,6 +90,7 @@ TESTS = { 'NVMe/SMART': { 'Enabled': False, 'Quick': False, + 'Short Test': {}, 'Status': {}, }, 'badblocks': { @@ -601,6 +602,12 @@ def post_drive_results(ticket_number): report[-1] = report[-1].replace('_', ' ') report.append('') + # SMART Short test result + if TESTS['NVMe/SMART']['Short Test'][name]: + report.append('SMART short test result: {}'.format( + TESTS['NVMe/SMART']['Short Test'][name])) + report.append('') + # badblocks bb_status = TESTS['badblocks']['Status'].get(name, None) if TESTS['badblocks']['Enabled'] and bb_status not in ['Denied', 'Skipped', 'Aborted']: @@ -1122,6 +1129,7 @@ def run_nvme_smart(ticket_number): # Run for name, dev in sorted(TESTS['NVMe/SMART']['Devices'].items()): + TESTS['NVMe/SMART']['Short Test'][name] = None cur_status = TESTS['NVMe/SMART']['Status'][name] if cur_status == 'OVERRIDE': # Skipping test per user request @@ -1187,8 +1195,10 @@ def run_nvme_smart(ticket_number): 'passed', False) if test_passed: TESTS['NVMe/SMART']['Status'][name] = 'CS' + TESTS['NVMe/SMART']['Short Test'][name] = 'CS' else: TESTS['NVMe/SMART']['Status'][name] = 'NS' + TESTS['NVMe/SMART']['Short Test'][name] = 'NS' update_progress() print_standard('Done', timestamp=False) From e642bfd2d3468cb03304cc4c47b485e7fb97bda7 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Thu, 4 Oct 2018 13:56:16 -0600 Subject: [PATCH 259/293] Fix WK device detection to omit from HW-Diags --- .bin/Scripts/functions/hw_diags.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index b1284989..93b73bdb 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -1274,8 +1274,13 @@ def scan_disks(full_paths=False, only_path=None): TESTS['iobenchmark']['Status'][d['name']] = 'Pending' else: # Skip WizardKit devices - wk_label = '{}_LINUX'.format(KIT_NAME_SHORT) - if wk_label not in [c.get('label', '') for c in d.get('children', [])]: + skip_dev=False + wk_label_regex = r'{}_(LINUX|UFD)'.format(KIT_NAME_SHORT) + for c in d.get('children', []): + r = re.search( + wk_label_regex, c.get('label', ''), re.IGNORECASE) + skip_dev = bool(r) + if not skip_dev: devs[d['name']] = {'lsblk': d} TESTS['NVMe/SMART']['Status'][d['name']] = 'Pending' TESTS['badblocks']['Status'][d['name']] = 'Pending' From f097b98c8574f2829d210bba41022c456f99e4fb Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sat, 6 Oct 2018 19:19:14 -0600 Subject: [PATCH 260/293] Fixed update_furmark() and add FurMark Launcher --- .bin/Scripts/functions/update.py | 6 +++--- .bin/Scripts/settings/launchers.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index c7b30474..16a23afa 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -416,7 +416,7 @@ def update_furmark(): remove_from_kit('FurMark') # Prep - install_dir = r'{}\FurMarkTemp"'.format(global_vars['TmpDir']) + install_dir = r'{}\FurMarkTemp'.format(global_vars['TmpDir']) dest = r'{}\FurMark'.format(global_vars['CBinDir']) uninstaller = None @@ -426,7 +426,7 @@ def update_furmark(): # Install to temp cmd = [ r'{}\furmark_setup.exe'.format(global_vars['TmpDir']), - '/DIR="{}"'.format(install_dir), + '/DIR={}'.format(install_dir), '/SILENT'] run_program(cmd) @@ -436,7 +436,7 @@ def update_furmark(): r = re.search(r'^unins\d+\.(dat|exe)$', item.name, re.IGNORECASE) if r: if 'exe' in item.name: - uninstaller = r'{}\{}'.format(dest, item.name) + uninstaller = r'{}\{}'.format(install_dir, item.name) remove_item(item.path) # Uninstall from temp diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 34491575..85d8881d 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -314,6 +314,11 @@ LAUNCHERS = { r'call "%bin%\Scripts\init_client_dir.cmd" /Info', ], }, + 'FurMark': { + 'L_TYPE': 'Executable', + 'L_PATH': 'FurMark', + 'L_ITEM': 'FurMark.exe', + }, 'HitmanPro': { 'L_TYPE': 'Executable', 'L_PATH': 'HitmanPro', From f5caaf09c2582b87e53c8cc71242c4adae6b7b85 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sat, 6 Oct 2018 19:20:29 -0600 Subject: [PATCH 261/293] Fixed updateshutup10() --- .bin/Scripts/functions/update.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 16a23afa..145f3642 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -639,7 +639,7 @@ def update_adobe_reader_dc(): def update_eset_config(): """Copy config files to .cbin before compress_item""" - dest = r'{}\ESETConfigs'.format(global_vars['cbindir']) + dest = r'{}\ESETConfigs'.format(global_vars['CBinDir']) include_path = r'{}\_include\ESETConfigs'.format(global_vars['CBinDir']) if os.path.exists(include_path): shutil.copytree(include_path, dest) @@ -853,17 +853,18 @@ def update_shutup10(): # Remove existing folders remove_from_kit('ShutUp10') + # Copy settings + dest = r'{}\ShutUp10'.format(global_vars['CBinDir']) + include_path = r'{}\_include\ShutUp10'.format(global_vars['CBinDir']) + if os.path.exists(include_path): + shutil.copytree(include_path, dest) + # Download download_generic( r'{}\ShutUp10'.format(global_vars['CBinDir']), 'OOSU10.exe', SOURCE_URLS['ShutUp10']) - # Copy settings - include_path = r'{}\_include\ESETConfigs'.format(global_vars['CBinDir']) - if os.path.exists(include_path): - shutil.copytree(include_path, dest) - def update_wiztree(): # Stop running processes for process in ['WizTree.exe', 'WizTree64.exe']: From b1f495dada4bfec09fea0b06a86372b3aad9fa2f Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sat, 6 Oct 2018 20:33:07 -0600 Subject: [PATCH 262/293] Updated ESET installation sections * Apply user config before installation * Disables splash screen and desktop notifications * Call update_eset_config() in update_kit.py * Fixed install_eset_nod32_av() * Moved ESET launcher to Installers --- .bin/Scripts/functions/setup.py | 18 +++++++++++++++--- .bin/Scripts/settings/launchers.py | 12 ++++++------ .bin/Scripts/update_kit.py | 1 + 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index af5b3791..81c84e25 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -32,6 +32,15 @@ SETTINGS_CLASSIC_START = { }, }, } +SETTINGS_ESET = { + r'Software\ESET\ESET Security\CurrentVersion\gui\UI_CONFIG': { + 'DWORD Items': { + 'FullScreenMode': 0, + 'ShowDesktopAlert': 0, + 'ShowSplash': 0, + }, + }, + } SETTINGS_EXPLORER_SYSTEM_HW = { # Enable RegBack r'System\CurrentControlSet\Control\Session Manager\Configuration Manager': { @@ -292,18 +301,21 @@ def install_classicstart_skin(): def install_eset_nod32_av(scan_pups=True): """Install ESET NOD32 AV with custom config.""" extract_item('ESETConfigs', silent=True) - config_file = '{BinDir}\ESETConfigs\{config_file}.xml'.format( + config_file = r'{BinDir}\ESETConfigs\{config_file}.xml'.format( config_file='eset-config' if scan_pups else 'eset-config-no-pup', **global_vars) + # Apply user configuration + write_registry_settings(SETTINGS_ESET, all_users=False) + # Download result = try_and_print(message='Downloading Setup...', cs='Done', other_results=OTHER_RESULTS, function=download_generic, out_dir=global_vars['ClientDir'], out_name='eav_nt64.exe', - source_url=SOURCE_URLS['ESET NOD32']) + source_url=SOURCE_URLS['ESET NOD32 AV']) if not result['CS']: - raise GenericError('Failed to download ESET NOD32') + raise GenericError('Failed to download ESET NOD32 AV') # Install cmd = [r'{ClientDir}\eav_nt64.exe'.format(**global_vars), diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 85d8881d..2ff92d8a 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -13,12 +13,6 @@ LAUNCHERS = { 'L_PATH': 'd7II', 'L_ITEM': 'd7II.exe', }, - 'Install ESET NOD32 AV': { - 'L_TYPE': 'PyScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'install_eset_nod32_av.py', - 'L_ELEV': 'True', - }, 'Post-d7II Work': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -423,6 +417,12 @@ LAUNCHERS = { }, }, r'Installers': { + 'ESET NOD32 AV': { + 'L_TYPE': 'PyScript', + 'L_PATH': 'Scripts', + 'L_ITEM': 'install_eset_nod32_av.py', + 'L_ELEV': 'True', + }, 'SW Bundle': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 945a473f..4644548f 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -59,6 +59,7 @@ if __name__ == '__main__': # Installers print_info(' Installers') try_and_print(message='Adobe Reader DC...', function=update_adobe_reader_dc, other_results=other_results, width=40) + try_and_print(message='ESET Configs...', function=update_eset_config, other_results=other_results, width=40) try_and_print(message='Macs Fan Control...', function=update_macs_fan_control, other_results=other_results, width=40) try_and_print(message='MS Office...', function=update_office, other_results=other_results, width=40) try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40) From b495ce399d66fdc9e9290c045c76f52e36976304 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sat, 6 Oct 2018 21:49:26 -0600 Subject: [PATCH 263/293] Removed Adobe Reader from SW Bundle --- .bin/Scripts/install_sw_bundle.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.bin/Scripts/install_sw_bundle.py b/.bin/Scripts/install_sw_bundle.py index cc0c9a7f..42757753 100644 --- a/.bin/Scripts/install_sw_bundle.py +++ b/.bin/Scripts/install_sw_bundle.py @@ -27,10 +27,6 @@ if __name__ == '__main__': 'UnsupportedOSError': 'Unsupported OS', }} answer_extensions = D7_MODE or ask('Install Extensions?') - if D7_MODE: - answer_adobe_reader = False - else: - answer_adobe_reader = ask('Install Adobe Reader?') answer_vcr = D7_MODE or ask('Install Visual C++ Runtimes?') answer_ninite = D7_MODE or ask('Install Ninite Bundle?') if not D7_MODE and ( @@ -41,9 +37,6 @@ if __name__ == '__main__': answer_mse = False print_info('Installing Programs') - if answer_adobe_reader: - try_and_print(message='Adobe Reader DC...', - function=install_adobe_reader, other_results=other_results) if answer_vcr: install_vcredists() if answer_ninite: From 63086dcb1ecdba441fd8e67d875d62565008b1a2 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sat, 6 Oct 2018 22:27:33 -0600 Subject: [PATCH 264/293] Added 1201 Root CA * Allows uploaded crash reports under Windows --- .bin/1201_Root_CA.crt | 36 ++++++++++++++++++++++++++++++++ .bin/Scripts/functions/common.py | 10 ++++++--- .bin/Scripts/settings/main.py | 2 ++ 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .bin/1201_Root_CA.crt diff --git a/.bin/1201_Root_CA.crt b/.bin/1201_Root_CA.crt new file mode 100644 index 00000000..7d8ae206 --- /dev/null +++ b/.bin/1201_Root_CA.crt @@ -0,0 +1,36 @@ +-----BEGIN CERTIFICATE----- +MIIGTzCCBDegAwIBAgIBfDANBgkqhkiG9w0BAQsFADCBsDELMAkGA1UEBhMCVVMx +DzANBgNVBAgTBk9yZWdvbjERMA8GA1UEBxMIUG9ydGxhbmQxHTAbBgNVBAoTFDEy +MDEgQ29tcHV0ZXIgUmVwYWlyMSMwIQYDVQQLExoxMjAxIENlcnRpZmljYXRlIEF1 +dGhvcml0eTEVMBMGA1UEAxMMMTIwMSBSb290IENBMSIwIAYJKoZIhvcNAQkBFhNt +YW5hZ2VtZW50QDEyMDEuY29tMB4XDTE4MDgyMDA2MDEwMFoXDTM4MDgyMDA2MDEw +MFowgbAxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZPcmVnb24xETAPBgNVBAcTCFBv +cnRsYW5kMR0wGwYDVQQKExQxMjAxIENvbXB1dGVyIFJlcGFpcjEjMCEGA1UECxMa +MTIwMSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxFTATBgNVBAMTDDEyMDEgUm9vdCBD +QTEiMCAGCSqGSIb3DQEJARYTbWFuYWdlbWVudEAxMjAxLmNvbTCCAiIwDQYJKoZI +hvcNAQEBBQADggIPADCCAgoCggIBANGYohJk5/CC/p14R7EpnhdEUF7Wvlnt8yuF +dtuyStlIGkLxPMlj9hQfoLDplQqlKBefTaI3WwrI/Hndso+jStLKgtRWRdyNB34K +AWqT04zXYGicdi3fqaMhEC4SPyX1tRXU2e9kjtIJ21AZx2F40NUjfOMKLVymZgXm +gkG1oA/BSzE8vIidrd/lJPwo0u+EYFa87y+9SHS93Ze1AVoTVqUzSMkjqt+6YIzJ +4XBD7UBvps0Mnd18HMUlXHFXusUL1K921W3wDVcMlNIIA8MJjQk+aVS/1EGSn+81 +C+r40x64lYkyh0ZUAHkVXUC/BUfa0SKx1Nfa4mSvtyPnUCb7Dir8MkTDKgopGCok +KmW+VvE2H8AEPCbcctFmhdip19laYxzyDhZ5wiQN6AOg64cWvDf6/uT9hyPvxkj1 +ps5vWElryzawTE7h1BI8liMqwsG1Y7cc6D0PABxPsp4iR8pde0oZtpLnEvejRodo +zz3BGvZjq+pHtRMjL+yiDtdAL+K+7/e7gNCQBIGsphahWIOf7TczWVgMNclTNxl3 +WZjKkOEs7j+prRTDvffV6H32+Tk5TwgMsfvnY4a37CkJ0L0d1JhWj9wO+gESfg3W +8yvt3hfcj3NOUMJWhJstqlIeX8dj7vVcMhjNvYJxabJmJgk+DNlHe55fXDGJ1CLO +E0EbRTyBAgMBAAGjcjBwMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFM+hXjFx +6BldZFBQW1Pn/Yp3vbw+MAsGA1UdDwQEAwIBBjARBglghkgBhvhCAQEEBAMCAAcw +HgYJYIZIAYb4QgENBBEWD3hjYSBjZXJ0aWZpY2F0ZTANBgkqhkiG9w0BAQsFAAOC +AgEALWcnu3auMSnSSF/kOiLvJ4RAnHZebGYNcUWM14u1K1/XtTB7AFzQIHX7BcDH +m/z4UEyhl9EdR5Bgf2Szuk+8+LyGqcdAdbPoK+bmcwwL8lufDnlIYBThKIBfU2Xw +vw41972B+HH5r1TZXve1EdJaLyImbxmq5s41oH7djGC+sowtyGuVqP7RBguXBGiJ +At1yfdPWVaxLmE8QFknkIvpgTmELpxasTfvgnQBenA3Ts0Z2hwN4796hLbRzGsb8 +4hKWAfQDP0klzXKRRyVeAueXxj/FcNZilYxv15MqMc4qrUiW0hXHluQM1yceNjNZ +SE4Igi1Ap71L4PpgkHIDfZD908UexGGkql+p4EWrpnXUYWTa0sHg1bFKQntgpyFg +86Ug0Q7ZNhImENzeigZknL0ceIdaNUCs7UPrkqpUSJR2yujp1JC3tX1LgKZw8B3J +fQx/8h3zzNuz5dVtr1wUJaUD0nGhMIRBEXb2t4jupEISSTN1pkHPcbNzhAQXjVUA +CJxnnz3jmyGsNCoQf7NWfaN6RSRTWehsC6m7JvPvoU2EZoQkSlNOv4xZuFpEx0u7 +MFDtC1cSGPH7YwYXPVc45xAMC6Ni8mvq93oT89XZNHIqE8/T8aPHLwYFgu1b1r/A +L8oMEnG5s8tG3n0DcFoOYsaIzVeP0r7B7e3zKui6DQLuu9E= +-----END CERTIFICATE----- diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index e3c7ac97..92fcbc92 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -588,6 +588,8 @@ def upload_crash_details(): if 'LogFile' in global_vars and global_vars['LogFile']: if ask('Upload crash details to {}?'.format(CRASH_SERVER['Name'])): with open(global_vars['LogFile']) as f: + certificate_authority = r'{}\{}'.format( + global_vars['BinDir'], ROOT_CA_NAME) data = '''{} ############################# Runtime Details: @@ -602,9 +604,11 @@ global_vars: {}'''.format(f.read(), sys.argv, global_vars) CRASH_SERVER['Url'], global_vars.get('Date-Time', 'Unknown Date-Time'), filename) - r = requests.put(url, data=data, - headers = {'X-Requested-With': 'XMLHttpRequest'}, - auth = (CRASH_SERVER['User'], CRASH_SERVER['Pass'])) + r = requests.put( + url, data=data, + headers={'X-Requested-With': 'XMLHttpRequest'}, + auth=(CRASH_SERVER['User'], CRASH_SERVER['Pass']), + verify=certificate_authority) # Raise exception if upload NS if not r.ok: raise Exception diff --git a/.bin/Scripts/settings/main.py b/.bin/Scripts/settings/main.py index 3810066a..b59dce45 100644 --- a/.bin/Scripts/settings/main.py +++ b/.bin/Scripts/settings/main.py @@ -25,6 +25,8 @@ IMGUR_CLIENT_ID='3d1ee1d38707b85' MPRIME_LIMIT='7' # of minutes to run Prime95 during hw-diags ROOT_PASSWORD='1201 loves computers!' TECH_PASSWORD='Sorted1201' +# Root Certificate Authority +ROOT_CA_NAME='1201_Root_CA.crt' # Server IP addresses OFFICE_SERVER_IP='10.11.1.20' QUICKBOOKS_SERVER_IP='10.11.1.20' From 3c950e3c56bf4ff786f15108e62d5515c3f04209 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:28:37 -0600 Subject: [PATCH 265/293] Adjusted System Diagnostic formatting --- .bin/Scripts/functions/browsers.py | 4 ++-- .bin/Scripts/system_diagnostics.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index c6834386..a17422ef 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -129,7 +129,7 @@ def archive_all_users(): # Backup browsers for all valid users print_info('Backing up browsers') for fake_env in sorted(user_envs, key=itemgetter('USERPROFILE')): - print_standard(fake_env['USERNAME']) + print_standard(' {}'.format(fake_env['USERNAME'])) for b_k, b_v in sorted(SUPPORTED_BROWSERS.items()): if b_k == 'Mozilla Firefox Dev': continue @@ -145,7 +145,7 @@ def archive_all_users(): global_vars['Tools']['SevenZip'], 'a', '-aoa', '-bso0', '-bse0', '-mx=1', archive_path, source_items] - try_and_print(message=' {}...'.format(b_k), + try_and_print(message='{}...'.format(b_k), function=run_program, cmd=cmd) print_standard(' ') diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 1ee42ffa..85edab97 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -145,7 +145,7 @@ if __name__ == '__main__': # Run BleachBit cleaners print_info('BleachBit Cleanup') for k, v in sorted(BLEACH_BIT_CLEANERS.items()): - try_and_print(message=' {}...'.format(k), + try_and_print(message='{}...'.format(k), function=run_bleachbit, cs='Done', other_results=other_results, cleaners=v, preview=bool(not D7_MODE)) From f1b3ffb483379996de843bf000d5cc8ec9577be7 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:31:01 -0600 Subject: [PATCH 266/293] Updated d7II cleanup for Windows 7 --- .bin/Scripts/functions/cleanup.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index 11c940aa..96570b4d 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -4,9 +4,13 @@ from functions.common import * # STATIC VARIABLES D7_HKCR_CLEANUP = { + r'batfile\shell\!!RunWithParms': {'Recurse': True}, r'batfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True}, + r'cmdfile\shell\!!RunWithParms': {'Recurse': True}, r'cmdfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True}, + r'exefile\shell\!!RunWithParms': {'Recurse': True}, r'exefile\shell\ResourceHacker': {'Recurse': True}, + r'regfile\shell\!!RunWithParms': {'Recurse': True}, r'regfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True}, } D7_HKCU_CLEANUP = { @@ -226,16 +230,20 @@ def delete_registry_key(hive, key, recurse=False): """Delete a registry key and all it's subkeys.""" access = winreg.KEY_ALL_ACCESS - if recurse: - # Delete all subkeys first - with winreg.OpenKeyEx(hive, key, 0, access) as k: - key_info = winreg.QueryInfoKey(k) - for x in range(key_info[0]): - subkey = r'{}\{}'.format(key, winreg.EnumKey(k, 0)) - delete_registry_key(hive, subkey) + try: + if recurse: + # Delete all subkeys first + with winreg.OpenKeyEx(hive, key, 0, access) as k: + key_info = winreg.QueryInfoKey(k) + for x in range(key_info[0]): + subkey = r'{}\{}'.format(key, winreg.EnumKey(k, 0)) + delete_registry_key(hive, subkey) - # Delete key - winreg.DeleteKey(hive, key) + # Delete key + winreg.DeleteKey(hive, key) + except FileNotFoundError: + # Ignore + pass def delete_registry_value(hive, key, value): """Delete a registry value.""" From 8e95eb5010c567c562d451f2499917baf8d0db56 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:31:32 -0600 Subject: [PATCH 267/293] Disabled Caffeine --- .bin/Scripts/functions/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index 92fcbc92..95bcaf7c 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -500,6 +500,8 @@ def sleep(seconds=2): def stay_awake(): """Prevent the system from sleeping or hibernating.""" + # DISABLED due to VCR2008 dependency + return # Bail if caffeine is already running for proc in psutil.process_iter(): if proc.name() == 'caffeine.exe': @@ -507,7 +509,7 @@ def stay_awake(): # Extract and run extract_item('Caffeine', silent=True) try: - popen_program(global_vars['Tools']['Caffeine']) + popen_program([global_vars['Tools']['Caffeine']]) except Exception: print_error('ERROR: No caffeine available.') print_warning('Please set the power setting to High Performance.') From 56a74798e5d18597e034eb53aa70f6763b66015c Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:32:14 -0600 Subject: [PATCH 268/293] Fixed unmute command --- .bin/Scripts/functions/diags.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/diags.py b/.bin/Scripts/functions/diags.py index 54c4105d..c2a0f2b8 100644 --- a/.bin/Scripts/functions/diags.py +++ b/.bin/Scripts/functions/diags.py @@ -135,7 +135,8 @@ def run_xmplay(): r'{BinDir}\XMPlay\music.7z'.format(**global_vars)] # Unmute audio first - run_nircmd(['mutesysvolume', '0']) + extract_item('NirCmd', silent=True) + run_nircmd('mutesysvolume', '0') # Open XMPlay popen_program(cmd) From 0546ac3e84a74a8e523ce4bdbbc79318ee960718 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:36:20 -0600 Subject: [PATCH 269/293] Fixed updating WinAIO Repair --- .bin/Scripts/functions/update.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 145f3642..b58b685f 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -138,7 +138,9 @@ def remove_from_kit(item): item_locations = [] for p in [global_vars['BinDir'], global_vars['CBinDir']]: item_locations.append(r'{}\{}'.format(p, item)) + item_locations.append(r'{}\{}.7z'.format(p, item)) item_locations.append(r'{}\_Drivers\{}'.format(p, item)) + item_locations.append(r'{}\_Drivers\{}.7z'.format(p, item)) for item_path in item_locations: remove_item(item_path) @@ -996,21 +998,18 @@ def update_winaiorepair(): # Stop running processes kill_process('Repair_Windows.exe') - # Remove existing folders - remove_from_kit('WinAIO Repair') - # Download download_to_temp('winaio.zip', SOURCE_URLS['WinAIO Repair']) # Extract - extract_temp_to_cbin('winaio.zip', 'WinAIO Repair') - dest = r'{}\WinAIO Repair'.format(global_vars['CBinDir']) + extract_temp_to_cbin('winaio.zip', 'WinAIORepair') + dest = r'{}\WinAIORepair'.format(global_vars['CBinDir']) for item in os.scandir(r'{}\Tweaking.com - Windows Repair'.format(dest)): dest_item = '{}\{}'.format(dest, item.name) if not os.path.exists(dest_item): shutil.move(item.path, dest_item) shutil.rmtree( - r'{}\WinAIO Repair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir'])) + r'{}\WinAIORepair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir'])) # Cleanup remove_from_temp('winaio.zip') From a7fd06598d188caea9254807e55f3a1a3f119364 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:37:20 -0600 Subject: [PATCH 270/293] Add HDTune launcher --- .bin/Scripts/settings/launchers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 2ff92d8a..63fd7005 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -313,6 +313,11 @@ LAUNCHERS = { 'L_PATH': 'FurMark', 'L_ITEM': 'FurMark.exe', }, + 'HDTune Pro': { + 'L_TYPE': 'Executable', + 'L_PATH': 'HDTunePro', + 'L_ITEM': 'HDTunePro.exe', + }, 'HitmanPro': { 'L_TYPE': 'Executable', 'L_PATH': 'HitmanPro', From ebc040cd565942394c2d6a6f55f523f40782299c Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:37:59 -0600 Subject: [PATCH 271/293] Adjusted formatting --- .bin/Scripts/update_kit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 4644548f..c7ff74cc 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -40,10 +40,10 @@ if __name__ == '__main__': try_and_print(message='AIDA64...', function=update_aida64, other_results=other_results, width=40) try_and_print(message='Autoruns...', function=update_autoruns, other_results=other_results, width=40) try_and_print(message='BleachBit...', function=update_bleachbit, other_results=other_results, width=40) - try_and_print(message='BlueScreenView...', function=update_bluescreenview, other_results=other_results, width=40) + try_and_print(message='Blue Screen View...', function=update_bluescreenview, other_results=other_results, width=40) try_and_print(message='ERUNT...', function=update_erunt, other_results=other_results, width=40) try_and_print(message='FurMark...', function=update_furmark, other_results=other_results, width=40) - try_and_print(message='HitmanPro...', function=update_hitmanpro, other_results=other_results, width=40) + try_and_print(message='Hitman Pro...', function=update_hitmanpro, other_results=other_results, width=40) try_and_print(message='HWiNFO...', function=update_hwinfo, other_results=other_results, width=40) try_and_print(message='NirCmd...', function=update_nircmd, other_results=other_results, width=40) try_and_print(message='ProduKey...', function=update_produkey, other_results=other_results, width=40) @@ -71,7 +71,7 @@ if __name__ == '__main__': try_and_print(message='Classic Start Skin...', function=update_classic_start_skin, other_results=other_results, width=40) try_and_print(message='Du...', function=update_du, other_results=other_results, width=40) try_and_print(message='Everything...', function=update_everything, other_results=other_results, width=40) - try_and_print(message='FirefoxExtensions...', function=update_firefox_ublock_origin, other_results=other_results, width=40) + try_and_print(message='Firefox Extensions...', function=update_firefox_ublock_origin, other_results=other_results, width=40) try_and_print(message='PuTTY...', function=update_putty, other_results=other_results, width=40) try_and_print(message='ShutUp10...', function=update_shutup10, other_results=other_results, width=40) try_and_print(message='Notepad++...', function=update_notepadplusplus, other_results=other_results, width=40) @@ -83,7 +83,7 @@ if __name__ == '__main__': try_and_print(message='AdwCleaner...', function=update_adwcleaner, other_results=other_results, width=40) try_and_print(message='KVRT...', function=update_kvrt, other_results=other_results, width=40) try_and_print(message='RKill...', function=update_rkill, other_results=other_results, width=40) - try_and_print(message='TDSSKiller...', function=update_tdsskiller, other_results=other_results, width=40) + try_and_print(message='TDSS Killer...', function=update_tdsskiller, other_results=other_results, width=40) try_and_print(message='WinAIO Repair...', function=update_winaiorepair, other_results=other_results, width=40) # Uninstallers From 3c3eada6a7ca08a44e3e38a969080b9fcc0541b9 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:38:45 -0600 Subject: [PATCH 272/293] Removed temp size from system checklist --- .bin/Scripts/system_checklist.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 910b44f7..bf0e78f2 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -97,9 +97,6 @@ if __name__ == '__main__': try_and_print(message='Installed RAM:', function=show_installed_ram, ns='Unknown', silent_function=False) show_free_space() - if D7_MODE: - try_and_print(message='Temp Size:', - function=show_temp_files_size, silent_function=False) try_and_print(message='Installed Antivirus:', function=get_installed_antivirus, ns='Unknown', other_results=other_results, print_return=True) From 85653593df81be8290b896fdc55b30676c6dfdeb Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 14:39:17 -0600 Subject: [PATCH 273/293] Add Linux Reader --- .bin/Scripts/functions/update.py | 40 ++++++++++++++++++++++++++++++++ .bin/Scripts/settings/sources.py | 1 + .bin/Scripts/update_kit.py | 1 + 3 files changed, 42 insertions(+) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index b58b685f..ff151bc1 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -266,6 +266,46 @@ def update_fastcopy(): os.remove(r'{}\setup.exe'.format(_path, _installer)) remove_from_temp('FastCopy.zip') +def update_linux_reader(): + # Stop running processes + for exe in ['LinuxReader.exe', 'LinuxReader64.exe']: + kill_process(exe) + + # Remove existing folders + remove_from_kit('LinuxReader') + + # Prep + install_dir = r'{}\LinuxReaderTemp'.format(global_vars['TmpDir']) + dest = r'{}\LinuxReader'.format(global_vars['CBinDir']) + uninstaller = None + + # Download + download_to_temp('LinuxReader.exe', SOURCE_URLS['Linux Reader']) + + # Install to temp + cmd = [ + r'{}\LinuxReader.exe'.format(global_vars['TmpDir']), + '/S', + '/D={}'.format(install_dir)] + run_program(cmd) + + # Copy files + shutil.copytree(install_dir, dest) + for item in os.scandir(dest): + r = re.search(r'^uninstall.*(dat|exe)$', item.name, re.IGNORECASE) + if r: + if 'exe' in item.name: + uninstaller = r'{}\{}'.format(install_dir, item.name) + remove_item(item.path) + + # Uninstall from temp + if uninstaller: + cmd = [uninstaller, '/S'] + run_program(cmd) + + # Cleanup + remove_from_temp('LinuxReader.exe') + def update_wimlib(): # Stop running processes kill_process('wimlib-imagex.exe') diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 6bbe7e08..c65735f2 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -25,6 +25,7 @@ SOURCE_URLS = { 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27656/eng/Intel%20SSD%20Toolbox%20-%20v3.5.2.exe', 'IOBit_Uninstaller': 'https://portableapps.duckduckgo.com/IObitUninstallerPortable_7.5.0.7.paf.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', + 'Linux Reader': 'https://www.diskinternals.com/download/Linux_Reader.exe', 'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe', 'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip', 'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index c7ff74cc..aec91c6b 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -32,6 +32,7 @@ if __name__ == '__main__': # Data Transfers print_info(' Data Transfers') try_and_print(message='FastCopy...', function=update_fastcopy, other_results=other_results, width=40) + try_and_print(message='Linux Reader...', function=update_linux_reader, other_results=other_results, width=40) try_and_print(message='wimlib...', function=update_wimlib, other_results=other_results, width=40) try_and_print(message='XYplorer...', function=update_xyplorer, other_results=other_results, width=40) From 877a9c6634df40e93691e50638a89d79dab97a5e Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 16:45:33 -0600 Subject: [PATCH 274/293] Added second ShutUp10 launcher --- .bin/Scripts/settings/launchers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 63fd7005..71ea189e 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -538,6 +538,12 @@ LAUNCHERS = { 'L_PATH': 'ShutUp10', 'L_ITEM': 'OOSU10.exe', }, + 'ShutUp10 (1201 Minimal Selection)': { + 'L_TYPE': 'Executable', + 'L_PATH': 'ShutUp10', + 'L_ITEM': 'OOSU10.exe', + 'L_ARGS': '1201.cfg', + }, 'Update Kit': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', From 8189d412eba230e1011d77536872293d0550826c Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 19:05:39 -0600 Subject: [PATCH 275/293] Enabled ERUNT registry backup in d7 diagnostics --- .bin/Scripts/functions/info.py | 4 +++- .bin/Scripts/system_diagnostics.py | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/info.py b/.bin/Scripts/functions/info.py index e306d767..ccf78bfe 100644 --- a/.bin/Scripts/functions/info.py +++ b/.bin/Scripts/functions/info.py @@ -82,7 +82,7 @@ def backup_power_plans(): cmd = ['powercfg', '-export', out, guid] run_program(cmd, check=False) -def backup_registry(): +def backup_registry(overwrite=False): """Backup registry including user hives.""" extract_item('erunt', silent=True) cmd = [ @@ -92,6 +92,8 @@ def backup_registry(): 'curuser', 'otherusers', '/noprogresswindow'] + if overwrite: + cmd.append('/noconfirmdelete') run_program(cmd) def get_folder_size(path): diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 85edab97..18a3677f 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -162,9 +162,9 @@ if __name__ == '__main__': function=backup_power_plans, cs='Done') try_and_print(message='Product Keys...', function=run_produkey, cs='Done', other_results=other_results) - if not D7_MODE: - try_and_print(message='Registry...', - function=backup_registry, cs='Done', other_results=other_results) + try_and_print(message='Registry...', + function=backup_registry, cs='Done', other_results=other_results, + overwrite=True) # Summary if not D7_MODE: From f9ab36fc7c69d404e840d9805c469ff5c85d7621 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 21:04:41 -0600 Subject: [PATCH 276/293] Reorganized ClientDir * "ClientDir\Info" renamed to "ClientDir\Logs" * Logs are sorted into subdirs based on the source: * KIT_NAME_FULL: WizardKit logs * d7II: d7II logs * Tools: Logs from tools called by WizardKit or d7II * (no subdir): System information * "ClientDir\Backups" * Switched to "Backups\Source\{Date}" from "Backups\{Date}\Source" --- .bin/Scripts/activate.py | 2 +- .bin/Scripts/borrowed/sensors.py | 54 +++++++++++----------- .bin/Scripts/cbs_fix.py | 9 ++-- .bin/Scripts/check_disk.py | 5 ++- .bin/Scripts/dism.py | 5 ++- .bin/Scripts/functions/activation.py | 2 +- .bin/Scripts/functions/backup.py | 26 +++++------ .bin/Scripts/functions/browsers.py | 16 +++---- .bin/Scripts/functions/cleanup.py | 58 ++++++++++++------------ .bin/Scripts/functions/common.py | 9 ++-- .bin/Scripts/functions/data.py | 36 +++++++-------- .bin/Scripts/functions/ddrescue.py | 4 +- .bin/Scripts/functions/diags.py | 9 ++-- .bin/Scripts/functions/disk.py | 60 ++++++++++++------------- .bin/Scripts/functions/info.py | 11 ++--- .bin/Scripts/functions/network.py | 4 +- .bin/Scripts/functions/product_keys.py | 2 +- .bin/Scripts/functions/repairs.py | 16 +++---- .bin/Scripts/functions/windows_setup.py | 16 +++---- .bin/Scripts/functions/winpe_menus.py | 30 ++++++------- .bin/Scripts/init_client_dir.cmd | 6 +-- .bin/Scripts/install_eset_nod32_av.py | 3 +- .bin/Scripts/install_sw_bundle.py | 5 ++- .bin/Scripts/install_vcredists.py | 7 +-- .bin/Scripts/post_d7.py | 4 +- .bin/Scripts/reset_browsers.py | 4 +- .bin/Scripts/safemode_enter.py | 6 +-- .bin/Scripts/safemode_exit.py | 6 +-- .bin/Scripts/settings/launchers.py | 20 +++++---- .bin/Scripts/settings/windows_builds.py | 6 +-- .bin/Scripts/sfc_scan.py | 5 ++- .bin/Scripts/system_checklist.py | 3 +- .bin/Scripts/system_checklist_hw.py | 3 +- .bin/Scripts/system_diagnostics.py | 4 +- .bin/Scripts/transferred_keys.py | 5 ++- .bin/Scripts/user_checklist.py | 4 +- .bin/Scripts/user_data_transfer.py | 17 +++---- 37 files changed, 244 insertions(+), 238 deletions(-) diff --git a/.bin/Scripts/activate.py b/.bin/Scripts/activate.py index 3555c46a..642e5edd 100644 --- a/.bin/Scripts/activate.py +++ b/.bin/Scripts/activate.py @@ -39,7 +39,7 @@ if __name__ == '__main__': selection = menu_select( '{}: Windows Activation Menu'.format(KIT_NAME_FULL), main_entries=activation_methods, action_entries=actions) - + if (selection.isnumeric()): result = try_and_print( message = activation_methods[int(selection)-1]['Name'], diff --git a/.bin/Scripts/borrowed/sensors.py b/.bin/Scripts/borrowed/sensors.py index 847f2619..39b00a4f 100644 --- a/.bin/Scripts/borrowed/sensors.py +++ b/.bin/Scripts/borrowed/sensors.py @@ -35,7 +35,7 @@ class feature(Structure): _fields_ = [("name", c_char_p), ("number", c_int), ("type", c_int)] - + # sensors_feature_type IN = 0x00 FAN = 0x01 @@ -71,10 +71,10 @@ COMPUTE_MAPPING = 4 def init(cfg_file = None): file = _libc.fopen(cfg_file.encode("utf-8"), "r") if cfg_file is not None else None - + if _hdl.sensors_init(file) != 0: raise Exception("sensors_init failed") - + if file is not None: _libc.fclose(file) @@ -84,10 +84,10 @@ def cleanup(): def parse_chip_name(orig_name): ret = chip_name() err= _hdl.sensors_parse_chip_name(orig_name.encode("utf-8"), byref(ret)) - + if err < 0: raise Exception(strerror(err)) - + return ret def strerror(errnum): @@ -101,10 +101,10 @@ def get_detected_chips(match, nr): @return: (chip, next nr to query) """ _nr = c_int(nr) - + if match is not None: match = byref(match) - + chip = _hdl.sensors_get_detected_chips(match, byref(_nr)) chip = chip.contents if bool(chip) else None return chip, _nr.value @@ -115,10 +115,10 @@ def chip_snprintf_name(chip, buffer_size=200): """ ret = create_string_buffer(buffer_size) err = _hdl.sensors_snprintf_chip_name(ret, buffer_size, byref(chip)) - + if err < 0: raise Exception(strerror(err)) - + return ret.value.decode("utf-8") def do_chip_sets(chip): @@ -128,7 +128,7 @@ def do_chip_sets(chip): err = _hdl.sensors_do_chip_sets(byref(chip)) if err < 0: raise Exception(strerror(err)) - + def get_adapter_name(bus): return _hdl.sensors_get_adapter_name(byref(bus)).decode("utf-8") @@ -177,60 +177,60 @@ class ChipIterator: def __init__(self, match = None): self.match = parse_chip_name(match) if match is not None else None self.nr = 0 - + def __iter__(self): return self - + def __next__(self): chip, self.nr = get_detected_chips(self.match, self.nr) - + if chip is None: raise StopIteration - + return chip - + def __del__(self): if self.match is not None: free_chip_name(self.match) - + def next(self): # python2 compability return self.__next__() - + class FeatureIterator: def __init__(self, chip): self.chip = chip self.nr = 0 - + def __iter__(self): return self - + def __next__(self): feature, self.nr = get_features(self.chip, self.nr) - + if feature is None: raise StopIteration - + return feature def next(self): # python2 compability return self.__next__() - + class SubFeatureIterator: def __init__(self, chip, feature): self.chip = chip self.feature = feature self.nr = 0 - + def __iter__(self): return self - + def __next__(self): subfeature, self.nr = get_all_subfeatures(self.chip, self.feature, self.nr) - + if subfeature is None: raise StopIteration - + return subfeature - + def next(self): # python2 compability return self.__next__() diff --git a/.bin/Scripts/cbs_fix.py b/.bin/Scripts/cbs_fix.py index a3b40a8d..ff619369 100644 --- a/.bin/Scripts/cbs_fix.py +++ b/.bin/Scripts/cbs_fix.py @@ -10,7 +10,8 @@ from functions.cleanup import * from functions.data import * init_global_vars() os.system('title {}: CBS Cleanup'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\CBS Cleanup.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\CBS Cleanup.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -20,18 +21,18 @@ if __name__ == '__main__': folder_path = r'{}\Backups'.format(KIT_NAME_SHORT) dest = select_destination(folder_path=folder_path, prompt='Which disk are we using for temp data and backup?') - + # Show details print_info('{}: CBS Cleanup Tool\n'.format(KIT_NAME_FULL)) show_data('Backup / Temp path:', dest) print_standard('\n') if (not ask('Proceed with CBS cleanup?')): abort() - + # Run Cleanup try_and_print(message='Running cleanup...', function=cleanup_cbs, cs='Done', dest_folder=dest) - + # Done print_standard('\nDone.') pause("Press Enter to exit...") diff --git a/.bin/Scripts/check_disk.py b/.bin/Scripts/check_disk.py index 734319f0..131e56b5 100644 --- a/.bin/Scripts/check_disk.py +++ b/.bin/Scripts/check_disk.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.repairs import * init_global_vars() os.system('title {}: Check Disk Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Check Disk.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Check Disk.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -45,7 +46,7 @@ if __name__ == '__main__': cs=cs, other_results=other_results, repair=repair) else: abort() - + # Done print_success('Done.') pause("Press Enter to exit...") diff --git a/.bin/Scripts/dism.py b/.bin/Scripts/dism.py index 1c88e51b..9cb6e7fe 100644 --- a/.bin/Scripts/dism.py +++ b/.bin/Scripts/dism.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.repairs import * init_global_vars() os.system('title {}: DISM helper Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\DISM helper tool.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\DISM Helper.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -46,7 +47,7 @@ if __name__ == '__main__': other_results=other_results, repair=repair) else: abort() - + # Done print_success('Done.') pause("Press Enter to exit...") diff --git a/.bin/Scripts/functions/activation.py b/.bin/Scripts/functions/activation.py index f54d1dca..24436418 100644 --- a/.bin/Scripts/functions/activation.py +++ b/.bin/Scripts/functions/activation.py @@ -59,7 +59,7 @@ def windows_is_activated(): ['cscript', '//nologo', SLMGR, '/xpr'], check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) activation_string = activation_string.stdout.decode() - + return bool(activation_string and 'permanent' in activation_string) if __name__ == '__main__': diff --git a/.bin/Scripts/functions/backup.py b/.bin/Scripts/functions/backup.py index e33cea2c..d872c4d0 100644 --- a/.bin/Scripts/functions/backup.py +++ b/.bin/Scripts/functions/backup.py @@ -16,7 +16,7 @@ def backup_partition(disk, par): """Create a backup image of a partition.""" if par.get('Image Exists', False) or par['Number'] in disk['Bad Partitions']: raise GenericAbort - + cmd = [ global_vars['Tools']['wimlib-imagex'], 'capture', @@ -48,7 +48,7 @@ def get_volume_display_name(mountpoint): serial_number = None max_component_length = None file_system_flags = None - + vol_info = kernel32.GetVolumeInformationW( ctypes.c_wchar_p(mountpoint), vol_name_buffer, @@ -59,16 +59,16 @@ def get_volume_display_name(mountpoint): fs_name_buffer, ctypes.sizeof(fs_name_buffer) ) - + name = '{} "{}"'.format(name, vol_name_buffer.value) except: pass - + return name def prep_disk_for_backup(destination, disk, backup_prefix): """Gather details about the disk and its partitions. - + This includes partitions that can't be backed up, whether backups already exist on the BACKUP_SERVER, partition names/sizes/used space, etc.""" @@ -83,7 +83,7 @@ def prep_disk_for_backup(destination, disk, backup_prefix): if disk['Valid Partitions'] <= 0: print_error('ERROR: No partitions can be backed up for this disk') raise GenericAbort - + # Prep partitions for par in disk['Partitions']: display = '{size} {fs}'.format( @@ -91,7 +91,7 @@ def prep_disk_for_backup(destination, disk, backup_prefix): width = width, size = par['Size'], fs = par['FileSystem']) - + if par['Number'] in disk['Bad Partitions']: # Set display string using partition description & OS type display = '* {display}\t\t{q}{name}{q}\t{desc} ({os})'.format( @@ -120,7 +120,7 @@ def prep_disk_for_backup(destination, disk, backup_prefix): display = '+ {}'.format(display) else: display = ' {}'.format(display) - + # Append rest of Display String for valid/clobber partitions display += ' (Used: {used})\t{q}{name}{q}'.format( used = par['Used Space'], @@ -128,7 +128,7 @@ def prep_disk_for_backup(destination, disk, backup_prefix): name = par['Name']) # For all partitions par['Display String'] = display - + # Set description for bad partitions warnings = '\n' if disk['Bad Partitions']: @@ -148,7 +148,7 @@ def select_backup_destination(auto_select=True): actions = [ {'Name': 'Main Menu', 'Letter': 'M'}, ] - + # Add local disks for d in psutil.disk_partitions(): if re.search(r'^{}'.format(global_vars['Env']['SYSTEMDRIVE']), d.mountpoint, re.IGNORECASE): @@ -161,7 +161,7 @@ def select_backup_destination(auto_select=True): get_volume_display_name(d.mountpoint)), 'Letter': re.sub(r'^(\w):\\.*$', r'\1', d.mountpoint), }) - + # Size check for dest in destinations: if 'IP' in dest: @@ -175,11 +175,11 @@ def select_backup_destination(auto_select=True): if not destinations: print_warning('No backup destinations found.') raise GenericAbort - + # Skip menu? if len(destinations) == 1 and auto_select: return destinations[0] - + selection = menu_select( title = 'Where are we backing up to?', main_entries = destinations, diff --git a/.bin/Scripts/functions/browsers.py b/.bin/Scripts/functions/browsers.py index a17422ef..143d018d 100644 --- a/.bin/Scripts/functions/browsers.py +++ b/.bin/Scripts/functions/browsers.py @@ -137,7 +137,7 @@ def archive_all_users(): if not os.path.exists(source_path): continue source_items = source_path + '*' - archive_path = r'{BackupDir}\Browsers ({USERNAME})'.format( + archive_path = r'{BackupDir}\Browsers ({USERNAME})\{Date}'.format( **global_vars, **fake_env) os.makedirs(archive_path, exist_ok=True) archive_path += r'\{}.7z'.format(b_k) @@ -152,7 +152,7 @@ def archive_all_users(): def archive_browser(name): """Create backup of Browser saved in the BackupDir.""" source = '{}*'.format(browser_data[name]['user_data_path']) - dest = r'{BackupDir}\Browsers ({USERNAME})'.format( + dest = r'{BackupDir}\Browsers ({USERNAME})\{Date}'.format( **global_vars, **global_vars['Env']) archive = r'{}\{}.7z'.format(dest, name) os.makedirs(dest, exist_ok=True) @@ -274,7 +274,7 @@ def get_browser_details(name): profiles.extend( get_mozilla_profiles( search_path=browser['user_data_path'], dev=dev)) - + elif 'Opera' in name: if os.path.exists(browser['user_data_path']): profiles.append( @@ -413,7 +413,7 @@ def install_adblock(indent=8, width=32, just_firefox=False): winreg.QueryValue(HKLM, UBO_EXTRA_CHROME_REG) except FileNotFoundError: urls.append(UBO_EXTRA_CHROME) - + if len(urls) == 0: urls = ['chrome://extensions'] elif 'Opera' in browser: @@ -421,7 +421,7 @@ def install_adblock(indent=8, width=32, just_firefox=False): else: urls.append(UBO_CHROME) urls.append(UBO_EXTRA_CHROME) - + elif browser_data[browser]['base'] == 'mozilla': # Check for system extensions try: @@ -434,11 +434,11 @@ def install_adblock(indent=8, width=32, just_firefox=False): urls = ['about:addons'] else: urls = [UBO_MOZILLA] - + elif browser_data[browser]['base'] == 'ie': urls.append(IE_GALLERY) function=popen_program - + # By using check=False we're skipping any return codes so # it should only fail if the program can't be run # (or can't be found). @@ -461,7 +461,7 @@ def list_homepages(indent=8, width=32): end='', flush=True) print_warning('Not implemented', timestamp=False) continue - + # All other browsers print_info('{indent}{browser:<{width}}'.format( indent=' '*indent, width=width, browser=browser+'...')) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index 96570b4d..84227b30 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -46,7 +46,7 @@ def cleanup_adwcleaner(): # Main folder if os.path.exists(source_path): os.makedirs(global_vars['LogDir'], exist_ok=True) - dest_name = r'{LogDir}\{Date}\AdwCleaner'.format( + dest_name = r'{LogDir}\Tools\AdwCleaner'.format( **global_vars) dest_name = non_clobber_rename(dest_name) shutil.move(source_path, dest_name) @@ -93,7 +93,7 @@ def cleanup_cbs(dest_folder): def cleanup_d7ii(): """Sort d7II logs and remove temp items.""" d7_path = r'{}\d7II'.format(global_vars['ClientDir']) - d7_reports = r'{}_Reports'.format(d7_path) + d7_reports = r'{} Reports'.format(d7_path) d7_temp = r'{}\Temp'.format(d7_path) # Logs & Reports @@ -103,49 +103,46 @@ def cleanup_d7ii(): d7_date = '{}-{:02d}-{:02d}'.format( r.group(1), int(r.group(2)), int(r.group(3))) d7_mlogs = r'{}\Malware Logs'.format(entry.path) - log_dest = r'{SYSTEMDRIVE}\{prefix}\Info\{date}'.format( + log_dest = r'{SYSTEMDRIVE}\{prefix}\Logs\{date}'.format( prefix=KIT_NAME_SHORT, date=d7_date, **global_vars['Env']) - # Remove empty folders - for f in ('Malware Logs', 'Screen Shots'): - try: - os.rmdir(r'{}\{}'.format(entry.path, f)) - except FileNotFoundError: - pass - except OSError: - pass - # Malware Logs if os.path.exists(d7_mlogs): + m_report = 'MalwareScan_Report.txt' for m_entry in os.scandir(d7_mlogs): - prefix = '' - if m_entry.name == 'MalwareScan_Report.txt': - prefix = 'd7II_' - dest_path = r'{log_dest}\{prefix}{name}'.format( - log_dest=log_dest, - prefix=prefix, - name=m_entry.name) + dest_path = r'{}\{}\{}'.format( + log_dest, + 'd7II' if m_entry.name == m_report else 'Tools', + m_entry.name) dest_path = non_clobber_rename(dest_path) shutil.move(entry.path, dest_path) - try: - os.rmdir(d7_mlogs) - except OSError: - pass # Other items for o_entry in os.scandir(entry.path): - dest_path = r'{log_dest}\d7II_{name}'.format( + dest_path = r'{log_dest}\d7II\{name}'.format( log_dest=log_dest, name=m_entry.name) dest_path = non_clobber_rename(dest_path) + + # Just remove empty folders + if o_entry.isdir(): + try: + os.rmdir(o_entry.path) + except OSError: + pass + else: + continue + + # Move item shutil.move(entry.path, dest_path) - # Remove folder if empty + # Remove folder try: os.rmdir(entry.path) except OSError: + # Folder should be empty but whatever pass # Registry Items @@ -167,7 +164,7 @@ def cleanup_d7ii(): def cleanup_desktop(): """Move known backup files and reports into the ClientDir.""" - dest_folder = r'{ProgBackupDir}\{Date}\Desktop'.format(**global_vars) + dest_folder = r'{LogDir}\Tools'.format(**global_vars) os.makedirs(dest_folder, exist_ok=True) desktop_path = r'{USERPROFILE}\Desktop'.format(**global_vars['Env']) @@ -210,12 +207,13 @@ def cleanup_regbackups(): if not os.path.exists(source_path): return + # Make dest folder + dest_dir = r'{BackupDir}\Registry\{Date}'.format(**global_vars) + os.makedirs(dest_dir, exist_ok=True) + # Move to backup folder for entry in os.scandir(source_path): - os.makedirs(global_vars['ProgBackupDir'], exist_ok=True) - dest_path = r'{ProgBackupDir}\{Date}\Registry\{name}'.format( - name=entry.name, - **global_vars) + dest_path = r'{dest}\{name}'.format(dest=dest_dir, name=entry.name) dest_path = non_clobber_rename(dest_path) shutil.move(entry.path, dest_path) diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index 95bcaf7c..d489bbcf 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -168,8 +168,7 @@ def exit_script(return_value=0): # Remove dirs (if empty) for dir in ['BackupDir', 'LogDir', 'TmpDir']: try: - dir = global_vars[dir] - os.rmdir(dir) + os.rmdir(global_vars[dir]) except Exception: pass @@ -774,11 +773,9 @@ def set_common_vars(): **global_vars) global_vars['ClientDir'] = r'{SYSTEMDRIVE}\{prefix}'.format( prefix=KIT_NAME_SHORT, **global_vars['Env']) - global_vars['BackupDir'] = r'{ClientDir}\Backups\{Date}'.format( + global_vars['BackupDir'] = r'{ClientDir}\Backups'.format( **global_vars) - global_vars['LogDir'] = r'{ClientDir}\Info\{Date}'.format( - **global_vars) - global_vars['ProgBackupDir'] = r'{ClientDir}\Backups'.format( + global_vars['LogDir'] = r'{ClientDir}\Logs\{Date}'.format( **global_vars) global_vars['QuarantineDir'] = r'{ClientDir}\Quarantine'.format( **global_vars) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 7f50610f..26f61645 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -126,11 +126,11 @@ def cleanup_transfer(dest_path): if not os.path.exists(dest_path): # Bail if dest_path was empty and removed raise Exception - + # Fix attributes cmd = ['attrib', '-a', '-h', '-r', '-s', dest_path] run_program(cmd, check=False) - + for root, dirs, files in os.walk(dest_path, topdown=False): for name in dirs: # Remove empty directories and junction points @@ -278,7 +278,7 @@ def mount_volumes(all_devices=True, device_path=None, read_write=False): volumes.update({child['name']: child}) for grandchild in child.get('children', []): volumes.update({grandchild['name']: grandchild}) - + # Get list of mounted volumes mounted_volumes = get_mounted_volumes() @@ -357,7 +357,7 @@ def mount_backup_shares(read_write=False): if server['Mounted']: print_warning(mounted_str) continue - + mount_network_share(server, read_write) def mount_network_share(server, read_write=False): @@ -419,12 +419,12 @@ def run_fast_copy(items, dest): """Copy items to dest using FastCopy.""" if not items: raise Exception - + cmd = [global_vars['Tools']['FastCopy'], *FAST_COPY_ARGS] - cmd.append(r'/logfile={}\FastCopy.log'.format(global_vars['LogDir'])) + cmd.append(r'/logfile={LogDir}\Tools\FastCopy.log'.format(**global_vars)) cmd.extend(items) cmd.append('/to={}\\'.format(dest)) - + run_program(cmd) def run_wimextract(source, items, dest): @@ -491,7 +491,7 @@ def list_source_items(source_obj, rel_path=None): def scan_source(source_obj, dest_path, rel_path='', interactive=True): """Scan source for files/folders to transfer, returns list. - + This will scan the root and (recursively) any Windows.old folders.""" selected_items = [] win_olds = [] @@ -568,7 +568,7 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True): '{}{}{}'.format(dest_path, os.sep, old.name), rel_path=old.name, interactive=False)) - + # Done return selected_items @@ -712,7 +712,7 @@ def select_source(backup_prefix): item.name, # Image file ), 'Source': item}) - + # Check for local sources print_standard('Scanning for local sources...') set_thread_error_mode(silent=True) # Prevents "No disk" popups @@ -752,7 +752,7 @@ def select_source(backup_prefix): ' Local', d.mountpoint, item.name), 'Sort': r'{}{}'.format(d.mountpoint, item.name), 'Source': item}) - + set_thread_error_mode(silent=False) # Return to normal # Build Menu @@ -780,7 +780,7 @@ def select_source(backup_prefix): umount_backup_shares() pause("Press Enter to exit...") exit_script() - + # Sanity check if selected_source.is_file(): # Image-Based @@ -788,7 +788,7 @@ def select_source(backup_prefix): print_error('ERROR: Unsupported image: {}'.format( selected_source.path)) raise GenericError - + # Done return selected_source @@ -796,7 +796,7 @@ def select_volume(title='Select disk', auto_select=True): """Select disk from attached disks. returns dict.""" actions = [{'Name': 'Quit', 'Letter': 'Q'}] disks = [] - + # Build list of disks set_thread_error_mode(silent=True) # Prevents "No disk" popups for d in psutil.disk_partitions(): @@ -817,11 +817,11 @@ def select_volume(title='Select disk', auto_select=True): info['Display Name'] = '{} ({})'.format(info['Name'], free) disks.append(info) set_thread_error_mode(silent=False) # Return to normal - + # Skip menu? if len(disks) == 1 and auto_select: return disks[0] - + # Show menu selection = menu_select(title, main_entries=disks, action_entries=actions) if selection == 'Q': @@ -831,12 +831,12 @@ def select_volume(title='Select disk', auto_select=True): def set_thread_error_mode(silent=True): """Disable or Enable Windows error message dialogs. - + Disable when scanning for disks to avoid popups for empty cardreaders, etc """ # Code borrowed from: https://stackoverflow.com/a/29075319 kernel32 = ctypes.WinDLL('kernel32') - + if silent: kernel32.SetThreadErrorMode(SEM_FAIL, ctypes.byref(SEM_NORMAL)) else: diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index a93f88e4..f0770df2 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -323,7 +323,7 @@ class RecoveryState(): elif not is_writable_filesystem(dest): raise GenericError( 'Destination is mounted read-only, refusing to continue.') - + # Safety checks passed self.block_pairs.append(BlockPair(self.mode, source, dest)) @@ -1081,7 +1081,7 @@ def select_path(skip_device=None): except OSError: raise GenericError( 'Failed to create folder "{}"'.format(s_path)) - + # Create DirObj selected_path = DirObj(s_path) diff --git a/.bin/Scripts/functions/diags.py b/.bin/Scripts/functions/diags.py index c2a0f2b8..e55f5b12 100644 --- a/.bin/Scripts/functions/diags.py +++ b/.bin/Scripts/functions/diags.py @@ -147,7 +147,7 @@ def run_hitmanpro(): cmd = [ global_vars['Tools']['HitmanPro'], '/quiet', '/noinstall', '/noupload', - r'/log={LogDir}\hitman.xml'.format(**global_vars)] + r'/log={LogDir}\Tools\HitmanPro.txt'.format(**global_vars)] popen_program(cmd) def run_process_killer(): @@ -165,20 +165,17 @@ def run_rkill(): extract_item('RKill', silent=True) cmd = [ global_vars['Tools']['RKill'], - '-l', r'{LogDir}\RKill.log'.format(**global_vars), + '-s', '-l', r'{LogDir}\Tools\RKill.log'.format(**global_vars), '-new_console:n', '-new_console:s33V'] run_program(cmd, check=False) wait_for_process('RKill') - kill_process('notepad.exe') # RKill cleanup desktop_path = r'{USERPROFILE}\Desktop'.format(**global_vars['Env']) if os.path.exists(desktop_path): for item in os.scandir(desktop_path): if re.search(r'^RKill', item.name, re.IGNORECASE): - dest = re.sub(r'^(.*)\.', '\1_{Date-Time}.'.format( - **global_vars), item.name) - dest = r'{ClientDir}\Info\{name}'.format( + dest = r'{LogDir}\Tools\{name}'.format( name=dest, **global_vars) dest = non_clobber_rename(dest) shutil.move(item.path, dest) diff --git a/.bin/Scripts/functions/disk.py b/.bin/Scripts/functions/disk.py index 2d7cf0bb..75879ff8 100644 --- a/.bin/Scripts/functions/disk.py +++ b/.bin/Scripts/functions/disk.py @@ -14,13 +14,13 @@ REGEX_DISK_RAW = re.compile(r'Disk ID: 00000000', re.IGNORECASE) def assign_volume_letters(): """Assign a volume letter to all available volumes.""" remove_volume_letters() - + # Write script script = [] for vol in get_volumes(): script.append('select volume {}'.format(vol['Number'])) script.append('assign') - + # Run run_diskpart(script) @@ -35,7 +35,7 @@ def get_boot_mode(): boot_mode = 'UEFI' except: boot_mode = 'Unknown' - + return boot_mode def get_disk_details(disk): @@ -44,7 +44,7 @@ def get_disk_details(disk): script = [ 'select disk {}'.format(disk['Number']), 'detail disk'] - + # Run try: result = run_diskpart(script) @@ -60,13 +60,13 @@ def get_disk_details(disk): tmp = [s.split(':') for s in tmp if ':' in s] # Add key/value pairs to the details variable and return dict details.update({key.strip(): value.strip() for (key, value) in tmp}) - + return details - + def get_disks(): """Get list of attached disks using DiskPart.""" disks = [] - + try: # Run script result = run_diskpart(['list disk']) @@ -79,7 +79,7 @@ def get_disks(): num = tmp[0] size = human_readable_size(tmp[1]) disks.append({'Number': num, 'Size': size}) - + return disks def get_partition_details(disk, partition): @@ -89,7 +89,7 @@ def get_partition_details(disk, partition): 'select disk {}'.format(disk['Number']), 'select partition {}'.format(partition['Number']), 'detail partition'] - + # Diskpart details try: # Run script @@ -111,14 +111,14 @@ def get_partition_details(disk, partition): tmp = [s.split(':') for s in tmp if ':' in s] # Add key/value pairs to the details variable and return dict details.update({key.strip(): value.strip() for (key, value) in tmp}) - + # Get MBR type / GPT GUID for extra details on "Unknown" partitions guid = partition_uids.lookup_guid(details.get('Type')) if guid: details.update({ 'Description': guid.get('Description', '')[:29], 'OS': guid.get('OS', 'Unknown')[:27]}) - + if 'Letter' in details: # Disk usage try: @@ -128,7 +128,7 @@ def get_partition_details(disk, partition): details['Error'] = err.strerror else: details['Used Space'] = human_readable_size(tmp.used) - + # fsutil details cmd = [ 'fsutil', @@ -151,14 +151,14 @@ def get_partition_details(disk, partition): tmp = [s.split(':') for s in tmp if ':' in s] # Add key/value pairs to the details variable and return dict details.update({key.strip(): value.strip() for (key, value) in tmp}) - + # Set Volume Name details['Name'] = details.get('Volume Name', '') - + # Set FileSystem Type if details.get('FileSystem', '') not in ['RAW', 'Unknown']: details['FileSystem'] = details.get('File System Name', 'Unknown') - + return details def get_partitions(disk): @@ -167,7 +167,7 @@ def get_partitions(disk): script = [ 'select disk {}'.format(disk['Number']), 'list partition'] - + try: # Run script result = run_diskpart(script) @@ -181,7 +181,7 @@ def get_partitions(disk): num = tmp[0] size = human_readable_size(tmp[1]) partitions.append({'Number': num, 'Size': size}) - + return partitions def get_table_type(disk): @@ -190,7 +190,7 @@ def get_table_type(disk): script = [ 'select disk {}'.format(disk['Number']), 'uniqueid disk'] - + try: result = run_diskpart(script) except subprocess.CalledProcessError: @@ -203,7 +203,7 @@ def get_table_type(disk): part_type = 'MBR' elif REGEX_DISK_RAW.search(output): part_type = 'RAW' - + return part_type def get_volumes(): @@ -218,7 +218,7 @@ def get_volumes(): output = result.stdout.decode().strip() for tmp in re.findall(r'Volume (\d+)\s+([A-Za-z]?)\s+', output): vols.append({'Number': tmp[0], 'Letter': tmp[1]}) - + return vols def is_bad_partition(par): @@ -229,7 +229,7 @@ def prep_disk_for_formatting(disk=None): """Gather details about the disk and its partitions.""" disk['Format Warnings'] = '\n' width = len(str(len(disk['Partitions']))) - + # Bail early if disk is None: raise Exception('Disk not provided.') @@ -242,7 +242,7 @@ def prep_disk_for_formatting(disk=None): else: if (ask("Setup Windows to use BIOS/Legacy booting?")): disk['Use GPT'] = False - + # Set Display and Warning Strings if len(disk['Partitions']) == 0: disk['Format Warnings'] += 'No partitions found\n' @@ -252,7 +252,7 @@ def prep_disk_for_formatting(disk=None): width = width, size = partition['Size'], fs = partition['FileSystem']) - + if is_bad_partition(partition): # Set display string using partition description & OS type display += '\t\t{q}{name}{q}\t{desc} ({os})'.format( @@ -290,13 +290,13 @@ def remove_volume_letters(keep=None): """Remove all assigned volume letters using DiskPart.""" if not keep: keep = '' - + script = [] for vol in get_volumes(): if vol['Letter'].upper() != keep.upper(): script.append('select volume {}'.format(vol['Number'])) script.append('remove noerr') - + # Run script try: run_diskpart(script) @@ -306,12 +306,12 @@ def remove_volume_letters(keep=None): def run_diskpart(script): """Run DiskPart script.""" tempfile = r'{}\diskpart.script'.format(global_vars['Env']['TMP']) - + # Write script with open(tempfile, 'w') as f: for line in script: f.write('{}\n'.format(line)) - + # Run script cmd = [ r'{}\Windows\System32\diskpart.exe'.format( @@ -335,7 +335,7 @@ def scan_disks(): # Get partition info for disk disk['Partitions'] = get_partitions(disk) - + for partition in disk['Partitions']: # Get partition details partition.update(get_partition_details(disk, partition)) @@ -364,12 +364,12 @@ def select_disk(title='Which disk?', disks=[]): fs = partition['FileSystem']) if partition['Name']: p_name += '\t"{}"'.format(partition['Name']) - + # Show unsupported partition(s) if is_bad_partition(partition): p_name = '{YELLOW}{p_name}{CLEAR}'.format( p_name=p_name, **COLORS) - + display_name += '\n\t\t\t{}'.format(p_name) if not disk['Partitions']: display_name += '\n\t\t\t{}No partitions found.{}'.format( diff --git a/.bin/Scripts/functions/info.py b/.bin/Scripts/functions/info.py index ccf78bfe..7630a766 100644 --- a/.bin/Scripts/functions/info.py +++ b/.bin/Scripts/functions/info.py @@ -68,7 +68,8 @@ def backup_file_list(): def backup_power_plans(): """Export current power plans.""" - os.makedirs(r'{BackupDir}\Power Plans'.format(**global_vars), exist_ok=True) + os.makedirs(r'{BackupDir}\Power Plans\{Date}'.format( + **global_vars), exist_ok=True) plans = run_program(['powercfg', '/L']) plans = plans.stdout.decode().splitlines() plans = [p for p in plans if re.search(r'^Power Scheme', p)] @@ -76,7 +77,7 @@ def backup_power_plans(): guid = re.sub(r'Power Scheme GUID:\s+([0-9a-f\-]+).*', r'\1', p) name = re.sub( r'Power Scheme GUID:\s+[0-9a-f\-]+\s+\(([^\)]+)\).*', r'\1', p) - out = r'{BackupDir}\Power Plans\{name}.pow'.format( + out = r'{BackupDir}\Power Plans\{Date}\{name}.pow'.format( name=name, **global_vars) if not os.path.exists(out): cmd = ['powercfg', '-export', out, guid] @@ -87,7 +88,7 @@ def backup_registry(overwrite=False): extract_item('erunt', silent=True) cmd = [ global_vars['Tools']['ERUNT'], - r'{BackupDir}\Registry'.format(**global_vars), + r'{BackupDir}\Registry\{Date}'.format(**global_vars), 'sysreg', 'curuser', 'otherusers', @@ -374,7 +375,7 @@ def run_bleachbit(cleaners=None, preview=True): """Run BleachBit preview and save log. If preview is True then no files should be deleted.""" - error_path = r'{}\BleachBit.err'.format(global_vars['LogDir']) + error_path = r'{}\Tools\BleachBit.err'.format(global_vars['LogDir']) log_path = error_path.replace('err', 'log') extract_item('BleachBit', silent=True) @@ -473,7 +474,7 @@ def show_os_name(): def show_temp_files_size(): """Show total size of temp files identified by BleachBit.""" size = None - with open(r'{LogDir}\BleachBit.log'.format(**global_vars), 'r') as f: + with open(r'{LogDir}\Tools\BleachBit.log'.format(**global_vars), 'r') as f: for line in f.readlines(): if re.search(r'^disk space to be recovered:', line, re.IGNORECASE): size = re.sub(r'.*: ', '', line.strip()) diff --git a/.bin/Scripts/functions/network.py b/.bin/Scripts/functions/network.py index d040e343..5735c486 100644 --- a/.bin/Scripts/functions/network.py +++ b/.bin/Scripts/functions/network.py @@ -26,7 +26,7 @@ def connect_to_network(): # Bail if currently connected if is_connected(): return - + # WiFi if 'wl' in net_ifs: cmd = [ @@ -37,7 +37,7 @@ def connect_to_network(): message = 'Connecting to {}...'.format(WIFI_SSID), function = run_program, cmd = cmd) - + def is_connected(): """Check for a valid private IP.""" devs = psutil.net_if_addrs() diff --git a/.bin/Scripts/functions/product_keys.py b/.bin/Scripts/functions/product_keys.py index 705f46e9..988d36fd 100644 --- a/.bin/Scripts/functions/product_keys.py +++ b/.bin/Scripts/functions/product_keys.py @@ -39,7 +39,7 @@ def extract_keys(): keys[product] = [] if key not in keys[product]: keys[product].append(key) - + # Done return keys diff --git a/.bin/Scripts/functions/repairs.py b/.bin/Scripts/functions/repairs.py index e4d5e74f..589dccc3 100644 --- a/.bin/Scripts/functions/repairs.py +++ b/.bin/Scripts/functions/repairs.py @@ -24,11 +24,11 @@ def run_chkdsk_scan(): raise GenericError # Save stderr - with open(r'{LogDir}\CHKDSK.err'.format(**global_vars), 'a') as f: + with open(r'{LogDir}\Tools\CHKDSK.err'.format(**global_vars), 'a') as f: for line in out.stderr.decode().splitlines(): f.write(line.strip() + '\n') # Save stdout - with open(r'{LogDir}\CHKDSK.log'.format(**global_vars), 'a') as f: + with open(r'{LogDir}\Tools\CHKDSK.log'.format(**global_vars), 'a') as f: for line in out.stdout.decode().splitlines(): f.write(line.strip() + '\n') @@ -50,7 +50,7 @@ def run_dism(repair=False): cmd = [ 'DISM', '/Online', '/Cleanup-Image', '/RestoreHealth', - r'/LogPath:"{LogDir}\DISM_RestoreHealth.log"'.format( + r'/LogPath:"{LogDir}\Tools\DISM_RestoreHealth.log"'.format( **global_vars), '-new_console:n', '-new_console:s33V'] else: @@ -58,7 +58,7 @@ def run_dism(repair=False): cmd = [ 'DISM', '/Online', '/Cleanup-Image', '/ScanHealth', - r'/LogPath:"{LogDir}\DISM_ScanHealth.log"'.format( + r'/LogPath:"{LogDir}\Tools\DISM_ScanHealth.log"'.format( **global_vars), '-new_console:n', '-new_console:s33V'] run_program(cmd, pipe=False, check=False, shell=True) @@ -67,7 +67,7 @@ def run_dism(repair=False): cmd = [ 'DISM', '/Online', '/Cleanup-Image', '/CheckHealth', - r'/LogPath:"{LogDir}\DISM_CheckHealth.log"'.format(**global_vars)] + r'/LogPath:"{LogDir}\Tools\DISM_CheckHealth.log"'.format(**global_vars)] result = run_program(cmd, shell=True).stdout.decode() # Check result if 'no component store corruption detected' not in result.lower(): @@ -93,11 +93,11 @@ def run_sfc_scan(): '/scannow'] out = run_program(cmd, check=False) # Save stderr - with open(r'{LogDir}\SFC.err'.format(**global_vars), 'a') as f: + with open(r'{LogDir}\Tools\SFC.err'.format(**global_vars), 'a') as f: for line in out.stderr.decode('utf-8', 'ignore').splitlines(): f.write(line.strip() + '\n') # Save stdout - with open(r'{LogDir}\SFC.log'.format(**global_vars), 'a') as f: + with open(r'{LogDir}\Tools\SFC.log'.format(**global_vars), 'a') as f: for line in out.stdout.decode('utf-8', 'ignore').splitlines(): f.write(line.strip() + '\n') # Check result @@ -116,7 +116,7 @@ def run_tdsskiller(): **global_vars), exist_ok=True) cmd = [ global_vars['Tools']['TDSSKiller'], - '-l', r'{LogDir}\TDSSKiller.log'.format(**global_vars), + '-l', r'{LogDir}\Tools\TDSSKiller.log'.format(**global_vars), '-qpath', r'{QuarantineDir}\TDSSKiller'.format(**global_vars), '-accepteula', '-accepteulaksn', '-dcexact', '-tdlfs'] diff --git a/.bin/Scripts/functions/windows_setup.py b/.bin/Scripts/functions/windows_setup.py index cd7f8444..0952e64d 100644 --- a/.bin/Scripts/functions/windows_setup.py +++ b/.bin/Scripts/functions/windows_setup.py @@ -17,7 +17,7 @@ WINDOWS_VERSIONS = [ {'Name': 'Windows 7 Ultimate', 'Image File': 'Win7', 'Image Name': 'Windows 7 ULTIMATE'}, - + {'Name': 'Windows 8.1', 'Image File': 'Win8', 'Image Name': 'Windows 8.1', @@ -25,7 +25,7 @@ WINDOWS_VERSIONS = [ {'Name': 'Windows 8.1 Pro', 'Image File': 'Win8', 'Image Name': 'Windows 8.1 Pro'}, - + {'Name': 'Windows 10 Home', 'Image File': 'Win10', 'Image Name': 'Windows 10 Home', @@ -75,7 +75,7 @@ def find_windows_image(windows_version): image['Glob'] = '--ref="{}*.swm"'.format( image['Path'][:-4]) break - + # Display image to be used (if any) and return if image: print_info('Using image: {}'.format(image['Path'])) @@ -122,7 +122,7 @@ def format_gpt(disk): 'set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"', 'gpt attributes=0x8000000000000001', ] - + # Run run_diskpart(script) @@ -151,7 +151,7 @@ def format_mbr(disk): 'assign letter="T"', 'set id=27', ] - + # Run run_diskpart(script) @@ -197,11 +197,11 @@ def setup_windows_re(windows_version, windows_letter='W', tools_letter='T'): win = r'{}:\Windows'.format(windows_letter) winre = r'{}\System32\Recovery\WinRE.wim'.format(win) dest = r'{}:\Recovery\WindowsRE'.format(tools_letter) - + # Copy WinRE.wim os.makedirs(dest, exist_ok=True) shutil.copy(winre, r'{}\WinRE.wim'.format(dest)) - + # Set location cmd = [ r'{}\System32\ReAgentc.exe'.format(win), @@ -231,7 +231,7 @@ def wim_contains_image(filename, imagename): run_program(cmd) except subprocess.CalledProcessError: return False - + return True if __name__ == '__main__': diff --git a/.bin/Scripts/functions/winpe_menus.py b/.bin/Scripts/functions/winpe_menus.py index 64ffb666..1c732eca 100644 --- a/.bin/Scripts/functions/winpe_menus.py +++ b/.bin/Scripts/functions/winpe_menus.py @@ -90,7 +90,7 @@ def menu_backup(): message = 'Assigning letters...', function = assign_volume_letters, other_results = other_results) - + # Mount backup shares mount_backup_shares(read_write=True) @@ -107,12 +107,12 @@ def menu_backup(): else: print_error('ERROR: No disks found.') raise GenericAbort - + # Select disk to backup disk = select_disk('For which disk are we creating backups?', disks) if not disk: raise GenericAbort - + # "Prep" disk prep_disk_for_backup(destination, disk, backup_prefix) @@ -150,7 +150,7 @@ def menu_backup(): # Ask to proceed if (not ask('Proceed with backup?')): raise GenericAbort - + # Backup partition(s) print_info('\n\nStarting task.\n') for par in disk['Partitions']: @@ -163,7 +163,7 @@ def menu_backup(): if not result['CS'] and not isinstance(result['Error'], GenericAbort): errors = True par['Error'] = result['Error'] - + # Verify backup(s) if disk['Valid Partitions']: print_info('\n\nVerifying backup images(s)\n') @@ -270,7 +270,7 @@ def menu_setup(): # Select the version of Windows to apply windows_version = select_windows_version() - + # Find Windows image # NOTE: Reassign volume letters to ensure all devices are scanned try_and_print( @@ -289,12 +289,12 @@ def menu_setup(): else: print_error('ERROR: No disks found.') raise GenericAbort - + # Select disk to use as the OS disk dest_disk = select_disk('To which disk are we installing Windows?', disks) if not dest_disk: raise GenericAbort - + # "Prep" disk prep_disk_for_formatting(dest_disk) @@ -323,10 +323,10 @@ def menu_setup(): data = par['Display String'], warning = True) print_warning(dest_disk['Format Warnings']) - + if (not ask('Is this correct?')): raise GenericAbort - + # Safety check print_standard('\nSAFETY CHECK') print_warning('All data will be DELETED from the ' @@ -342,7 +342,7 @@ def menu_setup(): function = remove_volume_letters, other_results = other_results, keep=windows_image['Letter']) - + # Assign new letter for local source if necessary if windows_image['Local'] and windows_image['Letter'] in ['S', 'T', 'W']: new_letter = try_and_print( @@ -377,13 +377,13 @@ def menu_setup(): # We need to crash as the disk is in an unknown state print_error('ERROR: Failed to apply image.') raise GenericAbort - + # Create Boot files try_and_print( message = 'Updating boot files...', function = update_boot_partition, other_results = other_results) - + # Setup WinRE try_and_print( message = 'Updating recovery tools...', @@ -392,8 +392,8 @@ def menu_setup(): windows_version = windows_version) # Copy WinPE log(s) - source = r'{}\Info'.format(global_vars['ClientDir']) - dest = r'W:\{}\Info'.format(KIT_NAME_SHORT) + source = r'{}\Logs'.format(global_vars['ClientDir']) + dest = r'W:\{}\Logs\WinPE'.format(KIT_NAME_SHORT) shutil.copytree(source, dest) # Print summary diff --git a/.bin/Scripts/init_client_dir.cmd b/.bin/Scripts/init_client_dir.cmd index 4d73e7ab..073bd4f3 100644 --- a/.bin/Scripts/init_client_dir.cmd +++ b/.bin/Scripts/init_client_dir.cmd @@ -33,7 +33,7 @@ for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_SHORT "%SETTINGS%"`) do ( set "KIT_NAME_SHORT=!_v:~0,-1!" ) set "client_dir=%systemdrive%\%KIT_NAME_SHORT%" -set "log_dir=%client_dir%\Info\%iso_date%" +set "log_dir=%client_dir%\Logs\%iso_date%" :Flags set _backups= @@ -45,7 +45,7 @@ set _transfer= for %%f in (%*) do ( if /i "%%f" == "/DEBUG" (@echo on) if /i "%%f" == "/Backups" set _backups=True - if /i "%%f" == "/Info" set _info=True + if /i "%%f" == "/Logs" set _logs=True if /i "%%f" == "/Office" set _office=True if /i "%%f" == "/Quarantine" set _quarantine=True if /i "%%f" == "/QuickBooks" set _quickbooks=True @@ -54,7 +54,7 @@ for %%f in (%*) do ( :CreateDirs if defined _backups mkdir "%client_dir%\Backups">nul 2>&1 -if defined _info mkdir "%client_dir%\Info">nul 2>&1 +if defined _logs mkdir "%client_dir%\Logs">nul 2>&1 if defined _office mkdir "%client_dir%\Office">nul 2>&1 if defined _quarantine mkdir "%client_dir%\Quarantine">nul 2>&1 if defined _quickbooks mkdir "%client_dir%\QuickBooks">nul 2>&1 diff --git a/.bin/Scripts/install_eset_nod32_av.py b/.bin/Scripts/install_eset_nod32_av.py index 1bb45d9a..00cf98ec 100644 --- a/.bin/Scripts/install_eset_nod32_av.py +++ b/.bin/Scripts/install_eset_nod32_av.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.setup import * init_global_vars() os.system('title {}: Install ESET NOD32 AV'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Install ESET NOD32 AV.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Install ESET NOD32 AV.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: diff --git a/.bin/Scripts/install_sw_bundle.py b/.bin/Scripts/install_sw_bundle.py index 42757753..a316125e 100644 --- a/.bin/Scripts/install_sw_bundle.py +++ b/.bin/Scripts/install_sw_bundle.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.setup import * init_global_vars() os.system('title {}: SW Bundle Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Install SW Bundle.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Install SW Bundle.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': @@ -35,7 +36,7 @@ if __name__ == '__main__': answer_mse = ask('Install MSE?') else: answer_mse = False - + print_info('Installing Programs') if answer_vcr: install_vcredists() diff --git a/.bin/Scripts/install_vcredists.py b/.bin/Scripts/install_vcredists.py index 4a1f53ea..3207ee6e 100644 --- a/.bin/Scripts/install_vcredists.py +++ b/.bin/Scripts/install_vcredists.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.setup import * init_global_vars() os.system('title {}: Install Visual C++ Runtimes'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Install Visual C++ Runtimes.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Install Visual C++ Runtimes.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -20,12 +21,12 @@ if __name__ == '__main__': 'Error': { 'CalledProcessError': 'Unknown Error', }} - + if ask('Install Visual C++ Runtimes?'): install_vcredists() else: abort() - + print_standard('\nDone.') exit_script() except SystemExit: diff --git a/.bin/Scripts/post_d7.py b/.bin/Scripts/post_d7.py index 5f47cee7..41250db0 100644 --- a/.bin/Scripts/post_d7.py +++ b/.bin/Scripts/post_d7.py @@ -11,8 +11,8 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: Post-d7II Work'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Post-d7II Work.log'.format( - **global_vars, **global_vars['Env']) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Post-d7II Work.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: diff --git a/.bin/Scripts/reset_browsers.py b/.bin/Scripts/reset_browsers.py index e47cecbe..88342fb1 100644 --- a/.bin/Scripts/reset_browsers.py +++ b/.bin/Scripts/reset_browsers.py @@ -11,8 +11,8 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: Browser Reset Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Browser Reset ({USERNAME}).log'.format( - **global_vars, **global_vars['Env']) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Browser Reset ({USERNAME}).log'.format( + kit_name=KIT_NAME_FULL, **global_vars, **global_vars['Env']) D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/safemode_enter.py b/.bin/Scripts/safemode_enter.py index c3213cb9..cce7e28a 100644 --- a/.bin/Scripts/safemode_enter.py +++ b/.bin/Scripts/safemode_enter.py @@ -17,16 +17,16 @@ if __name__ == '__main__': other_results = { 'Error': {'CalledProcessError': 'Unknown Error'}, 'Warning': {}} - + if not ask('Enable booting to SafeMode (with Networking)?'): abort() - + # Configure SafeMode try_and_print(message='Set BCD option...', function=enable_safemode, other_results=other_results) try_and_print(message='Enable MSI in SafeMode...', function=enable_safemode_msi, other_results=other_results) - + # Done print_standard('\nDone.') pause('Press Enter to reboot...') diff --git a/.bin/Scripts/safemode_exit.py b/.bin/Scripts/safemode_exit.py index 1449cff5..af66222e 100644 --- a/.bin/Scripts/safemode_exit.py +++ b/.bin/Scripts/safemode_exit.py @@ -17,16 +17,16 @@ if __name__ == '__main__': other_results = { 'Error': {'CalledProcessError': 'Unknown Error'}, 'Warning': {}} - + if not ask('Disable booting to SafeMode?'): abort() - + # Configure SafeMode try_and_print(message='Remove BCD option...', function=disable_safemode, other_results=other_results) try_and_print(message='Disable MSI in SafeMode...', function=disable_safemode_msi, other_results=other_results) - + # Done print_standard('\nDone.') pause('Press Enter to reboot...') diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 71ea189e..fb194764 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -105,7 +105,7 @@ LAUNCHERS = { 'L_PATH': 'FastCopy', 'L_ITEM': 'FastCopy.exe', 'L_ARGS': ( - r' /logfile=%log_dir%\FastCopy.log' + r' /logfile=%log_dir%\Tools\FastCopy.log' r' /cmd=noexist_only' r' /utf8' r' /skip_empty_dir' @@ -145,7 +145,7 @@ LAUNCHERS = { ), 'L_ELEV': 'True', 'Extra Code': [ - r'call "%bin%\Scripts\init_client_dir.cmd" /Info /Transfer', + r'call "%bin%\Scripts\init_client_dir.cmd" /Logs /Transfer', ], }, 'FastCopy': { @@ -153,7 +153,7 @@ LAUNCHERS = { 'L_PATH': 'FastCopy', 'L_ITEM': 'FastCopy.exe', 'L_ARGS': ( - r' /logfile=%log_dir%\FastCopy.log' + r' /logfile=%log_dir%\Tools\FastCopy.log' r' /cmd=noexist_only' r' /utf8' r' /skip_empty_dir' @@ -192,7 +192,7 @@ LAUNCHERS = { r' /to=%client_dir%\Transfer_%iso_date%\ ' ), 'Extra Code': [ - r'call "%bin%\Scripts\init_client_dir.cmd" /Info /Transfer', + r'call "%bin%\Scripts\init_client_dir.cmd" /Logs /Transfer', ], }, 'KVRT': { @@ -302,10 +302,10 @@ LAUNCHERS = { 'L_TYPE': 'Executable', 'L_PATH': 'erunt', 'L_ITEM': 'ERUNT.EXE', - 'L_ARGS': '%client_dir%\Backups\%iso_date%\Registry sysreg curuser otherusers', + 'L_ARGS': '%client_dir%\Backups\Registry\%iso_date% sysreg curuser otherusers', 'L_ELEV': 'True', 'Extra Code': [ - r'call "%bin%\Scripts\init_client_dir.cmd" /Info', + r'call "%bin%\Scripts\init_client_dir.cmd" /Logs', ], }, 'FurMark': { @@ -323,7 +323,7 @@ LAUNCHERS = { 'L_PATH': 'HitmanPro', 'L_ITEM': 'HitmanPro.exe', 'Extra Code': [ - r'call "%bin%\Scripts\init_client_dir.cmd" /Info', + r'call "%bin%\Scripts\init_client_dir.cmd" /Logs', ], }, 'HWiNFO': { @@ -624,8 +624,10 @@ LAUNCHERS = { 'L_TYPE': 'Executable', 'L_PATH': 'RKill', 'L_ITEM': 'RKill.exe', + 'L_ARGS': '-s -l %log_dir%\Tools\RKill.log', + 'L_ELEV': 'True', 'Extra Code': [ - r'call "%bin%\Scripts\init_client_dir.cmd" /Info', + r'call "%bin%\Scripts\init_client_dir.cmd" /Logs', ], }, 'SFC Scan': { @@ -639,7 +641,7 @@ LAUNCHERS = { 'L_PATH': 'TDSSKiller', 'L_ITEM': 'TDSSKiller.exe', 'L_ARGS': ( - r' -l %log_dir%\TDSSKiller.log' + r' -l %log_dir%\Tools\TDSSKiller.log' r' -qpath %q_dir%' r' -accepteula' r' -accepteulaksn' diff --git a/.bin/Scripts/settings/windows_builds.py b/.bin/Scripts/settings/windows_builds.py index bdac8bf4..6c642928 100644 --- a/.bin/Scripts/settings/windows_builds.py +++ b/.bin/Scripts/settings/windows_builds.py @@ -6,16 +6,16 @@ WINDOWS_BUILDS = { '6000': ( 'Vista', 'RTM', 'Longhorn', None, 'unsupported'), '6001': ( 'Vista', 'SP1', 'Longhorn', None, 'unsupported'), '6002': ( 'Vista', 'SP2', 'Longhorn', None, 'unsupported'), - + '7600': ( '7', 'RTM', 'Vienna', None, 'unsupported'), '7601': ( '7', 'SP1', 'Vienna', None, 'outdated'), - + #9199 is a fake build since Win 8 is 6.2.9200 but that collides with Win 8.1 (6.3.9200) '9199': ( '8', 'RTM', None, None, 'unsupported'), '9200': ( '8.1', None, 'Blue', None, 'outdated'), '9600': ( '8.1', None, 'Update', None, None), - + '9841': ( '10', None, 'Threshold 1', None, 'preview build'), '9860': ( '10', None, 'Threshold 1', None, 'preview build'), '9879': ( '10', None, 'Threshold 1', None, 'preview build'), diff --git a/.bin/Scripts/sfc_scan.py b/.bin/Scripts/sfc_scan.py index 81211747..5ef17ae6 100644 --- a/.bin/Scripts/sfc_scan.py +++ b/.bin/Scripts/sfc_scan.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.repairs import * init_global_vars() os.system('title {}: SFC Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\SFC Tool.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\SFC Tool.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -28,7 +29,7 @@ if __name__ == '__main__': function=run_sfc_scan, other_results=other_results) else: abort() - + # Done print_standard('\nDone.') pause('Press Enter to exit...') diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index bf0e78f2..a2c23529 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -14,7 +14,8 @@ from functions.product_keys import * from functions.setup import * init_global_vars() os.system('title {}: System Checklist Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\System Checklist.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\System Checklist.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/system_checklist_hw.py b/.bin/Scripts/system_checklist_hw.py index 3e3ae4f1..de0b8ba3 100644 --- a/.bin/Scripts/system_checklist_hw.py +++ b/.bin/Scripts/system_checklist_hw.py @@ -14,7 +14,8 @@ from functions.product_keys import * from functions.setup import * init_global_vars() os.system('title {}: System HW Checklist Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\System HW Checklist.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\System HW Checklist.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 18a3677f..fb38bfb8 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -13,8 +13,8 @@ from functions.product_keys import * from functions.repairs import * init_global_vars() os.system('title {}: System Diagnostics Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\System Diagnostics.log'.format( - **global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\System Diagnostics.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) D7_MODE = 'd7mode' in sys.argv # Static Variables diff --git a/.bin/Scripts/transferred_keys.py b/.bin/Scripts/transferred_keys.py index 9829207e..8d2976ee 100644 --- a/.bin/Scripts/transferred_keys.py +++ b/.bin/Scripts/transferred_keys.py @@ -9,7 +9,8 @@ sys.path.append(os.getcwd()) from functions.product_keys import * init_global_vars() os.system('title {}: Transferred Key Finder'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\Transferred Keys.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\Transferred Keys.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -18,7 +19,7 @@ if __name__ == '__main__': print_info('{}: Transferred Key Finder\n'.format(KIT_NAME_FULL)) try_and_print(message='Searching for keys...', function=list_clientdir_keys, print_return=True) - + # Done print_standard('\nDone.') exit_script() diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index e71b4e96..8d79d738 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -11,8 +11,8 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: User Checklist Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\User Checklist ({USERNAME}).log'.format( - **global_vars, **global_vars['Env']) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\User Checklist ({USERNAME}).log'.format( + kit_name=KIT_NAME_FULL, **global_vars, **global_vars['Env']) D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/user_data_transfer.py b/.bin/Scripts/user_data_transfer.py index ce572f69..09f47344 100644 --- a/.bin/Scripts/user_data_transfer.py +++ b/.bin/Scripts/user_data_transfer.py @@ -10,7 +10,8 @@ from functions.data import * from functions.repairs import * init_global_vars() os.system('title {}: User Data Transfer Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\User Data Transfer.log'.format(**global_vars) +global_vars['LogFile'] = r'{LogDir}\{kit_name}\User Data Transfer.log'.format( + kit_name=KIT_NAME_FULL, **global_vars) if __name__ == '__main__': try: @@ -18,7 +19,7 @@ if __name__ == '__main__': stay_awake() clear_screen() print_info('{}: User Data Transfer Tool\n'.format(KIT_NAME_FULL)) - + # Get backup name prefix ticket_number = get_ticket_number() if ENABLED_TICKET_NUMBERS: @@ -26,16 +27,16 @@ if __name__ == '__main__': else: backup_prefix = get_simple_string(prompt='Enter backup name prefix') backup_prefix = backup_prefix.replace(' ', '_') - + # Set destination folder_path = r'{}\Transfer'.format(KIT_NAME_SHORT) dest = select_destination(folder_path=folder_path, prompt='Which disk are we transferring to?') - + # Set source items source = select_source(backup_prefix) items = scan_source(source, dest) - + # Transfer clear_screen() print_info('Transfer Details:\n') @@ -43,17 +44,17 @@ if __name__ == '__main__': show_data('Ticket:', ticket_number) show_data('Source:', source.path) show_data('Destination:', dest) - + if (not ask('Proceed with transfer?')): umount_backup_shares() abort() - + print_info('Transferring Data') transfer_source(source, dest, items) try_and_print(message='Removing extra files...', function=cleanup_transfer, cs='Done', dest_path=dest) umount_backup_shares() - + # Done try_and_print(message='Running KVRT...', function=run_kvrt, cs='Started') From ceae05817d02e93a9613cb5874736e81472db638 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 21:10:28 -0600 Subject: [PATCH 277/293] Delete ESET installer after setup --- .bin/Scripts/functions/setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index 81c84e25..0c592623 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -314,16 +314,20 @@ def install_eset_nod32_av(scan_pups=True): out_dir=global_vars['ClientDir'], out_name='eav_nt64.exe', source_url=SOURCE_URLS['ESET NOD32 AV']) + installer = r'{ClientDir}\eav_nt64.exe'.format(**global_vars) if not result['CS']: raise GenericError('Failed to download ESET NOD32 AV') # Install - cmd = [r'{ClientDir}\eav_nt64.exe'.format(**global_vars), + cmd = [installer, '--silent', '--accepteula', '--msi-property', 'PRODUCTTYPE=eav', 'PRODUCT_LANG=1033', 'PRODUCT_LANG_CODE=en-US', 'ADMINCFG="{}"'.format(config_file)] try_and_print(message='Installing ESET NOD32 AV...', other_results=OTHER_RESULTS, function=run_program, cmd=cmd) + + # Delete installer + remove_item(installer) def install_firefox_extensions(): """Update registry to install Firefox extensions for all users.""" From a8a2fce662805ba8167b4bdb0eefda9892fab0df Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 21:23:10 -0600 Subject: [PATCH 278/293] Added delete_empty_folders() * Deletes folders only if they're empty and does so from the bottom up * (i.e. "Some\Path" will be removed before "Some") --- .bin/Scripts/functions/cleanup.py | 34 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index 84227b30..cb400510 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -38,10 +38,7 @@ def cleanup_adwcleaner(): shutil.move(source_quarantine, dest_name) # Delete source folder if empty - try: - os.rmdir(source_path) - except OSError: - pass + delete_empty_folders(source_path) # Main folder if os.path.exists(source_path): @@ -139,11 +136,7 @@ def cleanup_d7ii(): shutil.move(entry.path, dest_path) # Remove folder - try: - os.rmdir(entry.path) - except OSError: - # Folder should be empty but whatever - pass + delete_empty_folders(entry.path) # Registry Items for key, settings in D7_HKCR_CLEANUP.items(): @@ -176,10 +169,7 @@ def cleanup_desktop(): shutil.move(entry.path, dest_name) # Remove dir if empty - try: - os.rmdir(dest_folder) - except OSError: - pass + delete_empty_folders(dest_folder) def cleanup_emsisoft(): """Remove EmsisoftCmd files from drive root.""" @@ -218,9 +208,23 @@ def cleanup_regbackups(): shutil.move(entry.path, dest_path) # Delete source folders if empty + delete_empty_folders(r'{}\Support'.format( + global_vars['Env']['SYSTEMDRIVE'])) + +def delete_empty_folders(folder_path): + """Delete all empty folders in path (depth first).""" + if not os.path.exists(folder_path) or not os.path.isdir(folder_path): + # Bail early (silently) + return + + # Delete empty subfolders first + for item in os.scandir(folder_path): + if item.is_dir(): + delete_empty_folders(item.path) + + # Remove top folder try: - os.rmdir(source_path) - os.rmdir(r'{}\Support'.format(global_vars['Env']['SYSTEMDRIVE'])) + os.rmdir(folder_path) except OSError: pass From 8d0ad7c20dbb011029da10f00a123fff68ec7c37 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 21:29:57 -0600 Subject: [PATCH 279/293] Cleanup ClientDir during the System Checklists --- .bin/Scripts/system_checklist.py | 3 +++ .bin/Scripts/system_checklist_hw.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index a2c23529..314a13d2 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -63,6 +63,9 @@ if __name__ == '__main__': function=cleanup_emsisoft, cs='Done') try_and_print(message='Registry Backup(s)...', function=cleanup_regbackups, cs='Done') + try_and_print(message='{}...'.format(KIT_NAME_FULL), + function=delete_empty_folders, cs='Done', + folder_path=global_vars['ClientDir']) # Export system info if not D7_MODE: diff --git a/.bin/Scripts/system_checklist_hw.py b/.bin/Scripts/system_checklist_hw.py index de0b8ba3..15ea9012 100644 --- a/.bin/Scripts/system_checklist_hw.py +++ b/.bin/Scripts/system_checklist_hw.py @@ -61,6 +61,12 @@ if __name__ == '__main__': try_and_print(message='Registry...', function=backup_registry, cs='Done', other_results=other_results) + # Cleanup + print_info('Cleanup') + try_and_print(message='{}...'.format(KIT_NAME_FULL), + function=delete_empty_folders, cs='Done', + folder_path=global_vars['ClientDir']) + # User data print_info('User Data') show_user_data_summary() From 47aeed6146763ea8a82a0c0764fe7204c52b2f50 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 21:40:54 -0600 Subject: [PATCH 280/293] Updated Notepad++ settings * Show menu, status bar, and tabs * Allow scrolling beyond last line --- .cbin/_include/NotepadPlusPlus/config.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.cbin/_include/NotepadPlusPlus/config.xml b/.cbin/_include/NotepadPlusPlus/config.xml index c2dd100c..1975e9a7 100644 --- a/.cbin/_include/NotepadPlusPlus/config.xml +++ b/.cbin/_include/NotepadPlusPlus/config.xml @@ -4,8 +4,8 @@ standard - hide - + show + vertical hide @@ -18,7 +18,7 @@ no yes - + yes @@ -29,7 +29,7 @@ - hide + show @@ -37,10 +37,10 @@ - + yes - + From bff141ff8dec87972d7ca17ff822210a2cde4551 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 22:03:30 -0600 Subject: [PATCH 281/293] Restore default UAC settings in post_d7.py --- .bin/Scripts/functions/cleanup.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index cb400510..92a047a6 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -1,6 +1,6 @@ # Wizard Kit: Functions - Cleanup -from functions.common import * +from functions.setup import * # STATIC VARIABLES D7_HKCR_CLEANUP = { @@ -23,6 +23,27 @@ HKU = winreg.HKEY_USERS HKCR = winreg.HKEY_CLASSES_ROOT HKCU = winreg.HKEY_CURRENT_USER HKLM = winreg.HKEY_LOCAL_MACHINE +UAC_DEFAULTS_WIN7 = { + r'Software\Microsoft\Windows\CurrentVersion\Policies\System': { + 'DWORD Items': { + 'ConsentPromptBehaviorAdmin': 5, + 'EnableLUA': 1, + 'PromptOnSecureDesktop': 1, + }, + }, + } +UAC_DEFAULTS_WIN10 = { + r'Software\Microsoft\Windows\CurrentVersion\Policies\System': { + 'DWORD Items': { + 'ConsentPromptBehaviorAdmin': 5, + 'ConsentPromptBehaviorUser': 3, + 'EnableInstallerDetection': 1, + 'EnableLUA': 1, + 'EnableVirtualization': 1, + 'PromptOnSecureDesktop': 1, + }, + }, + } def cleanup_adwcleaner(): """Move AdwCleaner folders into the ClientDir.""" @@ -154,6 +175,13 @@ def cleanup_d7ii(): os.rmdir(d7_path) except OSError: pass + + # Restore default UAC settings + if global_vars['OS']['Version'] == '10': + write_registry_settings(UAC_DEFAULTS_WIN10, all_users=True) + else: + # Haven't checked Win8 settings, only applying minimum set + write_registry_settings(UAC_DEFAULTS_WIN7, all_users=True) def cleanup_desktop(): """Move known backup files and reports into the ClientDir.""" From 4afbc1a0a43e880a5cc8083e34c213c1a76793aa Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Sun, 7 Oct 2018 22:09:20 -0600 Subject: [PATCH 282/293] Cleanup ClientDir during post_d7.py --- .bin/Scripts/post_d7.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bin/Scripts/post_d7.py b/.bin/Scripts/post_d7.py index 41250db0..dd796728 100644 --- a/.bin/Scripts/post_d7.py +++ b/.bin/Scripts/post_d7.py @@ -37,6 +37,9 @@ if __name__ == '__main__': print_info('Cleanup') try_and_print(message='d7II...', function=cleanup_d7ii, cs='Done') + try_and_print(message='{}...'.format(KIT_NAME_FULL), + function=delete_empty_folders, cs='Done', + folder_path=global_vars['ClientDir']) # Done print_standard('\nDone.') From 6a67052d83a0eef3645cf711c3f42ca7c884c384 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 8 Oct 2018 15:47:40 -0600 Subject: [PATCH 283/293] Show SMART for parent dev if child dev selected --- .bin/Scripts/functions/ddrescue.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index 4af88e84..eba04452 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -859,11 +859,14 @@ def run_ddrescue(state, pass_settings): height_ddrescue = height - height_smart - height_journal # Show SMART status + smart_dev = state.source_path + if state.source.parent: + smart_dev = state.source.parent smart_pane = tmux_splitw( '-bdvl', str(height_smart), '-PF', '#D', 'watch', '--color', '--no-title', '--interval', '300', - 'ddrescue-tui-smart-display', state.source_path) + 'ddrescue-tui-smart-display', smart_dev) # Show systemd journal output journal_pane = tmux_splitw( From fb9731539f564f785424597f4387096e28438471 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 8 Oct 2018 21:44:38 -0600 Subject: [PATCH 284/293] Added set_log_file() --- .bin/Scripts/cbs_fix.py | 3 +-- .bin/Scripts/check_disk.py | 3 +-- .bin/Scripts/dism.py | 3 +-- .bin/Scripts/functions/common.py | 10 ++++++++++ .bin/Scripts/install_eset_nod32_av.py | 3 +-- .bin/Scripts/install_sw_bundle.py | 3 +-- .bin/Scripts/install_vcredists.py | 3 +-- .bin/Scripts/post_d7.py | 3 +-- .bin/Scripts/reset_browsers.py | 3 +-- .bin/Scripts/sfc_scan.py | 3 +-- .bin/Scripts/system_checklist.py | 3 +-- .bin/Scripts/system_checklist_hw.py | 3 +-- .bin/Scripts/system_diagnostics.py | 3 +-- .bin/Scripts/transferred_keys.py | 3 +-- .bin/Scripts/user_checklist.py | 3 +-- .bin/Scripts/user_data_transfer.py | 3 +-- .bin/Scripts/winpe_root_menu.py | 2 +- 17 files changed, 26 insertions(+), 31 deletions(-) diff --git a/.bin/Scripts/cbs_fix.py b/.bin/Scripts/cbs_fix.py index ff619369..9a8ff10c 100644 --- a/.bin/Scripts/cbs_fix.py +++ b/.bin/Scripts/cbs_fix.py @@ -10,8 +10,7 @@ from functions.cleanup import * from functions.data import * init_global_vars() os.system('title {}: CBS Cleanup'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\CBS Cleanup.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('CBS Cleanup.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/check_disk.py b/.bin/Scripts/check_disk.py index 131e56b5..7e59fb2b 100644 --- a/.bin/Scripts/check_disk.py +++ b/.bin/Scripts/check_disk.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.repairs import * init_global_vars() os.system('title {}: Check Disk Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Check Disk.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('Check Disk.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/dism.py b/.bin/Scripts/dism.py index 9cb6e7fe..e49a9512 100644 --- a/.bin/Scripts/dism.py +++ b/.bin/Scripts/dism.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.repairs import * init_global_vars() os.system('title {}: DISM helper Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\DISM Helper.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('DISM Helper.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/functions/common.py b/.bin/Scripts/functions/common.py index d489bbcf..ee222937 100644 --- a/.bin/Scripts/functions/common.py +++ b/.bin/Scripts/functions/common.py @@ -758,6 +758,9 @@ def make_tmp_dirs(): """Make temp directories.""" os.makedirs(global_vars['BackupDir'], exist_ok=True) os.makedirs(global_vars['LogDir'], exist_ok=True) + os.makedirs(r'{}\{}'.format( + global_vars['LogDir'], KIT_NAME_FULL), exist_ok=True) + os.makedirs(r'{}\Tools'.format(global_vars['LogDir']), exist_ok=True) os.makedirs(global_vars['TmpDir'], exist_ok=True) def set_common_vars(): @@ -798,5 +801,12 @@ def set_linux_vars(): 'SevenZip': '7z', } +def set_log_file(log_name): + """Sets global var LogFile and creates path as needed.""" + folder_path = r'{}\{}'.format(global_vars['LogDir'], KIT_NAME_FULL) + log_file = r'{}\{}'.format(folder_path, log_name) + os.makedirs(folder_path, exist_ok=True) + global_vars['LogFile'] = log_file + if __name__ == '__main__': print("This file is not meant to be called directly.") diff --git a/.bin/Scripts/install_eset_nod32_av.py b/.bin/Scripts/install_eset_nod32_av.py index 00cf98ec..b53adfb6 100644 --- a/.bin/Scripts/install_eset_nod32_av.py +++ b/.bin/Scripts/install_eset_nod32_av.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.setup import * init_global_vars() os.system('title {}: Install ESET NOD32 AV'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Install ESET NOD32 AV.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('Install ESET NOD32 AV.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/install_sw_bundle.py b/.bin/Scripts/install_sw_bundle.py index a316125e..e04ea88a 100644 --- a/.bin/Scripts/install_sw_bundle.py +++ b/.bin/Scripts/install_sw_bundle.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.setup import * init_global_vars() os.system('title {}: SW Bundle Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Install SW Bundle.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('Install SW Bundle.log') D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/install_vcredists.py b/.bin/Scripts/install_vcredists.py index 3207ee6e..fd953551 100644 --- a/.bin/Scripts/install_vcredists.py +++ b/.bin/Scripts/install_vcredists.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.setup import * init_global_vars() os.system('title {}: Install Visual C++ Runtimes'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Install Visual C++ Runtimes.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('Install Visual C++ Runtimes.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/post_d7.py b/.bin/Scripts/post_d7.py index dd796728..e72c5869 100644 --- a/.bin/Scripts/post_d7.py +++ b/.bin/Scripts/post_d7.py @@ -11,8 +11,7 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: Post-d7II Work'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Post-d7II Work.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('Post-d7II Work.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/reset_browsers.py b/.bin/Scripts/reset_browsers.py index 88342fb1..4f1efbf9 100644 --- a/.bin/Scripts/reset_browsers.py +++ b/.bin/Scripts/reset_browsers.py @@ -11,8 +11,7 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: Browser Reset Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Browser Reset ({USERNAME}).log'.format( - kit_name=KIT_NAME_FULL, **global_vars, **global_vars['Env']) +set_log_file('Browser Reset ({USERNAME}).log'.format(**global_vars['Env'])) D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/sfc_scan.py b/.bin/Scripts/sfc_scan.py index 5ef17ae6..d7a3d3fc 100644 --- a/.bin/Scripts/sfc_scan.py +++ b/.bin/Scripts/sfc_scan.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.repairs import * init_global_vars() os.system('title {}: SFC Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\SFC Tool.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('SFC Tool.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 314a13d2..9803d90c 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -14,8 +14,7 @@ from functions.product_keys import * from functions.setup import * init_global_vars() os.system('title {}: System Checklist Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\System Checklist.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('System Checklist.log') D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/system_checklist_hw.py b/.bin/Scripts/system_checklist_hw.py index 15ea9012..ba696934 100644 --- a/.bin/Scripts/system_checklist_hw.py +++ b/.bin/Scripts/system_checklist_hw.py @@ -14,8 +14,7 @@ from functions.product_keys import * from functions.setup import * init_global_vars() os.system('title {}: System HW Checklist Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\System HW Checklist.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('System HW Checklist.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index fb38bfb8..affc4b4b 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -13,8 +13,7 @@ from functions.product_keys import * from functions.repairs import * init_global_vars() os.system('title {}: System Diagnostics Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\System Diagnostics.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('System Diagnostics.log') D7_MODE = 'd7mode' in sys.argv # Static Variables diff --git a/.bin/Scripts/transferred_keys.py b/.bin/Scripts/transferred_keys.py index 8d2976ee..b95ff3c9 100644 --- a/.bin/Scripts/transferred_keys.py +++ b/.bin/Scripts/transferred_keys.py @@ -9,8 +9,7 @@ sys.path.append(os.getcwd()) from functions.product_keys import * init_global_vars() os.system('title {}: Transferred Key Finder'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\Transferred Keys.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('Transferred Keys.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index 8d79d738..29accf82 100644 --- a/.bin/Scripts/user_checklist.py +++ b/.bin/Scripts/user_checklist.py @@ -11,8 +11,7 @@ from functions.cleanup import * from functions.setup import * init_global_vars() os.system('title {}: User Checklist Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\User Checklist ({USERNAME}).log'.format( - kit_name=KIT_NAME_FULL, **global_vars, **global_vars['Env']) +set_log_file('User Checklist ({USERNAME}).log'.format(**global_vars['Env'])) D7_MODE = 'd7mode' in sys.argv if __name__ == '__main__': diff --git a/.bin/Scripts/user_data_transfer.py b/.bin/Scripts/user_data_transfer.py index 09f47344..981e235a 100644 --- a/.bin/Scripts/user_data_transfer.py +++ b/.bin/Scripts/user_data_transfer.py @@ -10,8 +10,7 @@ from functions.data import * from functions.repairs import * init_global_vars() os.system('title {}: User Data Transfer Tool'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\{kit_name}\User Data Transfer.log'.format( - kit_name=KIT_NAME_FULL, **global_vars) +set_log_file('User Data Transfer.log') if __name__ == '__main__': try: diff --git a/.bin/Scripts/winpe_root_menu.py b/.bin/Scripts/winpe_root_menu.py index 03c763af..743d987b 100644 --- a/.bin/Scripts/winpe_root_menu.py +++ b/.bin/Scripts/winpe_root_menu.py @@ -11,7 +11,7 @@ from functions.winpe_menus import * TOOLS['SevenZip'].pop('64') init_global_vars() set_title('{}: Root Menu'.format(KIT_NAME_FULL)) -global_vars['LogFile'] = r'{LogDir}\WinPE.log'.format(**global_vars) +set_log_file('WinPE.log') if __name__ == '__main__': try: From 122df6240c7fabdf40f70c2c183702fd2b7d7d08 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 8 Oct 2018 21:46:50 -0600 Subject: [PATCH 285/293] Create new ClientDir folders to prevent crashes --- .bin/Scripts/init_client_dir.cmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/init_client_dir.cmd b/.bin/Scripts/init_client_dir.cmd index 073bd4f3..cbbe9fbc 100644 --- a/.bin/Scripts/init_client_dir.cmd +++ b/.bin/Scripts/init_client_dir.cmd @@ -54,7 +54,10 @@ for %%f in (%*) do ( :CreateDirs if defined _backups mkdir "%client_dir%\Backups">nul 2>&1 -if defined _logs mkdir "%client_dir%\Logs">nul 2>&1 +if defined _logs ( + mkdir "%log_dir%\%KIT_NAME_FULL%">nul 2>&1 + mkdir "%log_dir%\d7II">nul 2>&1 + mkdir "%log_dir%\Tools">nul 2>&1) if defined _office mkdir "%client_dir%\Office">nul 2>&1 if defined _quarantine mkdir "%client_dir%\Quarantine">nul 2>&1 if defined _quickbooks mkdir "%client_dir%\QuickBooks">nul 2>&1 From 93e4bd5c0f2e7b411a73b72db70bec10bab3ad6b Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 8 Oct 2018 21:47:11 -0600 Subject: [PATCH 286/293] Fix cleanup_d7ii() --- .bin/Scripts/functions/cleanup.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.bin/Scripts/functions/cleanup.py b/.bin/Scripts/functions/cleanup.py index 92a047a6..67675cbb 100644 --- a/.bin/Scripts/functions/cleanup.py +++ b/.bin/Scripts/functions/cleanup.py @@ -125,27 +125,29 @@ def cleanup_d7ii(): prefix=KIT_NAME_SHORT, date=d7_date, **global_vars['Env']) + os.makedirs(r'{}\d7II'.format(log_dest), exist_ok=True) + os.makedirs(r'{}\Tools'.format(log_dest), exist_ok=True) # Malware Logs if os.path.exists(d7_mlogs): m_report = 'MalwareScan_Report.txt' for m_entry in os.scandir(d7_mlogs): - dest_path = r'{}\{}\{}'.format( - log_dest, - 'd7II' if m_entry.name == m_report else 'Tools', - m_entry.name) + if m_entry.name == m_report: + dest_path = r'{}\d7II\{}'.format(log_dest, m_entry.name) + else: + dest_path = r'{}\Tools\{}'.format(log_dest, m_entry.name) dest_path = non_clobber_rename(dest_path) - shutil.move(entry.path, dest_path) + shutil.move(m_entry.path, dest_path) # Other items for o_entry in os.scandir(entry.path): dest_path = r'{log_dest}\d7II\{name}'.format( log_dest=log_dest, - name=m_entry.name) + name=o_entry.name) dest_path = non_clobber_rename(dest_path) # Just remove empty folders - if o_entry.isdir(): + if o_entry.is_dir(): try: os.rmdir(o_entry.path) except OSError: @@ -154,7 +156,7 @@ def cleanup_d7ii(): continue # Move item - shutil.move(entry.path, dest_path) + shutil.move(o_entry.path, dest_path) # Remove folder delete_empty_folders(entry.path) From 73654b2213e4976f3950b45c8ca6b140b84d9f8a Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 8 Oct 2018 23:12:35 -0600 Subject: [PATCH 287/293] Added d7II config files (from 2018-08) --- .bin/d7ii/3rd Party Tools/HMP.cmd | 11 + .bin/d7ii/3rd Party Tools/JRT_Auto.cmd | 17 + .bin/d7ii/3rd Party Tools/MBAM_Install.cmd | 27 + .bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd | 63 + .../3rd Party Tools/WizardKit Launcher.cmd | 14 + .bin/d7ii/3rd Party Tools/rkill.cmd | 5 + .bin/d7ii/Config/AltText.ini | 39 + .bin/d7ii/Config/AppOverrides.ini | 42 + .../CustomApps/AdwCleaner (Updated).cfg | 37 + .../Config/CustomApps/HitmanPro (Auto).cfg | 45 + .../Config/CustomApps/IObit Uninstaller.cfg | 34 + .../Config/CustomApps/Install SW Bundle.cfg | 34 + .../CustomApps/Malwarebytes Download.cfg | 35 + .../CustomApps/Malwarebytes Install.cfg | 34 + .../Config/CustomApps/Malwarebytes Scan.cfg | 34 + .../CustomApps/Malwarebytes Uninstall.cfg | 30 + .bin/d7ii/Config/CustomApps/RKill (Auto).cfg | 40 + .../CustomApps/WizardKit Browser Reset.cfg | 35 + .../CustomApps/WizardKit System Checklist.cfg | 35 + .../WizardKit System Diagnostics.cfg | 35 + .../CustomApps/WizardKit User Checklist.cfg | 35 + .../CustomApps_d7II/3rd Party Configs/HMP.cmd | 11 + .../3rd Party Configs/JRT_Auto.cmd | 17 + .../3rd Party Configs/Neutron.ini | 26 + .../3rd Party Configs/rkill.cmd | 5 + .../CustomApps_d7II/AS SSD Benchmark.cfg | 35 + .../Config/CustomApps_d7II/AdwCleaner.cfg | 36 + .../CustomApps_d7II/Auslogics DD Portable.cfg | 34 + .bin/d7ii/Config/CustomApps_d7II/Autoruns.cfg | 36 + .../Config/CustomApps_d7II/Avast! aswMBR.cfg | 33 + .../CustomApps_d7II/BatteryInfoView.cfg | 34 + .../Belarc Advisor (Install-Report).cfg | 36 + .../Bitdefender Rootkit Remover.cfg | 38 + .../Config/CustomApps_d7II/BluescreenView.cfg | 34 + .bin/d7ii/Config/CustomApps_d7II/CPU-Z.cfg | 39 + .../CustomApps_d7II/ComboFix (Uninstall).cfg | 33 + .bin/d7ii/Config/CustomApps_d7II/ComboFix.cfg | 34 + .../Config/CustomApps_d7II/CrowdInspect.cfg | 33 + .../CustomApps_d7II/CrystalDiskInfo.cfg | 37 + .../d7ii/Config/CustomApps_d7II/CurrPorts.cfg | 39 + .../CustomApps_d7II/ESET Smart Installer.cfg | 36 + .../Emsisoft a2cmd Deep Scan (Offline).cfg | 42 + .../Emsisoft a2cmd Deep Scan.cfg | 42 + .../Emsisoft a2cmd Quick Scan.cfg | 41 + .../Emsisoft a2cmd Smart Scan.cfg | 41 + .../Everything Search Engine.cfg | 39 + .bin/d7ii/Config/CustomApps_d7II/GMER.cfg | 34 + .../Config/CustomApps_d7II/GPU-Z Report.cfg | 37 + .bin/d7ii/Config/CustomApps_d7II/GPU-Z.cfg | 35 + .../Google Chrome Software Removal Tool.cfg | 36 + .../d7ii/Config/CustomApps_d7II/HeavyLoad.cfg | 39 + .../CustomApps_d7II/HitmanPro (Manual).cfg | 44 + .../d7ii/Config/CustomApps_d7II/HitmanPro.cfg | 45 + .bin/d7ii/Config/CustomApps_d7II/JRT.cfg | 42 + .../Kaspersky TDSSKiller (Silent).cfg | 35 + .../CustomApps_d7II/Kaspersky TDSSKiller.cfg | 35 + .../Config/CustomApps_d7II/KillEmAll v5.cfg | 36 + .../CustomApps_d7II/MBRCheck (Offline).cfg | 36 + .../MBRCheck (Report Only).cfg | 38 + .bin/d7ii/Config/CustomApps_d7II/MBRCheck.cfg | 36 + ... Office Config Analyzer Tool (Install).cfg | 35 + ...Office Config Analyzer Tool (Portable).cfg | 32 + .../MalwareBytes Anti-Rootkit.cfg | 37 + .../CustomApps_d7II/Malwarebytes v2.cfg | 39 + .../McAfee Stinger (Offline).cfg | 38 + .../McAfee Stinger (Silent).cfg | 37 + .../McAfee Stinger (Silent-Offline).cfg | 38 + .../Config/CustomApps_d7II/McAfee Stinger.cfg | 38 + .../Microsoft .NET Framework Repair Tool.cfg | 35 + .../Microsoft FixIt Portable.cfg | 34 + .../Microsoft FixIt Win Update (Auto).cfg | 34 + .../Microsoft FixIt Winsock (Auto).cfg | 34 + .../Microsoft Safety Scanner.cfg | 38 + .../CustomApps_d7II/Neutron (Sync Time).cfg | 35 + .bin/d7ii/Config/CustomApps_d7II/OTL.cfg | 34 + .../CustomApps_d7II/OpenHardwareMonitor.cfg | 34 + .../CustomApps_d7II/Opened Files View.cfg | 42 + .../CustomApps_d7II/OpenedFilesView.cfg | 24 + .../CustomApps_d7II/PatchMyPC (Auto).cfg | 37 + .../d7ii/Config/CustomApps_d7II/PatchMyPC.cfg | 37 + .../CustomApps_d7II/Petya Encryption Fix.cfg | 36 + .../Piriform CCleaner (Auto).cfg | 38 + .../CustomApps_d7II/Piriform CCleaner.cfg | 37 + .../Piriform Defraggler (Auto).cfg | 38 + .../CustomApps_d7II/Piriform Defraggler.cfg | 37 + .../CustomApps_d7II/Piriform Recuva.cfg | 33 + .../CustomApps_d7II/Piriform Speccy.cfg | 35 + .../CustomApps_d7II/PreviousFilesRecovery.cfg | 39 + .../Config/CustomApps_d7II/RegFromApp-x32.cfg | 39 + .../Config/CustomApps_d7II/RegFromApp-x64.cfg | 39 + .../Config/CustomApps_d7II/RegFromApp.cfg | 9 + .../CustomApps_d7II/Revo Uninstaller.cfg | 38 + .../Config/CustomApps_d7II/Rogue Killer.cfg | 41 + .../Config/CustomApps_d7II/ShadowCopyView.cfg | 39 + .../Should I Remove It (Uninstall).cfg | 33 + .../CustomApps_d7II/Should I Remove It.cfg | 39 + .../Sophos Virus Removal Tool.cfg | 39 + .../Config/CustomApps_d7II/SpaceSniffer.cfg | 33 + .../Config/CustomApps_d7II/StartUpLite.cfg | 35 + .../CustomApps_d7II/SuperAntiSpyware.cfg | 36 + .../Svchost Process Analyzer.cfg | 37 + .../Sysinternals PageDefrag (XP).cfg | 36 + .../Config/CustomApps_d7II/TCPOptimizer.cfg | 35 + .bin/d7ii/Config/CustomApps_d7II/TreeSize.cfg | 36 + .../CustomApps_d7II/USB Devices View.cfg | 39 + .../d7ii/Config/CustomApps_d7II/USBDeview.cfg | 28 + .../Config/CustomApps_d7II/UltraSearch.cfg | 40 + .../CustomApps_d7II/Unchecky (Install).cfg | 35 + .../VipreRescueScanner (Deep Scan).cfg | 40 + .../VipreRescueScanner (Manual).cfg | 39 + .../VipreRescueScanner (Quick Scan).cfg | 40 + .../VirusTotal Uploader Uninstall.cfg | 32 + .../CustomApps_d7II/VirusTotal Uploader.cfg | 36 + .../Config/CustomApps_d7II/WhatIsHang.cfg | 14 + .../Windows Repair AIO (Auto).cfg | 36 + .../CustomApps_d7II/Windows Repair AIO.cfg | 35 + .bin/d7ii/Config/CustomApps_d7II/cports.cfg | 40 + .../herdProtect (Uninstall).cfg | 32 + .../Config/CustomApps_d7II/herdProtect.cfg | 38 + .bin/d7ii/Config/CustomApps_d7II/rkill.cfg | 40 + .bin/d7ii/Config/Email.Settings.dat | Bin 0 -> 73 bytes .bin/d7ii/Config/FTP.Settings.dat | Bin 0 -> 78 bytes .bin/d7ii/Config/Folders.txt | 1 + .bin/d7ii/Config/IntFunctions/MBAM_Prefs.cfg | 5 + .bin/d7ii/Config/Links.txt | 16 + .bin/d7ii/Config/OS Branding/OSBranding.ini | 12 + .bin/d7ii/Config/OS Branding/oeminfo.ini | 3 + .bin/d7ii/Config/Profiles/Default.cfg | 1496 +++++++++++++++++ .../Config/Profiles/Diagnose and Testing.cfg | 306 ++++ .bin/d7ii/Config/Profiles/Full.cfg | 830 +++++++++ .bin/d7ii/Config/Profiles/Quick.cfg | 290 ++++ .bin/d7ii/Config/Reg.Settings.dat | Bin 0 -> 187 bytes .bin/d7ii/Config/RegLinks.txt | 1 + .bin/d7ii/Config/SiteSearch.txt | 4 + .bin/d7ii/Config/SortOrder/AuditBox1.cfg | 1 + .bin/d7ii/Config/SortOrder/AuditBox2.cfg | 1 + .bin/d7ii/Config/SortOrder/CustomMaint | 1 + .bin/d7ii/Config/SortOrder/CustomTools.cfg | 1 + .bin/d7ii/Config/SortOrder/MaintBox1.cfg | 1 + .bin/d7ii/Config/SortOrder/MaintBox2.cfg | 1 + .bin/d7ii/Config/SortOrder/MaintBox3.cfg | 1 + .bin/d7ii/Config/SortOrder/MalwareBox1.cfg | 1 + .bin/d7ii/Config/SortOrder/MalwareBox2.cfg | 1 + .bin/d7ii/Config/SortOrder/MalwareBox3.cfg | 1 + .bin/d7ii/Config/SortOrder/MalwarePost.cfg | 1 + .bin/d7ii/Config/SortOrder/MalwarePre.cfg | 1 + .bin/d7ii/Config/SortOrder/OfflineBox1.cfg | 1 + .bin/d7ii/Config/SortOrder/RepairBox1.cfg | 1 + .bin/d7ii/Config/SortOrder/RepairBox2.cfg | 1 + .bin/d7ii/Config/SortOrder/RepairBox3.cfg | 1 + .bin/d7ii/Config/SortOrder/RepairWin.cfg | 1 + .bin/d7ii/Config/SortOrder/TweaksBox1.cfg | 1 + .bin/d7ii/Config/SortOrder/d7IIEndSession.cfg | 1 + .../Config/SortOrder/d7IIStartSession.cfg | 1 + .bin/d7ii/Config/SortOrder/d7IIStartup.cfg | 1 + .../Templates/Email/BreakFix Report.txt | 21 + .../Email/Client Diagnostic Report.txt | 15 + .../Templates/Email/Contract Report.txt | 20 + .../Config/Templates/Notes/Company Info.txt | 8 + .../Templates/Notes/Detected Infections.txt | 6 + .../Templates/Notes/Equipment Received.txt | 12 + .../d7ii/Config/Templates/Notes/User Info.txt | 23 + .../Diagnostics - Maintenance Needed.txt | 19 + .../Diagnostics - PC Repair Needed.txt | 19 + .../Snippets/Diagnostics - Virus Detected.txt | 19 + .../Snippets/Diagnostics Completed.txt | 13 + .../Config/Templates/Snippets/Invoice.txt | 35 + .../Snippets/Maintenance Completed.txt | 25 + .../Snippets/PC Repair Completed.txt | 25 + .../Snippets/Virus Removal Completed.txt | 25 + .bin/d7ii/Config/d7II.ini | 162 ++ .bin/d7ii/Config/d7II_DefaultApps.INI | 58 + .bin/d7ii/Config/d7II_SFX_Mini.ini | 11 + .bin/d7ii/Modules/Defs/dUninstaller.txt | 1 + .../Defs/dUninstaller_FileSystemObjects.txt | 2 + .../Modules/Defs/dUninstaller_RegKeys.txt | 1 + .../Modules/Defs/dUninstaller_RegValues.txt | 2 + .../Modules/Defs/dUninstaller_RunValues.txt | 2 + .../Defs/dUninstaller_StartMenuFolders.txt | 1 + .../Modules/Defs/dUninstaller_Whitelist.txt | 1 + 180 files changed, 7684 insertions(+) create mode 100644 .bin/d7ii/3rd Party Tools/HMP.cmd create mode 100644 .bin/d7ii/3rd Party Tools/JRT_Auto.cmd create mode 100644 .bin/d7ii/3rd Party Tools/MBAM_Install.cmd create mode 100644 .bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd create mode 100644 .bin/d7ii/3rd Party Tools/WizardKit Launcher.cmd create mode 100644 .bin/d7ii/3rd Party Tools/rkill.cmd create mode 100644 .bin/d7ii/Config/AltText.ini create mode 100644 .bin/d7ii/Config/AppOverrides.ini create mode 100644 .bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg create mode 100644 .bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps/IObit Uninstaller.cfg create mode 100644 .bin/d7ii/Config/CustomApps/Install SW Bundle.cfg create mode 100644 .bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg create mode 100644 .bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg create mode 100644 .bin/d7ii/Config/CustomApps/Malwarebytes Scan.cfg create mode 100644 .bin/d7ii/Config/CustomApps/Malwarebytes Uninstall.cfg create mode 100644 .bin/d7ii/Config/CustomApps/RKill (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps/WizardKit Browser Reset.cfg create mode 100644 .bin/d7ii/Config/CustomApps/WizardKit System Checklist.cfg create mode 100644 .bin/d7ii/Config/CustomApps/WizardKit System Diagnostics.cfg create mode 100644 .bin/d7ii/Config/CustomApps/WizardKit User Checklist.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/HMP.cmd create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/JRT_Auto.cmd create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Neutron.ini create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/rkill.cmd create mode 100644 .bin/d7ii/Config/CustomApps_d7II/AS SSD Benchmark.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/AdwCleaner.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Auslogics DD Portable.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Autoruns.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Avast! aswMBR.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/BatteryInfoView.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Belarc Advisor (Install-Report).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Bitdefender Rootkit Remover.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/BluescreenView.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/CPU-Z.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/ComboFix (Uninstall).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/ComboFix.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/CrowdInspect.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/CrystalDiskInfo.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/CurrPorts.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/ESET Smart Installer.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan (Offline).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Quick Scan.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Smart Scan.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Everything Search Engine.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/GMER.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/GPU-Z Report.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/GPU-Z.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Google Chrome Software Removal Tool.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/HeavyLoad.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/HitmanPro (Manual).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/JRT.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/KillEmAll v5.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/MBRCheck (Offline).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/MBRCheck (Report Only).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/MBRCheck.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Install).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Portable).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/MalwareBytes Anti-Rootkit.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Malwarebytes v2.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Offline).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent-Offline).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/McAfee Stinger.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Microsoft .NET Framework Repair Tool.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Portable.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Win Update (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Winsock (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Microsoft Safety Scanner.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/OTL.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/OpenHardwareMonitor.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Opened Files View.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/OpenedFilesView.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/PatchMyPC (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/PatchMyPC.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Petya Encryption Fix.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Piriform Recuva.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Piriform Speccy.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/PreviousFilesRecovery.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/RegFromApp-x32.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/RegFromApp-x64.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/RegFromApp.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Revo Uninstaller.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Rogue Killer.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/ShadowCopyView.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Should I Remove It (Uninstall).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Should I Remove It.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Sophos Virus Removal Tool.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/SpaceSniffer.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/StartUpLite.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/SuperAntiSpyware.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Svchost Process Analyzer.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Sysinternals PageDefrag (XP).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/TCPOptimizer.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/TreeSize.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/USB Devices View.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/USBDeview.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/UltraSearch.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Unchecky (Install).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Deep Scan).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Manual).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Quick Scan).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader Uninstall.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/WhatIsHang.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO (Auto).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/cports.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/herdProtect (Uninstall).cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/herdProtect.cfg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/rkill.cfg create mode 100644 .bin/d7ii/Config/Email.Settings.dat create mode 100644 .bin/d7ii/Config/FTP.Settings.dat create mode 100644 .bin/d7ii/Config/Folders.txt create mode 100644 .bin/d7ii/Config/IntFunctions/MBAM_Prefs.cfg create mode 100644 .bin/d7ii/Config/Links.txt create mode 100644 .bin/d7ii/Config/OS Branding/OSBranding.ini create mode 100644 .bin/d7ii/Config/OS Branding/oeminfo.ini create mode 100644 .bin/d7ii/Config/Profiles/Default.cfg create mode 100644 .bin/d7ii/Config/Profiles/Diagnose and Testing.cfg create mode 100644 .bin/d7ii/Config/Profiles/Full.cfg create mode 100644 .bin/d7ii/Config/Profiles/Quick.cfg create mode 100644 .bin/d7ii/Config/Reg.Settings.dat create mode 100644 .bin/d7ii/Config/RegLinks.txt create mode 100644 .bin/d7ii/Config/SiteSearch.txt create mode 100644 .bin/d7ii/Config/SortOrder/AuditBox1.cfg create mode 100644 .bin/d7ii/Config/SortOrder/AuditBox2.cfg create mode 100644 .bin/d7ii/Config/SortOrder/CustomMaint create mode 100644 .bin/d7ii/Config/SortOrder/CustomTools.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MaintBox1.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MaintBox2.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MaintBox3.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MalwareBox1.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MalwareBox2.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MalwareBox3.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MalwarePost.cfg create mode 100644 .bin/d7ii/Config/SortOrder/MalwarePre.cfg create mode 100644 .bin/d7ii/Config/SortOrder/OfflineBox1.cfg create mode 100644 .bin/d7ii/Config/SortOrder/RepairBox1.cfg create mode 100644 .bin/d7ii/Config/SortOrder/RepairBox2.cfg create mode 100644 .bin/d7ii/Config/SortOrder/RepairBox3.cfg create mode 100644 .bin/d7ii/Config/SortOrder/RepairWin.cfg create mode 100644 .bin/d7ii/Config/SortOrder/TweaksBox1.cfg create mode 100644 .bin/d7ii/Config/SortOrder/d7IIEndSession.cfg create mode 100644 .bin/d7ii/Config/SortOrder/d7IIStartSession.cfg create mode 100644 .bin/d7ii/Config/SortOrder/d7IIStartup.cfg create mode 100644 .bin/d7ii/Config/Templates/Email/BreakFix Report.txt create mode 100644 .bin/d7ii/Config/Templates/Email/Client Diagnostic Report.txt create mode 100644 .bin/d7ii/Config/Templates/Email/Contract Report.txt create mode 100644 .bin/d7ii/Config/Templates/Notes/Company Info.txt create mode 100644 .bin/d7ii/Config/Templates/Notes/Detected Infections.txt create mode 100644 .bin/d7ii/Config/Templates/Notes/Equipment Received.txt create mode 100644 .bin/d7ii/Config/Templates/Notes/User Info.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Diagnostics - Maintenance Needed.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Diagnostics - PC Repair Needed.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Diagnostics - Virus Detected.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Diagnostics Completed.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Invoice.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Maintenance Completed.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/PC Repair Completed.txt create mode 100644 .bin/d7ii/Config/Templates/Snippets/Virus Removal Completed.txt create mode 100644 .bin/d7ii/Config/d7II.ini create mode 100644 .bin/d7ii/Config/d7II_DefaultApps.INI create mode 100644 .bin/d7ii/Config/d7II_SFX_Mini.ini create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller.txt create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt create mode 100644 .bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt diff --git a/.bin/d7ii/3rd Party Tools/HMP.cmd b/.bin/d7ii/3rd Party Tools/HMP.cmd new file mode 100644 index 00000000..0481ff41 --- /dev/null +++ b/.bin/d7ii/3rd Party Tools/HMP.cmd @@ -0,0 +1,11 @@ +pushd "%~dp0" +cd.. +set d7IIpath=%cd% +pushd "%~dp0" +echo %d7IIpath%\>HMP_Excludes.txt +echo %programfiles%\dSupportSuite\>>HMP_Excludes.txt +echo %programfiles(x86)%\dSupportSuite\>>HMP_Excludes.txt +echo %programfiles%\CryptoPrevent\>>HMP_Excludes.txt +echo %programfiles(x86)%\CryptoPrevent\>>HMP_Excludes.txt +echo %programfiles%\Foolish IT\CryptoPrevent\>>HMP_Excludes.txt +echo %programfiles(x86)%\Foolish IT\CryptoPrevent\>>HMP_Excludes.txt \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/JRT_Auto.cmd b/.bin/d7ii/3rd Party Tools/JRT_Auto.cmd new file mode 100644 index 00000000..549e8e0a --- /dev/null +++ b/.bin/d7ii/3rd Party Tools/JRT_Auto.cmd @@ -0,0 +1,17 @@ +@echo off&pushd "%~dp0" +start /wait JRT.exe -y -nr +pushd "%temp%\jrt" +if not exist "get.bat" pushd %systemdrive%\JRT +if not exist "get.bat" goto :eof +findstr /v /i "pause" get.bat>tmp.txt +findstr /v /i /b "notepad" tmp.txt>get.bat +echo.>>"%temp%\jrt\wl_services.cfg" +echo d7iisvc>>"%temp%\jrt\wl_services.cfg" +echo dSSEventSvc>>"%temp%\jrt\wl_services.cfg" +echo CryptoPreventEventSvc>>"%temp%\jrt\wl_services.cfg" +echo.>>"%temp%\jrt\wl_processes.cfg" +echo d7ii>>"%temp%\jrt\wl_processes.cfg" +echo dfunk>>"%temp%\jrt\wl_processes.cfg" +echo dSupportSuite>>"%temp%\jrt\wl_processes.cfg" +echo CryptoPrevent>>"%temp%\jrt\wl_processes.cfg" +start /wait cmd.exe /c get.bat \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/MBAM_Install.cmd b/.bin/d7ii/3rd Party Tools/MBAM_Install.cmd new file mode 100644 index 00000000..ef7edc09 --- /dev/null +++ b/.bin/d7ii/3rd Party Tools/MBAM_Install.cmd @@ -0,0 +1,27 @@ +@echo off + +setlocal +pushd "%~dp0" + +rem Remove stale marker if present +if exist "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" ( + del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" +) + +rem Set marker to prevent unintended MBAM removal +if exist "%PROGRAMFILES%\Malwarebytes\Anti-Malware\mbam.exe" ( + echo Previous Malwarebytes installation detected. + echo. > "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" +) +if exist "%PROGRAMFILES(X86)%\Malwarebytes Anti-Malware\mbam.exe" ( + rem MBAM v2 installation + echo Previous Malwarebytes [v2] installation detected. + echo. > "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" +) + +rem Install/Upgrade MBAM +echo Installing Malwarebytes... +start "" /wait mbam-setup.exe /VERYSILENT /NORESTART + +popd +endlocal \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd b/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd new file mode 100644 index 00000000..0fd4d2e7 --- /dev/null +++ b/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd @@ -0,0 +1,63 @@ +@echo off + +setlocal +pushd "%~dp0" + +:GetDate +:: 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. +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 + set _yyyy=%%L + set _mm=00%%J + set _dd=00%%G + set _hour=00%%H + set _minute=00%%I +) +:s_done +:: Pad digits with leading zeros +set _mm=%_mm:~-2% +set _dd=%_dd:~-2% +set _hour=%_hour:~-2% +set _minute=%_minute:~-2% +set iso_date=%_yyyy%-%_mm%-%_dd% + +rem Get uninstaller path from registry +set "uninstaller=" +for /f usebackq^ tokens^=2^ delims^=^" %%s in ( + `reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1" /v UninstallString` +) do ( + set "uninstaller=%%s" +) + +rem Copy logs to 1201 folder +echo "Copying logs..." +robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\LOGS" "%SYSTEMDRIVE%\1201\Info\%iso_date%\MBAM Logs" >nul +robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\ScanResults" "%SYSTEMDRIVE%\1201\Info\%iso_date%\MBAM Logs" >nul + +if exist "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" ( + rem Keep MBAM + echo Previous Malwarebytes installation detected. +) else ( + rem Move Quarantine to 1201 folder + move "%PROGRAMDATA%\Malwarebytes\Malwarebytes Anti-Malware\Quarantine" "%SYSTEMDRIVE%\1201\Quarantine\MBAM_%iso_date%_%_hour%%_minute%" + + rem Remove MBAM + echo No previous Malwarebytes installation detected. + if exist "%uninstaller%" ( + echo "Uninstalling Malwarebytes..." + start "" /wait "%uninstaller%" /VERYSILENT /NORESTART /LOG + ) else ( + color 4e + echo "Malwarebytes installation not found." + echo "" + echo "Press any key to exit... " + pause >nul + ) +) + +rem Remove marker +del /f "%SYSTEMDRIVE%\1201\Preserve-MBAM.marker" + +popd +endlocal \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/WizardKit Launcher.cmd b/.bin/d7ii/3rd Party Tools/WizardKit Launcher.cmd new file mode 100644 index 00000000..0102cd6b --- /dev/null +++ b/.bin/d7ii/3rd Party Tools/WizardKit Launcher.cmd @@ -0,0 +1,14 @@ +:: Launch WizardKit item +@echo off + +setlocal +pushd "%~dp0\..\..\.." + +rem Run WizardKit Launcher +call "%*" + +rem Sleep for 5 sec so d7II can wait for launched proc +"%systemroot%\System32\ping.exe" -n 5 127.0.0.1>nul + +popd +endlocal \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/rkill.cmd b/.bin/d7ii/3rd Party Tools/rkill.cmd new file mode 100644 index 00000000..6cca7c3a --- /dev/null +++ b/.bin/d7ii/3rd Party Tools/rkill.cmd @@ -0,0 +1,5 @@ +pushd "%~dp0" +cd.. +set d7IIpath=%cd% +pushd "%~dp0" +echo %d7IIpath%\d7II.exe>rkill_Excludes.txt diff --git a/.bin/d7ii/Config/AltText.ini b/.bin/d7ii/Config/AltText.ini new file mode 100644 index 00000000..9a985025 --- /dev/null +++ b/.bin/d7ii/Config/AltText.ini @@ -0,0 +1,39 @@ +[ShortDesc] +Autoruns=Manages Startup Items +Autoruns_Copy=Manages Startup Items +Autoruns (Verify and Log)=Manages Startup Items +Google Chrome Software Removal Tool=Remove add-ons, extensions, toolbars, and other software that may interfere with the operation of Google Chrome. +VipreRescueScanner (Deep Scan)=Virus scanner (Designed for both the Malware Removal and the Offline Operations tab) +VipreRescueScanner (Quick Scan)=Virus scanner (Designed for both the Malware Removal and the Offline Operations tab) +=Install software bundle +[ReportDesc] +Autoruns=Examined Windows startup items and removed unnecessary entries. +Autoruns_Copy=Examined Windows startup items and removed unnecessary entries. +Autoruns (Verify and Log)=Examined Windows startup items and removed unnecessary entries. +Google Chrome Software Removal Tool=Scanned for and removed any toolbars/extensions/add-ons that may interfere with the operation of Google Chrome. +VipreRescueScanner (Deep Scan)=Ran virus scans (Vipre) +VipreRescueScanner (Quick Scan)=Ran virus scans (Vipre) +28=Created a System Restore point. +32=Ran a Zero Access malware scan. +2=Uninstalled unnecessary applications +41=Re-wrote the default Safe Mode services to prevent potential issues with blue screens when entering Safe Mode. +33=Backed up all Registry Hives. +1=Uninstalled unnecessary applications +9=Repaired file associations for executable files. +10=Removed restrictive Windows policy settings. +11=Cleared proxy settings. +18=Scanned for known malware files and registry entries and removed anything found. +12=Deleted unnecessary temporary files from user profiles and temporary files used by Windows. +13=Deleted temporary internet cache from user profiles. +34=Scanned for viruses/malware with Microsoft Security Essentials / Windows Defender. +49=Scanned for Windows system component corruption to repair any issues found. +24=Repaired the built-in Windows firewall. +31=Set all network adapters to DHCP. +75=Apply static DNS settings to all NICs. +21=Ran repair and reset procedures on networking components. +25=Reset all settings to defaults for the built-in Windows firewall. +36=Manually examined the HOSTS file for hijacks or other issues. +22=Repaired the Windows Update services responsible for Windows Update functionality. +38=Performed repair routines to ensure the Winsock is operating properly. +83=Examined internet speed/bandwidth. +=Installed or updated commonly used applications (Adobe Reader, Google Chrome, etc) diff --git a/.bin/d7ii/Config/AppOverrides.ini b/.bin/d7ii/Config/AppOverrides.ini new file mode 100644 index 00000000..0e07e944 --- /dev/null +++ b/.bin/d7ii/Config/AppOverrides.ini @@ -0,0 +1,42 @@ +[Autoruns] +PostRunApp= +AlwaysAttemptDownload=1 +DLafterXdays=7 +EmailBeforeExecution=0 +PriorAlert=1 +[Autoruns_Copy] +PostRunApp= +AlwaysAttemptDownload=1 +DLafterXdays=7 +EmailBeforeExecution=0 +PriorAlert=1 +[Autoruns (Verify and Log)] +PostRunApp= +AlwaysAttemptDownload=1 +DLafterXdays=7 +EmailBeforeExecution=0 +PriorAlert=0 +[Google Chrome Software Removal Tool] +PostRunApp= +AlwaysAttemptDownload=1 +DLafterXdays=0 +EmailBeforeExecution=0 +PriorAlert=1 +[VipreRescueScanner (Deep Scan)] +PostRunApp= +AlwaysAttemptDownload=1 +DLafterXdays=1 +EmailBeforeExecution=0 +PriorAlert=0 +[VipreRescueScanner (Quick Scan)] +PostRunApp= +AlwaysAttemptDownload=1 +DLafterXdays=1 +EmailBeforeExecution=0 +PriorAlert=0 +[] +PostRunApp= +AlwaysAttemptDownload=0 +DLafterXdays=5 +EmailBeforeExecution=0 +PriorAlert=0 diff --git a/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg b/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg new file mode 100644 index 00000000..91ece4b2 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg @@ -0,0 +1,37 @@ +[Config] +LastEditDate=8/13/2018 5:54:29 PM +PostRunApp= +AppWebsite=https://www.malwarebytes.com/adwcleaner/ +AppDLPage=https://downloads.malwarebytes.com/file/adwcleaner +AppDesc=Toolbar Remover +App=AdwCleaner.exe +UseFTPServer=0 +AppURL=https://downloads.malwarebytes.com/file/adwcleaner +AppDLName=AdwCleaner.exe +AlwaysAttemptDownload=0 +DLafterXdays=.5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%systemdrive%\AdwCleaner\AdwCleaner*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Removed unnecessary internet browser add-ins (e.g. Toolbars) [AdwCleaner] +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=8/14/2018 diff --git a/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg b/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg new file mode 100644 index 00000000..decb9549 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg @@ -0,0 +1,45 @@ +[Config] +Author=2Shirt +LastEditDate=8/19/2018 3:48:33 PM +PostRunApp= +AppWebsite=http://www.surfright.nl/en/hitmanpro/ +AppDLPage=http://www.surfright.nl/en/downloads/ +AppDesc=Malware scanner +App=HitmanPro.exe +App64=HitmanPro_x64.exe +AppParms=/clean /noinstall /excludelist="%3rdpath%\HMP_Excludes.txt" /logtype=txt /log="%malreportdir%\HitmanPro_Scan_Log_%date%.txt" +AppURL64=https://dl.surfright.nl/HitmanPro_x64.exe +AppURL64B=http://dl.surfright.nl/FoolishIT/HitmanPro_x64.exe +AppDLName64=HitmanPro_x64.exe +UseFTPServer=0 +AppURL=https://dl.surfright.nl/HitmanPro.exe +AppURLB=http://dl.surfright.nl/FoolishIT/HitmanPro.exe +AppDLName=HitmanPro.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=1 +AppWaitTime=60 +AppRandomize=1 +CopyConfigFirst=HMP.cmd +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran Malware Scans (HitmanPro) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=8/19/2018 diff --git a/.bin/d7ii/Config/CustomApps/IObit Uninstaller.cfg b/.bin/d7ii/Config/CustomApps/IObit Uninstaller.cfg new file mode 100644 index 00000000..3ad516fc --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/IObit Uninstaller.cfg @@ -0,0 +1,34 @@ +[Config] +LastEditDate=8/25/2018 3:50:11 PM +PostRunApp= +App=WizardKit Launcher.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LogVerbiage=Uninstalled unnecessary / junk programs. +AppDesc=Application uninstaller and cleanup utility +AppParms=Uninstallers\IObit Uninstaller.cmd +WaitOnProcesses=IObitUninstallerPortable.exe +AppWaitTime=60 diff --git a/.bin/d7ii/Config/CustomApps/Install SW Bundle.cfg b/.bin/d7ii/Config/CustomApps/Install SW Bundle.cfg new file mode 100644 index 00000000..33d1196d --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/Install SW Bundle.cfg @@ -0,0 +1,34 @@ +[Config] +LastEditDate=8/30/2018 10:49:46 AM +PostRunApp= +AppParms=.bin\Scripts\launchers_for_d7\Install SW Bundle.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +App=WizardKit Launcher.cmd +AutoFlag=0 +WaitOnProcesses=ConEmu.exe;ConEmuC.exe;ConEmu64.exe;ConEmuC64.exe;python.exe;Ninite.exe +AppDesc=Install software bundle +LogVerbiage=Installed or updated commonly used applications (Adobe Reader, Google Chrome, etc) +AppWaitTime=60 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg new file mode 100644 index 00000000..e56531d5 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg @@ -0,0 +1,35 @@ +[Config] +LastEditDate=8/18/2018 6:36:00 PM +PostRunApp= +AppWebsite=https://www.malwarebytes.com/ +AppDLPage=https://downloads.malwarebytes.com/file/mb3/ +AppDesc=Download MBAM setup +UseFTPServer=0 +AppURL=https://downloads.malwarebytes.com/file/mb3/ +AppDLName=mbam-setup.exe +AlwaysAttemptDownload=1 +DLafterXdays=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=1 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +App=exit +LastDownload=8/31/2018 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg new file mode 100644 index 00000000..9a7ef75b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg @@ -0,0 +1,34 @@ +[Config] +LastEditDate=8/25/2018 3:50:23 PM +PostRunApp= +App=MBAM_Install.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +AppDesc=Install/Upgrade MBAM +LogVerbiage=Malwarebytes installed successfully. +LastDownload=8/18/2018 +Author=2Shirt +AppWaitTime=30 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Scan.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Scan.cfg new file mode 100644 index 00000000..21d0df01 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Scan.cfg @@ -0,0 +1,34 @@ +[Config] +LastEditDate=8/13/2018 4:48:53 PM +PostRunApp= +AppWebsite=https://www.malwarebytes.com/ +AppDLPage=https://downloads.malwarebytes.com/file/mb3/ +AppDesc=Malwarebytes Execution +App=%programfiles%\Malwarebytes\Anti-Malware\mbam.exe +App64=%programfiles%\Malwarebytes\Anti-Malware\mbam.exe +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Malwarebytes ran successfully. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Uninstall.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Uninstall.cfg new file mode 100644 index 00000000..272c9a6d --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Uninstall.cfg @@ -0,0 +1,30 @@ +[Config] +LastEditDate=8/13/2018 7:32:30 PM +PostRunApp= +App=MBAM_Uninstall.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +AppDesc=Uninstall MBAM (if not previously installed) diff --git a/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg b/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg new file mode 100644 index 00000000..71e4e669 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg @@ -0,0 +1,40 @@ +[Config] +Author=2Shirt +LastEditDate=8/19/2018 3:31:04 PM +PostRunApp= +AppWebsite=http://www.bleepingcomputer.com/forums/t/308364/rkill-what-it-does-and-what-it-doesnt-a-brief-introduction-to-the-program/ +AppDLPage=http://www.bleepingcomputer.com/download/rkill/ +AppDesc=Anti-Malware app. +App=rkill.exe +AppParms=-s -w "%3rdpath%\rkill_Excludes.txt" +UseFTPServer=0 +AppURL=https://download.bleepingcomputer.com/grinler/rkill.exe +AppDLName=rkill.exe +AlwaysAttemptDownload=1 +DLafterXdays=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +CopyConfigFirst=rkill.cmd +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%userprofile%\Desktop\rkill*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran Malware Scan (RKill) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=8/31/2018 diff --git a/.bin/d7ii/Config/CustomApps/WizardKit Browser Reset.cfg b/.bin/d7ii/Config/CustomApps/WizardKit Browser Reset.cfg new file mode 100644 index 00000000..1014745e --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/WizardKit Browser Reset.cfg @@ -0,0 +1,35 @@ +[Config] +Author=2Shirt +LastEditDate=8/25/2018 3:50:41 PM +PostRunApp= +AppDesc=WizardKit browser reset script (d7II mode) +App=WizardKit Launcher.cmd +AppParms=.bin\Scripts\launchers_for_d7\Browser Reset.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +WaitOnProcesses=ConEmu.exe;ConEmuC.exe;ConEmu64.exe;ConEmuC64.exe;python.exe +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Reset web browsers to safe defaults and removed any malicous addons found. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppWaitTime=30 diff --git a/.bin/d7ii/Config/CustomApps/WizardKit System Checklist.cfg b/.bin/d7ii/Config/CustomApps/WizardKit System Checklist.cfg new file mode 100644 index 00000000..03628cc8 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/WizardKit System Checklist.cfg @@ -0,0 +1,35 @@ +[Config] +Author=2Shirt +LastEditDate=8/25/2018 3:50:50 PM +PostRunApp= +AppDesc=WizardKit system checklist script (d7II mode) +App=WizardKit Launcher.cmd +AppParms=.bin\Scripts\launchers_for_d7\System Checklist.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +WaitOnProcesses=ConEmu.exe;ConEmuC.exe;ConEmu64.exe;ConEmuC64.exe;python.exe +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LogVerbiage=Examined and verified system-wide settings (available updates, drivers, activation, etc) +AppWaitTime=60 diff --git a/.bin/d7ii/Config/CustomApps/WizardKit System Diagnostics.cfg b/.bin/d7ii/Config/CustomApps/WizardKit System Diagnostics.cfg new file mode 100644 index 00000000..f7f239f3 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/WizardKit System Diagnostics.cfg @@ -0,0 +1,35 @@ +[Config] +Author=2Shirt +LastEditDate=8/25/2018 3:49:49 PM +PostRunApp= +AppDesc=WizardKit system diagnostics script (d7II mode) +App=WizardKit Launcher.cmd +AppParms=.bin\Scripts\launchers_for_d7\System Diagnostics.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +WaitOnProcesses=ConEmu.exe;ConEmuC.exe;ConEmu64.exe;ConEmuC64.exe;python.exe +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LogVerbiage=Ran OS built-in repairs and backed up system information +AppWaitTime=60 diff --git a/.bin/d7ii/Config/CustomApps/WizardKit User Checklist.cfg b/.bin/d7ii/Config/CustomApps/WizardKit User Checklist.cfg new file mode 100644 index 00000000..bf53c889 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps/WizardKit User Checklist.cfg @@ -0,0 +1,35 @@ +[Config] +Author=2Shirt +LastEditDate=8/25/2018 3:50:59 PM +PostRunApp= +AppDesc=WizardKit user checklist script (d7II mode) +App=WizardKit Launcher.cmd +AppParms=.bin\Scripts\launchers_for_d7\User Checklist.cmd +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +WaitOnProcesses=ConEmu.exe;ConEmuC.exe;ConEmu64.exe;ConEmuC64.exe;python.exe;firefox.exe;chrome.exe +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=1 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Verified web browser settings and functionality +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppWaitTime=60 diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/HMP.cmd b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/HMP.cmd new file mode 100644 index 00000000..0481ff41 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/HMP.cmd @@ -0,0 +1,11 @@ +pushd "%~dp0" +cd.. +set d7IIpath=%cd% +pushd "%~dp0" +echo %d7IIpath%\>HMP_Excludes.txt +echo %programfiles%\dSupportSuite\>>HMP_Excludes.txt +echo %programfiles(x86)%\dSupportSuite\>>HMP_Excludes.txt +echo %programfiles%\CryptoPrevent\>>HMP_Excludes.txt +echo %programfiles(x86)%\CryptoPrevent\>>HMP_Excludes.txt +echo %programfiles%\Foolish IT\CryptoPrevent\>>HMP_Excludes.txt +echo %programfiles(x86)%\Foolish IT\CryptoPrevent\>>HMP_Excludes.txt \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/JRT_Auto.cmd b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/JRT_Auto.cmd new file mode 100644 index 00000000..549e8e0a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/JRT_Auto.cmd @@ -0,0 +1,17 @@ +@echo off&pushd "%~dp0" +start /wait JRT.exe -y -nr +pushd "%temp%\jrt" +if not exist "get.bat" pushd %systemdrive%\JRT +if not exist "get.bat" goto :eof +findstr /v /i "pause" get.bat>tmp.txt +findstr /v /i /b "notepad" tmp.txt>get.bat +echo.>>"%temp%\jrt\wl_services.cfg" +echo d7iisvc>>"%temp%\jrt\wl_services.cfg" +echo dSSEventSvc>>"%temp%\jrt\wl_services.cfg" +echo CryptoPreventEventSvc>>"%temp%\jrt\wl_services.cfg" +echo.>>"%temp%\jrt\wl_processes.cfg" +echo d7ii>>"%temp%\jrt\wl_processes.cfg" +echo dfunk>>"%temp%\jrt\wl_processes.cfg" +echo dSupportSuite>>"%temp%\jrt\wl_processes.cfg" +echo CryptoPrevent>>"%temp%\jrt\wl_processes.cfg" +start /wait cmd.exe /c get.bat \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Neutron.ini b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Neutron.ini new file mode 100644 index 00000000..27c28250 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Neutron.ini @@ -0,0 +1,26 @@ +[Options] +AutoSync=1 +AutoExit=1 +Retry=1 + +[Servers] +0="time-a.nist.gov" +1="time-a.timefreq.bldrdoc.gov" +2="time-b.nist.gov" +3="time-b.timefreq.bldrdoc.gov" +4="time-c.timefreq.bldrdoc.gov" +5="us.pool.ntp.org" +6="1.us.pool.ntp.org" +7="2.us.pool.ntp.org" +8="3.us.pool.ntp.org" +9="pubts1-sj.witime.net" +10="pubts2-sj.witime.net" +11="rolex.usg.edu" +12="timekeeper.isi.edu" +13="nist1.symmetricom.com" +14="clock.via.net" +15="nist1.aol-ca.truetime.com" +16="nist.expertsmi.com" +17="nist1-dc.WiTime.net" +18="nist1-sj.WiTime.net" +19="utcnist.colorado.edu" diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/rkill.cmd b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/rkill.cmd new file mode 100644 index 00000000..6cca7c3a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/rkill.cmd @@ -0,0 +1,5 @@ +pushd "%~dp0" +cd.. +set d7IIpath=%cd% +pushd "%~dp0" +echo %d7IIpath%\d7II.exe>rkill_Excludes.txt diff --git a/.bin/d7ii/Config/CustomApps_d7II/AS SSD Benchmark.cfg b/.bin/d7ii/Config/CustomApps_d7II/AS SSD Benchmark.cfg new file mode 100644 index 00000000..220e910d --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/AS SSD Benchmark.cfg @@ -0,0 +1,35 @@ +[Config] +DisableCloudShare=0 +AppURL=http://www.alex-is.de/PHP/fusion/downloads.php?cat_id=4&file_id=9 +AppDLName=AS SSD Benchmark.zip +AlwaysAttemptDownload=1 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +App=AS SSD Benchmark\AS SSD Benchmark.exe +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=0 +LogVerbiage=Ran SSD testing/benchmark +LastDownload=10/27/2017 +AppWebsite=www.alex-is.de/PHP/fusion/downloads.php?cat_id=4&download_id=9 +Author=FoolishTech +LastEditDate=2/7/2014 9:45:12 AM +NonDirectURLs=0 +AppDLPage=www.alex-is.de/PHP/fusion/downloads.php?cat_id=4&download_id=9 +AppDesc=SSD Benchmark Utility +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/AdwCleaner.cfg b/.bin/d7ii/Config/CustomApps_d7II/AdwCleaner.cfg new file mode 100644 index 00000000..db51c8a9 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/AdwCleaner.cfg @@ -0,0 +1,36 @@ +[Config] +Author=FoolishTech +LastEditDate=7/21/2014 11:16:06 AM +AppWebsite=http://www.bleepingcomputer.com/download/adwcleaner/ +AppDLPage=http://www.bleepingcomputer.com/download/adwcleaner/ +AppDesc=Toolbar Remover +App=AdwCleaner.exe +UseFTPServer=0 +AppURL=http://download.bleepingcomputer.com/Xplode/AdwCleaner.exe +AppURLB=http://general-changelog-team.fr/fr/downloads/finish/20-outils-de-xplode/2-adwcleaner +AppDLName=AdwCleaner.exe +AlwaysAttemptDownload=1 +DLafterXdays=.5 +AppWait=1 +PriorAlert=1 +ServiceWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%systemdrive%\AdwCleaner\AdwCleaner*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Removed unnecessary internet browser add-ins (e.g. Toolbars) [AdwCleaner] +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +LastDownload=10/27/2017 +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Auslogics DD Portable.cfg b/.bin/d7ii/Config/CustomApps_d7II/Auslogics DD Portable.cfg new file mode 100644 index 00000000..5b9d818f --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Auslogics DD Portable.cfg @@ -0,0 +1,34 @@ +[Config] +DisableCloudShare=0 +AppWebsite=http://www.auslogics.com/en/software/disk-defrag/command-line/ +App=ausdiskdefragportable.exe +AppURL=http://www.auslogics.com/en/downloads/disk-defrag/ausdiskdefragportable.exe +AppDLName=ausdiskdefragportable.exe +AlwaysAttemptDownload=1 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +LogVerbiage=Defragmented file system (Auslogics) +Author=FoolishTech +LastEditDate=2/7/2014 9:45:41 AM +NonDirectURLs=0 +AppDesc=Disk Defragmenter +AppDLPage=http://www.auslogics.com/en/software/disk-defrag/ +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/Autoruns.cfg b/.bin/d7ii/Config/CustomApps_d7II/Autoruns.cfg new file mode 100644 index 00000000..3b75ac6f --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Autoruns.cfg @@ -0,0 +1,36 @@ +[Config] +App=autoruns\autoruns.exe +AppURL=http://download.sysinternals.com/files/Autoruns.zip +AppDLName=autoruns.zip +AppWait=1 +AppMsgBox=0 +AppRandomize=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +AppParms=-accepteula +DisableCloudShare=0 +UseFTPServer=0 +AlwaysAttemptDownload=1 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +SaveConfigAfter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://technet.microsoft.com/en-us/sysinternals/bb963902 +LogVerbiage=Examined Windows startup items and removed unnecessary entries. +LastDownload=10/27/2017 +Author=FoolishTech +LastEditDate=2/7/2014 9:46:37 AM +NonDirectURLs=0 +AppDLPage=http://technet.microsoft.com/en-us/sysinternals/bb963902 +AppDesc=Manages Startup Items +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Avast! aswMBR.cfg b/.bin/d7ii/Config/CustomApps_d7II/Avast! aswMBR.cfg new file mode 100644 index 00000000..dd51702d --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Avast! aswMBR.cfg @@ -0,0 +1,33 @@ +[Config] +App=aswMBR.exe +AppURL=http://public.avast.com/~gmerek/aswMBR.exe +AppWait=1 +AppMsgBox=0 +AppRandomize=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +AppDLName=aswMBR.exe +DisableCloudShare=0 +UseFTPServer=0 +AlwaysAttemptDownload=0 +PriorAlert=1 +ServiceWait=0 +SaveConfigAfter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://public.avast.com/~gmerek/aswMBR.htm +LogVerbiage=Checked MBR for infections and scanned for additional malicious items (Avast!). +Author=FoolishTech +LastEditDate=2/7/2014 9:46:53 AM +AppDLPage=http://public.avast.com/~gmerek/aswMBR.htm +AppDesc=MBR Checker and Virus Scanner +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/BatteryInfoView.cfg b/.bin/d7ii/Config/CustomApps_d7II/BatteryInfoView.cfg new file mode 100644 index 00000000..1f4ed47b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/BatteryInfoView.cfg @@ -0,0 +1,34 @@ +[Config] +DisableCloudShare=0 +App=batteryinfoview.exe +AppURL=http://www.nirsoft.net/panel/batteryinfoview.exe +AppDLName=batteryinfoview.exe +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=www.nirsoft.net/utils/battery_information_view.html +UseFTPServer=0 +PriorAlert=0 +LogVerbiage=Checked battery life and wear level. +Author=FoolishTech +LastEditDate=2/7/2014 9:47:17 AM +AppDLPage=www.nirsoft.net/utils/battery_information_view.html +AppDesc=Detailed info on installed batteries +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Belarc Advisor (Install-Report).cfg b/.bin/d7ii/Config/CustomApps_d7II/Belarc Advisor (Install-Report).cfg new file mode 100644 index 00000000..83d765cf --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Belarc Advisor (Install-Report).cfg @@ -0,0 +1,36 @@ +[Config] +Author=FoolishTech +LastEditDate=2/7/2014 9:49:58 AM +App=advisorinstaller.exe +AppParms=/silent +UseFTPServer=0 +AppURL=http://www.belarc.com/Programs/advisorinstaller.exe +AppDLName=advisorinstaller.exe +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +WaitOnProcesses=Belarc~1.exe +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsLoc=%programfiles(x86)%\Belarc\BelarcAdvisor\System\tmp\(%computername%).html +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AppWebsite=http://www.belarc.com/free_download.html +AppDLPage=http://www.belarc.com/free_download.html +AppDesc=System Information Utility (Not 'Portable' - Installation Necessary) +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Bitdefender Rootkit Remover.cfg b/.bin/d7ii/Config/CustomApps_d7II/Bitdefender Rootkit Remover.cfg new file mode 100644 index 00000000..d93b1328 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Bitdefender Rootkit Remover.cfg @@ -0,0 +1,38 @@ +[Config] +DisableCloudShare=0 +App=BootkitRemoval_x86.exe +App64=BootkitRemoval_x64.exe +AppURL64=http://download.bitdefender.com/removal_tools/BootkitRemoval_x64.exe +AppDLName64=BootkitRemoval_x64.exe +UseFTPServer=0 +AppURL=http://download.bitdefender.com/removal_tools/BootkitRemoval_x86.exe +AppDLName=BootkitRemoval_x86.exe +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://labs.bitdefender.com/projects/rootkit-remover/rootkit-remover/ +LogVerbiage=Performed additional rootkit scanning. (BRR) +Author=FoolishTech +LastEditDate=2/7/2014 9:50:38 AM +AppDLPage=http://labs.bitdefender.com/projects/rootkit-remover/rootkit-remover/ +AppDesc=Bitdefender Rootkit Remover +NonDirectURLs=0 +AutoFlag=0 +LastDownload=8/13/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/BluescreenView.cfg b/.bin/d7ii/Config/CustomApps_d7II/BluescreenView.cfg new file mode 100644 index 00000000..51997f14 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/BluescreenView.cfg @@ -0,0 +1,34 @@ +[Config] +DisableCloudShare=0 +App=bluescreenview.exe +AppURL=http://www.nirsoft.net/panel/bluescreenview.exe +AppDLName=bluescreenview.exe +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +UseFTPServer=0 +PriorAlert=0 +LogVerbiage=Checked for previous blue screens / crash dumps. +AppWebsite=www.nirsoft.net/utils/blue_screen_view.html +Author=FoolishTech +LastEditDate=2/7/2014 9:51:06 AM +AppDLPage=www.nirsoft.net/utils/blue_screen_view.html +AppDesc=Analyze blue screens / memory dumps created by Windows +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/CPU-Z.cfg b/.bin/d7ii/Config/CustomApps_d7II/CPU-Z.cfg new file mode 100644 index 00000000..29700743 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/CPU-Z.cfg @@ -0,0 +1,39 @@ +[Config] +Author=FoolishIT +LastEditDate=12/8/2015 9:51:43 AM +PostRunApp= +AppWebsite=http://www.cpuid.com/softwares/cpu-z.html +AppDLPage=http://www.cpuid.com/softwares/cpu-z.html +App=cpu-z\cpuz_x32.exe +App64=cpu-z\cpuz_x64.exe +UseFTPServer=0 +AppURL=http://download.cpuid.com/cpu-z/cpu-z_1.74-en.zip +AppDLName=cpu-z.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppDesc=Display hardware information (CPU, RAM, MB) +LogVerbiage=Reviewed hardware information of the system. +LastDownload=12/8/2015 +CopyConfigFirst=cpuz.ini diff --git a/.bin/d7ii/Config/CustomApps_d7II/ComboFix (Uninstall).cfg b/.bin/d7ii/Config/CustomApps_d7II/ComboFix (Uninstall).cfg new file mode 100644 index 00000000..0593ef70 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/ComboFix (Uninstall).cfg @@ -0,0 +1,33 @@ +[Config] +App=combofix.exe +AppParms=/uninstall +AppURL=http://download.bleepingcomputer.com/sUBs/ComboFix.exe +AppDLName=combofix.exe +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=0 +AlwaysAttemptDownload=0 +SaveConfigAfter=0 +DisableCloudShare=0 +UseFTPServer=0 +PriorAlert=1 +ServiceWait=1 +RunWithSystemAccess=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=http://www.bleepingcomputer.com/download/combofix/ +Author=FoolishTech +LastEditDate=2/7/2014 9:51:39 AM +AppDLPage=http://www.bleepingcomputer.com/download/combofix/ +AppDesc=Uninstalls Combofix, cleaning up any leftover files/settings. +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/ComboFix.cfg b/.bin/d7ii/Config/CustomApps_d7II/ComboFix.cfg new file mode 100644 index 00000000..c0986c15 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/ComboFix.cfg @@ -0,0 +1,34 @@ +[Config] +App=combofix.exe +AppURL=http://download.bleepingcomputer.com/sUBs/ComboFix.exe +AppDLName=combofix.exe +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +AlwaysAttemptDownload=1 +SaveConfigAfter=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=0 +DisableCloudShare=0 +UseFTPServer=0 +DLafterXdays=.5 +PriorAlert=1 +ServiceWait=1 +RunWithSystemAccess=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=http://www.bleepingcomputer.com/download/combofix/ +LogVerbiage=Ran malware scans (Combofix) +Author=FoolishTech +LastEditDate=2/7/2014 9:52:03 AM +AppDLPage=http://www.bleepingcomputer.com/download/combofix/ +AppDesc=Malware removal tool. +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/CrowdInspect.cfg b/.bin/d7ii/Config/CustomApps_d7II/CrowdInspect.cfg new file mode 100644 index 00000000..f98fb150 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/CrowdInspect.cfg @@ -0,0 +1,33 @@ +[Config] +Author=FoolishTech +LastEditDate=3/15/2014 3:49:54 PM +AppWebsite=www.crowdstrike.com +AppDLPage=www.crowdstrike.com/crowdinspect/ +AppDesc=Analyze running processes against VirusTotal, Web of Trust, and the Malware Hash Project. +App=CrowdInspect\CrowdInspect.exe +UseFTPServer=0 +AppURL=http://download.crowdstrike.com/crowdinspect/CrowdInspect.zip +AppDLName=CrowdInspect.zip +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/CrystalDiskInfo.cfg b/.bin/d7ii/Config/CustomApps_d7II/CrystalDiskInfo.cfg new file mode 100644 index 00000000..08d02f4b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/CrystalDiskInfo.cfg @@ -0,0 +1,37 @@ +[Config] +Author=FoolishTech +LastEditDate=4/1/2016 12:41:03 PM +PostRunApp= +AppWebsite=http://crystalmark.info/software/CrystalDiskInfo/index-e.html +AppDLPage=http://crystalmark.info/software/CrystalDiskInfo/index-e.html +AppDesc=Hard drive diagnostics / information. +App=CrystalDiskInfo\DiskInfo.exe +App64=CrystalDiskInfo\DiskInfoX64.exe +UseFTPServer=0 +AppURL=https://osdn.jp/frs/redir.php?m=tcpdiag&f=%2Fcrystaldiskinfo%2F65634%2FCrystalDiskInfo6_8_2.zip +AppDLName=CrystalDiskInfo.zip +AlwaysAttemptDownload=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Examined Hard Drive health (CrystalDiskInfo) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/CurrPorts.cfg b/.bin/d7ii/Config/CustomApps_d7II/CurrPorts.cfg new file mode 100644 index 00000000..17acbaa3 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/CurrPorts.cfg @@ -0,0 +1,39 @@ +[Config] +Author=dSupportOnline +LastEditDate=11/6/2014 10:33:04 PM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/cports.html +AppDLPage=http://www.nirsoft.net/utils/cports.html +AppDesc=Displays current ports in use on system and by which process +App=cports\cports.exe +AppURLSpoof=http://www.nirsoft.net/utils/cports.html +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/cports.zip +AppDLName=cports.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=cports.cfg +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Reviewed current ports in use by various applications on the system +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/ESET Smart Installer.cfg b/.bin/d7ii/Config/CustomApps_d7II/ESET Smart Installer.cfg new file mode 100644 index 00000000..9eea5090 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/ESET Smart Installer.cfg @@ -0,0 +1,36 @@ +[Config] +DisableCloudShare=0 +App=esetsmartinstaller_enu.exe +AppURL=http://download.eset.com/special/eos/esetsmartinstaller_enu.exe +AppDLName=esetsmartinstaller_enu.exe +AlwaysAttemptDownload=1 +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=http://www.eset.com/int/online-scanner-popup/ +LogVerbiage=Ran Virus/Malware scans (ESET) +LastDownload=9/28/2013 +WaitOnProcesses=onlinescannerapp.exe +NonDirectURLs=0 +Author=FoolishTech +LastEditDate=2/7/2014 9:53:54 AM +AppDLPage=http://www.eset.com/int/online-scanner-popup/ +AppDesc=Online Virus Scanner +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan (Offline).cfg b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan (Offline).cfg new file mode 100644 index 00000000..45d584b2 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan (Offline).cfg @@ -0,0 +1,42 @@ +[Config] +Author=FoolishTech +LastEditDate=2/3/2017 5:45:31 PM +PostRunApp= +AppWebsite=http://www.emsisoft.com/en/software/cmd/ +AppDLPage=http://www.emsisoft.com/en/software/cmd/ +AppDesc=Virus Scanner (configured for scanning from the Offline Operations tab) +AppParms=/f=%tdrive% /deep /rk /pup /a /n /ac /dq /la="%malreportdir%\a2cmd_deep_log_offline_%date%.txt" +AppURL64=http://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe +AppDLName64=Emsisoft_a2cmd\EmsisoftCommandlineScanner64.exe +UseFTPServer=0 +AppURL=http://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe +AppDLName=Emsisoft_a2cmd\EmsisoftCommandlineScanner32.exe +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran deep virus scans (Emsisoft) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +App=Emsisoft_a2cmd\a2cmd.cmd +CopyConfigFirst=a2cmd.cmd +WaitOnProcesses=a2cmd.exe +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg new file mode 100644 index 00000000..8c65a911 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg @@ -0,0 +1,42 @@ +[Config] +Author=FoolishTech +LastEditDate=2/3/2017 5:45:31 PM +PostRunApp= +AppWebsite=http://www.emsisoft.com/en/software/cmd/ +AppDLPage=http://www.emsisoft.com/en/software/cmd/ +AppDesc=Virus Scanner - Scans all files on all hard disks thoroughly. (does not need prior update) +AppParms=/f=%tdrive% /deep /rk /m /t /c /pup /a /n /ac /d /wl="%systemdrive%\EmsisoftCmd\a2cmd_Whitelist.txt" /la="%malreportdir%\a2cmd_deep_log_%date%.txt" +AppURL64=http://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe +AppDLName64=Emsisoft_a2cmd\EmsisoftCommandlineScanner64.exe +UseFTPServer=0 +AppURL=http://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe +AppDLName=Emsisoft_a2cmd\EmsisoftCommandlineScanner32.exe +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran deep virus scans (Emsisoft) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +App=Emsisoft_a2cmd\a2cmd.cmd +CopyConfigFirst=a2cmd.cmd +WaitOnProcesses=a2cmd.exe +LastDownload=8/31/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Quick Scan.cfg b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Quick Scan.cfg new file mode 100644 index 00000000..bce3d597 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Quick Scan.cfg @@ -0,0 +1,41 @@ +[Config] +Author=FoolishTech +LastEditDate=2/3/2017 5:45:31 PM +PostRunApp= +AppWebsite=http://www.emsisoft.com/en/software/cmd/ +AppDLPage=http://www.emsisoft.com/en/software/cmd/ +AppDesc=Virus Scanner - Scans all active programs, malware traces (registry, files) and Tracking Cookies. Skips ADS, archive files, and some cookies. (does not need prior update) +AppParms=/f=%tdrive% /quick /rk /m /t /pup /ac /d /wl="%systemdrive%\EmsisoftCmd\a2cmd_Whitelist.txt" /la="%malreportdir%\a2cmd_quick_log_%date%.txt" +AppURL64=http://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe +AppDLName64=Emsisoft_a2cmd\EmsisoftCommandlineScanner64.exe +UseFTPServer=0 +AppURL=http://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe +AppDLName=Emsisoft_a2cmd\EmsisoftCommandlineScanner32.exe +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (Emsisoft) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +App=Emsisoft_a2cmd\a2cmd.cmd +CopyConfigFirst=a2cmd.cmd +WaitOnProcesses=a2cmd.exe diff --git a/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Smart Scan.cfg b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Smart Scan.cfg new file mode 100644 index 00000000..22fc69b5 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Smart Scan.cfg @@ -0,0 +1,41 @@ +[Config] +Author=FoolishTech +LastEditDate=2/3/2017 5:45:31 PM +PostRunApp= +AppWebsite=http://www.emsisoft.com/en/software/cmd/ +AppDLPage=http://www.emsisoft.com/en/software/cmd/ +AppDesc=Virus Scanner - Scans the Windows and program files folders in addition to everything scanned by the quick scan. Skips ADS, archive files, and some cookies. (does not need prior update) +AppParms=/f=%tdrive% /smart /rk /m /t /pup /ac /d /wl="%systemdrive%\EmsisoftCmd\a2cmd_Whitelist.txt" /la="%malreportdir%\a2cmd_smart_log_%date%.txt" +AppURL64=http://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe +AppDLName64=Emsisoft_a2cmd\EmsisoftCommandlineScanner64.exe +UseFTPServer=0 +AppURL=http://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe +AppDLName=Emsisoft_a2cmd\EmsisoftCommandlineScanner32.exe +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (Emsisoft) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +App=Emsisoft_a2cmd\a2cmd.cmd +CopyConfigFirst=a2cmd.cmd +WaitOnProcesses=a2cmd.exe diff --git a/.bin/d7ii/Config/CustomApps_d7II/Everything Search Engine.cfg b/.bin/d7ii/Config/CustomApps_d7II/Everything Search Engine.cfg new file mode 100644 index 00000000..2bee29c2 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Everything Search Engine.cfg @@ -0,0 +1,39 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/9/2014 1:20:00 PM +PostRunApp= +AppWebsite=http://www.voidtools.com/support/everything/ +AppDLPage=http://www.voidtools.com/downloads/ +App=everything32\Everything.exe +App64=everything64\Everything.exe +AppURL64=http://www.voidtools.com/Everything-1.3.4.686.x64.zip +AppDLName64=everything64.zip +UseFTPServer=0 +AppURL=http://www.voidtools.com/Everything-1.3.4.686.x86.zip +AppDLName=everything32.zip +AlwaysAttemptDownload=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=Everything.ini +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppDesc=Quickly searches files and folders +LogVerbiage=Searched system for files and folders to further inspect or remove. diff --git a/.bin/d7ii/Config/CustomApps_d7II/GMER.cfg b/.bin/d7ii/Config/CustomApps_d7II/GMER.cfg new file mode 100644 index 00000000..07e11961 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/GMER.cfg @@ -0,0 +1,34 @@ +[Config] +App=gmer\gmer.exe +AppURL=http://www2.gmer.net/gmer.zip +AppDLName=gmer.zip +AppWait=1 +AppMsgBox=0 +AppRandomize=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +DisableCloudShare=0 +UseFTPServer=0 +AlwaysAttemptDownload=1 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +SaveConfigAfter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://www.gmer.net/ +LogVerbiage=Manually scanned for rootkit activity. +Author=FoolishTech +LastEditDate=2/7/2014 9:54:39 AM +AppDLPage=http://www.gmer.net/ +AppDesc=Rootkit / Malware Scanner +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/GPU-Z Report.cfg b/.bin/d7ii/Config/CustomApps_d7II/GPU-Z Report.cfg new file mode 100644 index 00000000..c17fdc0e --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/GPU-Z Report.cfg @@ -0,0 +1,37 @@ +[Config] +Author=Proctor Foolish IT +LastEditDate=3/2/2016 5:09:19 PM +PostRunApp= +AppWebsite=https://www.techpowerup.com/gpuz/ +AppDesc=Reported on Graphis Adapter Information +LogVerbiage=Reviewed hardware information of the system. +UseFTPServer=0 +AppURL=https://www.techpowerup.com/downloads/2627/techpowerup-gpu-z-v0-8-7/start?server=6 +AppDLName=GPU-Z.exe +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +AppParms=-dump gpu-z.xml +SnatchReportsLoc=gpu-z.xml +App=GPU-Z.exe diff --git a/.bin/d7ii/Config/CustomApps_d7II/GPU-Z.cfg b/.bin/d7ii/Config/CustomApps_d7II/GPU-Z.cfg new file mode 100644 index 00000000..fdfe4d6f --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/GPU-Z.cfg @@ -0,0 +1,35 @@ +[Config] +Author=Proctor Foolish IT +LastEditDate=3/2/2016 4:24:41 PM +PostRunApp=GPU-Z Report +AppWebsite=https://www.techpowerup.com/gpuz/ +App64=GPU-Z.exe +UseFTPServer=0 +AppURL=https://www.techpowerup.com/downloads/2627/techpowerup-gpu-z-v0-8-7/start?server=6 +AppDLName=GPU-Z.exe +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +AppDesc=Review Graphis Adapter Information +LogVerbiage=Reviewed hardware information of the system. \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/Google Chrome Software Removal Tool.cfg b/.bin/d7ii/Config/CustomApps_d7II/Google Chrome Software Removal Tool.cfg new file mode 100644 index 00000000..6796bd7a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Google Chrome Software Removal Tool.cfg @@ -0,0 +1,36 @@ +[Config] +LastEditDate=10/13/2014 6:35:14 AM +PostRunApp= +AppWebsite=https://support.google.com/chrome/answer/6086368?p=ui_software_removal_tool&rd=1 +AppDLPage=https://www.google.com/chrome/srt/ +App=software_removal_tool.exe +UseFTPServer=0 +AppURL=https://dl.google.com/dl/softwareremovaltool/win/software_removal_tool.exe +AppDLName=software_removal_tool.exe +AlwaysAttemptDownload=1 +DLafterXdays=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +Author=FoolishTech +AppDesc=Remove add-ons, extensions, toolbars, and other software that may interfere with the operation of Google Chrome. +LogVerbiage=Scanned for and removed any toolbars/extensions/add-ons that may interfere with the operation of Google Chrome. diff --git a/.bin/d7ii/Config/CustomApps_d7II/HeavyLoad.cfg b/.bin/d7ii/Config/CustomApps_d7II/HeavyLoad.cfg new file mode 100644 index 00000000..63e6354f --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/HeavyLoad.cfg @@ -0,0 +1,39 @@ +[Config] +Author=Foolish IT +LastEditDate=3/30/2016 11:11:09 AM +PostRunApp= +AppWebsite=https://www.jam-software.de/heavyload/ +AppDLPage=https://www.jam-software.de/heavyload/ +App=HeavyLoadx86\HeavyLoad.exe +UseFTPServer=0 +AppURL=http://www.jam-software.com/heavyload/HeavyLoad-x86.zip +AppDLName=HeavyLoadx86.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppURL64=http://www.jam-software.com/heavyload/HeavyLoad-x64.zip +AppDLName64=HeavyLoadx64.zip +App64=HeavyLoadx64\HeavyLoad.exe +AppDesc=Stress Testing Application +LogVerbiage=Stress Tested System diff --git a/.bin/d7ii/Config/CustomApps_d7II/HitmanPro (Manual).cfg b/.bin/d7ii/Config/CustomApps_d7II/HitmanPro (Manual).cfg new file mode 100644 index 00000000..dd2c393e --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/HitmanPro (Manual).cfg @@ -0,0 +1,44 @@ +[Config] +Author=FoolishTech +LastEditDate=10/10/2014 4:14:36 AM +PostRunApp= +AppWebsite=http://www.surfright.nl/en/hitmanpro/ +AppDLPage=http://www.surfright.nl/en/downloads/ +AppDesc=Malware scanner (Manual removal) +App=HitmanPro.exe +App64=HitmanPro_x64.exe +AppParms=/noinstall /excludelist="%3rdpath%\HMP_Excludes.txt" /log="%malreportdir%\HitmanPro_Scan_Log_%date%.txt" +AppURL64=http://dl.surfright.nl/HitmanPro_x64.exe +AppURL64B=http://dl.surfright.nl/FoolishIT/HitmanPro_x64.exe +AppDLName64=HitmanPro_x64.exe +UseFTPServer=0 +AppURL=http://dl.surfright.nl/HitmanPro.exe +AppURLB=http://dl.surfright.nl/FoolishIT/HitmanPro.exe +AppDLName=HitmanPro.exe +AlwaysAttemptDownload=1 +DLafterXdays=4 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=1 +AppWaitTime=60 +AppRandomize=1 +CopyConfigFirst=HMP.cmd +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran Malware Scans and manually investigated results (HitmanPro) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg b/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg new file mode 100644 index 00000000..7e8feef6 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg @@ -0,0 +1,45 @@ +[Config] +Author=FoolishTech +LastEditDate=7/13/2015 10:52:20 AM +PostRunApp= +AppWebsite=http://www.surfright.nl/en/hitmanpro/ +AppDLPage=http://www.surfright.nl/en/downloads/ +AppDesc=Malware scanner +App=HitmanPro.exe +App64=HitmanPro_x64.exe +AppParms=/clean /noinstall /excludelist="%3rdpath%\HMP_Excludes.txt" /log="%malreportdir%\HitmanPro_Scan_Log_%date%.txt" +AppURL64=http://dl.surfright.nl/HitmanPro_x64.exe +AppURL64B=http://dl.surfright.nl/FoolishIT/HitmanPro_x64.exe +AppDLName64=HitmanPro_x64.exe +UseFTPServer=0 +AppURL=http://dl.surfright.nl/HitmanPro.exe +AppURLB=http://dl.surfright.nl/FoolishIT/HitmanPro.exe +AppDLName=HitmanPro.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=1 +AppWaitTime=60 +AppRandomize=1 +CopyConfigFirst=HMP.cmd +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran Malware Scans (HitmanPro) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=8/31/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/JRT.cfg b/.bin/d7ii/Config/CustomApps_d7II/JRT.cfg new file mode 100644 index 00000000..e2e0776d --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/JRT.cfg @@ -0,0 +1,42 @@ +[Config] +Author=FoolishTech +LastEditDate=7/13/2015 9:38:52 AM +PostRunApp= +AppWebsite=http://thisisudax.org/ +AppDLPage=http://thisisudax.org/ +AppDesc=Junkware Removal Tool - toolbar remover. +App=JRT.exe +AppParms=-y -om1 -nr +UseFTPServer=0 +AppURL=http://thisisudax.org/downloads/JRT.exe +AppDLName=JRT.exe +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=JRT_Auto.cmd +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%userprofile%\Desktop\JRT.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Removed unnecessary internet browser add-ins (e.g. Toolbars) [JRT] +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +WaitOnProcesses=wget.dat,jq.dat,nircmd.dat,sed.dat,grep.dat,cut.dat,reg.exe +LastDownload=8/19/2018 +AppWaitTime=30 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg b/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg new file mode 100644 index 00000000..1ffc505b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg @@ -0,0 +1,35 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:45:37 PM +AppWebsite=http://support.kaspersky.com/5350 +AppDLPage=http://support.kaspersky.com/viruses/disinfection/5350 +AppDesc=TDSS / Rootkit scanner +App=TDSSKiller.exe +AppParms=-accepteula -accepteulaksn -l "%malreportdir%\TDSSKiller_Report_%date%.txt" -tdlfs -dcexact -silent +UseFTPServer=0 +AppURL=http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe +AppDLName=tdsskiller.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Scanned for MBR infections / rootkits (TDSSKiller) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=2 +LastDownload=8/31/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller.cfg b/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller.cfg new file mode 100644 index 00000000..f59338ad --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller.cfg @@ -0,0 +1,35 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:45:26 PM +AppWebsite=http://support.kaspersky.com/5350 +AppDLPage=http://support.kaspersky.com/viruses/disinfection/5350 +AppDesc=TDSS / Rootkit scanner +App=TDSSKiller.exe +AppParms=-accepteula -accepteulaksn -l "%malreportdir%\TDSSKiller_Report_%date%.txt" -tdlfs -dcexact +UseFTPServer=0 +AppURL=http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe +AppDLName=tdsskiller.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Scanned for MBR infections / rootkits (TDSSKiller) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/KillEmAll v5.cfg b/.bin/d7ii/Config/CustomApps_d7II/KillEmAll v5.cfg new file mode 100644 index 00000000..05b5991b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/KillEmAll v5.cfg @@ -0,0 +1,36 @@ +[Config] +Author=Foolish IT +LastEditDate=1/28/2016 3:33:42 PM +PostRunApp= +AppWebsite=https://www.foolishit.com/d7x/killemall/ +AppDLPage=https://www.foolishit.com/d7x/killemall/ +UseFTPServer=0 +AppURL=http://download.foolishit.com/killemall/KillEmAll_Portable.zip +AppDLName=KillEmAll_Portable.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +App=KillEmAll_Portable\KillEmAll.exe +AutoFlag=0 +AppDesc=Kills non-essential processes +LastDownload=5/17/2016 diff --git a/.bin/d7ii/Config/CustomApps_d7II/MBRCheck (Offline).cfg b/.bin/d7ii/Config/CustomApps_d7II/MBRCheck (Offline).cfg new file mode 100644 index 00000000..5c521f98 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/MBRCheck (Offline).cfg @@ -0,0 +1,36 @@ +[Config] +DisableCloudShare=0 +App=MBRCheck.exe +AppURL=http://ad13.geekstogo.com/MBRCheck.exe +AppDLName=MBRCheck.exe +AlwaysAttemptDownload=1 +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%userprofile%\Desktop\MBRCheck*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +IsDLInstaller=0 +AppWebsite=http://www.majorgeeks.com/files/details/mbrcheck.html +LogVerbiage=Checked MBR for infections. +Author=FoolishTech +LastEditDate=2/7/2014 9:59:38 AM +AppDLPage=http://www.majorgeeks.com/files/details/mbrcheck.html +AppDesc=MBR scanner, this profile is intended to be used from the Offline Operations page. +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/MBRCheck (Report Only).cfg b/.bin/d7ii/Config/CustomApps_d7II/MBRCheck (Report Only).cfg new file mode 100644 index 00000000..7f897aaf --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/MBRCheck (Report Only).cfg @@ -0,0 +1,38 @@ +[Config] +Author=FoolishTech +LastEditDate=9/28/2014 4:13:43 PM +PostRunApp=Autoruns_Copy +AppWebsite=http://www.majorgeeks.com/files/details/mbrcheck.html +AppDLPage=http://www.majorgeeks.com/files/details/mbrcheck.html +AppDesc=MBR scanner - use as a second opinion, not reliable especially to repair any damage. +App=MBRCheck.exe +UseFTPServer=0 +AppURL=http://ad13.geekstogo.com/MBRCheck.exe +AppDLName=MBRCheck.exe +AlwaysAttemptDownload=1 +DLafterXdays=7 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%userprofile%\Desktop\MBRCheck*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=1 +SendEnter=1 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Checked MBR for infections. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=2 +LastDownload=9/28/2014 diff --git a/.bin/d7ii/Config/CustomApps_d7II/MBRCheck.cfg b/.bin/d7ii/Config/CustomApps_d7II/MBRCheck.cfg new file mode 100644 index 00000000..4bb5e8a5 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/MBRCheck.cfg @@ -0,0 +1,36 @@ +[Config] +DisableCloudShare=0 +App=MBRCheck.exe +AppURL=http://ad13.geekstogo.com/MBRCheck.exe +AppDLName=MBRCheck.exe +AlwaysAttemptDownload=1 +AppWait=1 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%userprofile%\Desktop\MBRCheck*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +IsDLInstaller=0 +AppWebsite=http://www.majorgeeks.com/files/details/mbrcheck.html +LogVerbiage=Checked MBR for infections. +Author=FoolishTech +LastEditDate=2/7/2014 10:00:33 AM +AppDLPage=http://www.majorgeeks.com/files/details/mbrcheck.html +AppDesc=MBR scanner - use as a second opinion, not reliable especially to repair any damage. +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Install).cfg b/.bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Install).cfg new file mode 100644 index 00000000..2bc228a2 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Install).cfg @@ -0,0 +1,35 @@ +[Config] +Author=FoolishTech +LastEditDate=2/8/2014 1:17:11 AM +AppWebsite=http://support.microsoft.com/kb/2812744 +AppDLPage=http://www.microsoft.com/en-us/download/details.aspx?id=36852 +AppDesc=Fixes a wide variety of issues with Microsoft Office - Installer version +App=%programfiles(x86)%\Microsoft OffCAT\OffCAT.exe +UseFTPServer=0 +InstallerParms=/passive +InstallerName=OffCAT.msi +AppURL=http://go.microsoft.com/fwlink/?LinkID=286211 +AppDLName=OffCAT.msi +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=1 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Portable).cfg b/.bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Portable).cfg new file mode 100644 index 00000000..85b483e6 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/MS Office Config Analyzer Tool (Portable).cfg @@ -0,0 +1,32 @@ +[Config] +Author=FoolishTech +LastEditDate=2/8/2014 1:17:02 AM +AppWebsite=http://support.microsoft.com/kb/2812744 +AppDLPage=http://www.microsoft.com/en-us/download/details.aspx?id=36852 +AppDesc=Fixes a wide variety of issues with Microsoft Office - Portable Version +App=OffCAT\OffCAT.exe +UseFTPServer=0 +AppURL=http://go.microsoft.com/fwlink/?LinkID=286208 +AppDLName=OffCAT.zip +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/MalwareBytes Anti-Rootkit.cfg b/.bin/d7ii/Config/CustomApps_d7II/MalwareBytes Anti-Rootkit.cfg new file mode 100644 index 00000000..342f6fcd --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/MalwareBytes Anti-Rootkit.cfg @@ -0,0 +1,37 @@ +[Config] +DisableCloudShare=0 +App=mbar\mbar\mbar.exe +AppURL=http://downloads.malwarebytes.org/file/mbar +AppDLName=mbar.7z +AlwaysAttemptDownload=1 +AppWait=1 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=1 +RunWithSystemAccess=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +ServiceWait=0 +SnatchReportsLoc=%3rdpath%\system-log.txt +IsDLInstaller=0 +Servers=1 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +LogVerbiage=Scanned for MBR infections / rootkits (MBAR) +AppWebsite=http://www.malwarebytes.org/products/mbar/ +LastDownload=11/3/2013 +NonDirectURLs=0 +WaitOnProcesses=mbar.exe +Author=FoolishTech +LastEditDate=2/7/2014 9:59:08 AM +AppDLPage=http://www.malwarebytes.org/products/mbar/ +AppDesc=Rootkit scanner +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/Malwarebytes v2.cfg b/.bin/d7ii/Config/CustomApps_d7II/Malwarebytes v2.cfg new file mode 100644 index 00000000..624c9305 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Malwarebytes v2.cfg @@ -0,0 +1,39 @@ +[Config] +Author=FoolishTech +LastEditDate=1/26/2015 3:38:04 PM +PostRunApp= +AppWebsite=http://www.malwarebytes.org/products/malwarebytes_free/ +AppDLPage=http://www.malwarebytes.org/products/malwarebytes_free/ +AppDesc=Malware scanner +App=%programfiles(x86)%\Malwarebytes Anti-Malware\mbam.exe +UseFTPServer=0 +InstallerParms=/silent /suppressmsgboxes /norestart /nocancel /lang=1033 +InstallerName=mbam2-setup.exe +AppURL=http://downloads.malwarebytes.org/file/mbam/ +AppDLName=mbam2-setup.exe +AlwaysAttemptDownload=1 +DLafterXdays=0 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsLoc=%programdata%\Malwarebytes\Malwarebytes Anti-Malware\Logs\*.xml +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=1 +LogVerbiage=Scanned for Malware (MBAM) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Offline).cfg b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Offline).cfg new file mode 100644 index 00000000..6958a699 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Offline).cfg @@ -0,0 +1,38 @@ +[Config] +DisableCloudShare=0 +App=stinger32.exe +App64=stinger64.exe +AppParms=--go --repair --noprocess --noregistry --scanpath=%tdrive% --reportpath="%malreportdir%" +AppURL64=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger64.exe +AppDLName64=stinger64.exe +AppURL=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger32.exe +AppDLName=stinger32.exe +AlwaysAttemptDownload=1 +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +ServiceWait=1 +AppWebsite=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +UseFTPServer=0 +PriorAlert=1 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (McAfee Stinger) +Author=FoolishTech +LastEditDate=2/7/2014 10:01:11 AM +AppDLPage=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +AppDesc=Virus scanner - meant to be used from the Offline Operations tab. +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent).cfg b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent).cfg new file mode 100644 index 00000000..3c6918ee --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent).cfg @@ -0,0 +1,37 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:47:06 PM +AppWebsite=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +AppDLPage=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +AppDesc=Virus scanner +App=stinger32.exe +App64=stinger64.exe +AppParms=--silent --go --repair --adl --reportpath="%malreportdir%" +AppURL64=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger64.exe +AppDLName64=stinger64.exe +UseFTPServer=0 +AppURL=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger32.exe +AppDLName=stinger32.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=0 +ServiceWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (McAfee Stinger) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=2 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent-Offline).cfg b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent-Offline).cfg new file mode 100644 index 00000000..c41cb0b3 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger (Silent-Offline).cfg @@ -0,0 +1,38 @@ +[Config] +DisableCloudShare=0 +AppWebsite=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +App=stinger32.exe +App64=stinger64.exe +AppParms=--silent --go --repair --noprocess --noregistry --scanpath=%tdrive% --reportpath="%malreportdir%" +AppURL64=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger64.exe +AppDLName64=stinger64.exe +UseFTPServer=0 +AppURL=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger32.exe +AppDLName=stinger32.exe +AlwaysAttemptDownload=1 +AppWait=1 +PriorAlert=0 +ServiceWait=1 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (McAfee Stinger) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +Author=FoolishTech +LastEditDate=2/7/2014 10:01:42 AM +AppDLPage=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +AppDesc=Virus scanner - meant to be used from the Offline Operations tab. +NonDirectURLs=0 +AutoFlag=2 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger.cfg b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger.cfg new file mode 100644 index 00000000..9d2cb718 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/McAfee Stinger.cfg @@ -0,0 +1,38 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:46:41 PM +AppWebsite=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +AppDLPage=http://www.mcafee.com/us/downloads/free-tools/stinger.aspx +AppDesc=Virus scanner +App=stinger32.exe +App64=stinger64.exe +AppParms=--go --repair --adl --reportpath="%malreportdir%" +AppURL64=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger64.exe +AppDLName64=stinger64.exe +UseFTPServer=0 +AppURL=http://downloadcenter.mcafee.com/products/mcafee-avert/Stinger/stinger32.exe +AppDLName=stinger32.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (McAfee Stinger) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Microsoft .NET Framework Repair Tool.cfg b/.bin/d7ii/Config/CustomApps_d7II/Microsoft .NET Framework Repair Tool.cfg new file mode 100644 index 00000000..e7f181da --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Microsoft .NET Framework Repair Tool.cfg @@ -0,0 +1,35 @@ +[Config] +Author=Microsoft +LastEditDate=6/20/2016 2:00:27 PM +PostRunApp= +AppWebsite=https://support.microsoft.com/en-us/kb/2698555 +AppDLPage=http://go.microsoft.com/fwlink/?LinkID=246062 +App=NetFxRepairTool.exe +UseFTPServer=0 +AppURL=https://download.microsoft.com/download/2/B/D/2BDE5459-2225-48B8-830C-AE19CAF038F1/NetFxRepairTool.exe +AlwaysAttemptDownload=0 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=1 +LastDownload=6/20/2016 +AppDLName=NetFxRepairTool.exe +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Portable.cfg b/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Portable.cfg new file mode 100644 index 00000000..cc0f0ba8 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Portable.cfg @@ -0,0 +1,34 @@ +[Config] +LastEditDate=2/8/2014 12:42:30 AM +AppWebsite=www.microsoft.com +AppDLPage=http://go.microsoft.com/?linkid=9775982 +AppDesc=Fix a wide variety of Windows issues all in one portable MS FixIT +App=MicrosoftFixit-portable.exe +UseFTPServer=0 +AppURL=http://download.microsoft.com/download/E/2/3/E237A32D-E0A9-4863-B864-9E820C1C6F9A/MicrosoftFixit-portable.exe +AppDLName=MicrosoftFixit-portable.exe +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Fixed misc. broken Windows functions with %app% +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +Author=FoolishTech +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Win Update (Auto).cfg b/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Win Update (Auto).cfg new file mode 100644 index 00000000..c2013713 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Win Update (Auto).cfg @@ -0,0 +1,34 @@ +[Config] +Author=FoolishTech +LastEditDate=2/8/2014 1:20:09 AM +AppWebsite=http://support.microsoft.com/kb/971058/en-US +AppDLPage=http://go.microsoft.com/?linkid=9665683 +AppDesc=MS FixIt 50202 fixes issues with Windows Update - This will reboot! +App=MicrosoftFixIt50202.msi +AppParms=/passive +UseFTPServer=0 +AppURL=http://go.microsoft.com/?linkid=9665683 +AppDLName=MicrosoftFixIt50202.msi +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +LastDownload=10/27/2017 +AutoFlag=1 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Winsock (Auto).cfg b/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Winsock (Auto).cfg new file mode 100644 index 00000000..604ce04c --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Microsoft FixIt Winsock (Auto).cfg @@ -0,0 +1,34 @@ +[Config] +Author=FoolishTech +LastEditDate=2/8/2014 1:03:54 AM +AppWebsite=http://support.microsoft.com/kb/811259 +AppDLPage=http://go.microsoft.com/?linkid=9662461 +AppDesc=Microsoft FixIt 50203 fixes Winsock corruption issues - This will reboot! +App=MicrosoftFixit50203.msi +AppParms=/passive +UseFTPServer=0 +AppURL=http://go.microsoft.com/?linkid=9662461 +AppDLName=MicrosoftFixit50203.msi +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Microsoft Safety Scanner.cfg b/.bin/d7ii/Config/CustomApps_d7II/Microsoft Safety Scanner.cfg new file mode 100644 index 00000000..0b92f8e3 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Microsoft Safety Scanner.cfg @@ -0,0 +1,38 @@ +[Config] +Author=Microsoft +LastEditDate=7/11/2016 1:23:26 PM +PostRunApp= +AppWebsite=https://www.microsoft.com/security/scanner/en-us/default.aspx +AppDLPage=https://www.microsoft.com/security/scanner/en-us/default.aspx +App=msert.exe +App64=msert.exe +AppURL64=http://definitionupdates.microsoft.com/download/definitionupdates/safetyscanner/amd64/msert.exe +AppDLName64=msert.exe +UseFTPServer=0 +AppURL=http://definitionupdates.microsoft.com/download/definitionupdates/safetyscanner/x86/msert.exe +AppDLName=msert.exe +AlwaysAttemptDownload=1 +DLafterXdays=9 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=7/11/2016 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg b/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg new file mode 100644 index 00000000..79267d14 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg @@ -0,0 +1,35 @@ +[Config] +DisableCloudShare=0 +AppWebsite=http://keir.net/neutron.html +App=neutron\Neutron.exe +UseFTPServer=0 +AppURL=http://keir.net/download/neutron.zip +AppDLName=neutron.zip +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=neutron.ini +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +PriorAlert=0 +LogVerbiage=Synced Windows time with the atomic clock. +Author=FoolishTech +LastEditDate=2/7/2014 10:03:42 AM +AppDLPage=http://keir.net/neutron.html +AppDesc=Sync time with an internet time server +NonDirectURLs=0 +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/OTL.cfg b/.bin/d7ii/Config/CustomApps_d7II/OTL.cfg new file mode 100644 index 00000000..aad5fad7 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/OTL.cfg @@ -0,0 +1,34 @@ +[Config] +App=OTL.exe +AppURL=http://oldtimer.geekstogo.com/OTL.exe +AppDLName=OTL.exe +AppWait=1 +AppMsgBox=0 +AppRandomize=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +DisableCloudShare=0 +UseFTPServer=0 +AlwaysAttemptDownload=1 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +SaveConfigAfter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://www.geekstogo.com/forum/topic/277391-otl-tutorial-how-to-use-oldtimer-listit/ +LogVerbiage=Performed manual inspection for viruses/malware. +Author=FoolishTech +LastEditDate=2/7/2014 10:05:19 AM +AppDLPage=http://www.geekstogo.com/forum/topic/277391-otl-tutorial-how-to-use-oldtimer-listit/ +AppDesc=Malware scanner and startup manager. +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/OpenHardwareMonitor.cfg b/.bin/d7ii/Config/CustomApps_d7II/OpenHardwareMonitor.cfg new file mode 100644 index 00000000..63170062 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/OpenHardwareMonitor.cfg @@ -0,0 +1,34 @@ +[Config] +DisableCloudShare=0 +App=openhardwaremonitor\OpenHardwareMonitor\OpenHardwareMonitor.exe +AppURL=http://openhardwaremonitor.org/files/openhardwaremonitor-v0.6.0-beta.zip +AppDLName=openhardwaremonitor.zip +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://openhardwaremonitor.org/ +UseFTPServer=0 +PriorAlert=0 +LogVerbiage=Checked hardware temperatures / fan speeds. +Author=FoolishTech +LastEditDate=2/7/2014 10:04:27 AM +AppDLPage=http://openhardwaremonitor.org/downloads/ +AppDesc=Detailed hardware information +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Opened Files View.cfg b/.bin/d7ii/Config/CustomApps_d7II/Opened Files View.cfg new file mode 100644 index 00000000..b7aa3a54 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Opened Files View.cfg @@ -0,0 +1,42 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/29/2014 9:41:55 AM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/opened_files_view.html +AppDLPage=http://www.nirsoft.net/utils/opened_files_view.html +AppDesc=Shows currently opened files in use by the system +App=ofview\OpenedFilesView.exe +App64=ofview-x64\OpenedFilesView.exe +AppURL64=http://www.nirsoft.net/utils/ofview-x64.zip +AppDLName64=ofview-x64.zip +AppURLSpoof=http://www.nirsoft.net/utils/opened_files_view.html +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/ofview.zip +AppDLName=ofview.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Detected currently open files and manipulated as necessary. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 +CopyConfigFirst=OpenedFilesView.cfg diff --git a/.bin/d7ii/Config/CustomApps_d7II/OpenedFilesView.cfg b/.bin/d7ii/Config/CustomApps_d7II/OpenedFilesView.cfg new file mode 100644 index 00000000..9b86f336 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/OpenedFilesView.cfg @@ -0,0 +1,24 @@ +[General] +ToolTipTimeAutoPop=-1 +ToolTipTimeInitial=10 +ToolTipTimeReshow=10 +TrayIcon=0 +ShowGridLines=0 +ShowOpenedFiles=1 +ShowOpenedDirectories=0 +ShowNetworkFiles=0 +SortOnRefresh=0 +HideWindowsFiles=0 +HideSystemProcessFiles=0 +HideSvchostFiles=0 +AddExportHeaderLine=0 +ShowInfoTip=1 +AutoRefresh=0 +SaveFilterIndex=0 +ConvertToLongPath=0 +MarkModifiedFilenames=1 +MarkPositionChange=1 +MarkOddEvenRows=0 +WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 80 02 00 00 E0 01 00 00 +Columns=82 00 00 00 2C 01 01 00 3C 00 02 00 78 00 03 00 78 00 04 00 46 00 05 00 64 00 06 00 3C 00 07 00 3C 00 08 00 3C 00 09 00 3C 00 0A 00 3C 00 0B 00 3C 00 0C 00 50 00 0D 00 50 00 0E 00 50 00 0F 00 78 00 10 00 FA 00 11 00 50 00 12 00 50 00 13 00 +Sort=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/PatchMyPC (Auto).cfg b/.bin/d7ii/Config/CustomApps_d7II/PatchMyPC (Auto).cfg new file mode 100644 index 00000000..debc4dc2 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/PatchMyPC (Auto).cfg @@ -0,0 +1,37 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:45:01 PM +AppWebsite=www.patchmypc.net +AppDLPage=www.patchmypc.net +AppDesc=Windows and misc application updater +App=PatchMyPC.exe +AppParms=/auto /update +UseFTPServer=0 +AppURL=https://patchmypc.net/freeupdater/PatchMyPC.exe +AppDLName=PatchMyPC.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=PatchMyPC.reg +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%systemdrive%\%computername%.rtf +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Installed updates Windows and commonly used applications. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/PatchMyPC.cfg b/.bin/d7ii/Config/CustomApps_d7II/PatchMyPC.cfg new file mode 100644 index 00000000..9c19d3f4 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/PatchMyPC.cfg @@ -0,0 +1,37 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:44:22 PM +AppWebsite=www.patchmypc.net +AppDLPage=www.patchmypc.net +AppDesc=Windows and misc application updater +App=PatchMyPC.exe +UseFTPServer=0 +AppURL=http://www.patchmypc.net/PatchMyPC.exe +AppDLName=PatchMyPC.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=PatchMyPC.reg +ExportRegAfter=HKLM\Software\Patch My PC\Options +SaveConfigAfter=1 +MoveSnatchReports=1 +SnatchReportsLoc=%systemdrive%\%computername%.rtf +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Installed updates Windows and commonly used applications. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Petya Encryption Fix.cfg b/.bin/d7ii/Config/CustomApps_d7II/Petya Encryption Fix.cfg new file mode 100644 index 00000000..01a4564a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Petya Encryption Fix.cfg @@ -0,0 +1,36 @@ +[Config] +Author=Foolish Proctor +LastEditDate=4/13/2016 3:12:07 PM +PostRunApp= +AppWebsite=http://rmprepusb.blogspot.co.uk/2016/04/petya-whole-disk-encryption-fix.html +AppDLPage=http://rmprepusb.blogspot.co.uk/2016/04/petya-whole-disk-encryption-fix.html +App=PetyaExtractor\PetyaExtractor.exe +UseFTPServer=0 +AppURL=http://download.bleepingcomputer.com/fabian-wosar/PetyaExtractor.zip +AppDLName=PetyaExtractor.zip +AlwaysAttemptDownload=1 +DLafterXdays=7 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppDesc=Decrypt Disk with Petya malware infection +LogVerbiage=Decrypt Disk infected with Petya malware diff --git a/.bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner (Auto).cfg b/.bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner (Auto).cfg new file mode 100644 index 00000000..dafd8912 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner (Auto).cfg @@ -0,0 +1,38 @@ +[Config] +App=ccleaner\CCleaner.exe +App64=ccleaner\CCleaner64.exe +AppParms=/auto +AppURL=http://www.piriform.com/ccleaner/download/portable/downloadfile +AppDLName=ccleaner.zip +AppWait=0 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +AlwaysAttemptDownload=1 +CopyConfigFirst=CCleaner.ini +SaveConfigAfter=0 +DisableCloudShare=0 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=0 +ServiceWait=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=www.piriform.com/ccleaner +LogVerbiage=Scanned registry for unnecessary data and removed. +Author=FoolishTech +LastEditDate=2/7/2014 10:06:48 AM +AppDLPage=http://www.piriform.com/ccleaner/builds +AppDesc=Temp file remover and registry cleaner +NonDirectURLs=0 +AutoFlag=1 +LastDownload=8/13/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner.cfg b/.bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner.cfg new file mode 100644 index 00000000..dfe51f34 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Piriform CCleaner.cfg @@ -0,0 +1,37 @@ +[Config] +App=ccleaner\CCleaner.exe +App64=ccleaner\CCleaner64.exe +AppURL=http://www.piriform.com/ccleaner/download/portable/downloadfile +AppDLName=ccleaner.zip +AppWait=0 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +AlwaysAttemptDownload=1 +CopyConfigFirst=CCleaner.ini +SaveConfigAfter=1 +DisableCloudShare=0 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=www.piriform.com/ccleaner +LogVerbiage=Scanned registry for unnecessary data and removed. +LastEditDate=2/7/2014 10:07:10 AM +AppDLPage=http://www.piriform.com/ccleaner/builds +NonDirectURLs=0 +Author=FoolishTech +AppDesc=Temp file remover and registry cleaner +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler (Auto).cfg b/.bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler (Auto).cfg new file mode 100644 index 00000000..03e6459e --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler (Auto).cfg @@ -0,0 +1,38 @@ +[Config] +App=defraggler\df.exe +App64=defraggler\df64.exe +AppParms=%systemdrive% +AppURL=http://www.piriform.com/defraggler/download/portable/downloadfile +AppDLName=defraggler.zip +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +AlwaysAttemptDownload=1 +CopyConfigFirst=Defraggler.ini +SaveConfigAfter=0 +DisableCloudShare=0 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=0 +ServiceWait=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=www.piriform.com/defraggler +LogVerbiage=Defragmented file system (Defraggler) +Author=FoolishTech +LastEditDate=2/7/2014 10:07:50 AM +AppDLPage=http://www.piriform.com/defraggler/builds +AppDesc=Disk defragmenter +NonDirectURLs=0 +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler.cfg b/.bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler.cfg new file mode 100644 index 00000000..6ed8075f --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Piriform Defraggler.cfg @@ -0,0 +1,37 @@ +[Config] +App=Defraggler\Defraggler.exe +App64=Defraggler\Defraggler64.exe +AppURL=http://www.piriform.com/defraggler/download/portable/downloadfile +AppDLName=defraggler.zip +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +AlwaysAttemptDownload=1 +CopyConfigFirst=Defraggler.ini +SaveConfigAfter=1 +DisableCloudShare=0 +UseFTPServer=0 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +Servers=1 +AppWebsite=www.piriform.com/defraggler +LogVerbiage=Defragmented file system (Defraggler) +Author=FoolishTech +LastEditDate=2/7/2014 10:08:05 AM +AppDLPage=http://www.piriform.com/defraggler/builds +AppDesc=Disk defragmenter +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Piriform Recuva.cfg b/.bin/d7ii/Config/CustomApps_d7II/Piriform Recuva.cfg new file mode 100644 index 00000000..90630b8a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Piriform Recuva.cfg @@ -0,0 +1,33 @@ +[Config] +DisableCloudShare=0 +App=recuva\recuva.exe +App64=recuva\recuva64.exe +AppURL=http://www.piriform.com/recuva/download/portable/downloadfile +AppDLName=recuva.zip +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=www.piriform.com/recuva +UseFTPServer=0 +PriorAlert=0 +Author=FoolishTech +LastEditDate=2/7/2014 10:08:40 AM +AppDLPage=http://www.piriform.com/recuva/builds +AppDesc=File undelete utility +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/Piriform Speccy.cfg b/.bin/d7ii/Config/CustomApps_d7II/Piriform Speccy.cfg new file mode 100644 index 00000000..a232d7d6 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Piriform Speccy.cfg @@ -0,0 +1,35 @@ +[Config] +DisableCloudShare=0 +App=speccy\Speccy.exe +App64=speccy\Speccy64.exe +AppURL=http://www.piriform.com/speccy/download/portable/downloadfile +AppDLName=speccy.zip +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=www.piriform.com/speccy +UseFTPServer=0 +PriorAlert=0 +LogVerbiage=Gathered information on system specs. +Author=FoolishTech +LastEditDate=2/7/2014 10:09:08 AM +AppDLPage=http://www.piriform.com/speccy/builds +AppDesc=System information utility. +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/PreviousFilesRecovery.cfg b/.bin/d7ii/Config/CustomApps_d7II/PreviousFilesRecovery.cfg new file mode 100644 index 00000000..f6a46778 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/PreviousFilesRecovery.cfg @@ -0,0 +1,39 @@ +[Config] +LastEditDate=7/14/2016 4:49:58 PM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/previous_files_recovery.html +AppDLPage=http://www.nirsoft.net/utils/previous_files_recovery.html +AppDesc=Recover Previous Files +App=previousfilesrecovery\PreviousFilesRecovery.exe +App64=previousfilesrecovery-x64\PreviousFilesRecovery.exe +AppURL64=http://www.nirsoft.net/utils/previousfilesrecovery-x64.zip +AppDLName64=previousfilesrecovery-x64.zip +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/previousfilesrecovery.zip +AppDLName=previousfilesrecovery.zip +AlwaysAttemptDownload=1 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Recover Previous Files +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +Author=FoolishProctor diff --git a/.bin/d7ii/Config/CustomApps_d7II/RegFromApp-x32.cfg b/.bin/d7ii/Config/CustomApps_d7II/RegFromApp-x32.cfg new file mode 100644 index 00000000..63b97c50 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/RegFromApp-x32.cfg @@ -0,0 +1,39 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/29/2014 9:50:53 AM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/reg_file_from_application.html +AppDLPage=http://www.nirsoft.net/utils/reg_file_from_application.html +AppDesc=Shows registry entries created by a selected process +App=regfromapp\RegFromApp.exe +AppURLSpoof=http://www.nirsoft.net/utils/reg_file_from_application.html +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/regfromapp.zip +AppDLName=regfromapp.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=RegFromApp.cfg +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Detected registry entries created by 32-bit application. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/RegFromApp-x64.cfg b/.bin/d7ii/Config/CustomApps_d7II/RegFromApp-x64.cfg new file mode 100644 index 00000000..d8b62c75 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/RegFromApp-x64.cfg @@ -0,0 +1,39 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/29/2014 9:52:31 AM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/reg_file_from_application.html +AppDLPage=http://www.nirsoft.net/utils/reg_file_from_application.html +AppDesc=Shows registry entries created by a selected 64-bit process +App=regfromapp-x64\RegFromApp.exe +AppURLSpoof=http://www.nirsoft.net/utils/reg_file_from_application.html +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/regfromapp-x64.zip +AppDLName=regfromapp-x64.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +CopyConfigFirst=RegFromApp.cfg +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Detected registry entries created by 64-bit application. +32=0 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/RegFromApp.cfg b/.bin/d7ii/Config/CustomApps_d7II/RegFromApp.cfg new file mode 100644 index 00000000..7b7eeb26 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/RegFromApp.cfg @@ -0,0 +1,9 @@ +[General] +RegFileVersion=5 +AddOnlyModifiedValues=1 +DisplayMode=1 +ProcessPath= +ProcessParams= +StartImmediately=0 +ListViewSortProcess=0 +WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 80 02 00 00 E0 01 00 00 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Revo Uninstaller.cfg b/.bin/d7ii/Config/CustomApps_d7II/Revo Uninstaller.cfg new file mode 100644 index 00000000..bb8854dd --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Revo Uninstaller.cfg @@ -0,0 +1,38 @@ +[Config] +Author=FoolishTech +LastEditDate=8/30/2016 3:23:42 PM +PostRunApp= +AppWebsite=http://www.revouninstaller.com/ +AppDLPage=http://www.revouninstaller.com/download-free-portable.php +AppDesc=Application uninstaller and cleanup utility +App=revouninstaller\RevoUninstaller_Portable\x86\RevoUn.exe +App64=revouninstaller\RevoUninstaller_Portable\x64\RevoUn.exe +UseFTPServer=0 +AppURL=http://www.revouninstaller.com/download/revouninstaller.zip +AppDLName=revouninstaller.zip +AlwaysAttemptDownload=1 +DLafterXdays=7 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Uninstalled unnecessary / junk programs. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Rogue Killer.cfg b/.bin/d7ii/Config/CustomApps_d7II/Rogue Killer.cfg new file mode 100644 index 00000000..5b2e53e4 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Rogue Killer.cfg @@ -0,0 +1,41 @@ +[Config] +Author=FoolishTech +LastEditDate=6/19/2015 4:06:02 PM +PostRunApp= +AppWebsite=http://www.adlice.com/softwares/roguekiller/ +AppDLPage=http://www.adlice.com/softwares/roguekiller/ +AppDesc=Rogue malware remover. +App=RogueKiller.exe +App64=RogueKillerX64.exe +AppURL64=http://download.adlice.com/RogueKiller/RogueKillerX64.exe +AppDLName64=RogueKillerX64.exe +UseFTPServer=0 +AppURL=http://download.adlice.com/RogueKiller/RogueKiller.exe +AppDLName=RogueKiller.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=1 +ServiceWait=1 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%programdata%\RogueKiller\Logs\RKreport*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Scanned for rogue applications and malware (RogueKiller) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=6/19/2015 diff --git a/.bin/d7ii/Config/CustomApps_d7II/ShadowCopyView.cfg b/.bin/d7ii/Config/CustomApps_d7II/ShadowCopyView.cfg new file mode 100644 index 00000000..0a4a6159 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/ShadowCopyView.cfg @@ -0,0 +1,39 @@ +[Config] +Author=Proctor Foolish IT LLC +LastEditDate=6/27/2016 9:46:36 AM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/shadow_copy_view.html +AppDLPage=http://www.nirsoft.net/utils/shadow_copy_view.html +App=shadowcopyview\ShadowCopyView.exe +App64=shadowcopyview-x64\ShadowCopyView.exe +AppURL64=http://www.nirsoft.net/utils/shadowcopyview-x64.zip +AppDLName64=shadowcopyview-x64.zip +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/shadowcopyview.zip +AppDLName=shadowcopyview.zip +AlwaysAttemptDownload=1 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AppDesc=Manage Shadow Copy files +LogVerbiage=Manage Shadow Copy files +LastDownload=6/27/2016 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Should I Remove It (Uninstall).cfg b/.bin/d7ii/Config/CustomApps_d7II/Should I Remove It (Uninstall).cfg new file mode 100644 index 00000000..b2546e6e --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Should I Remove It (Uninstall).cfg @@ -0,0 +1,33 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/9/2014 1:41:32 PM +PostRunApp= +AppWebsite=http://www.shouldiremoveit.com +App=%WINDIR%\System32\MsiExec.exe +App64=%WINDIR%\SysWow64\MsiExec.exe +AppParms=/X{4E62123C-4C0D-4123-A8A2-C0103B92D7EA} /qn +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +AutoFlag=1 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Should I Remove It.cfg b/.bin/d7ii/Config/CustomApps_d7II/Should I Remove It.cfg new file mode 100644 index 00000000..15f9227b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Should I Remove It.cfg @@ -0,0 +1,39 @@ +[Config] +LastEditDate=10/9/2014 2:12:59 PM +AppWebsite=http://www.shouldiremoveit.com +AppDLPage=http://www.shouldiremoveit.com/download.aspx +UseFTPServer=0 +InstallerParms=/qn +InstallerName=ShouldIRemoveIt_Setup.exe +AppURL=http://www.shouldiremoveit.com/installers/ShouldIRemoveIt_Setup.exe +AppDLName=ShouldIRemoveIt_Setup.exe +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=1 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +App=%programfiles(x86)%\Reason\Should I Remove It\ShouldIRemoveIt.exe +Author=dSupportOnline +PostRunApp=Should I Remove It (Uninstall) +EmailBeforeExecution=0 +SendEnter=0 +AutoFlag=0 +LastDownload=10/27/2017 +AppDesc=Crowdsource installed programs to determine if they are malicious. +LogVerbiage=Verified installed programs against crowdsource rating system. diff --git a/.bin/d7ii/Config/CustomApps_d7II/Sophos Virus Removal Tool.cfg b/.bin/d7ii/Config/CustomApps_d7II/Sophos Virus Removal Tool.cfg new file mode 100644 index 00000000..068fb155 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Sophos Virus Removal Tool.cfg @@ -0,0 +1,39 @@ +[Config] +Author=FoolishTech +LastEditDate=3/30/2016 11:12:26 AM +PostRunApp= +AppWebsite=http://www.sophos.com/en-us/products/free-tools/virus-removal-tool/download.aspx +AppDLPage=http://www.sophos.com/en-us/products/free-tools/virus-removal-tool/download.aspx +AppDesc=Virus scanner +App=%programfiles(x86)%\Sophos\Sophos Virus Removal Tool\SVRTcli.exe +AppParms=-reboot -uninstall -yes +UseFTPServer=0 +InstallerName=SophosVRT.exe +AppURL=http://downloads.sophos.com/tools/withides/Sophos%20Virus%20Removal%20Tool.exe +AppDLName=SophosVRT.exe +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%programdata%\Sophos\Sophos Virus Removal Tool\Logs\SophosVirusRemovalTool.log +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=1 +LogVerbiage=Scanned for viruses/malware (Sophos) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 diff --git a/.bin/d7ii/Config/CustomApps_d7II/SpaceSniffer.cfg b/.bin/d7ii/Config/CustomApps_d7II/SpaceSniffer.cfg new file mode 100644 index 00000000..bb28d717 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/SpaceSniffer.cfg @@ -0,0 +1,33 @@ +[Config] +DisableCloudShare=0 +App=spacesniffer_1_1_4_0\SpaceSniffer.exe +AppURL=http://www.uderzo.it/main_products/space_sniffer/files/spacesniffer_1_1_4_0.zip +AppDLName=spacesniffer_1_1_4_0.zip +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=www.uderzo.it/main_products/space_sniffer +UseFTPServer=0 +PriorAlert=0 +Author=FoolishTech +LastEditDate=2/7/2014 10:13:36 AM +AppDLPage=www.uderzo.it/main_products/space_sniffer +AppDesc=Useful to determine where all your disk space is being used! +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/StartUpLite.cfg b/.bin/d7ii/Config/CustomApps_d7II/StartUpLite.cfg new file mode 100644 index 00000000..03069aff --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/StartUpLite.cfg @@ -0,0 +1,35 @@ +[Config] +App=StartUpLite.exe +AppURL=http://www.malwarebytes.org/StartUpLite.exe +AppDLName=StartUpLite.exe +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +DisableCloudShare=0 +UseFTPServer=0 +AlwaysAttemptDownload=1 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +SaveConfigAfter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://www.malwarebytes.org/products/startuplite/ +LogVerbiage=Removed unnecessary Windows startup entries. +Author=FoolishTech +LastEditDate=2/7/2014 10:14:03 AM +AppDLPage=http://www.malwarebytes.org/products/startuplite/ +AppDesc=Startup entry manager by MalwareBytes +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/SuperAntiSpyware.cfg b/.bin/d7ii/Config/CustomApps_d7II/SuperAntiSpyware.cfg new file mode 100644 index 00000000..e0d9b14b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/SuperAntiSpyware.cfg @@ -0,0 +1,36 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:48:26 PM +AppWebsite=http://www.superantispyware.com/ +AppDLPage=http://www.superantispyware.com/downloadfile.html?productid=SUPERANTISPYWAREFREE +AppDesc=Malware scanner +App=sas.com +AppURLSpoof= +UseFTPServer=0 +AppURL=http://www.superantispyware.com/sasportable.php +AppDLName=sas.com +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +WaitOnProcesses=program.com;program64.com;superantispyware.exe +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsLoc=%temp%\SAS_SelfExtract\Logs\SUPERAntiSpyware*.log +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Scanned for ad/spy/malware (SAS) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/Svchost Process Analyzer.cfg b/.bin/d7ii/Config/CustomApps_d7II/Svchost Process Analyzer.cfg new file mode 100644 index 00000000..862cc4d3 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Svchost Process Analyzer.cfg @@ -0,0 +1,37 @@ +[Config] +Author=Foolish IT +LastEditDate=3/30/2016 11:16:04 AM +PostRunApp= +AppWebsite=http://www.neuber.com/free/svchost-analyzer/ +AppDLPage=http://www.neuber.com/free/svchost-analyzer/ +AppDesc=Analyze svchost checking for malware +App=SvchostAnalyzer.exe +UseFTPServer=0 +AppURL=http://www.neuber.com/download/SvchostAnalyzer.exe +AppDLName=SvchostAnalyzer.exe +AlwaysAttemptDownload=1 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Checking for malware by analyzing svchost +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=3/30/2016 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Sysinternals PageDefrag (XP).cfg b/.bin/d7ii/Config/CustomApps_d7II/Sysinternals PageDefrag (XP).cfg new file mode 100644 index 00000000..d81eb31a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Sysinternals PageDefrag (XP).cfg @@ -0,0 +1,36 @@ +[Config] +DisableCloudShare=0 +App=pagedfrg.exe +AppURL=http://live.sysinternals.com/pagedfrg.exe +AppDLName=pagedfrg.exe +AlwaysAttemptDownload=0 +AppWait=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=0 +XP=1 +Vista=0 +7=0 +8=0 +Servers=0 +AppParms=-o +CopyConfigFirst=pagedfrg.reg +AppWebsite=http://technet.microsoft.com/en-us/sysinternals/bb897426 +UseFTPServer=0 +PriorAlert=0 +LogVerbiage=Defragmented Windows paging file and registry. +Author=FoolishTech +LastEditDate=2/7/2014 10:15:12 AM +AppDLPage=http://technet.microsoft.com/en-us/sysinternals/bb897426 +AppDesc=Defragments the paging file and registry hives for Windows XP only. +NonDirectURLs=0 +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/TCPOptimizer.cfg b/.bin/d7ii/Config/CustomApps_d7II/TCPOptimizer.cfg new file mode 100644 index 00000000..29d862fc --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/TCPOptimizer.cfg @@ -0,0 +1,35 @@ +[Config] +App=TCPOptimizer.exe +AppURL=http://www.speedguide.net/files/TCPOptimizer.exe +AppDLName=TCPOptimizer.exe +AppWait=1 +AppMsgBox=0 +AppRandomize=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +DisableCloudShare=0 +UseFTPServer=0 +AlwaysAttemptDownload=1 +DLafterXdays=7 +PriorAlert=1 +ServiceWait=0 +SaveConfigAfter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +AppWebsite=http://www.speedguide.net/tcpoptimizer.php +LogVerbiage=Optimized TCP stack for better networking performance. +Author=FoolishTech +LastEditDate=2/7/2014 10:15:36 AM +AppDLPage=http://www.speedguide.net/tcpoptimizer.php +AppDesc=Optimize and fix issues with network adapters. +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/TreeSize.cfg b/.bin/d7ii/Config/CustomApps_d7II/TreeSize.cfg new file mode 100644 index 00000000..ddcdd854 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/TreeSize.cfg @@ -0,0 +1,36 @@ +[Config] +Author=Foolish IT +LastEditDate=3/30/2016 11:19:29 AM +PostRunApp= +AppWebsite=http://www.jam-software.com/treesize_free/ +AppDLPage=http://www.jam-software.com/treesize_free/ +App=TreeSizeFree\TreeSizeFree.exe +UseFTPServer=0 +AppURL=http://www.jam-software.com/treesize_free/TreeSizeFree.zip +AppDLName=TreeSizeFree.zip +AlwaysAttemptDownload=1 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppDesc=Check Disk Space Usage +LogVerbiage=Reviewed disk space usage diff --git a/.bin/d7ii/Config/CustomApps_d7II/USB Devices View.cfg b/.bin/d7ii/Config/CustomApps_d7II/USB Devices View.cfg new file mode 100644 index 00000000..546d0dc7 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/USB Devices View.cfg @@ -0,0 +1,39 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/29/2014 9:27:56 AM +PostRunApp= +AppWebsite=http://www.nirsoft.net/utils/usb_devices_view.html +AppDLPage=http://www.nirsoft.net/utils/usb_devices_view.html +AppDesc=Utility to examine installed USB devices and remove corrupt drivers +App=usbdeview\USBDeview.exe +AppURLSpoof=http://www.nirsoft.net/utils/usb_devices_view.html +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/usbdeview.zip +AppDLName=usbdeview.zip +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=1 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Examined installed USB devices and removed corrupted drivers or updated accordingly. +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 +CopyConfigFirst=USBDeview.cfg diff --git a/.bin/d7ii/Config/CustomApps_d7II/USBDeview.cfg b/.bin/d7ii/Config/CustomApps_d7II/USBDeview.cfg new file mode 100644 index 00000000..c38f99e6 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/USBDeview.cfg @@ -0,0 +1,28 @@ +[General] +ShowGridLines=0 +ShowInfoTip=1 +DisplayDisconnected=1 +DisplayNoPortSerial=1 +DisplayNoDriver=0 +DisplayHubs=0 +ShowDisconnectMessage=0 +TrayIcon=0 +ShowWindowOnDeviceConnect=0 +AutoPlayOnDeviceConnect=0 +DisplayBalloonOnDeviceConnect=0 +StartAsHidden=0 +ShowTimeInGMT=0 +DisplayBalloonOnDeviceDisconnect=0 +RetrieveUSBPower=1 +MarkConnectedDevices=1 +SaveFilterIndex=0 +DeviceConnectExecute= +UseDeviceConnectExecute=0 +DeviceDisconnectExecute= +UseDeviceDisconnectExecute=0 +AddExportHeaderLine=0 +MarkOddEvenRows=0 +DecodeSerialNumbers=1 +WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 80 02 00 00 E0 01 00 00 +Columns=96 00 00 00 B4 00 01 00 96 00 02 00 5A 00 03 00 5A 00 04 00 5A 00 05 00 50 00 06 00 5A 00 07 00 78 00 08 00 78 00 09 00 78 00 0A 00 64 00 0B 00 64 00 0C 00 64 00 0D 00 50 00 0E 00 50 00 0F 00 50 00 10 00 64 00 11 00 6E 00 12 00 96 00 13 00 96 00 14 00 96 00 15 00 6E 00 16 00 6E 00 17 00 6E 00 18 00 6E 00 19 00 8C 00 1A 00 5A 00 1B 00 5A 00 1C 00 82 00 1D 00 82 00 1E 00 C8 00 1F 00 +Sort=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/UltraSearch.cfg b/.bin/d7ii/Config/CustomApps_d7II/UltraSearch.cfg new file mode 100644 index 00000000..355220b7 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/UltraSearch.cfg @@ -0,0 +1,40 @@ +[Config] +Author=Foolish IT +LastEditDate=3/30/2016 11:23:32 AM +PostRunApp= +AppWebsite=http://www.jam-software.com/ultrasearch/ +AppDLPage=http://www.jam-software.com/ultrasearch/ +App=UltraSearchx32\UltraSearch.exe +UseFTPServer=0 +AppURL=http://www.jam-software.com/ultrasearch/UltraSearch-x86.zip +AppDLName=UltraSearchx32.zip +AlwaysAttemptDownload=1 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +App64=UltraSearchx64\UltraSearch.exe +AppURL64=http://www.jam-software.com/ultrasearch/UltraSearch-x64.zip +AppDLName64=UltraSearchx64.zip +LastDownload=3/30/2016 +AppDesc=Quickly search files and folders +LogVerbiage=Searched files and folders diff --git a/.bin/d7ii/Config/CustomApps_d7II/Unchecky (Install).cfg b/.bin/d7ii/Config/CustomApps_d7II/Unchecky (Install).cfg new file mode 100644 index 00000000..c66def4a --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Unchecky (Install).cfg @@ -0,0 +1,35 @@ +[Config] +Author=FoolishTech +LastEditDate=7/19/2014 6:00:26 AM +AppWebsite=http://unchecky.com/ +AppDLPage=http://unchecky.com/ +AppDesc=Keeps your checkboxes clear. +UseFTPServer=0 +AppURL=http://unchecky.com/files/unchecky_setup.exe +AppDLName=unchecky_setup.exe +AlwaysAttemptDownload=1 +DLafterXdays=5 +AppWait=1 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Installed Unchecky application +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +App=unchecky_setup.exe +AppParms=-install -update -no_desktop_icon +LastDownload=10/27/2017 +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Deep Scan).cfg b/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Deep Scan).cfg new file mode 100644 index 00000000..cff93333 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Deep Scan).cfg @@ -0,0 +1,40 @@ +[Config] +Author=FoolishTech +LastEditDate=10/29/2014 10:09:50 AM +PostRunApp= +AppWebsite=http://live.sunbeltsoftware.com/ +AppDLPage=http://www.vipreantivirus.com/live/Download2/ +AppDesc=Virus scanner (Designed for both the Malware Removal and the Offline Operations tab) +App=vipre\VipreRescueScanner.exe +AppParms=/path %tdrive% +UseFTPServer=0 +AppURL=http://go.threattracksecurity.com/?linkid=1605 +AppDLName=vipre.zip +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsToMalwareLogs=1 +RunInCMD=1 +SendEnter=1 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (Vipre) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=1 +AutoFlag=1 +SnatchReportsLoc=%3rdpath%\*.csv +LastDownload=10/27/2017 +AppURLSpoof=http://www.vipreantivirus.com/support.aspx#vp-Rescue diff --git a/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Manual).cfg b/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Manual).cfg new file mode 100644 index 00000000..d4c074de --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Manual).cfg @@ -0,0 +1,39 @@ +[Config] +Author=FoolishTech +LastEditDate=9/28/2014 7:46:09 PM +PostRunApp= +AppWebsite=http://live.sunbeltsoftware.com/ +AppDLPage=http://www.vipreantivirus.com/live/Download2/ +AppDesc=Virus scanner - Manual removal +App=vipre\VipreRescueScanner.exe +UseFTPServer=0 +AppURL=http://go.threattracksecurity.com/?linkid=1605 +AppDLName=vipre.zip +AlwaysAttemptDownload=1 +DLafterXdays=7 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%3rdpath%\*.csv +SnatchReportsToMalwareLogs=1 +RunInCMD=1 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (Vipre) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=1 +AutoFlag=0 +LastDownload=9/28/2014 +AppURLSpoof=http://www.vipreantivirus.com/support.aspx#vp-Rescue \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Quick Scan).cfg b/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Quick Scan).cfg new file mode 100644 index 00000000..f39da538 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/VipreRescueScanner (Quick Scan).cfg @@ -0,0 +1,40 @@ +[Config] +Author=FoolishTech +LastEditDate=10/13/2014 9:42:04 AM +PostRunApp= +AppWebsite=http://live.sunbeltsoftware.com/ +AppDLPage=http://www.vipreantivirus.com/live/Download2/ +AppDesc=Virus scanner (Designed for both the Malware Removal and the Offline Operations tab) +App=vipre\VipreRescueScanner.exe +AppParms=/path %tdrive% /quick +UseFTPServer=0 +AppURL=http://go.threattracksecurity.com/?linkid=1605 +AppDLName=vipre.zip +AlwaysAttemptDownload=1 +DLafterXdays=1 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%3rdpath%\*.csv +SnatchReportsToMalwareLogs=1 +RunInCMD=1 +SendEnter=1 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran virus scans (Vipre) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=1 +AutoFlag=1 +LastDownload=10/13/2014 +AppURLSpoof=http://www.vipreantivirus.com/support.aspx#vp-Rescue \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader Uninstall.cfg b/.bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader Uninstall.cfg new file mode 100644 index 00000000..51513d28 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader Uninstall.cfg @@ -0,0 +1,32 @@ +[Config] +Author=VirusTotal +LastEditDate=5/16/2016 5:25:35 PM +PostRunApp= +AppWebsite=https://www.virustotal.com/en/documentation/desktop-applications/ +AppDLPage=https://www.virustotal.com/en/documentation/desktop-applications/ +App=%programfiles%\VirusTotalUploader2\uninstall.exe +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader.cfg b/.bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader.cfg new file mode 100644 index 00000000..6173859c --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/VirusTotal Uploader.cfg @@ -0,0 +1,36 @@ +[Config] +Author=VirusTotal +LastEditDate=5/16/2016 5:48:48 PM +PostRunApp=VirusTotal Uploader Uninstall +AppWebsite=https://www.virustotal.com/en/documentation/desktop-applications/ +AppDLPage=https://www.virustotal.com/en/documentation/desktop-applications/ +App=%programfiles(x86)%\VirusTotalUploader2\VirusTotalUploader2.2.exe +UseFTPServer=0 +InstallerName=vtuploader2.2.exe +AppURL=https://www.virustotal.com/static/bin/vtuploader2.2.exe +AppDLName=vtuploader2.2.exe +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=1 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=5/16/2016 diff --git a/.bin/d7ii/Config/CustomApps_d7II/WhatIsHang.cfg b/.bin/d7ii/Config/CustomApps_d7II/WhatIsHang.cfg new file mode 100644 index 00000000..51ad3075 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/WhatIsHang.cfg @@ -0,0 +1,14 @@ +[General] +ShowGridLines=0 +SaveFilterIndex=0 +ShowInfoTip=1 +AutoRefresh=1 +VerSplitLoc=16383 +TrayIcon=0 +DisplayAboveAscii127=0 +StartAsHidden=0 +AlwaysOnTop=0 +AutoGetReport=0 +WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 80 02 00 00 E0 01 00 00 +Columns=96 00 00 00 96 00 01 00 64 00 02 00 64 00 03 00 FA 00 04 00 +Sort=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO (Auto).cfg b/.bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO (Auto).cfg new file mode 100644 index 00000000..028b8f47 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO (Auto).cfg @@ -0,0 +1,36 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:48:49 PM +AppWebsite=http://www.tweaking.com/articles/pages/windows_repair_all_in_one_tips,1.html +AppDLPage=http://www.tweaking.com/content/page/windows_repair_all_in_one.html +AppDesc=Tweaking.com's Windows Repair All-In-One can fix a large majority of known Windows problems. +App=aio\Tweaking.com - Windows Repair\Repair_Windows.exe +AppParms=/silent +UseFTPServer=0 +AppURL=http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip +AppDLName=aio.zip +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%3rdpath%\Logs\_Windows_Repair_Log.txt +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Repaired damage to Windows with %app% +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO.cfg b/.bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO.cfg new file mode 100644 index 00000000..0caeffac --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/Windows Repair AIO.cfg @@ -0,0 +1,35 @@ +[Config] +Author=FoolishTech +LastEditDate=5/27/2014 1:48:42 PM +AppWebsite=http://www.tweaking.com/articles/pages/windows_repair_all_in_one_tips,1.html +AppDLPage=http://www.tweaking.com/content/page/windows_repair_all_in_one.html +AppDesc=Tweaking.com's Windows Repair All-In-One can fix a large majority of known Windows problems. +App=aio\Tweaking.com - Windows Repair\Repair_Windows.exe +UseFTPServer=0 +AppURL=http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip +AppDLName=aio.zip +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +PriorAlert=1 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%3rdpath%\Logs\_Windows_Repair_Log.txt +SnatchReportsToMalwareLogs=0 +RunInCMD=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Repaired damage to Windows with %app% +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=0 +NonDirectURLs=0 +AutoFlag=0 +LastDownload=10/27/2017 diff --git a/.bin/d7ii/Config/CustomApps_d7II/cports.cfg b/.bin/d7ii/Config/CustomApps_d7II/cports.cfg new file mode 100644 index 00000000..5b8a5276 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/cports.cfg @@ -0,0 +1,40 @@ +[General] +WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 4E 00 00 00 4E 00 00 00 CE 02 00 00 2E 02 00 00 +Columns=6E 00 00 00 3C 00 01 00 3C 00 02 00 46 00 03 00 46 00 04 00 64 00 05 00 46 00 06 00 46 00 07 00 64 00 08 00 78 00 09 00 50 00 0A 00 40 01 0B 00 B4 00 0C 00 B4 00 0D 00 B4 00 0E 00 B4 00 0F 00 78 00 10 00 8C 00 11 00 96 00 12 00 64 00 13 00 78 00 14 00 C8 00 15 00 6E 00 16 00 96 00 17 00 +Sort1=0 +ShowGridLines=0 +SaveFilterIndex=0 +MarkPorts=1 +DisplayUdpPorts=1 +DisplayTcpPorts=1 +DisplayClosedPorts=1 +MarkNewModifiedPorts=1 +SortOnAutoRefresh=1 +AlwaysOnTop=0 +AskBefore=1 +DisplayIPv6Ports=1 +DisplayListening=1 +DisplayEstablished=1 +DisplayNoState=1 +DisplayNoRemoteIP=1 +ResolveAddresses=1 +RememberLastFilter=1 +AutoResizeColumns=0 +DisplayPortInAddress=0 +AutoRefresh=0 +ShowInfoTip=1 +TrayIcon=0 +TrayIconOneClick=0 +LogChanges=0 +LogFilename=cports.log +StartAsHidden=0 +DisabledFilters=0 +UseCustomLogLine=0 +CustomLogLine=%Process_ID.5% %Process_Name.20% %Protocol.5% %Local_Address.25% %Remote_Address.35% %User_Name.40% +MissingConnectionsWorkaround=0 +AddExportHeaderLine=0 +MarkOddEvenRows=0 +TrayBalloonOnNewPort=0 +BeepOnNewPort=0 +UseDNSCache=0 +CustomRefresh=15 diff --git a/.bin/d7ii/Config/CustomApps_d7II/herdProtect (Uninstall).cfg b/.bin/d7ii/Config/CustomApps_d7II/herdProtect (Uninstall).cfg new file mode 100644 index 00000000..18418caf --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/herdProtect (Uninstall).cfg @@ -0,0 +1,32 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/9/2014 3:36:58 PM +PostRunApp= +AppWebsite=http://www.herdprotect.com/index.aspx +App=%ProgramFiles%\Reason\herdProtect\Scanner\Uninstall.exe +UseFTPServer=0 +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +AppParms=/qn diff --git a/.bin/d7ii/Config/CustomApps_d7II/herdProtect.cfg b/.bin/d7ii/Config/CustomApps_d7II/herdProtect.cfg new file mode 100644 index 00000000..17ac004b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/herdProtect.cfg @@ -0,0 +1,38 @@ +[Config] +Author=dSupportOnline +LastEditDate=10/9/2014 3:44:33 PM +PostRunApp=herdProtect (Uninstall) +AppWebsite=http://www.herdprotect.com/index.aspx +AppDLPage=http://www.herdprotect.com/downloads.aspx +UseFTPServer=0 +AppURL=http://www.herdprotect.com/installers/herdProtectScan_Setup.exe +AppDLName=herdProtectSetup.exe +AlwaysAttemptDownload=0 +DLafterXdays=5 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=1 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=0 +InstallerParms=/qn +InstallerName=herdProtectSetup.exe +App=C:\Program Files\Reason\herdProtect\Scanner\herdProtectScan.exe +AppDesc=Cloud-based anti-malware scanner +LogVerbiage=Scanned system against 68 various anti-malware scanners diff --git a/.bin/d7ii/Config/CustomApps_d7II/rkill.cfg b/.bin/d7ii/Config/CustomApps_d7II/rkill.cfg new file mode 100644 index 00000000..0f0d70a0 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/rkill.cfg @@ -0,0 +1,40 @@ +[Config] +Author=FoolishTech +LastEditDate=10/10/2014 5:07:05 AM +PostRunApp= +AppWebsite=http://www.bleepingcomputer.com/forums/t/308364/rkill-what-it-does-and-what-it-doesnt-a-brief-introduction-to-the-program/ +AppDLPage=http://www.bleepingcomputer.com/download/rkill/ +AppDesc=Anti-Malware app. +App=rkill.exe +AppParms=-s -w "%3rdpath%\rkill_Excludes.txt" +UseFTPServer=0 +AppURL=http://download.bleepingcomputer.com/grinler/rkill.exe +AppDLName=rkill.exe +AlwaysAttemptDownload=1 +DLafterXdays=3 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=1 +CopyConfigFirst=rkill.cmd +SaveConfigAfter=0 +MoveSnatchReports=1 +SnatchReportsLoc=%userprofile%\Desktop\rkill*.txt +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +LogVerbiage=Ran Rogue Malware Scans (rkill) +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +AutoFlag=1 +LastDownload=8/13/2018 diff --git a/.bin/d7ii/Config/Email.Settings.dat b/.bin/d7ii/Config/Email.Settings.dat new file mode 100644 index 0000000000000000000000000000000000000000..b18493d13131b2cdbf05f0d4b5fd6d263d1f76c8 GIT binary patch literal 73 scmWe(NHNdMba2kkElA9(^h?Z5)l1IL6~QXXz`)928yi_?$AAR@03G)b!2kdN literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/FTP.Settings.dat b/.bin/d7ii/Config/FTP.Settings.dat new file mode 100644 index 0000000000000000000000000000000000000000..c55d9e1193e2249b47e8e2743e0856167a8f84a0 GIT binary patch literal 78 zcmZQzU|?Wnu#JtZvjej5GdURagHj9fi%N>w8T6g=^U^ZYK|1tZQqzh-ni&`X1Emf* literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/Folders.txt b/.bin/d7ii/Config/Folders.txt new file mode 100644 index 00000000..a0fa7ee6 --- /dev/null +++ b/.bin/d7ii/Config/Folders.txt @@ -0,0 +1 @@ +\\nas,\\nas diff --git a/.bin/d7ii/Config/IntFunctions/MBAM_Prefs.cfg b/.bin/d7ii/Config/IntFunctions/MBAM_Prefs.cfg new file mode 100644 index 00000000..245f6716 --- /dev/null +++ b/.bin/d7ii/Config/IntFunctions/MBAM_Prefs.cfg @@ -0,0 +1,5 @@ +[PostScan] +AlwaysUninstallFreeVer=0 +[PreScan] +AutoContinue=1 +AlwaysUninstallFreeVer=0 diff --git a/.bin/d7ii/Config/Links.txt b/.bin/d7ii/Config/Links.txt new file mode 100644 index 00000000..3869db96 --- /dev/null +++ b/.bin/d7ii/Config/Links.txt @@ -0,0 +1,16 @@ +Windows Services Reg Files (BleepingComputer.com),http://download.bleepingcomputer.com/win-services/ +Process Library (Search for information on a Process),http://www.processlibrary.com/en/ +DLL-files.com (Download Missing dll files),http://www.dll-files.com/ +PCI Vendor and Device Lists (Identify Unknown Devices),http://www.pcidatabase.com/ +Driver Guide (Download Missing Drivers),http://www.driverguide.com/ +Drivers for notebooks (Quick Access to various model's drivers),http://drp.su/drivers/notebooks/?l=en +RouterPasswords.com (Common Router Passwords),http://www.routerpasswords.com/ +Default Username and Password for Routers - All makes (irintech.com) ,http://www.irintech.com/x1/co/764/Default-Username-and- +Laptop Recovery Instructions (Details on Accessing Recovery Mode for laptops),http://www.mmpcsolutions.co.uk/recovery.php +Contact Tech Support Websites (provided by MALabs.com),http://www.malabs.com/services/tech_support.php +Support Details (Brief Browser/OS specs export via email/cvx/pdf) ,http://supportdetails.com/ +HeliDoc.net (Direct D/L links to MS Software),http://www.heidoc.net/joomla/technology-science/microsoft +My copy of Office did not come with a disk (via Microsoft),http://office.microsoft.com/en-gb/products/download-backup-restore-microsoft-office-products-FX103427465.aspx +Computer Repair Flowcharts (Common Repair Problems Flow Charts),http://www.similarsites.com/goto/fixingmycomputer.com?pos=5&s=10 +How to Download Windows 8.1 RTM Standalone Offline ISO for Clean Installation?,http://www.askvg.com/how-to-download-windows-8-1-rtm-standalone-offline-iso-for-clean-installation/ +Service Pack Center (via Microsoft),http://windows.microsoft.com/en-us/windows/service-packs-download diff --git a/.bin/d7ii/Config/OS Branding/OSBranding.ini b/.bin/d7ii/Config/OS Branding/OSBranding.ini new file mode 100644 index 00000000..b3f034a1 --- /dev/null +++ b/.bin/d7ii/Config/OS Branding/OSBranding.ini @@ -0,0 +1,12 @@ +[OSBranding] +AlwaysPrompt=0 +Mfgr=1201 Computers +Model=Custom +Phone=503-523-1012 +Hours=M-F 9am-7pm PST +URL=http://www.1201.com +[DesktopShortcut] +ShortcutURL=http://www.1201.com +ShortcutName=1201 Computers +ShortcutIcon=CompanyName.ico +UseIE=0 diff --git a/.bin/d7ii/Config/OS Branding/oeminfo.ini b/.bin/d7ii/Config/OS Branding/oeminfo.ini new file mode 100644 index 00000000..7930294f --- /dev/null +++ b/.bin/d7ii/Config/OS Branding/oeminfo.ini @@ -0,0 +1,3 @@ +[General] +Manufacturer=1201 Computers +Model=Custom diff --git a/.bin/d7ii/Config/Profiles/Default.cfg b/.bin/d7ii/Config/Profiles/Default.cfg new file mode 100644 index 00000000..ed1be24b --- /dev/null +++ b/.bin/d7ii/Config/Profiles/Default.cfg @@ -0,0 +1,1496 @@ +[QA_Defaults] +Item1=0 +Item2=1 +Item3=1 +Item4=1 +Item5=1 +Item6=1 +Item7=1 +Item8=1 +Item9=0 +Item10=0 +Item11=0 +Item12=1 +Item13=1 +Item14=1 +Item15=0 +Item16=0 +Item17=0 +Item18=0 +Item19=0 +Item20=0 +Item21=0 +[Tweaks_Defaults] +Item1=0 +Item2=0 +Item3=0 +Item4=0 +Item5=0 +Item6=1 +Item7=0 +Item8=0 +Item9=0 +Item10=1 +Item11=0 +Item12=0 +Item13=1 +Item14=0 +Item15=0 +Item16=0 +Item17=0 +Item18=0 +Item19=0 +Item20=0 +Item21=0 +Item22=0 +Item23=0 +Item24=0 +Item25=0 +Item26=0 +Item27=0 +Item28=0 +Item29=0 +Item30=0 +Item31=0 +Item32=0 +Item33=0 +Item34=0 +Item35=0 +Item36=0 +Item37=0 +Item38=0 +Item39=0 +Item40=0 +Item41=0 +Item42=0 +Item43=0 +Item44=0 +Item45=0 +Item46=0 +Item47=0 +Item48=0 +Item49=0 +Item50=0 +Item51=0 +Item52=0 +Item53=0 +Item54=0 +Item55=0 +Item56=0 +Item57=0 +Item58=1 +Item59=0 +Item60=0 +Item61=0 +[CustomizeInstall] +BrandOS=0 +DropShortcut=0 +CustomDNSApply=0 +CustomDNSName=(Select DNS Servers) +CustomDNS1= +CustomDNS2= +CustomHOSTS=0 +UPHClean=1 +CustomWinUpd=0 +UpdateFlash=1 +SetBrowserHomepage=0 +BrowserHomepage= +CPWhite=0 +dSS=0 +CPFree=0 +RunNiniteEarly=1 +PatchMyPC=0 +PatchMyPC (Auto)=0 +Unchecky (Install)=1 +[Maintenance] +Auslogics DD Portable=0 +AdwCleaner=0 +Autoruns=0 +CrowdInspect=0 +Neutron (Sync Time)=1 +Piriform CCleaner=0 +Piriform CCleaner (Auto)=1 +Piriform Defraggler=0 +Piriform Defraggler (Auto)=0 +Revo Uninstaller=0 +DelNTUninstDirs=1 +DefragStartupItems=1 +CustomMaint=0 +TimeZoneCheck=0 +MaintDelTemps=1 +MaintPurgeSysRest=1 +MaintEmptyBin=1 +MaintProcIdleTasks=1 +MaintTimeSync=0 +MaintShortcuts=1 +MaintIE8PerfFixit=0 +PageDefrag=1 +CreateRPAfterD7Auto=1 +MaintClearEventLogs=1 +DelIEBHOs=0 +DelIEToolbars=0 +RevoUninstaller=0 +ResetIEtoDefaults=1 +OrphanFinderPF=1 +DelTempInternet=1 +DelCookies=0 +DelHistory=0 +Prefetch=1 +AutoUninstall=1 +AutoUninstallUI=1 +CleanMgr=1 +JRT=0 +[OfflineDefaults] +PreMalwareScan=1 +MalwareScan=1 +DelTemps=1 +PurgeSysRest=1 +FixShell=1 +RemovePolicies=1 +KillRenameOps=1 +ResetHiddenVol=0 +CopyD7=1 +IFEOModifier=1 +[MalwareDefaults] +Safe Mode w/Net Mod=0 +KillZA Check=0 +Pre-MalwareScan=1 +dUninstaller (Auto)=1 +dUninstaller (UI)=0 +Purge System Restore=1 +Registry Hive Backup=1 +System Restore Point (pre)=1 +Find Moved Shortcuts=1 +Reset Hidden Volume=0 +Kill Rename Ops=1 +Fix File Associations=1 +Remove Policies=1 +Clear Proxy Settings=1 +Apply DHCP to All NICs=0 +Delete Temp Files=1 +Delete Temp Internet Files=1 +Delete History=0 +Delete Cookies=0 +Empty Recycle Bin=1 +MSSE/WD Quick Scan=1 +MSSE/WD Full Scan=0 +JRT=0 +McAfee Stinger=0 +McAfee Stinger (Silent)=1 +ComboFix=0 +ComboFix (Uninstall)=0 +HitmanPro=1 +AdwCleaner=0 +Autoruns=0 +Avast! aswMBR=0 +Bitdefender Rootkit Remover=0 +CrowdInspect=0 +Emsisoft a2cmd Full Scan=0 +Emsisoft a2cmd Update=0 +ESET Smart Installer=0 +GMER=0 +Kaspersky TDSSKiller=0 +Kaspersky TDSSKiller (Silent)=0 +MalwareBytes Anti-Rootkit=0 +Malwarebytes v2=1 +MBRCheck=0 +OTL=0 +rkill=0 +Rogue Killer=0 +Sophos Virus Removal Tool=0 +SuperAntiSpyware=0 +VipreRescueScanner=0 +MalwareScan=1 +Repair Permissions=0 +Reset Networking=1 +Repair Windows Update=1 +Repair WMI/WBEM/DCOM=1 +Repair Windows Firewall=1 +Reset Windows Firewall=1 +Repair System Restore=1 +Repair Security Center=1 +System Restore Point (post)=1 +Remove Safe Mode w/Net Mod=0 +KillEmAll=1 +Kill Explorer.exe=1 +RebootOnFinish=0 +MergeDefs=0 +MergeDefsDLOnly=1 +=0 +=1 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=1 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=1 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +[RepairDefaults] +RebootOnAutoFinish=0 +Default Start Menu LNKs=1 +Fix File Associations=1 +Rebuild Icon Cache=1 +Remove Policies=1 +Fix Device Manager=1 +Clear Print Spooler=1 +Windows Update Svcs=1 +WMI/WBEM/DCOM=1 +Security Center=1 +Windows Defender=1 +Safe Mode Services=1 +System Restore=1 +Installer Service=1 +VSS Service=1 +Repair Permissions=0 +Regsvr32 IE DLLs=0 +DISM RestoreHealth=0 +System File Checker=0 +Examine Hosts File=1 +Clear Proxy Settings=1 +Apply DHCP to All NICs=0 +Release / Renew IP=0 +Reset Network Interfaces=0 +Reset Winsock=0 +Repair Windows Firewall=1 +Reset Windows Firewall=1 +MS FixIT for Winsock=0 +Windows Repair AIO=0 +Windows Repair AIO (Auto)=0 +TCPOptimizer=0 +Microsoft FixIt Portable=0 +Microsoft FixIt Winsock (Auto)=0 +Microsoft FixIt Win Update (Auto)=0 +MS Office Config Analyzer Tool (Install)=0 +MS Office Config Analyzer Tool (Portable)=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +=0 +[AuditDefaults] +0=0 +1=1 +2=1 +3=1 +4=1 +5=0 +6=0 +Belarc Advisor (Install-Report)=0 +OpenHardwareMonitor=0 +Piriform Speccy=0 +BatteryInfoView=0 +BluescreenView=0 +AS SSD Benchmark=0 +CrystalDiskInfo=0 +SpaceSniffer=0 +MoveReportsToFTP=0 +CrowdInspect=0 +Autoruns=0 +[chkNinite] +0=1 +1=1 +2=1 +3=1 +4=1 +5=1 +6=0 +7=1 +[txtNinite] +0= +1= +[optNinite] +Cache=1 +[Maintenance3] +Auslogics DD Portable=0 +AdwCleaner=0 +JRT=0 +Autoruns=0 +~Email Alert=0 +CrowdInspect=0 +Neutron (Sync Time)=1 +Piriform CCleaner=0 +Piriform CCleaner (Auto)=1 +Piriform Defraggler=0 +Piriform Defraggler (Auto)=0 +Revo Uninstaller=0 +PatchMyPC=0 +PatchMyPC (Auto)=0 +Unchecky (Install)=0 +StartUpLite=0 +TCPOptimizer=0 +2=0 +28=0 +54=0 +59=0 +[NiniteApps] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[Maintenance2] +Piriform CCleaner (Auto)=0 +Piriform Defraggler (Auto)=0 +PatchMyPC (Auto)=0 +Neutron (Sync Time)=0 +Sysinternals PageDefrag (XP)=0 +74=0 +0=0 +55=0 +53=0 +2=0 +JRT=0 +56=0 +[Maintenance1] +4=0 +1=0 +12=0 +13=0 +67=0 +16=0 +17=0 +57=0 +62=0 +63=0 +65=0 +66=0 +68=0 +33=0 +103=0 +[Offline1] +Emsisoft a2cmd Update (Offline)=1 +Emsisoft a2cmd Full Scan (Offline)=1 +McAfee Stinger (Silent-Offline)=0 +McAfee Stinger (Offline)=0 +MBRCheck (Offline)=0 +Emsisoft a2cmd Deep Scan (Offline)=0 +Autoruns (Verify and Log)=0 +Autoruns=0 +VipreRescueScanner (Deep Scan)=0 +[Malware1] +33=1 +1=1 +32=1 +6=1 +9=1 +10=1 +11=1 +18=1 +12=1 +13=1 +16=0 +17=0 +8=1 +7=0 +29=0 +2=0 +53=0 +34=0 +35=0 +41=1 +3=1 +[Malware2] +Emsisoft a2cmd Update=0 +Emsisoft a2cmd Full Scan=0 +34=1 +35=0 +McAfee Stinger (Silent)=0 +Kaspersky TDSSKiller (Silent)=1 +HitmanPro=1 +JRT=1 +0=0 +Sophos Virus Removal Tool=1 +McAfee Stinger=0 +VipreRescueScanner (Auto)=0 +VipreRescueScanner (Manual)=0 +Kaspersky TDSSKiller=0 +Autoruns=0 +herdProtect=0 +Should I Remove It=0 +Malwarebytes v2=0 +SuperAntiSpyware=0 +Emsisoft a2cmd - Update and Full Scan=0 +Emsisoft a2cmd Smart Scan=0 +Emsisoft a2cmd Deep Scan=1 +102=0 +Autoruns (Verify and Log)=0 +30=1 +rkill=1 +Piriform CCleaner (Auto)=1 +VipreRescueScanner (Quick Scan)=0 +VipreRescueScanner (Deep Scan)=0 +98=1 +Windows Repair AIO (Auto)=0 +WizardKit System Diagnostics=1 +1=1 +RKill (Auto)=1 +[Malware3] +ComboFix=0 +ComboFix (Uninstall)=0 +ESET Smart Installer=0 +VipreRescueScanner=0 +Sophos Virus Removal Tool=0 +Malwarebytes v2=0 +AdwCleaner=1 +19=0 +Rogue Killer=0 +GMER=0 +rkill=0 +StartUpLite=0 +Bitdefender Rootkit Remover=0 +MalwareBytes Anti-Rootkit=0 +Avast! aswMBR=0 +MBRCheck=0 +CrowdInspect=0 +OTL=0 +Everything Search Engine=0 +30=0 +102=0 +0=0 +SuperAntiSpyware=0 +28=0 +herdProtect=0 +HitmanPro (Manual)=0 +105=0 +Should I Remove It=0 +Autoruns=1 +53=0 +Google Chrome Software Removal Tool=0 +CurrPorts=0 +Opened Files View=0 +Malwarebytes v3 Install=1 +Malwarebytes v3 Run=1 +Malwarebytes v3 Uninstall=1 +Malwarebytes v3 Check=1 +AdwCleaner_Copy=1 +Malwarebytes Install=1 +Malwarebytes Scan=1 +Malwarebytes Uninstall=1 +AdwCleaner (Updated)=1 +IObit Uninstaller=1 +Install SW Bundle=1 +WizardKit User Checklist=1 +WizardKit System Checklist=1 +WizardKit Browser Reset=0 +Malwarebytes Download=1 +[Repair2] +49=0 +48=0 +50=0 +20=0 +22=0 +23=0 +24=0 +26=0 +27=0 +40=0 +41=0 +42=0 +43=0 +44=0 +45=0 +51=0 +52=0 +46=0 +47=0 +[Repair3] +11=0 +31=0 +21=0 +24=0 +25=0 +36=0 +37=0 +38=0 +73=0 +75=0 +76=0 +Microsoft FixIt Winsock (Auto)=0 +[Repair1] +Microsoft FixIt Portable=0 +Microsoft FixIt Win Update (Auto)=0 +Microsoft FixIt Winsock (Auto)=0 +39=0 +MS Office Config Analyzer Tool (Install)=0 +MS Office Config Analyzer Tool (Portable)=0 +Windows Repair AIO=0 +Windows Repair AIO (Auto)=0 +[Audit1] +0=0 +1=0 +2=0 +3=0 +4=0 +5=0 +6=0 +Autoruns=0 +CrowdInspect=0 +Belarc Advisor (Install-Report)=0 +OpenHardwareMonitor=0 +BatteryInfoView=0 +BluescreenView=0 +CrystalDiskInfo=0 +AS SSD Benchmark=0 +SpaceSniffer=0 +77=0 +78=0 +Should I Remove It=0 +7=0 +8=0 +CurrPorts=0 +Opened Files View=0 +Piriform Speccy=0 +USB Devices View=0 +[Audit2] +82=0 +83=0 +84=0 +85=0 +86=0 +87=0 +88=0 +89=0 +90=0 +91=0 +92=0 +93=0 +94=0 +95=0 +96=0 +97=0 +[Tweaks1] +Item1=0 +Item2=1 +Item3=0 +Item4=0 +Item5=0 +Item6=1 +Item7=0 +Item8=0 +Item9=0 +Item10=1 +Item11=0 +Item12=0 +Item13=1 +Item14=0 +Item15=1 +Item16=0 +Item17=0 +Item18=0 +Item19=0 +Item20=0 +Item21=0 +Item22=0 +Item23=0 +Item24=0 +Item25=0 +Item26=0 +Item27=0 +Item28=0 +Item29=0 +Item30=0 +Item31=0 +Item32=0 +Item33=0 +Item34=0 +Item35=0 +Item36=0 +Item37=0 +Item38=0 +Item39=0 +Item40=0 +Item41=0 +Item42=0 +Item43=0 +Item44=0 +Item45=0 +Item46=0 +Item47=0 +Item48=0 +Item49=0 +Item50=0 +Item51=0 +Item52=1 +Item53=0 +Item54=0 +Item55=0 +Item56=0 +Item57=0 +Item58=1 +Item59=0 +Item60=0 +Item61=0 +AdwCleaner=1 +[NiniteWorkstationInstall] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[NiniteWorkstationUpdate] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[NiniteServerInstall] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[NiniteServerUpdate] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 diff --git a/.bin/d7ii/Config/Profiles/Diagnose and Testing.cfg b/.bin/d7ii/Config/Profiles/Diagnose and Testing.cfg new file mode 100644 index 00000000..a3cbf757 --- /dev/null +++ b/.bin/d7ii/Config/Profiles/Diagnose and Testing.cfg @@ -0,0 +1,306 @@ +[Maintenance3] +2=0 +StartUpLite=0 +Autoruns=0 +AdwCleaner=0 +Revo Uninstaller=0 +PatchMyPC=0 +Piriform CCleaner=0 +Piriform Defraggler=0 +TCPOptimizer=0 +Unchecky (Install)=0 +28=0 +54=0 +59=0 +[Maintenance2] +JRT=0 +Piriform CCleaner (Auto)=0 +Piriform Defraggler (Auto)=0 +PatchMyPC (Auto)=0 +Neutron (Sync Time)=0 +Sysinternals PageDefrag (XP)=0 +74=0 +0=0 +55=0 +53=0 +56=0 +[Maintenance1] +4=0 +1=0 +12=0 +13=0 +67=0 +16=0 +17=0 +57=0 +62=0 +63=0 +65=0 +66=0 +68=0 +33=0 +103=0 +[Offline1] +McAfee Stinger (Silent-Offline)=0 +MBRCheck (Offline)=0 +Emsisoft a2cmd Deep Scan (Offline)=0 +Autoruns (Verify and Log)=0 +McAfee Stinger (Offline)=0 +Autoruns=0 +VipreRescueScanner (Deep Scan)=0 +[OfflineDefaults] +PreMalwareScan=1 +MalwareScan=1 +DelTemps=1 +PurgeSysRest=1 +FixShell=1 +RemovePolicies=1 +KillRenameOps=1 +ResetHiddenVol=0 +CopyD7=1 +IFEOModifier=1 +[Malware1] +41=0 +29=0 +33=0 +1=0 +32=0 +6=0 +9=0 +10=0 +11=0 +18=0 +12=0 +13=0 +16=0 +17=0 +8=0 +7=0 +53=0 +34=0 +35=0 +3=0 +[Malware2] +Kaspersky TDSSKiller (Silent)=0 +Emsisoft a2cmd - Update and Full Scan=0 +VipreRescueScanner (Auto)=0 +Sophos Virus Removal Tool=0 +McAfee Stinger (Silent)=0 +HitmanPro=0 +JRT=0 +Emsisoft a2cmd Smart Scan=0 +Emsisoft a2cmd Deep Scan=0 +McAfee Stinger=0 +VipreRescueScanner (Manual)=0 +Kaspersky TDSSKiller=0 +102=0 +0=0 +Autoruns=0 +herdProtect=0 +Should I Remove It=0 +Malwarebytes v2=0 +Autoruns (Verify and Log)=0 +34=0 +35=0 +30=0 +rkill=0 +Piriform CCleaner (Auto)=0 +VipreRescueScanner (Quick Scan)=0 +VipreRescueScanner (Deep Scan)=0 +98=0 +[Malware3] +102=0 +0=0 +ComboFix=0 +ComboFix (Uninstall)=0 +ESET Smart Installer=0 +Malwarebytes v2=0 +AdwCleaner=0 +19=0 +Rogue Killer=0 +GMER=0 +30=0 +SuperAntiSpyware=0 +Avast! aswMBR=0 +MBRCheck=0 +MalwareBytes Anti-Rootkit=0 +Bitdefender Rootkit Remover=0 +rkill=0 +OTL=0 +CrowdInspect=0 +Everything Search Engine=0 +28=0 +herdProtect=0 +HitmanPro (Manual)=0 +105=0 +Should I Remove It=0 +Autoruns=0 +53=0 +Google Chrome Software Removal Tool=0 +CurrPorts=0 +Opened Files View=0 +[MalwareDefaults] +KillEmAll=0 +Kill Explorer.exe=0 +RebootOnFinish=0 +[RepairDefaults] +RebootOnAutoFinish=0 +[Repair2] +49=0 +48=0 +50=0 +20=0 +22=0 +23=0 +24=0 +26=0 +27=0 +40=0 +41=0 +42=0 +43=0 +44=0 +45=0 +51=0 +52=0 +46=0 +47=0 +[Repair3] +11=0 +31=0 +21=0 +24=0 +25=0 +36=0 +37=0 +38=0 +Microsoft FixIt Winsock (Auto)=0 +75=0 +[Repair1] +Microsoft FixIt Portable=0 +Microsoft FixIt Win Update (Auto)=0 +Microsoft FixIt Winsock (Auto)=0 +39=0 +MS Office Config Analyzer Tool (Install)=0 +MS Office Config Analyzer Tool (Portable)=0 +Windows Repair AIO=0 +Windows Repair AIO (Auto)=0 +[Audit1] +0=0 +1=1 +2=1 +3=1 +4=1 +5=1 +6=1 +CrowdInspect=1 +Should I Remove It=1 +Autoruns=1 +Belarc Advisor (Install-Report)=1 +OpenHardwareMonitor=1 +BatteryInfoView=1 +BluescreenView=1 +CrystalDiskInfo=1 +AS SSD Benchmark=1 +SpaceSniffer=1 +77=1 +78=1 +7=1 +8=1 +CurrPorts=1 +Opened Files View=1 +Piriform Speccy=1 +USB Devices View=1 +[AuditDefaults] +MoveReportsToFTP=0 +[Audit2] +82=1 +83=1 +84=1 +85=1 +86=1 +87=1 +88=1 +89=1 +90=1 +91=1 +92=1 +93=1 +94=1 +95=1 +96=1 +97=1 +[Tweaks1] +Item1=0 +Item2=1 +Item3=0 +Item4=0 +Item5=0 +Item6=1 +Item7=0 +Item8=0 +Item9=0 +Item10=1 +Item11=0 +Item12=0 +Item13=1 +Item14=0 +Item15=1 +Item16=0 +Item17=0 +Item18=0 +Item19=0 +Item20=0 +Item21=0 +Item22=0 +Item23=0 +Item24=0 +Item25=0 +Item26=0 +Item27=0 +Item28=0 +Item29=0 +Item30=0 +Item31=0 +Item32=0 +Item33=0 +Item34=0 +Item35=0 +Item36=0 +Item37=0 +Item38=0 +Item39=0 +Item40=0 +Item41=0 +Item42=0 +Item43=0 +Item44=0 +Item45=0 +Item46=0 +Item47=0 +Item48=0 +Item49=0 +Item50=0 +Item51=0 +Item52=1 +Item53=0 +Item54=0 +Item55=0 +Item56=0 +Item57=0 +Item58=1 +Item59=0 +Item60=0 +Item61=0 +[chkNinite] +0=1 +1=1 +3=1 +4=1 +5=1 +6=0 +[txtNinite] +0= +1= +[optNinite] +Cache=1 diff --git a/.bin/d7ii/Config/Profiles/Full.cfg b/.bin/d7ii/Config/Profiles/Full.cfg new file mode 100644 index 00000000..76b89c5c --- /dev/null +++ b/.bin/d7ii/Config/Profiles/Full.cfg @@ -0,0 +1,830 @@ +[Maintenance3] +StartUpLite=1 +Autoruns=1 +AdwCleaner=1 +Revo Uninstaller=1 +PatchMyPC=1 +Piriform CCleaner=1 +Piriform Defraggler=0 +TCPOptimizer=1 +Unchecky (Install)=1 +2=1 +28=1 +54=1 +59=1 +[Maintenance2] +Piriform CCleaner (Auto)=1 +Piriform Defraggler (Auto)=1 +PatchMyPC (Auto)=1 +Neutron (Sync Time)=1 +Sysinternals PageDefrag (XP)=1 +74=0 +0=1 +55=1 +53=1 +2=1 +JRT=1 +56=1 +[Maintenance1] +4=1 +1=1 +12=1 +13=1 +67=1 +16=1 +17=1 +57=1 +62=1 +63=1 +65=1 +66=1 +68=1 +33=1 +103=1 +[Offline1] +Emsisoft a2cmd Update (Offline)=1 +Emsisoft a2cmd Full Scan (Offline)=1 +McAfee Stinger (Silent-Offline)=0 +McAfee Stinger (Offline)=0 +MBRCheck (Offline)=0 +Emsisoft a2cmd - Update and Offline Scan=1 +Emsisoft a2cmd Deep Scan (Offline)=0 +Autoruns (Verify and Log)=1 +Autoruns=0 +VipreRescueScanner (Deep Scan)=0 +[OfflineDefaults] +PreMalwareScan=1 +MalwareScan=1 +DelTemps=1 +PurgeSysRest=1 +FixShell=1 +RemovePolicies=1 +KillRenameOps=1 +ResetHiddenVol=0 +CopyD7=1 +IFEOModifier=1 +[Malware1] +33=1 +1=1 +32=1 +6=1 +9=1 +10=1 +11=1 +18=1 +12=1 +13=1 +16=1 +17=1 +8=1 +7=0 +41=1 +29=1 +53=1 +34=0 +35=1 +3=1 +[Malware2] +Emsisoft a2cmd Update=1 +Emsisoft a2cmd Full Scan=1 +34=0 +35=1 +McAfee Stinger (Silent)=1 +Kaspersky TDSSKiller (Silent)=1 +HitmanPro=1 +JRT=1 +Sophos Virus Removal Tool=1 +0=1 +VipreRescueScanner (Auto)=1 +Emsisoft a2cmd - Update and Full Scan=1 +Emsisoft a2cmd Smart Scan=0 +Emsisoft a2cmd Deep Scan=1 +McAfee Stinger=0 +VipreRescueScanner (Manual)=0 +Kaspersky TDSSKiller=0 +102=0 +Autoruns=1 +herdProtect=1 +Should I Remove It=1 +Malwarebytes v2=1 +Autoruns (Verify and Log)=1 +30=1 +98=1 +rkill=1 +VipreRescueScanner (Quick Scan)=0 +VipreRescueScanner (Deep Scan)=1 +Piriform CCleaner (Auto)=1 +[Malware3] +ComboFix=1 +ComboFix (Uninstall)=1 +ESET Smart Installer=1 +VipreRescueScanner=0 +Malwarebytes v2=1 +AdwCleaner=1 +19=1 +Rogue Killer=1 +GMER=0 +102=0 +0=0 +SuperAntiSpyware=1 +Avast! aswMBR=1 +MBRCheck=1 +MalwareBytes Anti-Rootkit=1 +Bitdefender Rootkit Remover=1 +rkill=1 +OTL=0 +CrowdInspect=0 +Everything Search Engine=1 +30=1 +28=1 +herdProtect=1 +Should I Remove It=1 +Autoruns=1 +Google Chrome Software Removal Tool=1 +HitmanPro (Manual)=1 +105=1 +53=1 +CurrPorts=1 +Opened Files View=1 +[MalwareDefaults] +KillEmAll=1 +Kill Explorer.exe=1 +RebootOnFinish=0 +[RepairDefaults] +RebootOnAutoFinish=0 +[Repair2] +49=1 +48=1 +50=1 +20=1 +22=1 +23=1 +24=1 +26=1 +27=1 +40=1 +41=1 +42=1 +43=1 +44=1 +45=1 +51=1 +52=1 +46=1 +47=0 +[Repair3] +11=1 +31=0 +21=1 +24=1 +25=1 +36=1 +37=1 +38=1 +Microsoft FixIt Winsock (Auto)=1 +75=0 +[Repair1] +Microsoft FixIt Portable=0 +Microsoft FixIt Win Update (Auto)=1 +Microsoft FixIt Winsock (Auto)=1 +39=0 +MS Office Config Analyzer Tool (Install)=0 +MS Office Config Analyzer Tool (Portable)=1 +Windows Repair AIO=0 +Windows Repair AIO (Auto)=1 +[Audit1] +0=1 +1=0 +2=1 +3=1 +4=1 +5=1 +6=1 +Autoruns=0 +CrowdInspect=0 +Belarc Advisor (Install-Report)=0 +OpenHardwareMonitor=0 +BatteryInfoView=0 +BluescreenView=0 +CrystalDiskInfo=0 +AS SSD Benchmark=0 +SpaceSniffer=0 +77=0 +78=0 +Should I Remove It=0 +7=1 +8=1 +CurrPorts=0 +Opened Files View=0 +Piriform Speccy=0 +USB Devices View=0 +[AuditDefaults] +MoveReportsToFTP=0 +[Audit2] +82=0 +83=0 +84=0 +85=0 +86=0 +87=0 +88=0 +89=0 +90=0 +91=0 +92=0 +93=0 +94=0 +95=0 +96=0 +97=0 +[Tweaks1] +Item1=0 +Item2=1 +Item3=0 +Item4=0 +Item5=0 +Item6=1 +Item7=0 +Item8=0 +Item9=0 +Item10=1 +Item11=0 +Item12=0 +Item13=1 +Item14=0 +Item15=1 +Item16=0 +Item17=0 +Item18=0 +Item19=0 +Item20=0 +Item21=0 +Item22=0 +Item23=0 +Item24=0 +Item25=0 +Item26=0 +Item27=0 +Item28=0 +Item29=0 +Item30=0 +Item31=0 +Item32=0 +Item33=0 +Item34=0 +Item35=0 +Item36=0 +Item37=0 +Item38=0 +Item39=0 +Item40=0 +Item41=0 +Item42=0 +Item43=0 +Item44=0 +Item45=0 +Item46=0 +Item47=0 +Item48=0 +Item49=0 +Item50=0 +Item51=0 +Item52=1 +Item53=0 +Item54=0 +Item55=0 +Item56=0 +Item57=0 +Item58=1 +Item59=0 +Item60=0 +Item61=0 +AdwCleaner=1 +[chkNinite] +0=1 +1=1 +3=1 +4=1 +5=1 +6=0 +[txtNinite] +0= +1= +[NiniteWorkstationInstall] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[NiniteWorkstationUpdate] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[NiniteServerInstall] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[NiniteServerUpdate] +.NET=0 +.NET 4=0 +.NET 4.5=0 +.NET 4.5.1=0 +.NET 4.5.2=0 +7-Zip=0 +Acrobat=0 +Ad-Aware=0 +AIM=0 +AIMP=0 +Air=0 +Audacity=0 +Auslogics=0 +Avast=0 +AVG=0 +Avira=0 +BitTorrent Sync=0 +CCCP=0 +CCleaner=0 +CDBurnerXP=0 +Chrome=0 +Citrix Receiver=0 +Classic Start=0 +CutePDF=0 +Defraggler=0 +Digsby=0 +Dropbox=0 +Eclipse=0 +eMule=0 +Essentials=0 +Evernote=0 +Everything=0 +FastStone=0 +FileZilla=0 +Firefox=0 +Firefox ESR=0 +Flash=0 +Flash (IE)=0 +foobar2000=0 +Foxit Reader=0 +GIMP=0 +Glary=0 +GOM=0 +Google Drive=0 +Google Earth=0 +Google Talk=0 +GoToMeeting=0 +Greenshot=0 +Hulu=0 +ImgBurn=0 +InfraRecorder=0 +Inkscape=0 +IrfanView=0 +iTunes=0 +Java=0 +Java 6=0 +Java 8=0 +Java x64=0 +Java x64 6=0 +Java x64 8=0 +JDK=0 +JDK 6=0 +JDK 8=0 +JDK x64=0 +JDK x64 8=0 +K-Lite Codecs=0 +K-Lite Codecs x64=0 +KeePass=0 +KeePass 2=0 +KMPlayer=0 +Launchy=0 +LibreOffice=0 +LogMeIn=0 +Malwarebytes=0 +MediaMonkey=0 +Messenger=0 +Mozy=0 +Notepad++=0 +NVDA=0 +Office=0 +OneDrive=0 +OpenOffice=0 +Opera=0 +Opera Chromium=0 +Paint.NET=0 +PDFCreator=0 +PeaZip=0 +Picasa=0 +Pidgin=0 +PuTTY=0 +Python=0 +qBittorrent=0 +QuickTime=0 +Reader=0 +RealVNC=0 +Recuva=0 +Revo=0 +Safari=0 +Shockwave=0 +Silverlight=0 +SkyDrive=0 +Skype=0 +Songbird=0 +Speccy=0 +Spotify=0 +Spybot=0 +Spybot 2=0 +Steam=0 +SugarSync=0 +SumatraPDF=0 +Super=0 +TeamViewer=0 +TeraCopy=0 +Thunderbird=0 +Thunderbird ESR=0 +Trillian=0 +TrueCrypt=0 +TweetDeck=0 +uTorrent=0 +VLC=0 +WebEx=0 +Winamp=0 +WinDirStat=0 +WinMerge=0 +WinRAR=0 +WinSCP=0 +XnView=0 +Yahoo!=0 +[optNinite] +Cache=1 diff --git a/.bin/d7ii/Config/Profiles/Quick.cfg b/.bin/d7ii/Config/Profiles/Quick.cfg new file mode 100644 index 00000000..f6a8a2e0 --- /dev/null +++ b/.bin/d7ii/Config/Profiles/Quick.cfg @@ -0,0 +1,290 @@ +[Maintenance3] +2=0 +StartUpLite=1 +Autoruns=1 +AdwCleaner=1 +Revo Uninstaller=0 +PatchMyPC=0 +Piriform CCleaner=0 +Piriform Defraggler=0 +TCPOptimizer=0 +Unchecky (Install)=0 +28=1 +54=0 +59=0 +[Maintenance2] +JRT=1 +Piriform CCleaner (Auto)=1 +Piriform Defraggler (Auto)=0 +PatchMyPC (Auto)=1 +Neutron (Sync Time)=1 +Sysinternals PageDefrag (XP)=0 +74=0 +0=1 +55=1 +53=1 +56=1 +[Maintenance1] +4=1 +1=1 +12=1 +13=1 +67=1 +16=0 +17=0 +57=1 +62=1 +63=0 +65=1 +66=0 +68=1 +33=1 +103=1 +[Offline1] +Emsisoft a2cmd Deep Scan (Offline)=0 +VipreRescueScanner (Deep Scan)=0 +McAfee Stinger (Silent-Offline)=0 +McAfee Stinger (Offline)=0 +MBRCheck (Offline)=0 +Autoruns=0 +[OfflineDefaults] +PreMalwareScan=1 +MalwareScan=1 +DelTemps=1 +PurgeSysRest=1 +FixShell=1 +RemovePolicies=1 +KillRenameOps=1 +ResetHiddenVol=0 +CopyD7=1 +IFEOModifier=1 +[Malware1] +41=0 +29=0 +33=1 +1=1 +32=1 +6=1 +9=1 +10=1 +11=1 +18=1 +12=1 +13=1 +16=1 +17=0 +8=1 +7=0 +53=0 +3=1 +[Malware2] +34=1 +35=0 +Emsisoft a2cmd Smart Scan=1 +Emsisoft a2cmd Deep Scan=0 +Sophos Virus Removal Tool=0 +McAfee Stinger (Silent)=0 +McAfee Stinger=0 +VipreRescueScanner (Quick Scan)=1 +VipreRescueScanner (Deep Scan)=0 +30=0 +Kaspersky TDSSKiller (Silent)=1 +Kaspersky TDSSKiller=0 +HitmanPro=1 +JRT=1 +rkill=0 +102=0 +0=1 +Piriform CCleaner (Auto)=0 +98=0 +[Malware3] +ComboFix=0 +ComboFix (Uninstall)=0 +herdProtect=0 +ESET Smart Installer=0 +Malwarebytes v2=1 +SuperAntiSpyware=0 +AdwCleaner=1 +19=1 +Avast! aswMBR=0 +MBRCheck=0 +MalwareBytes Anti-Rootkit=1 +Bitdefender Rootkit Remover=0 +Rogue Killer=0 +GMER=0 +OTL=0 +CrowdInspect=0 +Should I Remove It=0 +Autoruns=1 +Everything Search Engine=0 +28=1 +Google Chrome Software Removal Tool=0 +HitmanPro (Manual)=0 +105=1 +53=0 +CurrPorts=0 +Opened Files View=0 +[MalwareDefaults] +KillEmAll=1 +Kill Explorer.exe=1 +RebootOnFinish=0 +[RepairDefaults] +RebootOnAutoFinish=0 +[Repair2] +49=0 +48=0 +50=0 +20=0 +22=1 +23=1 +24=1 +26=1 +27=1 +40=1 +41=1 +42=1 +43=1 +44=1 +45=1 +51=1 +52=1 +46=0 +47=0 +[Repair3] +11=1 +31=0 +21=1 +24=1 +25=0 +36=0 +37=1 +38=0 +Microsoft FixIt Winsock (Auto)=1 +75=0 +[Repair1] +Microsoft FixIt Portable=0 +Microsoft FixIt Win Update (Auto)=1 +MS Office Config Analyzer Tool (Install)=0 +MS Office Config Analyzer Tool (Portable)=0 +Windows Repair AIO=0 +Windows Repair AIO (Auto)=0 +[Audit1] +0=1 +1=0 +2=1 +3=1 +4=1 +5=1 +6=1 +CrowdInspect=0 +Should I Remove It=0 +Autoruns=0 +Belarc Advisor (Install-Report)=0 +OpenHardwareMonitor=0 +BatteryInfoView=0 +BluescreenView=0 +CrystalDiskInfo=0 +AS SSD Benchmark=0 +SpaceSniffer=0 +77=0 +78=0 +7=1 +8=1 +CurrPorts=0 +Opened Files View=0 +Piriform Speccy=0 +USB Devices View=0 +[AuditDefaults] +MoveReportsToFTP=0 +[Audit2] +82=0 +83=0 +84=0 +85=0 +86=0 +87=0 +88=0 +89=0 +90=0 +91=0 +92=0 +93=0 +94=0 +95=0 +96=0 +97=0 +[Tweaks1] +Item1=0 +Item2=1 +Item3=0 +Item4=0 +Item5=0 +Item6=1 +Item7=0 +Item8=0 +Item9=0 +Item10=1 +Item11=0 +Item12=0 +Item13=1 +Item14=0 +Item15=1 +Item16=0 +Item17=0 +Item18=0 +Item19=0 +Item20=0 +Item21=0 +Item22=0 +Item23=0 +Item24=0 +Item25=0 +Item26=0 +Item27=0 +Item28=0 +Item29=0 +Item30=0 +Item31=0 +Item32=0 +Item33=0 +Item34=0 +Item35=0 +Item36=0 +Item37=0 +Item38=0 +Item39=0 +Item40=0 +Item41=0 +Item42=0 +Item43=0 +Item44=0 +Item45=0 +Item46=0 +Item47=0 +Item48=0 +Item49=0 +Item50=0 +Item51=0 +Item52=1 +Item53=0 +Item54=0 +Item55=0 +Item56=0 +Item57=0 +Item58=1 +Item59=0 +Item60=0 +Item61=0 +AdwCleaner=1 +[chkNinite] +0=1 +1=1 +3=1 +4=1 +5=1 +6=0 +[txtNinite] +0= +1= +[optNinite] +Cache=1 diff --git a/.bin/d7ii/Config/Reg.Settings.dat b/.bin/d7ii/Config/Reg.Settings.dat new file mode 100644 index 0000000000000000000000000000000000000000..13f8c77e17e38e39beb78cedd5a968d73cb4b731 GIT binary patch literal 187 zcmWl~Uk`ym008j&2y8Y_ra$X}M0eFyc6VlN{yi{L%7Yb&vdE~{K0AIdzczqKg`877 zUR9aAxm}T0WmY^t5^x}#`<%jAzNf0c(Z*Y&|9HFfej7-$%nlItvZ>qsmCm!>Z8jzT z0uRPvnM1*?Sr-WIKIxH)8WN$AD3c)FiW4nL&+zWXHEVz>yC~WTVe5i*?P|s?K;85( e2_cR_qHE2XfQIncH;X9EsqKrSntcJKH873< literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/RegLinks.txt b/.bin/d7ii/Config/RegLinks.txt new file mode 100644 index 00000000..fcc8aafa --- /dev/null +++ b/.bin/d7ii/Config/RegLinks.txt @@ -0,0 +1 @@ +Open Optical Drive Filters,HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318} diff --git a/.bin/d7ii/Config/SiteSearch.txt b/.bin/d7ii/Config/SiteSearch.txt new file mode 100644 index 00000000..402e5315 --- /dev/null +++ b/.bin/d7ii/Config/SiteSearch.txt @@ -0,0 +1,4 @@ +foolishit.com +foolishtech.com +technibble.com +technet.microsoft.com diff --git a/.bin/d7ii/Config/SortOrder/AuditBox1.cfg b/.bin/d7ii/Config/SortOrder/AuditBox1.cfg new file mode 100644 index 00000000..1018d59c --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/AuditBox1.cfg @@ -0,0 +1 @@ +CrowdInspect|Should I Remove It|Autoruns|Belarc Advisor (Install-Report)|OpenHardwareMonitor|BatteryInfoView|BluescreenView|CrystalDiskInfo|AS SSD Benchmark|SpaceSniffer|77|78|CurrPorts|Opened Files View|Piriform Speccy|USB Devices View| diff --git a/.bin/d7ii/Config/SortOrder/AuditBox2.cfg b/.bin/d7ii/Config/SortOrder/AuditBox2.cfg new file mode 100644 index 00000000..5b5d1cfd --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/AuditBox2.cfg @@ -0,0 +1 @@ +82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97| diff --git a/.bin/d7ii/Config/SortOrder/CustomMaint b/.bin/d7ii/Config/SortOrder/CustomMaint new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/CustomMaint @@ -0,0 +1 @@ + diff --git a/.bin/d7ii/Config/SortOrder/CustomTools.cfg b/.bin/d7ii/Config/SortOrder/CustomTools.cfg new file mode 100644 index 00000000..a26b06c4 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/CustomTools.cfg @@ -0,0 +1 @@ +CurrPorts|Opened Files View|RegFromApp-x32|RegFromApp-x64|USB Devices View|WhatIsHang| diff --git a/.bin/d7ii/Config/SortOrder/MaintBox1.cfg b/.bin/d7ii/Config/SortOrder/MaintBox1.cfg new file mode 100644 index 00000000..7d8eb8d9 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MaintBox1.cfg @@ -0,0 +1 @@ +4|33|1|12|13|103|67|16|17|57|62|63|65|66|68| diff --git a/.bin/d7ii/Config/SortOrder/MaintBox2.cfg b/.bin/d7ii/Config/SortOrder/MaintBox2.cfg new file mode 100644 index 00000000..caa7bfe8 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MaintBox2.cfg @@ -0,0 +1 @@ +JRT|Piriform CCleaner (Auto)|Piriform Defraggler (Auto)|PatchMyPC (Auto)|Neutron (Sync Time)|Sysinternals PageDefrag (XP)|74|0|55|53|56| diff --git a/.bin/d7ii/Config/SortOrder/MaintBox3.cfg b/.bin/d7ii/Config/SortOrder/MaintBox3.cfg new file mode 100644 index 00000000..9e760e84 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MaintBox3.cfg @@ -0,0 +1 @@ +2|StartUpLite|Autoruns|AdwCleaner|Revo Uninstaller|PatchMyPC|Piriform CCleaner|Piriform Defraggler|TCPOptimizer|Unchecky (Install)|54|59|28| diff --git a/.bin/d7ii/Config/SortOrder/MalwareBox1.cfg b/.bin/d7ii/Config/SortOrder/MalwareBox1.cfg new file mode 100644 index 00000000..4a075621 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MalwareBox1.cfg @@ -0,0 +1 @@ +3|41|33|32|6|9|10|11|18|12|13|8| diff --git a/.bin/d7ii/Config/SortOrder/MalwareBox2.cfg b/.bin/d7ii/Config/SortOrder/MalwareBox2.cfg new file mode 100644 index 00000000..6e95d5ec --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MalwareBox2.cfg @@ -0,0 +1 @@ +RKill (Auto)|Kaspersky TDSSKiller (Silent)|WizardKit System Diagnostics|34|Emsisoft a2cmd Deep Scan|HitmanPro|1|98| diff --git a/.bin/d7ii/Config/SortOrder/MalwareBox3.cfg b/.bin/d7ii/Config/SortOrder/MalwareBox3.cfg new file mode 100644 index 00000000..75da8a9d --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MalwareBox3.cfg @@ -0,0 +1 @@ +Malwarebytes Download|Malwarebytes Install|Malwarebytes Scan|Malwarebytes Uninstall|AdwCleaner (Updated)|IObit Uninstaller|Install SW Bundle|WizardKit Browser Reset|WizardKit User Checklist|WizardKit System Checklist|Bitdefender Rootkit Remover| diff --git a/.bin/d7ii/Config/SortOrder/MalwarePost.cfg b/.bin/d7ii/Config/SortOrder/MalwarePost.cfg new file mode 100644 index 00000000..34fcac3c --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MalwarePost.cfg @@ -0,0 +1 @@ +~MalwareScan|~dUninstaller (UI)|~Repair Permissions|~Reset Networking|~Repair Windows Update|~Repair WMI/WBEM/DCOM|~Repair Windows Firewall|~Reset Windows Firewall|~Repair System Restore|~Repair Security Center|~System Restore Point (post) diff --git a/.bin/d7ii/Config/SortOrder/MalwarePre.cfg b/.bin/d7ii/Config/SortOrder/MalwarePre.cfg new file mode 100644 index 00000000..1cc83eea --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/MalwarePre.cfg @@ -0,0 +1 @@ +||||||||||| diff --git a/.bin/d7ii/Config/SortOrder/OfflineBox1.cfg b/.bin/d7ii/Config/SortOrder/OfflineBox1.cfg new file mode 100644 index 00000000..08b6cb1e --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/OfflineBox1.cfg @@ -0,0 +1 @@ +Emsisoft a2cmd Deep Scan (Offline)|VipreRescueScanner (Deep Scan)|McAfee Stinger (Silent-Offline)|McAfee Stinger (Offline)|MBRCheck (Offline)|Autoruns| diff --git a/.bin/d7ii/Config/SortOrder/RepairBox1.cfg b/.bin/d7ii/Config/SortOrder/RepairBox1.cfg new file mode 100644 index 00000000..92413abd --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/RepairBox1.cfg @@ -0,0 +1 @@ +Microsoft FixIt Portable|Microsoft FixIt Win Update (Auto)|MS Office Config Analyzer Tool (Install)|MS Office Config Analyzer Tool (Portable)|Windows Repair AIO|Windows Repair AIO (Auto)| diff --git a/.bin/d7ii/Config/SortOrder/RepairBox2.cfg b/.bin/d7ii/Config/SortOrder/RepairBox2.cfg new file mode 100644 index 00000000..bfec48b6 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/RepairBox2.cfg @@ -0,0 +1 @@ +49|48|50|20|22|23|24|26|27|40|41|42|43|44|45|51|52|46|47| diff --git a/.bin/d7ii/Config/SortOrder/RepairBox3.cfg b/.bin/d7ii/Config/SortOrder/RepairBox3.cfg new file mode 100644 index 00000000..c7eb9173 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/RepairBox3.cfg @@ -0,0 +1 @@ +11|31|21|24|25|36|37|38|Microsoft FixIt Winsock (Auto)|75| diff --git a/.bin/d7ii/Config/SortOrder/RepairWin.cfg b/.bin/d7ii/Config/SortOrder/RepairWin.cfg new file mode 100644 index 00000000..0e54a358 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/RepairWin.cfg @@ -0,0 +1 @@ +~Default Start Menu LNKs|~Fix File Associations|~Rebuild Icon Cache|~Remove Policies|~Fix Device Manager|~Clear Print Spooler|~Windows Update Svcs|~WMI/WBEM/DCOM|~Security Center|~Windows Defender|~Safe Mode Services|~System Restore|~Installer Service|~VSS Service|~Repair Permissions|~Regsvr32 IE DLLs|~DISM RestoreHealth|~System File Checker diff --git a/.bin/d7ii/Config/SortOrder/TweaksBox1.cfg b/.bin/d7ii/Config/SortOrder/TweaksBox1.cfg new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/TweaksBox1.cfg @@ -0,0 +1 @@ + diff --git a/.bin/d7ii/Config/SortOrder/d7IIEndSession.cfg b/.bin/d7ii/Config/SortOrder/d7IIEndSession.cfg new file mode 100644 index 00000000..a4ac0d7f --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/d7IIEndSession.cfg @@ -0,0 +1 @@ +28| diff --git a/.bin/d7ii/Config/SortOrder/d7IIStartSession.cfg b/.bin/d7ii/Config/SortOrder/d7IIStartSession.cfg new file mode 100644 index 00000000..a01867fc --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/d7IIStartSession.cfg @@ -0,0 +1 @@ +32|Neutron (Sync Time)|28| diff --git a/.bin/d7ii/Config/SortOrder/d7IIStartup.cfg b/.bin/d7ii/Config/SortOrder/d7IIStartup.cfg new file mode 100644 index 00000000..a4ac0d7f --- /dev/null +++ b/.bin/d7ii/Config/SortOrder/d7IIStartup.cfg @@ -0,0 +1 @@ +28| diff --git a/.bin/d7ii/Config/Templates/Email/BreakFix Report.txt b/.bin/d7ii/Config/Templates/Email/BreakFix Report.txt new file mode 100644 index 00000000..2c8ebe2c --- /dev/null +++ b/.bin/d7ii/Config/Templates/Email/BreakFix Report.txt @@ -0,0 +1,21 @@ +{%name% / #%num% / %date% - Break/Fix Report}%name% / #%num% / %date% - Break/Fix Report + +Service Type: On-Site +Service Rate: $XX.XX/hr. +Service Start Time: XXXXXX +Service End Time: XXXXXX +Time Logged: X hours + +Service Type: Remote +Service Rate: $XX.XX/hr. (or use flat-rate) +Service Start Time: XXXXXX +Service End Time: XXXXXX +Time Logged: X hours + +Service Type: Shop Service +Service Rate: $XX.XX/hr. (or use flat-rate) +Service Start Time: XXXXXX +Service End Time: XXXXXX +Time Logged: X hours + +Total Time Logged: XX hours diff --git a/.bin/d7ii/Config/Templates/Email/Client Diagnostic Report.txt b/.bin/d7ii/Config/Templates/Email/Client Diagnostic Report.txt new file mode 100644 index 00000000..18105c0e --- /dev/null +++ b/.bin/d7ii/Config/Templates/Email/Client Diagnostic Report.txt @@ -0,0 +1,15 @@ +{%name% / #%num% / %date% - Break/Fix Report}%name% / #%num% / %date% - Diagnostics Completed + +We have finished looking at your computer and +need your authorization to make one or more changes. + +Please get in touch with us by: + +Phone: +Email: +Website: www.yourwebsite.com + +We won't continue working, until after you have +authorized us to do so. + +You can find our Terms of Service online www.yourterms.com diff --git a/.bin/d7ii/Config/Templates/Email/Contract Report.txt b/.bin/d7ii/Config/Templates/Email/Contract Report.txt new file mode 100644 index 00000000..dad8df64 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Email/Contract Report.txt @@ -0,0 +1,20 @@ +{%name% / #%num% / %date% - Break/Fix Report}%name% / #%num% / %date% - Contract Report + +Service Type: On-Site +Service Start Time: XXXXXX +Service End Time: XXXXXX +Time Logged: X hours + +Service Type: Remote +Service Start Time: XXXXXX +Service End Time: XXXXXX +Time Logged: X hours + +Service Type: Shop Service +Service Start Time: XXXXXX +Service End Time: XXXXXX +Time Logged: X hours + +Total Time Logged: XX hours + +Additional Expenses: (list items here) diff --git a/.bin/d7ii/Config/Templates/Notes/Company Info.txt b/.bin/d7ii/Config/Templates/Notes/Company Info.txt new file mode 100644 index 00000000..04c34628 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Notes/Company Info.txt @@ -0,0 +1,8 @@ +Company Name: +Address: +Address 2: +City: +State: +Zip: +Phone: +Email: diff --git a/.bin/d7ii/Config/Templates/Notes/Detected Infections.txt b/.bin/d7ii/Config/Templates/Notes/Detected Infections.txt new file mode 100644 index 00000000..5081178a --- /dev/null +++ b/.bin/d7ii/Config/Templates/Notes/Detected Infections.txt @@ -0,0 +1,6 @@ +Scans have detected threats on the computer: + +Malwarebytes: YES (optionally list the # and type of infections here) +Super-AntiSpyware: +HitmanPro: +*Add Your AV Product Here*: diff --git a/.bin/d7ii/Config/Templates/Notes/Equipment Received.txt b/.bin/d7ii/Config/Templates/Notes/Equipment Received.txt new file mode 100644 index 00000000..87200d41 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Notes/Equipment Received.txt @@ -0,0 +1,12 @@ +PC Make/Model: +Type: (desktop, laptop, tablet, etc.) +OS Type: +Pwr Cable: +Mouse: +Keyboard: +WebCam: +ThumbDrive (size): YES (16gb) +OS Media: NO +Printer Make/Model: +Printer USB Cable/Pwr Cable: YES/YES +Other: diff --git a/.bin/d7ii/Config/Templates/Notes/User Info.txt b/.bin/d7ii/Config/Templates/Notes/User Info.txt new file mode 100644 index 00000000..1d9f905f --- /dev/null +++ b/.bin/d7ii/Config/Templates/Notes/User Info.txt @@ -0,0 +1,23 @@ +Primary Contact Name: +Title: +Address: +Address 2: +City: +State: +Zip: +Phone: +Email: +User Account: +Authorized Removal Of Password: YES + +Secondary Contact Name: +Title: +Address: +Address 2: +City: +State: +Zip: +Phone: +Email: +User Account: +Authorized Removal Of Password: NO diff --git a/.bin/d7ii/Config/Templates/Snippets/Diagnostics - Maintenance Needed.txt b/.bin/d7ii/Config/Templates/Snippets/Diagnostics - Maintenance Needed.txt new file mode 100644 index 00000000..511bf57b --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Diagnostics - Maintenance Needed.txt @@ -0,0 +1,19 @@ +We have determined that your PC is not working as fast as it should be. +We can improve speeds, install updates, and fix your security. + +But first we need your permission, so please contact us by: + +Phone: +Email: +Website: www.yourwebsite.comn + +Did you know you can have us maintain your computer 24/7/365? +Take a look at our Maintenance Package here. +This package includes: + +Anti-Virus Software +Automatic Updates +Automated Maintenance +We Block Known Bad Websites +Keeps Junk Programs Off Your PC +Easy Access To Our Team Of Experts \ No newline at end of file diff --git a/.bin/d7ii/Config/Templates/Snippets/Diagnostics - PC Repair Needed.txt b/.bin/d7ii/Config/Templates/Snippets/Diagnostics - PC Repair Needed.txt new file mode 100644 index 00000000..d5d5e159 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Diagnostics - PC Repair Needed.txt @@ -0,0 +1,19 @@ +We have determined that your PC has significant problems. +We can repair all of the issues for you so that it's healthy again. + +But first we need your permission, so please contact us by: + +Phone: +Email: +Website: www.yourwebsite.comn + +Did you know you can have keep your computer running healthy 24/7/365? +Take a look at our Maintenance Package here. +This package includes: + +Anti-Virus Software +Automatic Updates +Automated Maintenance +We Block Known Bad Websites +Keeps Junk Programs Off Your PC +Easy Access To Our Team Of Experts \ No newline at end of file diff --git a/.bin/d7ii/Config/Templates/Snippets/Diagnostics - Virus Detected.txt b/.bin/d7ii/Config/Templates/Snippets/Diagnostics - Virus Detected.txt new file mode 100644 index 00000000..508d2a24 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Diagnostics - Virus Detected.txt @@ -0,0 +1,19 @@ +We have detected computer infections on your PC. +We can remove them and fix your computer so they don't come back. + +But first we need your permission, so please contact us by: + +Phone: +Email: +Website: www.yourwebsite.comn + +Did you know you can have us keep your computer free of Viruses 24/7/365? +Take a look at our Maintenance Package here. +This package includes: + +Anti-Virus Software +Automatic Updates +Automated Maintenance +We Block Known Bad Websites +Keeps Junk Programs Off Your PC +Easy Access To Our Team Of Experts \ No newline at end of file diff --git a/.bin/d7ii/Config/Templates/Snippets/Diagnostics Completed.txt b/.bin/d7ii/Config/Templates/Snippets/Diagnostics Completed.txt new file mode 100644 index 00000000..863af355 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Diagnostics Completed.txt @@ -0,0 +1,13 @@ +We have finished looking at your computer and +need your authorization to make one or more changes. + +Please get in touch with us by: + +Phone: +Email: +Website: www.yourwebsite.comn + +We won't continue working, until after you have +authorized us to do so. + +You can find our Terms of Service online here. diff --git a/.bin/d7ii/Config/Templates/Snippets/Invoice.txt b/.bin/d7ii/Config/Templates/Snippets/Invoice.txt new file mode 100644 index 00000000..5f7916a1 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Invoice.txt @@ -0,0 +1,35 @@ +Thank you for your business! +Please check us out online by visiting our website or check us out on: + +Facebook +Twitter +LinkedIn +Pintrest + +What did we do? We are glad you asked, take a look! + +Add Activity Logged or Alert Text +Add Activity Logged or Alert Text +Add Activity Logged or Alert Text + + +If you would like a more advanced log of work that was performed +please contact us by: + +Phone: +Email: +Website: www.yourwebsite.comn + +You can pay your bill online by going here. + +We will add a 5% late fee for each week your payment is late, +or the maximum allowable by law. +Payments not received within 30 days will be sent to collections. + +Our office is not a storage facility. All property not picked up +within 60 days shall become the property of *Your Business Name Here*. +You agree that *Your Business Name Here* shall retain ownership of +said property after 60 days notice of this Invoice, and release all rights of +ownership to *Your Business Name Here*, and hold +*Your Business Name Here* harmless for all claims, and damages in +conjunction with said property. \ No newline at end of file diff --git a/.bin/d7ii/Config/Templates/Snippets/Maintenance Completed.txt b/.bin/d7ii/Config/Templates/Snippets/Maintenance Completed.txt new file mode 100644 index 00000000..0222aa36 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Maintenance Completed.txt @@ -0,0 +1,25 @@ +Your computer is running better now that we have finished our maintenance. +You can pay your bill online by going here. + +It's not too late to upgrade your purchase to our Maintenance Package + +We are helping people keep their computers running fast, +and fully updated 24/7/365 with our Maintenance Package + +Why keep paying for the same service without getting +constant protection for nearly the same amount, per year! + +We want to help you save as much money through-out the year as +possible, and avoid the need for repetative costs. Pay once, +and be done! + +Now you can have us keep your computer running fast, and up-to-date 24/7/365! +Take a look at our Maintenance Package here. +This package includes: + +Anti-Virus Software +Automatic Updates +Automated Maintenance +We Block Known Bad Websites +Keeps Junk Programs Off Your PC +Easy Access To Our Team Of Experts diff --git a/.bin/d7ii/Config/Templates/Snippets/PC Repair Completed.txt b/.bin/d7ii/Config/Templates/Snippets/PC Repair Completed.txt new file mode 100644 index 00000000..9a2fbe31 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/PC Repair Completed.txt @@ -0,0 +1,25 @@ +We have fixed all of the problems we were able to find on your PC. +You can pay your bill online by going here. + +It's not too late to upgrade your purchase to our Maintenance Package + +We are helping people keep their computers repaired, +and working healthy 24/7/365 with our Maintenance Package + +Why keep paying for the same service without getting +constant protection for nearly the same amount, per year! + +We want to help you save as much money through-out the year as +possible, and avoid the need for repetative costs. Pay once, +and be done! + +Now you can have us keep your computer healthy 24/7/365! +Take a look at our Maintenance Package here. +This package includes: + +Anti-Virus Software +Automatic Updates +Automated Maintenance +We Block Known Bad Websites +Keeps Junk Programs Off Your PC +Easy Access To Our Team Of Experts diff --git a/.bin/d7ii/Config/Templates/Snippets/Virus Removal Completed.txt b/.bin/d7ii/Config/Templates/Snippets/Virus Removal Completed.txt new file mode 100644 index 00000000..b1061d17 --- /dev/null +++ b/.bin/d7ii/Config/Templates/Snippets/Virus Removal Completed.txt @@ -0,0 +1,25 @@ +We have removed all of the detected computer infections on your PC. +You can pay your bill online by going here. + +It's not too late to upgrade your purchase to our Maintenance Package + +We are helping people keep their computers clean of Viruses, +and other nasty computer infections 24/7/365 with our Maintenance Package + +Why keep paying for the same service without getting +constant protection for nearly the same amount, per year! + +We want to help you save as much money through-out the year as +possible, and avoid the need for repetative costs. Pay once, +and be done! + +Now you can have us keep your computer free of Viruses 24/7/365! +Take a look at our Maintenance Package here. +This package includes: + +Anti-Virus Software +Automatic Updates +Automated Maintenance +We Block Known Bad Websites +Keeps Junk Programs Off Your PC +Easy Access To Our Team Of Experts diff --git a/.bin/d7ii/Config/d7II.ini b/.bin/d7ii/Config/d7II.ini new file mode 100644 index 00000000..cce77946 --- /dev/null +++ b/.bin/d7ii/Config/d7II.ini @@ -0,0 +1,162 @@ +[Reg] +EULA_Accepted=1 +RegTitle=(503) 523-1012 www.1201.com d7II +DisplayD7ver=1 +First_v4_Server_Contact=2/25/2015 1:12:37 AM +[3PTUpdateInfo] +LastDefaultProfileUpdate=4/6/2015 09:40 AM +LastDefaultProfileUpdateU=4/6/2015 9:40:27 AM +d7II_DefaultApps=4/6/2015 09:40 AM +d7II_DefaultAppsU=4/6/2015 9:40:27 AM +[CurrentVersions] +DefaultKetarin=10 +DefaultAppsConfig=58 +TestPack=1 +[Update] +VMTicker=Try d7II in a real environment for 1 month, Single Tech $19/mo. - cancel anytime or upgrade for a lower rate! +VMTickerURL=https://www.foolishit.com/d7ii/ +TickerForce=0 +LastDefUpdate=8/21/2015 3:03:18 PM +Ticker=ATTN: d7II has updated to d7x! Click for info! +TickerURL=https://www.foolishit.com/d7x/update/ +[d7II] +LastConfigConversionVer=3.6.87 +[Config] +Displayd7IINews=1 +DisplayPathInTitleBar=0 +OneNoteColorTabs=1 +HighlightTabs=1 +LongRectangleLogo=0 +AutoSizeLogo=0 +MainLogoName=CompanyLogo.bmp +ReportLogoName=CompanyReportLogo.bmp +AppIconName=Company.ico +dCloudLogoName=d7II_SFX_Mini.bmp +SFXMiniLogoName=d7II_SFX_Mini.bmp +HideCustomItemDetails=0 +HideCustomAppDetails=0 +NoClosePrompt=0 +EndSessionPromptToEnableAV=0 +NoScreenResPrompt=1 +AlwaysIncreaseLowRes=1 +DisableMSSE=0 +RestartSvcs=1 +StartupKill=0 +StartupShutdownPrevention=1 +d7IIDeskShortcut=1 +d7IIDeskShortcutFolder=0 +UseCrucialUKScanner=0 +UTCAdjustment=-8 +StartupCheckAV=1 +StoreLastd7IIRun=1 +ScreenLockSysTrayDefault=0 +FormatDateDayFirst=0 +StartupPriority=3 +StartupSystemPrompt=1 +ReplaceTaskMgr=1 +DropDesktopShortcut=0 +CustomHomePage=www.google.com +StartupDisableUAC=0 +ShutdownEnableUAC=2 +StartupToggleHiddenON=1 +StartupToggleHiddenOFF=1 +StartupToggleHiddenExtON=1 +StartupToggleHiddenExtOFF=0 +PreventSleep=1 +PreventScreenSaver=1 +StartupCheckTimeZone=1 +StartupLoadTab=Malware +d7IIUpdateCheck=2 +StartupCheckd7AutoUpdate=0 +SkipRevisionHistoryAfterUpdate=0 +StartupCheckActivation=0 +StartupInstShellExt=0 +StartupBrandOS=0 +UseD7ForGoogle=1 +NoD7inRunOnce=0 +MinimizeToTray2=0 +TimeZone=Pacific Standard Time +DisableAudibleAlerts=0 +DisableWANAddress=0 +CopyToOSLoc=\1201 +UseRecycleBin=0 +ScreenLockFile=http://www.CompanyName.com/LockScreen.html +d7IIDeskShortcutName=1201 - d7II +StartupLoadProfile=Default +MaxChainApps=1 +AutoGenTicketNumber=0 +DisplaydMZNews=1 +StartSessionInSafeMode=0 +EndSessionURL=http://www.CompanyName.com/WorkComplete.html +HideInternalFunctionDetails=0 +HideInternalFunctionIcons=0 +HideCustomAppIcons=0 +[ScheduledUpdate] +KetarinProfile=0 +DefaultApps=0 +[CustomFunctions] +D7StartupTab=1 +D7Startup=KillEmAll.pif +MapDrivesOnStartup=0 +RemoveMapDrivesOnClose=0 +[Reports] +PromptForName=0 +AutoGenInfoReport=0 +StoreLocation=\1201\d7II Reports\%date% +RemoteFormat=\%name%\%date%\%computername% +ReportsDirDeskShortcut=0 +ReportsDirDeskShortcutPath=\1201\d7II Reports +LogAllActions=1 +NoTimeStamp=0 +NoWorkCompleted=0 +ReportsDirDeskShortcutDesc=Copy of reports of work done on the system and the logs from various removal processes. +ReportsDirDeskShortcutName=1201 Reports +LogTechEmail=0 +[Cloud] +AutoCheckConfigUpdate=0 +AutoCheckDefUpdate=0 +AutoCheckUpdateRestart=0 +ConfigName=dMZ Configured +ConfigDate=4/6/2015 9:32:00 AM +DefsDate=8/21/2015 3:01:00 PM +[OS Customization] +BrowserHomepage=https://www.google.com +CustomDNS1=8.8.8.8 +CustomDNS2=8.8.4.4 +[CloseDefaults] +Email=0 +EmailReportsZipped=0 +HTMLEmailBody=1 +EmailBodyActLog=2 +MoveReports=0 +FTPStoreReports=0 +PasswordProtectedLaunch=0 +Cloud=0 +CloudDefs=0 +EmailTemplate=Contract Report +MoveReportsTod7IIDir=0 +DeleteLocalReportsDir=0 +EndSessionURL=0 +DefaultEmailRecipient=d7ii@CompanyName.com +DefaultEmailReplyTo=d7ii@CompanyName.com +[BoxLabels] +Audit1=Audit/Diagnose +Audit2=QA/Testing +Malware1=d7II Internal Automated +Malware2=Automated +Malware3=Manual +Repair1=External Tools +Repair2=Internal Windows Repair +Repair3=Networking Related +Maint1=d7II Internal Automated +Maint2=General Maintenance +Maint3=Manual Maintenance +[StartupDefaults] +MenuTimer=5 +CustomScript=0 +ServiceMode=0 +SystemMode=0 +Debug=0 +DisableRunOnce=0 +Normal=1 +MergeDefs=0 diff --git a/.bin/d7ii/Config/d7II_DefaultApps.INI b/.bin/d7ii/Config/d7II_DefaultApps.INI new file mode 100644 index 00000000..fdf663bd --- /dev/null +++ b/.bin/d7ii/Config/d7II_DefaultApps.INI @@ -0,0 +1,58 @@ +[URL] +lastactivityview=http://nirsoft.net/panel/lastactivityview.exe +erunt=http://www.derfisch.de/lars/erunt.zip +mbrcheck=http://ad13.geekstogo.com/MBRCheck.exe +desktopcmd=http://www.midiox.com/zip/dtcmd.zip +batteryinfoview=http://www.nirsoft.net/panel/batteryinfoview.exe +bluescreenview=http://www.nirsoft.net/panel/bluescreenview.exe +chromecookiesview=http://www.nirsoft.net/panel/chromecookiesview.exe +chromehistoryview=http://www.nirsoft.net/panel/chromehistoryview.exe +cports=http://www.nirsoft.net/utils/cports.zip +cports-x64=http://www.nirsoft.net/utils/cports-x64.zip +driverview=http://www.nirsoft.net/utils/driverview.zip +driverview-x64=http://www.nirsoft.net/utils/driverview-x64.zip +flashcookiesview=http://www.nirsoft.net/panel/flashcookiesview.exe +iehv=http://www.nirsoft.net/panel/iehv.exe +injecteddll=http://www.nirsoft.net/utils/injecteddll.zip +mailpv=http://www.nirsoft.net/panel/mailpv.exe +mzcv=http://www.nirsoft.net/panel/mzcv.exe +mozillahistoryview=http://www.nirsoft.net/panel/mozillahistoryview.exe +mylastsearch=http://www.nirsoft.net/panel/mylastsearch.exe +webbrowserpassview=http://nirsoft.net/panel/webbrowserpassview.exe +myuninst=http://www.nirsoft.net/panel/myuninst.exe +ntfslinksview=http://www.nirsoft.net/panel/ntfslinksview.exe +produkey=http://www.nirsoft.net/panel/produkey.exe +whatishang=http://www.nirsoft.net/panel/whatishang.exe +wirelesskeyview=http://www.nirsoft.net/toolsdownload/wirelesskeyview.zip +wirelesskeyview-x64=http://www.nirsoft.net/toolsdownload/wirelesskeyview-x64.zip +openhardwaremonitor=http://openhardwaremonitor.org/files/openhardwaremonitor-v0.3.2-beta.zip +otl=http://oldtimer.geekstogo.com/OTL.exe +ccleaner=http://www.piriform.com/ccleaner/download/portable/downloadfile +defraggler=http://www.piriform.com/defraggler/download/portable/downloadfile +recuva=http://www.piriform.com/recuva/download/portable/downloadfile +speccy=http://www.piriform.com/speccy/download/portable/downloadfile +revouninstaller=http://www.revouninstaller.com/download/revouninstaller.zip +spacesniffer=http://www.uderzo.it/main_products/space_sniffer/files/spacesniffer_1_1_4_0.zip +startuplite=http://www.malwarebytes.org/StartUpLite.exe +superantispyware=http://www.superantispyware.com/sasportable.php +autoruns=http://live.sysinternals.com/Files/Autoruns.zip +contig=http://live.sysinternals.com/Files/Contig.zip +dbgview=http://live.sysinternals.com/Files/DebugView.zip +junction=http://live.sysinternals.com/Files/Junction.zip +listdlls=http://live.sysinternals.com/Files/ListDlls.zip +pagedfrg=http://live.sysinternals.com/Files/PageDefrag.zip +procexp=http://live.sysinternals.com/Files/ProcessExplorer.zip +procmon=http://live.sysinternals.com/Files/ProcessMonitor.zip +psexec=http://live.sysinternals.com/psexec.exe +regdelnull=http://live.sysinternals.com/Files/Regdelnull.zip +sdelete=http://live.sysinternals.com/Files/SDelete.zip +sigcheck=http://live.sysinternals.com/Files/Sigcheck.zip +tcpoptimizer=http://www.speedguide.net/files/TCPOptimizer.exe +unstopcpy=http://www.roadkil.net/download.php?FileID=421&ProgramID=29 +MSIE8PerfFixIt=http://go.microsoft.com/?linkid=9726336 +MSWinUpdFixIt=http://go.microsoft.com/?linkid=9665683 +MSWinsockFixIt=http://go.microsoft.com/?linkid=9662461 +MSOfficeConfigAnalyzer=https://download.microsoft.com/download/5/F/D/5FD540BF-5AC6-4261-895F-676B38AA8406/OffCAT.msi +VTUploader=https://www.virustotal.com/static/bin/vtuploader2.0.exe +CrystalDiskInfo=http://jaist.dl.sourceforge.jp/crystaldiskinfo/54663/CrystalDiskInfo4_2_0a.zip +HDDScan=http://hddscan.com/download/HDDScan-3.3.zip diff --git a/.bin/d7ii/Config/d7II_SFX_Mini.ini b/.bin/d7ii/Config/d7II_SFX_Mini.ini new file mode 100644 index 00000000..caa4724a --- /dev/null +++ b/.bin/d7ii/Config/d7II_SFX_Mini.ini @@ -0,0 +1,11 @@ +[App] +Ver=3.0.0 +[dCloud] +FTPServer=gator3279.hostgator.com +UserName=d7ii@dsupportonline.com +Password==],6IH50_$Gua~> +ConfigDir=/Config +DefsDir=/Defs +TechPassword==],6IH50_$Gua~> +DefaultConfig=%prompt% +DefaultPath=%desktop% diff --git a/.bin/d7ii/Modules/Defs/dUninstaller.txt b/.bin/d7ii/Modules/Defs/dUninstaller.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller.txt @@ -0,0 +1 @@ + diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt b/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt new file mode 100644 index 00000000..ffa379f9 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt @@ -0,0 +1,2 @@ + +%userprofile%\foo.txt diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt b/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt new file mode 100644 index 00000000..7c8f50d9 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt @@ -0,0 +1 @@ +Software\Test Key diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt b/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt new file mode 100644 index 00000000..c006bcc9 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt @@ -0,0 +1,2 @@ +Software\Test\Test Value +Software\test diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt b/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt new file mode 100644 index 00000000..3586f6b9 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt @@ -0,0 +1,2 @@ +Test Value +test diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt b/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt @@ -0,0 +1 @@ + diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt b/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt new file mode 100644 index 00000000..9c558e35 --- /dev/null +++ b/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt @@ -0,0 +1 @@ +. From 1c5b4bbfd819afbdbe3a4242774358c23e4d3c57 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Mon, 8 Oct 2018 23:26:27 -0600 Subject: [PATCH 288/293] Updated d7II configs --- .bin/d7ii/3rd Party Tools/HMP.cmd | 11 - .bin/d7ii/3rd Party Tools/JRT_Auto.cmd | 17 - .bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd | 4 +- .bin/d7ii/3rd Party Tools/rkill.cmd | 5 - .bin/d7ii/Config/AltText.ini | 4 +- .bin/d7ii/Config/AppOverrides.ini | 2 +- .../CustomApps/Malwarebytes Download.cfg | 2 +- .../CustomApps/Malwarebytes Install.cfg | 4 +- .bin/d7ii/Config/CustomApps/RKill (Auto).cfg | 2 +- .../3rd Party Configs/Everything.ini | 485 ++++++++++++++++++ .../3rd Party Configs/PatchMyPC.reg | Bin 0 -> 236 bytes .../3rd Party Configs/a2cmd.cmd | 167 ++++++ .../3rd Party Configs/cpuz.ini | Bin 0 -> 504 bytes .../3rd Party Configs/pagedfrg.reg | Bin 0 -> 256 bytes .../Emsisoft a2cmd Deep Scan.cfg | 2 +- .../CustomApps_d7II/ExecutedProgramsList.cfg | 37 ++ .../d7ii/Config/CustomApps_d7II/HitmanPro.cfg | 2 +- .../Kaspersky TDSSKiller (Silent).cfg | 2 +- .bin/d7ii/Config/Links.txt | 1 + .bin/d7ii/Config/Reg.Settings.dat | Bin 187 -> 189 bytes .bin/d7ii/Config/RegLinks.txt | 1 + .bin/d7ii/Config/SiteSearch.txt | 1 + .bin/d7ii/Modules/Defs/dUninstaller.txt | 1 - .../Defs/dUninstaller_FileSystemObjects.txt | 2 - .../Modules/Defs/dUninstaller_RegKeys.txt | 1 - .../Modules/Defs/dUninstaller_RegValues.txt | 2 - .../Modules/Defs/dUninstaller_RunValues.txt | 2 - .../Defs/dUninstaller_StartMenuFolders.txt | 1 - .../Modules/Defs/dUninstaller_Whitelist.txt | 1 - 29 files changed, 704 insertions(+), 55 deletions(-) delete mode 100644 .bin/d7ii/3rd Party Tools/HMP.cmd delete mode 100644 .bin/d7ii/3rd Party Tools/JRT_Auto.cmd delete mode 100644 .bin/d7ii/3rd Party Tools/rkill.cmd create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Everything.ini create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/PatchMyPC.reg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/a2cmd.cmd create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/cpuz.ini create mode 100644 .bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/pagedfrg.reg create mode 100644 .bin/d7ii/Config/CustomApps_d7II/ExecutedProgramsList.cfg diff --git a/.bin/d7ii/3rd Party Tools/HMP.cmd b/.bin/d7ii/3rd Party Tools/HMP.cmd deleted file mode 100644 index 0481ff41..00000000 --- a/.bin/d7ii/3rd Party Tools/HMP.cmd +++ /dev/null @@ -1,11 +0,0 @@ -pushd "%~dp0" -cd.. -set d7IIpath=%cd% -pushd "%~dp0" -echo %d7IIpath%\>HMP_Excludes.txt -echo %programfiles%\dSupportSuite\>>HMP_Excludes.txt -echo %programfiles(x86)%\dSupportSuite\>>HMP_Excludes.txt -echo %programfiles%\CryptoPrevent\>>HMP_Excludes.txt -echo %programfiles(x86)%\CryptoPrevent\>>HMP_Excludes.txt -echo %programfiles%\Foolish IT\CryptoPrevent\>>HMP_Excludes.txt -echo %programfiles(x86)%\Foolish IT\CryptoPrevent\>>HMP_Excludes.txt \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/JRT_Auto.cmd b/.bin/d7ii/3rd Party Tools/JRT_Auto.cmd deleted file mode 100644 index 549e8e0a..00000000 --- a/.bin/d7ii/3rd Party Tools/JRT_Auto.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@echo off&pushd "%~dp0" -start /wait JRT.exe -y -nr -pushd "%temp%\jrt" -if not exist "get.bat" pushd %systemdrive%\JRT -if not exist "get.bat" goto :eof -findstr /v /i "pause" get.bat>tmp.txt -findstr /v /i /b "notepad" tmp.txt>get.bat -echo.>>"%temp%\jrt\wl_services.cfg" -echo d7iisvc>>"%temp%\jrt\wl_services.cfg" -echo dSSEventSvc>>"%temp%\jrt\wl_services.cfg" -echo CryptoPreventEventSvc>>"%temp%\jrt\wl_services.cfg" -echo.>>"%temp%\jrt\wl_processes.cfg" -echo d7ii>>"%temp%\jrt\wl_processes.cfg" -echo dfunk>>"%temp%\jrt\wl_processes.cfg" -echo dSupportSuite>>"%temp%\jrt\wl_processes.cfg" -echo CryptoPrevent>>"%temp%\jrt\wl_processes.cfg" -start /wait cmd.exe /c get.bat \ No newline at end of file diff --git a/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd b/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd index 0fd4d2e7..15ee7722 100644 --- a/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd +++ b/.bin/d7ii/3rd Party Tools/MBAM_Uninstall.cmd @@ -32,8 +32,8 @@ for /f usebackq^ tokens^=2^ delims^=^" %%s in ( rem Copy logs to 1201 folder echo "Copying logs..." -robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\LOGS" "%SYSTEMDRIVE%\1201\Info\%iso_date%\MBAM Logs" >nul -robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\ScanResults" "%SYSTEMDRIVE%\1201\Info\%iso_date%\MBAM Logs" >nul +robocopy /e "%PROGRAMDATA%\Malwarebytes\MBAMService\LOGS" "%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" ( rem Keep MBAM diff --git a/.bin/d7ii/3rd Party Tools/rkill.cmd b/.bin/d7ii/3rd Party Tools/rkill.cmd deleted file mode 100644 index 6cca7c3a..00000000 --- a/.bin/d7ii/3rd Party Tools/rkill.cmd +++ /dev/null @@ -1,5 +0,0 @@ -pushd "%~dp0" -cd.. -set d7IIpath=%cd% -pushd "%~dp0" -echo %d7IIpath%\d7II.exe>rkill_Excludes.txt diff --git a/.bin/d7ii/Config/AltText.ini b/.bin/d7ii/Config/AltText.ini index 9a985025..b58b6c23 100644 --- a/.bin/d7ii/Config/AltText.ini +++ b/.bin/d7ii/Config/AltText.ini @@ -5,7 +5,7 @@ Autoruns (Verify and Log)=Manages Startup Items Google Chrome Software Removal Tool=Remove add-ons, extensions, toolbars, and other software that may interfere with the operation of Google Chrome. VipreRescueScanner (Deep Scan)=Virus scanner (Designed for both the Malware Removal and the Offline Operations tab) VipreRescueScanner (Quick Scan)=Virus scanner (Designed for both the Malware Removal and the Offline Operations tab) -=Install software bundle +=Install/Upgrade MBAM [ReportDesc] Autoruns=Examined Windows startup items and removed unnecessary entries. Autoruns_Copy=Examined Windows startup items and removed unnecessary entries. @@ -36,4 +36,4 @@ VipreRescueScanner (Quick Scan)=Ran virus scans (Vipre) 22=Repaired the Windows Update services responsible for Windows Update functionality. 38=Performed repair routines to ensure the Winsock is operating properly. 83=Examined internet speed/bandwidth. -=Installed or updated commonly used applications (Adobe Reader, Google Chrome, etc) +=Malwarebytes installed successfully. diff --git a/.bin/d7ii/Config/AppOverrides.ini b/.bin/d7ii/Config/AppOverrides.ini index 0e07e944..9c73b9b3 100644 --- a/.bin/d7ii/Config/AppOverrides.ini +++ b/.bin/d7ii/Config/AppOverrides.ini @@ -37,6 +37,6 @@ PriorAlert=0 [] PostRunApp= AlwaysAttemptDownload=0 -DLafterXdays=5 +DLafterXdays=0 EmailBeforeExecution=0 PriorAlert=0 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg index e56531d5..75eed91d 100644 --- a/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg @@ -32,4 +32,4 @@ Servers=1 NonDirectURLs=0 AutoFlag=1 App=exit -LastDownload=8/31/2018 +LastDownload=10/7/2018 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg index 9a7ef75b..5aea34ab 100644 --- a/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Install.cfg @@ -1,5 +1,5 @@ [Config] -LastEditDate=8/25/2018 3:50:23 PM +LastEditDate=10/7/2018 3:51:22 PM PostRunApp= App=MBAM_Install.cmd UseFTPServer=0 @@ -31,4 +31,4 @@ AppDesc=Install/Upgrade MBAM LogVerbiage=Malwarebytes installed successfully. LastDownload=8/18/2018 Author=2Shirt -AppWaitTime=30 +AppWaitTime=5 diff --git a/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg b/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg index 71e4e669..ead5cbe7 100644 --- a/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg +++ b/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg @@ -37,4 +37,4 @@ Vista=1 Servers=1 NonDirectURLs=0 AutoFlag=1 -LastDownload=8/31/2018 +LastDownload=10/7/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Everything.ini b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Everything.ini new file mode 100644 index 00000000..f787a162 --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/Everything.ini @@ -0,0 +1,485 @@ +[Everything] +app_data=0 +run_as_admin=1 +window_x=1614 +window_y=186 +window_wide=794 +window_high=664 +maximized=0 +minimized=0 +fullscreen=0 +ontop=0 +match_whole_word=0 +match_path=0 +match_case=0 +match_diacritics=0 +match_regex=0 +selection_mask_right_bottom_inclusive=1 +allow_multiple_windows=0 +allow_multiple_instances=0 +run_in_background=1 +show_tray_icon=1 +alternate_row_color=0 +show_mouseover=0 +check_for_updates_on_startup=0 +beta_updates=0 +show_highlighted_search_terms=1 +text_size=0 +hide_empty_search_results=0 +clear_selection_on_search=1 +new_window_key=0 +show_window_key=0 +toggle_window_key=0 +language=0 +show_selected_item_in_statusbar=0 +open_folder_command2= +open_file_command2= +open_path_command2= +explore_command2= +explore_path_command2= +window_title_format= +taskbar_notification_title_format= +instance_name= +translucent_selection_rectangle_alpha=70 +min_zoom=-6 +max_zoom=27 +context_menu_type=0 +auto_include_fixed_volumes=1 +auto_include_removable_volumes=0 +last_export_type=0 +max_threads=0 +reuse_threads=1 +single_parent_context_menu=0 +auto_size_1=512 +auto_size_2=640 +auto_size_3=768 +auto_size_aspect_ratio_x=9 +auto_size_aspect_ratio_y=7 +auto_size_path_x=1 +auto_size_path_y=2 +sticky_vscroll_bottom=1 +last_options_page=9 +draw_focus_rect=1 +date_format= +time_format= +invert_layout=0 +listview_item_high=0 +debug=0 +home_match_case=0 +home_match_whole_word=0 +home_match_path=0 +home_match_diacritics=0 +home_regex=0 +home_search=1 +home_filter=0 +home_sort=0 +home_index=1 +allow_multiple_windows_from_tray=0 +single_click_tray=0 +close_on_execute=0 +double_click_path=0 +update_display_after_scroll=0 +update_display_after_mask=1 +auto_scroll_view=0 +double_quote_copy_as_path=0 +snap=0 +snaplen=10 +rename_select_filepart_only=0 +rename_move_caret_to_selection_end=0 +search_edit_move_caret_to_selection_end=0 +select_search_on_mouse_click=1 +focus_search_on_activate=0 +reset_vscroll_on_search=1 +wrap_focus=0 +load_icon_priority=0 +load_fileinfo_priority=0 +header_high=0 +hide_on_close=0 +winmm=0 +menu_escape_amp=1 +fast_ascii_search=1 +match_path_when_search_contains_path_separator=1 +allow_literal_operators=0 +allow_round_bracket_parenthesis=0 +expand_environment_variables=0 +search_as_you_type=1 +convert_forward_slash_to_backslash=0 +match_whole_filename_when_using_wildcards=1 +double_buffer=1 +search= +show_number_of_results_with_selection=0 +date_descending_first=0 +size_descending_first=0 +size_format=2 +alpha_select=0 +tooltips=1 +rtl_listview_edit=0 +bookmark_remember_case=1 +bookmark_remember_wholeword=1 +bookmark_remember_path=1 +bookmark_remember_diacritic=1 +bookmark_remember_regex=1 +bookmark_remember_sort=1 +bookmark_remember_filter=1 +bookmark_remember_index=1 +exclude_list_enabled=1 +exclude_hidden_files_and_folders=0 +exclude_system_files_and_folders=0 +include_only_files= +exclude_files= +db_location= +db_multi_user_filename=0 +db_compress=0 +extended_information_cache_monitor=1 +keep_missing_indexes=0 +editor_x=0 +editor_y=0 +editor_wide=0 +editor_high=0 +editor_maximized=0 +file_list_relative_paths=1 +max_recv_size=8388608 +display_full_path_name=0 +size_tiny=10240 +size_small=102400 +size_medium=1048576 +size_large=16777216 +size_huge=134217728 +themed_toolbar=1 +show_copy_path=2 +show_copy_full_name=2 +show_open_path=2 +show_explore=2 +show_explore_path=2 +copy_path_folder_append_backslash=0 +custom_verb01= +custom_verb02= +custom_verb03= +custom_verb04= +custom_verb05= +custom_verb06= +custom_verb07= +custom_verb08= +custom_verb09= +custom_verb10= +custom_verb11= +custom_verb12= +filters_visible=0 +filters_wide=128 +filters_right_align=1 +filters_tab_stop=0 +filter= +filter_everything_name= +sort=Name +sort_ascending=1 +always_keep_sort=0 +index=0 +index_file_list= +index_etp_server= +index_link_type=1 +status_bar_visible=1 +select_search_on_focus_mode=1 +select_search_on_set_mode=2 +search_history_enabled=0 +run_history_enabled=1 +search_history_days_to_keep=90 +run_history_days_to_keep=90 +search_history_always_suggest=0 +search_history_max_results=24 +search_history_show_above=0 +service_port=15485 +etp_server_enabled=0 +etp_server_bindings= +etp_server_port=21 +etp_server_username= +etp_server_password= +etp_server_welcome_message= +etp_server_log_file_name= +etp_server_logging_enabled=1 +etp_server_log_max_size=4194304 +etp_server_log_delta_size=524288 +etp_server_allow_file_download=1 +http_server_enabled=0 +http_server_bindings= +http_title_format= +http_server_port=80 +http_server_username= +http_server_password= +http_server_home= +http_server_default_page= +http_server_log_file_name= +http_server_logging_enabled=1 +http_server_log_max_size=4194304 +http_server_log_delta_size=524288 +http_server_allow_file_download=1 +name_column_pos=0 +name_column_width=256 +path_column_visible=1 +path_column_pos=1 +path_column_width=256 +size_column_visible=1 +size_column_pos=2 +size_column_width=96 +extension_column_visible=0 +extension_column_pos=3 +extension_column_width=96 +type_column_visible=0 +type_column_pos=4 +type_column_width=96 +last_write_time_column_visible=1 +last_write_time_column_pos=3 +last_write_time_column_width=153 +creation_time_column_visible=0 +creation_time_column_pos=6 +creation_time_column_width=140 +date_accessed_column_visible=0 +date_accessed_column_pos=7 +date_accessed_column_width=140 +attribute_column_visible=0 +attribute_column_pos=8 +attribute_column_width=70 +date_recently_changed_column_visible=0 +date_recently_changed_column_pos=9 +date_recently_changed_column_width=96 +run_count_column_visible=0 +run_count_column_pos=10 +run_count_column_width=96 +date_run_column_visible=0 +date_run_column_pos=11 +date_run_column_width=140 +file_list_filename_column_visible=0 +file_list_filename_column_pos=12 +file_list_filename_column_width=96 +translucent_selection_rectangle_background_color= +translucent_selection_rectangle_border_color= +ntfs_volume_paths= +ntfs_volume_includes= +ntfs_volume_load_recent_changes= +ntfs_volume_include_onlys= +ntfs_volume_monitors= +filelists= +folders= +folder_monitor_changes= +folder_update_types= +folder_update_days= +folder_update_ats= +folder_update_intervals= +folder_update_interval_types= +exclude_folders= +connect_history_hosts= +connect_history_ports= +connect_history_usernames= +connect_history_link_types= +file_new_search_window_keys=334 +file_open_file_list_keys=335 +file_close_file_list_keys= +file_close_keys=343,27 +file_export_keys=339 +file_copy_full_name_to_clipboard_keys=9539 +file_copy_path_to_clipboard_keys= +file_set_run_count_keys= +file_create_shortcut_keys= +file_delete_keys=8238 +file_delete_permanently_keys=9262 +file_edit_keys= +file_open_keys=8205 +file_open_selection_and_close_everything_keys= +file_explore_path_keys= +file_open_new_keys= +file_open_path_keys=8461 +file_open_with_keys= +file_open_with_default_verb_keys= +file_play_keys= +file_preview_keys= +file_print_keys= +file_print_to_keys= +file_properties_keys=8717 +file_read_extended_information_keys=8517 +file_rename_keys=8305 +file_run_as_keys= +file_exit_keys=337 +file_custom_verb_1_keys= +file_custom_verb_2_keys= +file_custom_verb_3_keys= +file_custom_verb_4_keys= +file_custom_verb_5_keys= +file_custom_verb_6_keys= +file_custom_verb_7_keys= +file_custom_verb_8_keys= +file_custom_verb_9_keys= +file_custom_verb_10_keys= +file_custom_verb_11_keys= +file_custom_verb_12_keys= +edit_cut_keys=8536 +edit_copy_keys=8515,8493 +edit_paste_keys=8534,9261 +edit_select_all_keys=8513 +edit_invert_selection_keys= +view_filters_keys= +view_status_bar_keys= +view_window_size_small_keys=561 +view_window_size_medium_keys=562 +view_window_size_large_keys=563 +view_window_size_auto_fit_keys=564 +view_zoom_zoom_in_keys=443,363 +view_zoom_zoom_out_keys=445,365 +view_zoom_reset_keys=304,352 +view_go_to_back_keys=549,166 +view_go_to_forward_keys=551,167 +view_go_to_home_keys=548 +view_sort_by_name_keys=305 +view_sort_by_path_keys=306 +view_sort_by_size_keys=307 +view_sort_by_extension_keys=308 +view_sort_by_type_keys=309 +view_sort_by_date_modified_keys=310 +view_sort_by_date_created_keys=311 +view_sort_by_attributes_keys=312 +view_sort_by_file_list_filename_keys= +view_sort_by_run_count_keys= +view_sort_by_date_run_keys= +view_sort_by_date_recently_changed_keys=313 +view_sort_by_date_accessed_keys= +view_sort_by_ascending_keys= +view_sort_by_descending_keys= +view_refresh_keys=116 +view_fullscreen_keys=122 +view_toggle_ltrrtl_keys= +view_on_top_never_keys= +view_on_top_always_keys=340 +view_on_top_while_searching_keys= +search_match_case_keys=329 +search_match_whole_word_keys=322 +search_match_path_keys=341 +search_match_diacritics_keys=333 +search_enable_regex_keys=338 +search_add_to_filters_keys= +search_organize_filters_keys=1350 +bookmarks_add_to_bookmarks_keys=324 +bookmarks_organize_bookmarks_keys=1346 +tools_options_keys=336 +tools_console_keys=448 +tools_file_list_editor_keys= +tools_connect_to_etp_server_keys= +tools_disconnect_from_etp_server_keys= +help_everything_help_keys=112 +help_search_syntax_keys= +help_regex_syntax_keys= +help_command_line_options_keys= +help_everything_website_keys= +help_check_for_updates_keys= +help_about_everything_keys=368 +search_edit_focus_search_edit_keys=326,114 +search_edit_delete_previous_word_keys=4360 +search_edit_auto_complete_search_keys=4384 +search_edit_show_search_history_keys= +search_edit_show_all_search_history_keys=4646,4648 +result_list_item_up_keys=8230,4134 +result_list_item_down_keys=8232,4136 +result_list_page_up_keys=8225,4129 +result_list_page_down_keys=8226,4130 +result_list_start_of_list_keys=8228 +result_list_end_of_list_keys=8227 +result_list_item_up_extend_keys=9254,5158 +result_list_item_down_extend_keys=9256,5160 +result_list_page_up_extend_keys=9249,5153 +result_list_page_down_extend_keys=9250,5154 +result_list_start_of_list_extend_keys=9252 +result_list_end_of_list_extend_keys=9251 +result_list_focus_up_keys=8486,4390 +result_list_focus_down_keys=8488,4392 +result_list_focus_page_up_keys=8481,4385 +result_list_focus_page_down_keys=8482,4386 +result_list_focus_start_of_list_keys=8484 +result_list_focus_end_of_list_keys=8483 +result_list_focus_up_extend_keys=9510,5414 +result_list_focus_down_extend_keys=9512,5416 +result_list_focus_page_up_extend_keys=9505,5409 +result_list_focus_page_down_extend_keys=9506,5410 +result_list_focus_start_of_list_extend_keys=9508 +result_list_focus_end_of_list_extend_keys=9507 +result_list_focus_result_list_keys= +result_list_toggle_path_column_keys=1330 +result_list_toggle_size_column_keys=1331 +result_list_toggle_extension_column_keys=1332 +result_list_toggle_type_column_keys=1333 +result_list_toggle_date_modified_column_keys=1334 +result_list_toggle_date_created_column_keys=1335 +result_list_toggle_attributes_column_keys=1336 +result_list_toggle_file_list_filename_column_keys= +result_list_toggle_run_count_column_keys= +result_list_toggle_date_recently_changed_column_keys=1337 +result_list_toggle_date_accessed_column_keys= +result_list_toggle_date_run_column_keys= +result_list_size_all_columns_to_fit_keys=8555 +result_list_size_result_list_to_fit_keys= +result_list_context_menu_keys=9337 +result_list_scroll_left_keys=8229 +result_list_scroll_right_keys=8231 +result_list_scroll_page_left_keys=8485 +result_list_scroll_page_right_keys=8487 +result_list_select_focus_keys=8224 +result_list_toggle_focus_selection_keys=8480 +result_list_copy_selection_to_clipboard_as_csv_keys= +result_list_font= +result_list_font_size= +search_edit_font= +search_edit_font_size= +status_bar_font= +status_bar_font_size= +header_font= +header_font_size= +normal_background_color= +normal_foreground_color= +normal_bold= +highlighted_background_color= +highlighted_foreground_color= +highlighted_bold= +selected_background_color= +selected_foreground_color= +selected_bold= +highlighted_selected_background_color= +highlighted_selected_foreground_color= +highlighted_selected_bold= +selected_inactive_background_color= +selected_inactive_foreground_color= +selected_inactive_bold= +highlighted_selected_inactive_background_color= +highlighted_selected_inactive_foreground_color= +highlighted_selected_inactive_bold= +drop_target_background_color= +drop_target_foreground_color= +drop_target_bold= +highlighted_drop_target_background_color= +highlighted_drop_target_foreground_color= +highlighted_drop_target_bold= +current_sort_background_color= +current_sort_foreground_color= +current_sort_bold= +highlighted_current_sort_background_color= +highlighted_current_sort_foreground_color= +highlighted_current_sort_bold= +mouseover_background_color= +mouseover_foreground_color= +mouseover_bold= +mouseover_highlighted_background_color= +mouseover_highlighted_foreground_color= +mouseover_highlighted_bold= +current_sort_mouseover_background_color= +current_sort_mouseover_foreground_color= +current_sort_mouseover_bold= +mouseover_current_sort_highlighted_background_color= +mouseover_current_sort_highlighted_foreground_color= +mouseover_current_sort_highlighted_bold= +alternate_row_background_color= +alternate_row_foreground_color= +alternate_row_bold= +alternate_row_highlighted_background_color= +alternate_row_highlighted_foreground_color= +alternate_row_highlighted_bold= +current_sort_alternate_row_background_color= +current_sort_alternate_row_foreground_color= +current_sort_alternate_row_bold= +current_sort_alternate_row_highlighted_background_color= +current_sort_alternate_row_highlighted_foreground_color= +current_sort_alternate_row_highlighted_bold= diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/PatchMyPC.reg b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/PatchMyPC.reg new file mode 100644 index 0000000000000000000000000000000000000000..540426a58720853de06b83778d6f2e5d9ae03382 GIT binary patch literal 236 zcmXwzT?+wG7=)i| zPcj0=95~8lJV<%TG*x3!A`Y0Tr>e2|CazJY;we(dXGw>io&_8F3<+ttH$?7Gt;;}l z#YC;el)3ykXGUyI*>UpMC{G^gSo!WQ|I5o*=P4!qXSq9Vdn7i#*eleVimu*E)SasH GZ}tUsXC{aM literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/a2cmd.cmd b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/a2cmd.cmd new file mode 100644 index 00000000..bf44096b --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/a2cmd.cmd @@ -0,0 +1,167 @@ +:: +:: --- BEGIN INFO --- +:: +:: +:: Applicable Custom App: All 'Emsisoft xxx' app configurations in d7II default custom app configurations. +:: +:: Last Update: 2017-02-03 +:: +:: Created by Nick @ FoolishIT.com [Foolish IT LLC] as an example for the user-configurable d7II custom app's system. +:: +:: +:: - d7II Config Location: (applicable to most anything having to do with this batch file) +:: Open Config (under Main drop down menu) \ Custom Apps (tab) \ (search/find/highlight desired custom app in left column/box first) \ New/Edit App (sub-tab) +:: +:: - This batch file is referenced from custom app configuration items in d7II Config, and may make references to other data available from within +:: the custom app configuration or used by it such as noted here. +:: +:: - The 'Whitelist.txt' file created by this batch file will by referenced in the command line arguments passed to the custom app; the configuration +:: for this is located in custom apps config as mentioned above \ then the Execution (sub-tab) +:: +:: - This batch file is called into action when configured in the 'Import Config Before Execution' setting in a d7II custom app configuration, +:: which can be found on the 'Pre-Execution' tab of the custom app configuration mentioned above. +:: +:: NOTES: * When a .BAT/.CMD file such as this is found configured under this setting (as opposed to any other text or data file) it will be +:: copied to the custom app's final running directory (the same as any other files would be) but then executed as a batch script (after +:: the installer is executed if one is configured, but prior to execution of the main custom app itself. +:: +:: * Similarly, a .VBS file would be copied to the custom app directory and executed as a script as above. +:: +:: * Further, a .REG file would be imported to the registry if found configured for this setting. +:: +:: * This setting may reference multiple files separated by a comma with no spacing required; e.g. 'file1.bat,file2.txt,file3.reg' +:: +:: * All files (no paths) configured here must be located within your 'd7II\Config\CustomApps\3rd Party Configs' path (create the last +:: dirs if not exist.) They will likely work if located in the 'd7II\Config\CustomApps_d7II\3rd Party Configs' path, but with all +:: d7II default custom app configurations, this path with all content will be deleted and rewritten during updates to the default apps. +:: +:: +:: Batch File Objectives: +:: +:: 1. Obtain d7II path via registry; use this in creating a whitelist to be used by the custom app +:: (to include all custom apps in subdirs of d7II) +:: +:: 2. Obtain 3rd Party Tools path via registry; if this is not a subdir of the main d7II Path, then +:: add this to a whitelist to be used by the custom app (to include all custom apps in subdirs) +:: +:: 3. create a2cmd whitelist as a new file in the location/directory of the custom app (overwrite existing if any) +:: - batch file current directory should be same as the main executable of the custom app (Execution tab) +:: - add d7II path and include all custom apps within the d7II subdir structure) and other Foolish IT apps +:: to a new file (overwrite) in the current directory (of the custom app whitelist for a2cmd.) +:: +:: +:: --- BEGIN CODE --- +:: Disable local echo, clear screen, output a blank line. +:: +@echo off&cls&echo. +:: Set window title to visually identify what this console window is doing. +title [a2cmd] Performing Additional Custom App Tasks... +:: Change from the Current Working Directory (available to the %cd% variable) +:: to the Current Directory (available as %~dp0 below) where the file actually "lives" +:: and was the location where this batch file was copied to by d7II.exe prior to running it. +:: +:: - This should be the path of the main exe for this custom app as configured in d7II; +:: located in custom apps config as mentioned above \ then the Execution (sub-tab) +:: +:: - Syntax explanation: +:: +:: '~' removes wrapping quotes (never use in a variable if possible, instead wrap the variable as necessary!) +:: 'd' returns a drive letter and colon +:: 'p' returns a full directory path (without a prepended driveletter, and including a trailing backslash) +:: '0' refers to self (this batch file) as the subject of the above conditions +:: +pushd "%~dp0" +:: Set variables for registry value queries and app info +:: +set "RegKey=HKLM\Software\Foolish IT\d7II\Session\Paths" +set "RegNameEXE=AppEXE" +set "RegName3PT=3PTDir" +set "MainPath=%systemdrive%\EmsisoftCmd" +set "MainEXE=a2cmd.exe" +set "InstEXE32=EmsisoftCommandlineScanner32.exe" +set "InstEXE64=EmsisoftCommandlineScanner64.exe" +set "InstParms=/S" +:: Determine if 64bit paths should be used. Note that by using the syntax '%programfiles% (x86)' and not the single +:: '%programfiles(x86)%' then we avoid any errors with the variable not existing and throwing off the actual exist check. +:: +if "[%programfiles(x86)%]" NEQ "[]" if exist "%programfiles% (x86)" set Win64=True +:: +if defined Win64 ( + set "ProgramDir32=%programfiles(x86)%" + set "InstEXE=%InstEXE64%" +) else ( + set "ProgramDir32=%programfiles%" + set "InstEXE=%InstEXE32%" +) +:: Run installer/self-extractor +:: +if not exist "%MainPath%\%MainEXE%" if exist %InstEXE% start "" /wait "%InstEXE%" %InstParms% +:: Exit if install path does not exist... +:: +if not exist "%MainPath%" ( + goto :eof +) else ( + pushd "%MainPath%" +) +:: Add exclusions for other Foolish IT product paths (unrelated to d7II) that may be on a system; +:: While we could first test for dir exist, the dumb addition of a few extra exclusions to the +:: whitelist without checking for their existence will make much of a difference to any custom app... +:: +:: - NOTE: observe the first code line using a single ">" chr prior to the whitelist filename, +:: this creates new or overwrites an existing file; all subsequent usage for the same +:: filename must include the syntax of double ">>" chrs, which creates new or appends +:: to an existing file. +:: +echo %ProgramDir32%\dSupportSuite\>a2cmd_Whitelist.txt +echo %ProgramDir32%\CryptoPrevent\>>a2cmd_Whitelist.txt +echo %ProgramDir32%\Foolish IT\CryptoPrevent\>>a2cmd_Whitelist.txt +:: Extract the full path to d7II.exe for the "d7IIPath" variable; obtain d7II path for the currently active +:: d7II 'session' via a registry query to the registry's copy of d7II's current session configuration. +:: +:: - NOTE: The ' 2^>nul' syntax below redirects errors from the 'reg query' command to 'nul' in order to +:: keep garbage/error messages from defining this variable on an unexpected error... +:: +:: Also, similar to the '%~dp0' syntax used with pushd at the beginning of the batch file, the +:: variable syntax '~dp' is used with the variable '%%_' to ensure output as a drive\path without +:: without a filename and without wrapping quotes (a trailing backslash is included in the output +:: and for these purposes it is also expected syntax for the custom app whitelist. +:: +for /f "usebackq tokens=2*" %%a in (`reg query "%RegKey%" /v "%RegNameEXE%" 2^>nul`) do set "d7IIPath=%%~dpb" +:: +:: Check for a result; if variable is defined above then add this path to the whitelist. +:: +if defined d7IIPath echo %d7IIpath%>>a2cmd_Whitelist.txt +:: Next get the path to d7II custom apps / 3rd party tools via reg query, to provide redundancy if this path +:: for any reason is not located within a subdir of d7II.exe itself. First set the new registry value name. +:: +for /f "usebackq tokens=2*" %%a in (`reg query "%RegKey%" /v "%RegName3PT%" 2^>nul`) do set "ToolsPath=%%~b" +:: +:: Check for a result; if variable is defined above then add this path to the whitelist, otherwise the rest +:: of this script is useless, so exit. +:: +if not defined ToolsPath goto :eof +echo %ToolsPath%\>>a2cmd_Whitelist.txt +:: If no parameters were passed to this batch file, it is being run as part of the "Copy Config" custom app +:: setting (it will be run a second time with parameters for the execution of the custom app itself, which is +:: configured to run this batch file again instead of %MainEXE% as the actual configured exe for this custom +:: app.) +:: +:: Test to find out if any parameters were passed to this batch file, and if none are found just update... +:: +if [%1] EQU [] goto :RunUpdate +:: If we make it this far then this batch file was launched with command line parameters intended for %MainEXE%, +:: so run the custom app passing all parameters as received and waiting for exit. +:: +echo Running scan... (in a separate window; please do NOT close this window!) +:: +start "" /wait "%MainEXE%" %* +goto :eof +:RunUpdate +:: +:: Since getting here means no parameters were passed, run %MainEXE% using parameters for it's own internal +:: definition/signature update, then exit. +:: +echo Starting update... (in a separate window; please do NOT close this window!) +:: +start "" /wait "%MainEXE%" /update +goto :eof \ No newline at end of file diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/cpuz.ini b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/cpuz.ini new file mode 100644 index 0000000000000000000000000000000000000000..e31404cd18862f8868b933b570578587c3a09d56 GIT binary patch literal 504 zcmZ{hT}uK%6o#K`p`W6-($|d_I-9VNwlr;s;f2+Ll9}WN){n2=nc2q5Vi}fm&ii#{ zKHhII_J>rUzEfoWvSm{4v#-n=OKc|)jZ+@Cc z!#Vus8|f@{o~6*Pzth_5T-vu{FaL4dpYQwi{EnI5#rfx|chyi1+q&21g^h3>jyU#N zQ-R2`a|l#T^fkX_!lK?fF&g dT5;1@jrCeaRd^xCC~+Evc=yUtsdk%%grB#oN(cY| literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/pagedfrg.reg b/.bin/d7ii/Config/CustomApps_d7II/3rd Party Configs/pagedfrg.reg new file mode 100644 index 0000000000000000000000000000000000000000..de812262c28e168b707a45fdbaf70ec792a02046 GIT binary patch literal 256 zcmX|*-3o$G5QM+$pmz`-AnKx%a#2C*z>XXfneeBMV2 z90?^2H68&exwx7q6|I=1)Iz8f_Bcqdq!z+Xc+7yIs!z}Q%!;*kPF$H2$}bSwuon*5 zX%2|=mSpm5h~<_V)0(Rj+g)%{?qVXgnsRXqbta`l7rW)l?WJEaGj6JshixbLOqIH^ P%n1`q*roi{=%4lry7w!7 literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg index 8c65a911..570ca229 100644 --- a/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg +++ b/.bin/d7ii/Config/CustomApps_d7II/Emsisoft a2cmd Deep Scan.cfg @@ -39,4 +39,4 @@ AutoFlag=1 App=Emsisoft_a2cmd\a2cmd.cmd CopyConfigFirst=a2cmd.cmd WaitOnProcesses=a2cmd.exe -LastDownload=8/31/2018 +LastDownload=10/7/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/ExecutedProgramsList.cfg b/.bin/d7ii/Config/CustomApps_d7II/ExecutedProgramsList.cfg new file mode 100644 index 00000000..ceecc1fc --- /dev/null +++ b/.bin/d7ii/Config/CustomApps_d7II/ExecutedProgramsList.cfg @@ -0,0 +1,37 @@ +[Config] +LastEditDate=3/29/2016 4:09:19 PM +PostRunApp= +UseFTPServer=0 +AppURL=http://www.nirsoft.net/utils/executedprogramslist.zip +AppDLName=ExecutedProgramsList.zip +AlwaysAttemptDownload=1 +DLafterXdays=30 +AppWait=1 +EmailBeforeExecution=0 +PriorAlert=0 +ServiceWait=0 +AppMsgBox=0 +AppRandomize=0 +SaveConfigAfter=0 +MoveSnatchReports=0 +SnatchReportsToMalwareLogs=1 +RunInCMD=0 +SendEnter=0 +RunWithSystemAccess=0 +IsDLInstaller=0 +32=1 +64=1 +XP=1 +Vista=1 +7=1 +8=1 +Servers=1 +NonDirectURLs=0 +Author=Foolish IT +AppWebsite=http://www.nirsoft.net/utils/executed_programs_list.html +AppDLPage=http://www.nirsoft.net/utils/executed_programs_list.html +AutoFlag=0 +App=ExecutedProgramsList\ExecutedProgramsList.exe +AppDesc=List out recently executed programs. +LogVerbiage=Checked recently executed programs. +LastDownload=3/29/2016 diff --git a/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg b/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg index 7e8feef6..9a9655ed 100644 --- a/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg +++ b/.bin/d7ii/Config/CustomApps_d7II/HitmanPro.cfg @@ -42,4 +42,4 @@ Vista=1 Servers=1 NonDirectURLs=0 AutoFlag=1 -LastDownload=8/31/2018 +LastDownload=10/7/2018 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg b/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg index 1ffc505b..4b1a5000 100644 --- a/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg +++ b/.bin/d7ii/Config/CustomApps_d7II/Kaspersky TDSSKiller (Silent).cfg @@ -32,4 +32,4 @@ Vista=1 Servers=1 NonDirectURLs=0 AutoFlag=2 -LastDownload=8/31/2018 +LastDownload=10/7/2018 diff --git a/.bin/d7ii/Config/Links.txt b/.bin/d7ii/Config/Links.txt index 3869db96..753bc8d2 100644 --- a/.bin/d7ii/Config/Links.txt +++ b/.bin/d7ii/Config/Links.txt @@ -1,3 +1,4 @@ +SysInternals Live,http://live.sysinternals.com/ Windows Services Reg Files (BleepingComputer.com),http://download.bleepingcomputer.com/win-services/ Process Library (Search for information on a Process),http://www.processlibrary.com/en/ DLL-files.com (Download Missing dll files),http://www.dll-files.com/ diff --git a/.bin/d7ii/Config/Reg.Settings.dat b/.bin/d7ii/Config/Reg.Settings.dat index 13f8c77e17e38e39beb78cedd5a968d73cb4b731..c99d5622b9876935a2497233a6fb4e15a3b4ba93 100644 GIT binary patch delta 41 wcmdnZxR-H)gSl2MMHy|KTqwqaI?*~Hj50Pb1~YybcN delta 39 ucmdnXxSMf;gRCrrQkb^6iKUj8iK1O_x|^d-xQCgJReVW~p;E}i_&5O06biop diff --git a/.bin/d7ii/Config/RegLinks.txt b/.bin/d7ii/Config/RegLinks.txt index fcc8aafa..8b322558 100644 --- a/.bin/d7ii/Config/RegLinks.txt +++ b/.bin/d7ii/Config/RegLinks.txt @@ -1 +1,2 @@ +WinNT Current Version,HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion Open Optical Drive Filters,HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318} diff --git a/.bin/d7ii/Config/SiteSearch.txt b/.bin/d7ii/Config/SiteSearch.txt index 402e5315..93b8b2a0 100644 --- a/.bin/d7ii/Config/SiteSearch.txt +++ b/.bin/d7ii/Config/SiteSearch.txt @@ -1,3 +1,4 @@ +google.com foolishit.com foolishtech.com technibble.com diff --git a/.bin/d7ii/Modules/Defs/dUninstaller.txt b/.bin/d7ii/Modules/Defs/dUninstaller.txt index 8b137891..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller.txt @@ -1 +0,0 @@ - diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt b/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt index ffa379f9..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller_FileSystemObjects.txt @@ -1,2 +0,0 @@ - -%userprofile%\foo.txt diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt b/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt index 7c8f50d9..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller_RegKeys.txt @@ -1 +0,0 @@ -Software\Test Key diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt b/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt index c006bcc9..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller_RegValues.txt @@ -1,2 +0,0 @@ -Software\Test\Test Value -Software\test diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt b/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt index 3586f6b9..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller_RunValues.txt @@ -1,2 +0,0 @@ -Test Value -test diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt b/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt index 8b137891..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller_StartMenuFolders.txt @@ -1 +0,0 @@ - diff --git a/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt b/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt index 9c558e35..e69de29b 100644 --- a/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt +++ b/.bin/d7ii/Modules/Defs/dUninstaller_Whitelist.txt @@ -1 +0,0 @@ -. From b4acdad3f0065df471666297deca14f3c6b90dc5 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 9 Oct 2018 00:24:35 -0600 Subject: [PATCH 289/293] Adjusted tool download frequency --- .bin/d7ii/Config/AppOverrides.ini | 4 ++-- .bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg | 4 ++-- .bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg | 4 ++-- .bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg | 4 ++-- .bin/d7ii/Config/CustomApps/RKill (Auto).cfg | 4 ++-- .bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.bin/d7ii/Config/AppOverrides.ini b/.bin/d7ii/Config/AppOverrides.ini index 9c73b9b3..2d55f1f7 100644 --- a/.bin/d7ii/Config/AppOverrides.ini +++ b/.bin/d7ii/Config/AppOverrides.ini @@ -36,7 +36,7 @@ EmailBeforeExecution=0 PriorAlert=0 [] PostRunApp= -AlwaysAttemptDownload=0 -DLafterXdays=0 +AlwaysAttemptDownload=1 +DLafterXdays=.5 EmailBeforeExecution=0 PriorAlert=0 diff --git a/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg b/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg index 91ece4b2..c4fcef59 100644 --- a/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg +++ b/.bin/d7ii/Config/CustomApps/AdwCleaner (Updated).cfg @@ -1,5 +1,5 @@ [Config] -LastEditDate=8/13/2018 5:54:29 PM +LastEditDate=10/8/2018 10:56:15 PM PostRunApp= AppWebsite=https://www.malwarebytes.com/adwcleaner/ AppDLPage=https://downloads.malwarebytes.com/file/adwcleaner @@ -8,7 +8,7 @@ App=AdwCleaner.exe UseFTPServer=0 AppURL=https://downloads.malwarebytes.com/file/adwcleaner AppDLName=AdwCleaner.exe -AlwaysAttemptDownload=0 +AlwaysAttemptDownload=1 DLafterXdays=.5 AppWait=1 EmailBeforeExecution=0 diff --git a/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg b/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg index decb9549..b2ec938d 100644 --- a/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg +++ b/.bin/d7ii/Config/CustomApps/HitmanPro (Auto).cfg @@ -1,6 +1,6 @@ [Config] Author=2Shirt -LastEditDate=8/19/2018 3:48:33 PM +LastEditDate=10/8/2018 10:56:18 PM PostRunApp= AppWebsite=http://www.surfright.nl/en/hitmanpro/ AppDLPage=http://www.surfright.nl/en/downloads/ @@ -16,7 +16,7 @@ AppURL=https://dl.surfright.nl/HitmanPro.exe AppURLB=http://dl.surfright.nl/FoolishIT/HitmanPro.exe AppDLName=HitmanPro.exe AlwaysAttemptDownload=1 -DLafterXdays=3 +DLafterXdays=.5 AppWait=1 EmailBeforeExecution=0 PriorAlert=0 diff --git a/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg b/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg index 75eed91d..c321701a 100644 --- a/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg +++ b/.bin/d7ii/Config/CustomApps/Malwarebytes Download.cfg @@ -1,5 +1,5 @@ [Config] -LastEditDate=8/18/2018 6:36:00 PM +LastEditDate=10/8/2018 10:55:27 PM PostRunApp= AppWebsite=https://www.malwarebytes.com/ AppDLPage=https://downloads.malwarebytes.com/file/mb3/ @@ -8,7 +8,7 @@ UseFTPServer=0 AppURL=https://downloads.malwarebytes.com/file/mb3/ AppDLName=mbam-setup.exe AlwaysAttemptDownload=1 -DLafterXdays=0 +DLafterXdays=3 AppWait=1 EmailBeforeExecution=0 PriorAlert=0 diff --git a/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg b/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg index ead5cbe7..3cbf5939 100644 --- a/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg +++ b/.bin/d7ii/Config/CustomApps/RKill (Auto).cfg @@ -1,6 +1,6 @@ [Config] Author=2Shirt -LastEditDate=8/19/2018 3:31:04 PM +LastEditDate=10/8/2018 10:56:23 PM PostRunApp= AppWebsite=http://www.bleepingcomputer.com/forums/t/308364/rkill-what-it-does-and-what-it-doesnt-a-brief-introduction-to-the-program/ AppDLPage=http://www.bleepingcomputer.com/download/rkill/ @@ -11,7 +11,7 @@ UseFTPServer=0 AppURL=https://download.bleepingcomputer.com/grinler/rkill.exe AppDLName=rkill.exe AlwaysAttemptDownload=1 -DLafterXdays=0 +DLafterXdays=.5 AppWait=1 EmailBeforeExecution=0 PriorAlert=0 diff --git a/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg b/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg index 79267d14..41d9c8d2 100644 --- a/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg +++ b/.bin/d7ii/Config/CustomApps_d7II/Neutron (Sync Time).cfg @@ -32,4 +32,4 @@ AppDLPage=http://keir.net/neutron.html AppDesc=Sync time with an internet time server NonDirectURLs=0 AutoFlag=1 -LastDownload=10/27/2017 +LastDownload=10/8/2018 From 09994a7c73329a8be23427b33d2dac15c9517474 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Tue, 9 Oct 2018 00:25:23 -0600 Subject: [PATCH 290/293] Adjusted main d7II settings * Added 1201 logo * Disabled news bar --- .bin/d7ii/Config/1201Logo.bmp | Bin 0 -> 2038 bytes .bin/d7ii/Config/d7II.ini | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 .bin/d7ii/Config/1201Logo.bmp diff --git a/.bin/d7ii/Config/1201Logo.bmp b/.bin/d7ii/Config/1201Logo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..99c948f76acdc30d3f9807aaef961c98f88cdfe6 GIT binary patch literal 2038 zcmb`HPe@cj9LK-vrZ3yVLm(bPp-W!MQ+bG7LI@$LYf&`m;elzpt&90BS^n>@_yx-^dZ+`RV{AjrYT5i+( z1U+Z%(}I-N^XvFY^F)eNo5buRiIEYB5B61Q$jY-~t$cT3FAOI*Do@$I|B z;2DY6ZzQr=3Arbs{wnydy!Lgj=X%~x=*O=;$?&97i=KtYO9iGZ>2Vh#=G6?5;Nshm zKMRq80_nJ2(*LopTdzwtkfDVu*z`J?9Kr?9j~Ib*&R;aCnoR_TOnqe>YG(Yu#6`1zc7OHE%Ul5S90%GjMI1D| zFTEeKra-eM|4P`B%)5da=0&t6^8w0Bys8_KV3MT{5-;OZ0wk5Bc@f{nt7N{5Q_Lkc zlldM6*1Xr_)A4vKfgkl&+Ho(wpgBik<8S-z7v55rO?_OZ6X6xh6QlaJaLHjMyk_j6 zmwCxwet`~Wyo7P)H5_m%@{fNmBhOqF^iDQ5!ktW|1g$&sHE&J=q%=|q>CiAA&^tZy zr=Uivyzb1UHvs`E%E%5+g?WiLnib-cc9>&J=Bf}EK-_kt5^^P)uf#h*1W`A3aX8|; zaRSjA+GIKHr2Q+QTNTmXXSz{`PO79=t`CE4@XKx(K_kd??uEy5&cD@U{4=h(*?#|t!<5CS_&s@YQUus@QsHZpY zWL!NFR}?Y0F~b(qr^6_ltB=%QK-c!mp1EHI8jP|bi}P3N8tJXPGq91Xa~XqEKOOe{ bm8y-s7#?0;&&Rltd-`bT<&RVi-+%Kz6jAbg literal 0 HcmV?d00001 diff --git a/.bin/d7ii/Config/d7II.ini b/.bin/d7ii/Config/d7II.ini index cce77946..c042bfed 100644 --- a/.bin/d7ii/Config/d7II.ini +++ b/.bin/d7ii/Config/d7II.ini @@ -1,6 +1,6 @@ [Reg] EULA_Accepted=1 -RegTitle=(503) 523-1012 www.1201.com d7II +RegTitle=(503) 523-1012 www.1201.com d7II DisplayD7ver=1 First_v4_Server_Contact=2/25/2015 1:12:37 AM [3PTUpdateInfo] @@ -22,13 +22,13 @@ TickerURL=https://www.foolishit.com/d7x/update/ [d7II] LastConfigConversionVer=3.6.87 [Config] -Displayd7IINews=1 +Displayd7IINews=0 DisplayPathInTitleBar=0 OneNoteColorTabs=1 HighlightTabs=1 LongRectangleLogo=0 AutoSizeLogo=0 -MainLogoName=CompanyLogo.bmp +MainLogoName=1201Logo.bmp ReportLogoName=CompanyReportLogo.bmp AppIconName=Company.ico dCloudLogoName=d7II_SFX_Mini.bmp From 1cb7de08f3b3c0d10ab240b59a89cdc0f7f3c1fd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 10 Oct 2018 15:47:48 -0600 Subject: [PATCH 291/293] Add small delay to network startup * Will hopefully allow test-stations to update the hostname more reliably --- .linux_items/include/airootfs/etc/skel/.update_network | 1 + 1 file changed, 1 insertion(+) diff --git a/.linux_items/include/airootfs/etc/skel/.update_network b/.linux_items/include/airootfs/etc/skel/.update_network index 97b5783b..e7119a37 100755 --- a/.linux_items/include/airootfs/etc/skel/.update_network +++ b/.linux_items/include/airootfs/etc/skel/.update_network @@ -5,6 +5,7 @@ # Connect connect-to-network +sleep 2s IP="$(ip a show scope global \ | grep inet \ From bf354edeae8513cda96d31eb488ce454d35134c0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 10 Oct 2018 15:48:18 -0600 Subject: [PATCH 292/293] Fix hw-sensor bug caused by upstream code --- .bin/Scripts/hw-sensors | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/hw-sensors b/.bin/Scripts/hw-sensors index 2a1a46e0..f251c589 100755 --- a/.bin/Scripts/hw-sensors +++ b/.bin/Scripts/hw-sensors @@ -67,7 +67,11 @@ def get_feature_string(chip, feature): for sf in sfs: name = sf.name[skipname:].decode("utf-8").strip() - val = sensors.get_value(chip, sf.number) + try: + val = sensors.get_value(chip, sf.number) + except Exception: + # Ignore upstream sensor bugs and lie instead + val = -123456789 if 'alarm' in name: # Skip continue From 509620707c8b18d66138b380fc4459024cdb4685 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 10 Oct 2018 16:54:12 -0600 Subject: [PATCH 293/293] Partially reverting commit d31991a6 --- .linux_items/include/airootfs/etc/modprobe.d/broadcom.conf | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .linux_items/include/airootfs/etc/modprobe.d/broadcom.conf diff --git a/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf b/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf deleted file mode 100644 index 1c85cd7b..00000000 --- a/.linux_items/include/airootfs/etc/modprobe.d/broadcom.conf +++ /dev/null @@ -1 +0,0 @@ -softdep tg3 pre: broadcom