MemScope is distributed in a Winimage SFX.
When you open the file with 7-zip, it can see the floppy image file (1.44MB), but it can't extract it.
The following is run from Linux:
$ unzip -Z MemScope-110.exe
Archive: MemScope-110.exe
Zip file size: 150635 bytes, number of entries: 1
warning [../Downloads/MemScope-110.exe]: 90156 extra bytes at beginning or within zipfile
(attempting to process anyway)
-rw-a-- 1.0 fat 1474560 bx defX 06-Apr-14 09:31 MemScope-110.IMA
1 file, 1474560 bytes uncompressed, 60222 bytes compressed: 95.9%
$ unzip ../Downloads/MemScope-110.exe
Archive: ../Downloads/MemScope-110.exe
M2K MemScope 1.10
Compliments of Micro 2000 (M2K)
www.micro2000.com
(800) 864-8008 (818) 547-0125
warning [../Downloads/MemScope-110.exe]: 90156 extra bytes at beginning or within zipfile
(attempting to process anyway)
file #1: bad zipfile offset (lseek): 180224
$ dd if=MemScope-110.exe of=MemScope.img.zip bs=90156 skip=1
0+1 records gelezen
0+1 records geschreven
60479 bytes (60 kB) gekopieerd, 0,000519201 s, 116 MB/s
$ file MemScope_dd.img
MemScope_dd.img: Zip archive data, at least v1.0 to extract
$ unzip -Z MemScope.img.zip
Archive: MemScope.img.zip
Zip file size: 60479 bytes, number of entries: 1
-rw-a-- 1.0 fat 1474560 bx defX 06-Apr-14 09:31 MemScope-110.IMA
1 file, 1474560 bytes uncompressed, 60222 bytes compressed: 95.9%
$ unzip MemScope.img.zip
Archive: MemScope.img.zip
M2K MemScope 1.10
Compliments of Micro 2000 (M2K)
www.micro2000.com
(800) 864-8008 (818) 547-0125
file #1: bad zipfile offset (lseek): 90112
Fixing the zip file:
$ zip -FF MemScope.img.zip --out MemScope-fixed.img.zip
Fix archive (-FF) - salvage what can
Found end record (EOCDR) - says expect single disk archive
Found archive comment
Scanning for entries...
copying: MemScope-110.IMA (60222 bytes)
Central Directory found...
EOCDR found ( 1 60354)...
gert@gert-kot:~/Bureaublad$ unzip MemScope-fixed.img.zip
Archive: MemScope-fixed.img.zip
M2K MemScope 1.10
Compliments of Micro 2000 (M2K)
www.micro2000.com
(800) 864-8008 (818) 547-0125
inflating: MemScope-110.IMA
Changed bytes, between original and fixed zip file:
$ cmp -l MemScope_dd_fixed.img.zip MemScope_dd_fixed2.img.zip
60323 54 0
60324 140 0
60325 1 0
Filesizes of the original and fixed zip file:
$ ls -l MemScope*.img.zip
-rw------- 1 gert gert 60479 2010-08-14 20:03 MemScope-fixed.img.zip
-rw-r--r-- 1 gert gert 60479 2010-08-14 19:56 MemScope.img.zip
I think the zip file is corrupted at the "Relative offset of local file header" field (offset 42) of the "ZIP central directory file header". I am not completely sure (just did some reading on wikipedia).
It would be nice, if 7-zip can automatically correct/extract the zip compressed floppy images from Winimage SFX files:
http://www.winimage.com/wima_sfx.htm
MemScope WinImage SFX
MemScope zip file retrieved from MemScope-110.exe (corrupted zip file)
fixed MemScope zip file
I don't think what 7-zip must support file that don't follow ZIP specification.
Just wondering, why was unpacking of some TAR and ISO archives with incorrect headers added to 7-zip 9.18 beta?
And why doesn't the same logic apply to embedded zip archives with incorrect headers like the WinImage images?
9.18 beta 2010-11-02
-------------------------
- 7-Zip now can unpack some TAR and ISO archives with incorrect headers.
I can open some "bad" archives, if I see error is simple and I know how to ignore it.
But ZIP format is so complex, so some errors are difficult to understand and difficult to process.
In case of WinImage embedded zip files, it doesn't seem to be that complex (you only need to set 4 bytes to zero).
You don't need to be able to open all "bad" archives.
Zip format is complex and ZIp code is complex.
So it's diffictult to think about all things when I change something there.
I don't think that Winimage BUGs are so important.
Why don't you report to Winimage developers about their bugs?