mirror of
https://github.com/paolo-projects/unlocker.git
synced 2025-07-28 16:34:29 +02:00
Cleanup and test scripts
This commit is contained in:
parent
b9bbe599e2
commit
d42473f2c4
27
dumpsmc.py
27
dumpsmc.py
@ -43,6 +43,9 @@ Offset Length struct Type Description
|
|||||||
import struct
|
import struct
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (2, 7):
|
||||||
|
sys.stderr.write('You need Python 2.7 or later\n')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def bytetohex(bytestr):
|
def bytetohex(bytestr):
|
||||||
return ''.join(['%02X ' % ord(x) for x in bytestr]).strip()
|
return ''.join(['%02X ' % ord(x) for x in bytestr]).strip()
|
||||||
@ -114,31 +117,31 @@ def dumpsmc(name):
|
|||||||
smc_adr = vmx.find(adr_key)
|
smc_adr = vmx.find(adr_key)
|
||||||
|
|
||||||
# Print vSMC0 tables and keys
|
# Print vSMC0 tables and keys
|
||||||
print 'applesmctablev0 (smc.version = "0")'
|
print 'appleSMCTableV0 (smc.version = "0")'
|
||||||
print 'applesmctablev0 Address : ' + hex(smc_header_v0_offset)
|
print 'appleSMCTableV0 Address : ' + hex(smc_header_v0_offset)
|
||||||
print 'applesmctablev0 Private Key #: 0xF2/242'
|
print 'appleSMCTableV0 Private Key #: 0xF2/242'
|
||||||
print 'applesmctablev0 Public Key #: 0xF0/240'
|
print 'appleSMCTableV0 Public Key #: 0xF0/240'
|
||||||
|
|
||||||
if (smc_adr - smc_key0) != 72:
|
if (smc_adr - smc_key0) != 72:
|
||||||
print 'applesmctablev0 Table : ' + hex(smc_key0)
|
print 'appleSMCTableV0 Table : ' + hex(smc_key0)
|
||||||
dumpkeys(f, smc_key0)
|
dumpkeys(f, smc_key0)
|
||||||
elif (smc_adr - smc_key1) != 72:
|
elif (smc_adr - smc_key1) != 72:
|
||||||
print 'applesmctablev0 Table : ' + hex(smc_key1)
|
print 'appleSMCTableV0 Table : ' + hex(smc_key1)
|
||||||
dumpkeys(f, smc_key1)
|
dumpkeys(f, smc_key1)
|
||||||
|
|
||||||
print
|
print
|
||||||
|
|
||||||
# Print vSMC1 tables and keys
|
# Print vSMC1 tables and keys
|
||||||
print 'applesmctablev1 (smc.version = "1")'
|
print 'appleSMCTableV1 (smc.version = "1")'
|
||||||
print 'applesmctablev1 Address : ' + hex(smc_header_v1_offset)
|
print 'appleSMCTableV1 Address : ' + hex(smc_header_v1_offset)
|
||||||
print 'applesmctablev1 Private Key #: 0x01B4/436'
|
print 'appleSMCTableV1 Private Key #: 0x01B4/436'
|
||||||
print 'applesmctablev1 Public Key #: 0x01B0/432'
|
print 'appleSMCTableV1 Public Key #: 0x01B0/432'
|
||||||
|
|
||||||
if (smc_adr - smc_key0) == 72:
|
if (smc_adr - smc_key0) == 72:
|
||||||
print 'applesmctablev1 Table : ' + hex(smc_key0)
|
print 'appleSMCTableV1 Table : ' + hex(smc_key0)
|
||||||
dumpkeys(f, smc_key0)
|
dumpkeys(f, smc_key0)
|
||||||
elif (smc_adr - smc_key1) == 72:
|
elif (smc_adr - smc_key1) == 72:
|
||||||
print 'applesmctablev1 Table : ' + hex(smc_key1)
|
print 'appleSMCTableV1 Table : ' + hex(smc_key1)
|
||||||
dumpkeys(f, smc_key1)
|
dumpkeys(f, smc_key1)
|
||||||
|
|
||||||
# Tidy up
|
# Tidy up
|
||||||
|
@ -34,7 +34,7 @@ xcopy /F /Y "%InstallPath%x64\vmware-vmx-stats.exe" .\backup\x64
|
|||||||
xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\
|
xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\
|
||||||
|
|
||||||
echo Patching...
|
echo Patching...
|
||||||
vmxsmc.exe
|
unlocker.exe
|
||||||
|
|
||||||
xcopy /F /Y .\tools\darwin.* "%InstallPath%"
|
xcopy /F /Y .\tools\darwin.* "%InstallPath%"
|
||||||
|
|
||||||
|
49
win-test-install.cmd
Normal file
49
win-test-install.cmd
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal ENABLEEXTENSIONS
|
||||||
|
echo VMware Unlocker 2.0.4
|
||||||
|
echo ========================
|
||||||
|
echo (c) Dave Parsons 2011-15
|
||||||
|
|
||||||
|
net session >NUL 2>&1
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo Administrator privileges required!
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
|
||||||
|
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation"
|
||||||
|
:: delims is a TAB followed by a space
|
||||||
|
for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B
|
||||||
|
echo VMware is installed at: %InstallPath%
|
||||||
|
|
||||||
|
echo Stopping VMware services...
|
||||||
|
net stop vmware-view-usbd > NUL 2>&1
|
||||||
|
net stop VMwareHostd > NUL 2>&1
|
||||||
|
net stop VMAuthdService > NUL 2>&1
|
||||||
|
net stop VMUSBArbService > NUL 2>&1
|
||||||
|
taskkill /F /IM vmware-tray.exe > NUL 2>&1
|
||||||
|
|
||||||
|
echo Backing up files...
|
||||||
|
rd /s /q .\backup > NUL 2>&1
|
||||||
|
mkdir .\backup
|
||||||
|
mkdir .\backup\x64
|
||||||
|
xcopy /F /Y "%InstallPath%x64\vmware-vmx.exe" .\backup\x64
|
||||||
|
xcopy /F /Y "%InstallPath%x64\vmware-vmx-debug.exe" .\backup\x64
|
||||||
|
xcopy /F /Y "%InstallPath%x64\vmware-vmx-stats.exe" .\backup\x64
|
||||||
|
xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\
|
||||||
|
|
||||||
|
echo Patching...
|
||||||
|
python unlocker.py
|
||||||
|
|
||||||
|
xcopy /F /Y .\tools\darwin.* "%InstallPath%"
|
||||||
|
|
||||||
|
echo Starting VMware services...
|
||||||
|
net start VMUSBArbService > NUL 2>&1
|
||||||
|
net start VMAuthdService > NUL 2>&1
|
||||||
|
net start VMwareHostd > NUL 2>&1
|
||||||
|
net start vmware-view-usbd > NUL 2>&1
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo Finished!
|
Loading…
x
Reference in New Issue
Block a user