Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #24. ISO path in vmtools has changed. #25

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dumpsmc.exe
Binary file not shown.
Binary file modified gettools.exe
Binary file not shown.
21 changes: 14 additions & 7 deletions gettools.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ def main():
try:
os.mkdir(dest + '/tools')
except :
pass
pass

parser = CDSParser()

# Last published version doesn't ship with darwin tools
# so in case of error get it from the core.vmware.fusion.tar
print('Trying to get tools from the packages folder...')

# Setup url and file paths
url = 'http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/'
# Setup secure url and file paths
url = 'https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/'

# Get the list of Fusion releases
# And get the last item in the ul/li tags
Expand Down Expand Up @@ -219,13 +219,20 @@ def main():

print('Extracting files from com.vmware.fusion.zip...')
cdszip = zipfile.ZipFile(convertpath(dest + '/tools/com.vmware.fusion.zip'), 'r')
cdszip.extract('payload/VMware Fusion.app/Contents/Library/isoimages/darwin.iso', path=convertpath(dest + '/tools/'))
cdszip.extract('payload/VMware Fusion.app/Contents/Library/isoimages/darwinPre15.iso', path=convertpath(dest + '/tools/'))

isoPath = ''
if 'payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/' in cdszip.namelist():
isoPath = 'payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/'
else:
isoPath = 'payload/VMware Fusion.app/Contents/Library/isoimages/'

cdszip.extract(isoPath + 'darwin.iso', path=convertpath(dest + '/tools/'))
cdszip.extract(isoPath + 'darwinPre15.iso', path=convertpath(dest + '/tools/'))
cdszip.close()

# Move the iso and sig files to tools folder
shutil.move(convertpath(dest + '/tools/payload/VMware Fusion.app/Contents/Library/isoimages/darwin.iso'), convertpath(dest + '/tools/darwin.iso'))
shutil.move(convertpath(dest + '/tools/payload/VMware Fusion.app/Contents/Library/isoimages/darwinPre15.iso'), convertpath(dest + '/tools/darwinPre15.iso'))
shutil.move(convertpath(dest + '/tools/' + isoPath + 'darwin.iso'), convertpath(dest + '/tools/darwin.iso'))
shutil.move(convertpath(dest + '/tools/' + isoPath + 'darwinPre15.iso'), convertpath(dest + '/tools/darwinPre15.iso'))

# Cleanup working files and folders
shutil.rmtree(convertpath(dest + '/tools/payload'), True)
Expand Down
Binary file modified unlocker.exe
Binary file not shown.