From 621de92822ff8e27db2517617f2e1b883b0404fd Mon Sep 17 00:00:00 2001 From: David Parsons Date: Mon, 9 Oct 2017 14:08:13 +0100 Subject: [PATCH] Fix vmwarebase patch offsets and Linux issues 2.0.9. --- test-unlocker.py | 2 +- unlocker.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test-unlocker.py b/test-unlocker.py index 940f77a..e0c4a72 100644 --- a/test-unlocker.py +++ b/test-unlocker.py @@ -40,7 +40,7 @@ def main(): dumpsmc.dumpsmc('./tests/esxi/esxi600/vmx') unlocker.patchsmc('./tests/esxi/esxi600/vmx', True) shutil.copyfile('./samples/esxi/esxi650/vmx', './tests/esxi/esxi650/vmx') - dumpsmc.dumpsmc('./tests/esxi/esxi600/vmx') + dumpsmc.dumpsmc('./tests/esxi/esxi650/vmx') unlocker.patchsmc('./tests/esxi/esxi650/vmx', True) shutil.copyfile('./samples/esxi/esxi600/libvmkctl.so', './tests/esxi/esxi600/libvmkctl.so') unlocker.patchvmkctl('./tests/esxi/esxi600/libvmkctl.so') diff --git a/unlocker.py b/unlocker.py index 6d508aa..e89fb9b 100755 --- a/unlocker.py +++ b/unlocker.py @@ -324,10 +324,10 @@ def patchbase(name): flag = ord(f.read(1)) flag = set_bit(flag, 0) flag = chr(flag) - f.seek(offset + 31) + f.seek(offset + 32) f.write(flag) print('GOS Patched flag @: ' + hex(offset)) - offset += 33 + offset += 40 # Tidy up f.flush() @@ -376,8 +376,7 @@ def main(): vmx = joinpath(vmx_path, 'vmware-vmx') vmx_debug = joinpath(vmx_path, 'vmware-vmx-debug') vmx_stats = joinpath(vmx_path, 'vmware-vmx-stats') - vmx_version = subprocess.check_output(["vmplayer", "-v"]) - if vmx_version.startswith('VMware Player 12'): + if os.path.isfile('/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so'): vmx_so = True vmwarebase = '/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so' else: