Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > Okay I got it now, so a special CRC32 is (or may be) used > to check if the result was indeed correct. [ Now I wonder, > why the normal CRC32 - which is calculated anyway - wasn't > good for this purpose for zips, and they've opted for a > s

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Hi Przemek, Now the remaining mystery is how 7-Zip could extract the wrong file anyway :) It was not wrong. Just simply 7-Zip like myunzip does not compare CRC32 stored in compressed header with CRC32 in file ZIP entry ignoring it. Okay I got it now, so a special CRC32 is (or may be) used

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > Now the remaining mystery is how 7-Zip could extract > the wrong file anyway :) It was not wrong. Just simply 7-Zip like myunzip does not compare CRC32 stored in compressed header with CRC32 in file ZIP entry ignoring it. > BTW, I wonder i

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Hi Przemek, Many thanks for the hunt and fix, it now works perfectly. Now the remaining mystery is how 7-Zip could extract the wrong file anyway :) BTW, I wonder if we couldn't rather use hb_fs*() functions instead of fopen/fread. (in places where this wouldn't badly affect performance, like hb

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Przemyslaw Czerpak wrote: Hi Viktor, > You do not have too. I've just located the reason of problem. > Just simply I was not writting anything for DOS/Windows for > too long time. On this systems fopen() without "b" flag strip > '\r' from the stream so CRC was wrongly calcula

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > For these tests I was using BCC 5.5.1, with these > switches (notably debug switches): > C_USR=-DUNICODE -v -y > I've now retried with a fully default build, with > no custom switches, but the effect is still there. > Even more strangely, I'

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Hi Przemek, For these tests I was using BCC 5.5.1, with these switches (notably debug switches): C_USR=-DUNICODE -v -y I've now retried with a fully default build, with no custom switches, but the effect is still there. Even more strangely, I'm getting the same (wrong) results with an MSVS 2005

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > Now I'm also confused, because myunzip cannot extra it either > (created a zero length file). > Now I did the .zip again (theoretically with no difference), > I'm attaching it. myunzip is able to unzip it, but unzip isn't. My unzip too. It

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Some additional info: - 7-Zip 4.57 GUI is able to extract myzip.prg from hello.zip with 'abc' password. - unzip.exe is able to extract sample encrypted .zip created with zip.exe. [[[ BTW, 7z support would be nice in Harbour since it hasn't some of the limits of .zip and std encryption is a l

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak(druzus/at/priv.onet.pl)

2008-07-31 Thread Juan Gálvez
: "Przemyslaw Czerpak" <[EMAIL PROTECTED]> To: "Harbour Project Main Developer List." Sent: Thursday, July 31, 2008 6:24 PM Subject: Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak(druzus/at/priv.onet.pl) On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Vik

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > Now, I was suspecting that an older hbmzip.lib is picked > up, but I did some test to ensure this is not the case, > besides renaming my production harbour binary dir > (but it's not in the path anyway). I tired to extract hello.zip you att

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak(druzus/at/priv.onet.pl)

2008-07-31 Thread Juan Gálvez
, 2008 4:42 PM Subject: Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak(druzus/at/priv.onet.pl) Hi Przemek, Viktor, Perhaps these considerations about my test.zip created with hbmzip can help : 1) Winzip shows all files in zip as cripted ("*"). 2) If I set the correct passw

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > I did these, after doing a complete checkout to an empty dir > and a full rebuild: Maybe a stupid question but did you recompile myzip.prg? It's not create automatically. > del hello.zip > myzip hello.zip myzip.tds --pass abc > unzip hello

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak(druzus/at/priv.onet.pl)

2008-07-31 Thread Juan Gálvez
ord. Best regards Juan - Original Message - From: "Szakáts Viktor" <[EMAIL PROTECTED]> To: "Harbour Project Main Developer List." Sent: Thursday, July 31, 2008 4:29 PM Subject: Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak(druzus/at/priv.onet.pl)

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Hi Przemek, 1) I did a quick test, but unzip doesn't seem to accept any passwords for something zipped with myzip. Please be sure that you are using current SVN code. I made test with UNZIP in my linux box and PKUNZIP in DOS emulator and both nicely decompress password encrypted archives

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
On Thu, 31 Jul 2008, Szakáts Viktor wrote: Hi Viktor, > 1) I did a quick test, but unzip doesn't seem to accept >any passwords for something zipped with myzip. Please be sure that you are using current SVN code. I made test with UNZIP in my linux box and PKUNZIP in DOS emulator and both nice

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Hi Przemek, 1) I did a quick test, but unzip doesn't seem to accept any passwords for something zipped with myzip. Also, I've zipped something with a password using zip, and tried to unzip it with myunzip, but it didn't work either. Maybe I'm doing something wrong. One correction: my

Re: [Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Szakáts Viktor
Hi Przemek, 1) I did a quick test, but unzip doesn't seem to accept any passwords for something zipped with myzip. Also, I've zipped something with a password using zip, and tried to unzip it with myunzip, but it didn't work either. Maybe I'm doing something wrong. 2) I'm not sure I

[Harbour] 2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

2008-07-31 Thread Przemyslaw Czerpak
2008-07-31 14:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmzip/zip.c ! set valid ZIP signature in header file (2.0) * harbour/contrib/hbmzip/hbmzip.c ! fixed ZIP encryption header by adding CRC32 checksum Now other tools should properly recognize p