Well, the subject says it all. I have an exe that is an SFX, and I want to extract the ZIP from the SFX. How can I do that?

link|improve this question
feedback

2 Answers

up vote 3 down vote accepted

7-Zip should be capable of doing this. You can right click the file and select "Open Archive" or navigate to the file within 7-Zip and right-click and select "Open Inside".

link|improve this answer
@Darcs: I can't open the archive because the zip is encrypted with password. I just want to extract the zip from the exe, without unzipping in the middle. – strDisplayName Sep 22 '11 at 9:40
Can't say if it will work for your file, but simply changing the extension from .exe to .zip seemed to work fine for me. It will still contain the executable parts of the file, but 7-Zip seems perfectly happy to ignore it. – Dracs Sep 22 '11 at 10:07
7-zip will open and recognize it, but I don't want the exe part in the file (purly zip file, that its header is PK, and not MZ like an exe). – strDisplayName Sep 22 '11 at 10:58
1  
I've managed to do this using a hex editor. The plain zip file and the edited SFX are identical. The process I did was to look for the zip file's header in the SFX. For 7-Zip this seems to be 37 7A BC, I did a search for the last occurrence of it. Then I deleted everything prior to it. This seems to give me an file identical to zipping my test file by itself. If you need a hex editor I used XVI32‌​. Let me know if it works for you or if you need anymore help. – Dracs Sep 22 '11 at 11:28
If it's a proper ZIP format archive, the correct way to locate the data is to locate the central directory header by its four byte magic number and read the central directory to find the first file header. – JdeBP Sep 22 '11 at 15:03
feedback

You can open an SFX file with WinZip if you want to access the files within. You don't need to execute the file.

It looks like a range of other compression utilities will also open SFX files.

link|improve this answer
I don't want to decompress the file (it is password protected), I just want to extract the zip from the exe. – strDisplayName Sep 22 '11 at 9:41
That will do it for you. Open in WinZip, and save archive as something.zip – Rory Alsop Sep 22 '11 at 9:49
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.