diff options
author | Jean-Marc Lenoir | 2018-09-29 16:07:25 +0200 |
---|---|---|
committer | Jean-Marc Lenoir | 2018-09-29 16:07:25 +0200 |
commit | 0f8d12fc84a7df8ef706c729e020f25ab50c1186 (patch) | |
tree | 6b424cd3aca30f9f08676621c8f5a0ea6bc2fa6b /unlocker.py | |
parent | 52899c0a95af05f8112b323608b19647064f599a (diff) | |
download | aur-0f8d12fc84a7df8ef706c729e020f25ab50c1186.tar.gz |
Update to 15.0.0
Diffstat (limited to 'unlocker.py')
-rw-r--r-- | unlocker.py | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/unlocker.py b/unlocker.py index 94d29e0964d3..2787e65d689e 100644 --- a/unlocker.py +++ b/unlocker.py @@ -44,9 +44,7 @@ Offset Length Struct Type Description from __future__ import print_function import codecs import os -import six import struct -import subprocess import sys if sys.version_info < (2, 7): @@ -56,6 +54,7 @@ if sys.version_info < (2, 7): # Setup imports depending on whether IronPython or CPython if sys.platform == 'win32' \ or sys.platform == 'cli': + # noinspection PyUnresolvedReferences from _winreg import * @@ -231,7 +230,7 @@ def patchsmc(name, sharedobj): # Read file into string variable vmx = f.read() - print('File: ' + name) + print('File: ' + name + '\n') # Setup hex string for vSMC headers # These are the private and public key counts @@ -349,6 +348,7 @@ def patchvmkctl(name): print('smcPresent Patched: ' + name) +# noinspection PyUnresolvedReferences def main(): # Work around absent Platform module on VMkernel if os.name == 'nt' or os.name == 'cli': @@ -356,19 +356,11 @@ def main(): else: osname = os.uname()[0].lower() - vmwarebase = '' - libvmkctl32 = '' - libvmkctl64 = '' + # vmwarebase = '' vmx_so = False # Setup default paths - if osname == 'darwin': - vmx_path = '/Applications/VMware Fusion.app/Contents/Library/' - vmx = joinpath(vmx_path, 'vmware-vmx') - vmx_debug = joinpath(vmx_path, 'vmware-vmx-debug') - vmx_stats = joinpath(vmx_path, 'vmware-vmx-stats') - - elif osname == 'linux': + if osname == 'linux': vmx_path = '/usr/lib/vmware/bin/' vmx = joinpath(vmx_path, 'vmware-vmx') vmx_debug = joinpath(vmx_path, 'vmware-vmx-debug') @@ -379,15 +371,6 @@ def main(): else: vmwarebase = '/usr/lib/vmware/lib/libvmwarebase.so.0/libvmwarebase.so.0' - elif osname == 'vmkernel': - vmx_path = os.path.dirname(os.path.abspath(__file__)) - vmx = joinpath(vmx_path, '/unlocker/bin/vmx') - vmx_debug = joinpath(vmx_path, '/unlocker/bin/vmx-debug') - vmx_stats = joinpath(vmx_path, '/unlocker/bin/vmx-stats') - vmx_so = True - libvmkctl32 = joinpath(vmx_path, '/unlocker/lib/libvmkctl.so') - libvmkctl64 = joinpath(vmx_path, '/unlocker/lib64/libvmkctl.so') - elif osname == 'windows': reg = ConnectRegistry(None, HKEY_LOCAL_MACHINE) key = OpenKey(reg, r'SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation') @@ -409,20 +392,7 @@ def main(): patchsmc(vmx_stats, vmx_so) # Patch vmwarebase for Workstation and Player - # Not required on Fusion or ESXi as table already has correct flags - if vmwarebase != '': - patchbase(vmwarebase) - else: - pass - - # Patch libvmkctl to return Apple SMC present - if osname == 'vmkernel': - # Patch ESXi 6.0 and 6.5 32 bit .so - patchvmkctl(libvmkctl32) - - # Patch ESXi 6.5 64 bit .so - if os.path.isfile(libvmkctl64): - patchvmkctl(libvmkctl64) + patchbase(vmwarebase) if __name__ == '__main__': |