Wednesday, June 3, 2009

Digg Inside *.dmg File

That being said - .dmg files are just compressed files, and you CAN access them - although it probably won't be of much use since you still won't be able to run the binaries enclosed within. Go to this web site, and download dmg2img source code. Now, you will need the build-essential package in order to compile from source code, so open up a terminal and type:

Code:
sudo apt-get install build-essential

Now, you need to compile dmg2img. In the terminal, use 'cd' to get to wherever the source code archive downloaded to, then:

Code:
tar -zxvf ./dmg2img.tar.gz
cd dmg2img
make all

Once that's done, use the following commands to convert, then mount, the .dmg file:

Code:
./dmg2img -i /path/to/dmg_file_to_convert.dmg -o /path/to/img_file_to_output.img
sudo modrobe hfsplus
sudo mount -t hfsplus -o loop /path/to/img_file.img /mount_point

Now you need to change to the mounted directory, and you'll be able to see the files contained in the .dmg file:

Code:
cd /mount_point
ls

Hope that helps! At least you'll be able to see what's inside the .dmg file.

If you can find Mac software which is open source, you me able to compile a version so that it runs on Linux.

No comments:

Post a Comment

list open ports and unix sockets

To do this I use netstat command to list all open ports: $ sudo netstat -tuplen to list open ports and unix sockets: $ sudo netstat -...