Go Back   FlashFXP Forums > > > >

Harm's scripts ioBanana, Readd script, ioVote

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-27-2005, 02:51 AM   #1
zkinner
Banned
 
Join Date: Sep 2005
Posts: 6
Default [Fixed] bad zip check

Hello. Sorry, if i'm repeating someone, i didn't find my problem here.

The problem is simple: zipscript in my ioBanana2 badly checks some zip-released (like 0day).

Code:
[L] 226-Zip: File is Bad!
But i know that file is good, i'm fxp'ing release from FTP where it's with [100%] tag. And i can't do anything. Every day i see 3-5 releases with that problem.

I tried ioZS check - it checks perfect, but then my sitebot will work buggy. Maybe i can update my ioBanana zipscript?
zkinner is offline   Reply With Quote
Old 09-27-2005, 02:53 AM   #2
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

The reason is simple I think, iob uses the zlib library which supports almost the complete zip standard. But deflate64 isnt supported and thus it isnt recognised and marked as bad. Check the zipfile with unzip or pkunzip and you'll see it.
FTPServerTools is offline   Reply With Quote
Old 09-27-2005, 02:56 AM   #3
zkinner
Banned
 
Join Date: Sep 2005
Posts: 6
Default

But it checks some files of this release as OK. And finally i have release with 60% or 80%, but last files will be checked as BAD every time.
zkinner is offline   Reply With Quote
Old 09-27-2005, 05:14 PM   #4
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

As I said it is the deflate64. Check it with unzip or pkzip. It may be that the zip is really bad, there are soem bad zips out there as well therefor I added some zip repair routines in my FTPLogger.
FTPServerTools is offline   Reply With Quote
Old 09-27-2005, 05:51 PM   #5
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

Actually, ioB2 is itcl based and uses unzip.exe to check the zip files' integrity.

It would be interesting to know what kind of repair mechanisms you've added to FTPLogger.. or at least what kind of bad zip files you've already encountered.

It would also be interesting to have details from zkinner. If unzip.exe says a file is corrupted, you'll need a little bit more than your word to convince me that the file is good. You could post the output of "unzip -t <zipfile>".
Harm is offline   Reply With Quote
Old 09-27-2005, 10:40 PM   #6
EwarWoo
Senior Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Oct 2002
Posts: 462
Default

Are they all coming from the same FTP? When a disk is on its way out servers tend to start throwing out corrupt files which appear to be fine on site.
Try a different source.
EwarWoo is offline   Reply With Quote
Old 09-28-2005, 01:25 AM   #7
zkinner
Banned
 
Join Date: Sep 2005
Posts: 6
Default

I'm sure the problem is in zipscript. Before ioBanana i used ioZS and have it in /scripts/ folder. To check i just modify ioftpd.ini file and check ioZS as checker - and everything good, it comes t 100% when i refill files (coz banana deletes bad, even with delete=0 checked).

I dunno where to find unzip exe, but i'm perfectly unpacked "BAD" file with WinRAR, Total Commander and Windows internal zip-packer. Everything was OK. But this file ioBanana don't want to save and checks as bad. Only this one file of all release (one of 6).

As i see, every day about 10 releases like that.
zkinner is offline   Reply With Quote
Old 09-28-2005, 03:38 AM   #8
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

Hmm if it uses unzip.exe then it must go good.

Harm the bad zip files I found are the ones that have extra's added to the end of a proper zip. There is some gl code I bet that screws up zip files when it adds comments. Every now and then I see a zip file where there a complete zip file, then a new zip header then an nfo header followed by a packed nfo file. This is basically bad coding according to the zip standards, it isnt allowed. The extra zip header isnt allowed to be glued to the end of a zip.
In short:
if (((*ZipHeader & 0x0000FFFF)==0x00004B50) && (*ZipHeader!=0x04034B50)) Start+=4; //PK00
//NITROUS is using a bad zipper whcih gets recognized tho. It preadds PK00 so the header looks like PK00PK... so lets check for PK??PK..
for (DWORD i=Start;i<_msize(mem){
zl=(struct ZipLocalFileHeader *)&mem[i];
if (zl->Signature!=0x04034B50) break; // No localfileheader
nrBytesToWrite=zl->FilenameLength+zl->ExtraFieldLength+zl->CompressedSize;
if (zl->Flags & 0x08) nrBytesToWrite+=12; //General purpose flag bit3 set -> Data descriptor follows
i+=sizeof(*zl)+nrBytesToWrite;
}
So in short that is what I do to check this.

Whether these files still come by I havent checked anymore, they get auto repaired with my FTPLogger.

And zkinner, since unzip is being used be sure to use the latest unzip and check your paths for duplicates of unzip.exe. There are older versions which do not support various of the newer zip packing types (mainly deflate64 and multi disk zipping).
FTPServerTools is offline   Reply With Quote
Old 09-28-2005, 03:40 AM   #9
zkinner
Banned
 
Join Date: Sep 2005
Posts: 6
Default

Where can i find and update it? I didn't find any 'unzip.exe' on my PC.
zkinner is offline   Reply With Quote
Old 09-28-2005, 08:14 AM   #10
oslike
Member
 
Join Date: Dec 2003
Posts: 90
Default

Hi all, i dont know if this post will add value to this conversation, but i remember encounting the same problem very often with ioBanana.20 too....

os
oslike is offline   Reply With Quote
Old 09-28-2005, 03:08 PM   #11
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

Thank you for these precisions RAMRAM. I'll take some time to really understand all the possible issues with zip files.

I'm starting to think zkinner is still using ioBanana v20. This one doesn't support corrupted zip files at all. Since there's a newer version available that doesn't have this problem, v20 is pretty much unsupported now. Upgrade before going any further.

PS: Also make sure your board account is linked to your customer portal account. ioBanana v20 was only available to registered users and you don't appear as one atm.
Harm is offline   Reply With Quote
Old 09-28-2005, 04:52 PM   #12
zykes
Junior Member
ioFTPD Foundation User
 
Join Date: May 2005
Posts: 26
Default

i got the same prob. uploaded 5 different rels. everyone of them got faults.

and it doesn't create any tags either
zykes is offline   Reply With Quote
Old 09-29-2005, 04:50 AM   #13
zkinner
Banned
 
Join Date: Sep 2005
Posts: 6
Default

Ok, thanks, i already solved my problem. DZSbot + ioZS works excellent.
zkinner is offline   Reply With Quote
Old 09-29-2005, 07:57 AM   #14
zykes
Junior Member
ioFTPD Foundation User
 
Join Date: May 2005
Posts: 26
Default

and i am using iob2
zykes is offline   Reply With Quote
Old 09-29-2005, 01:40 PM   #15
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

zykes: Could you define "faults" ?
Could you also paste the output of "unzip -t filename" for those files ? It would also be good to be able to see the output of SITE SHOWBANANA for these dirs and the content of the related file_id.diz files.

Edit: this problem was due to incorrect paths to the .exe files in his configuration file.
Harm is offline   Reply With Quote
Reply

Tags
checks, file, ftp, problem, zipscript

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:22 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)