diff --git a/.bin/Scripts/system_checklist.py b/.bin/Scripts/system_checklist.py index 72bb82bf..a76433ee 100644 --- a/.bin/Scripts/system_checklist.py +++ b/.bin/Scripts/system_checklist.py @@ -14,7 +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}\System Checklist.log'.format(**global_vars) +set_log_file('System Checklist.log') if __name__ == '__main__': try: @@ -49,10 +49,13 @@ 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='{}...'.format(KIT_NAME_FULL), + function=delete_empty_folders, cs='Done', + folder_path=global_vars['ClientDir']) # Export system info print_info('Backup System Information') @@ -107,6 +110,11 @@ if __name__ == '__main__': sleep(3) try_and_print(message='Running XMPlay...', function=run_xmplay, cs='Started', other_results=other_results) + try: + check_secure_boot_status(show_alert=True) + except: + # Only trying to open alert message boxes + pass # Done print_standard('\nDone.') @@ -116,3 +124,5 @@ if __name__ == '__main__': pass except: major_exception() + +# vim: sts=4 sw=4 ts=4 diff --git a/.bin/Scripts/system_diagnostics.py b/.bin/Scripts/system_diagnostics.py index 9a6e1c0b..bbeb2d11 100644 --- a/.bin/Scripts/system_diagnostics.py +++ b/.bin/Scripts/system_diagnostics.py @@ -13,8 +13,54 @@ 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) +set_log_file('System Diagnostics.log') + +# 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', + 'firefox.cache', + 'firefox.session_restore', + 'google_chrome.cache', + 'google_chrome.session', + 'google_earth.temporary_files', + 'internet_explorer.temporary_files', + 'opera.cache', + 'opera.current_session', + 'safari.cache', + 'seamonkey.cache', + ), + 'System': ( + 'system.clipboard', + 'system.tmp', + 'winapp2_windows.jump_lists', + 'winapp2_windows.ms_search', + 'windows_explorer.run', + 'windows_explorer.search_history', + 'windows_explorer.thumbnails', + ), +} if __name__ == '__main__': try: @@ -34,19 +80,17 @@ if __name__ == '__main__': if ENABLED_TICKET_NUMBERS: print_info('Starting System Diagnostics for Ticket #{}\n'.format( ticket_number)) - + # 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) - + # Re-run if earlier process was stopped. stay_awake() - + # Start diags print_info('Starting Background Scans') check_connection() @@ -54,7 +98,7 @@ 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') try_and_print( @@ -64,17 +108,23 @@ if __name__ == '__main__': function=run_sfc_scan, other_results=other_results) 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() - + + # 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=True) + # 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) backup_browsers() try_and_print(message='File listing...', function=backup_file_list, cs='Done', other_results=other_results) @@ -84,7 +134,7 @@ if __name__ == '__main__': function=run_produkey, cs='Done', other_results=other_results) try_and_print(message='Registry...', function=backup_registry, cs='Done', other_results=other_results) - + # Summary print_info('Summary') try_and_print(message='Operating System:', @@ -104,14 +154,14 @@ 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 print_info('User Data') try: show_user_data_summary() except Exception: print_error(' Unknown error.') - + # Done print_standard('\nDone.') pause('Press Enter to exit...') @@ -120,3 +170,5 @@ if __name__ == '__main__': pass except: major_exception() + +# vim: sts=4 sw=4 ts=4 diff --git a/.bin/Scripts/user_checklist.py b/.bin/Scripts/user_checklist.py index 72697af7..fd348dec 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}\User Checklist ({USERNAME}).log'.format( - **global_vars, **global_vars['Env']) +set_log_file('User Checklist ({USERNAME}).log'.format(**global_vars['Env'])) if __name__ == '__main__': try: @@ -31,29 +30,29 @@ if __name__ == '__main__': if global_vars['OS']['Version'] == '10': answer_config_classicshell = ask('Configure ClassicShell?') answer_config_explorer_user = ask('Configure Explorer?') - + # 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() - + # Backup 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: @@ -75,7 +74,7 @@ if __name__ == '__main__': # Run speedtest popen_program(['start', '', 'https://fast.com'], shell=True) - + # Done print_standard('\nDone.') pause('Press Enter to exit...') @@ -84,3 +83,5 @@ if __name__ == '__main__': pass except: major_exception() + +# vim: sts=4 sw=4 ts=4