Old 03-16-2004, 08:26 AM   #1
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default FTPLogger update, now adds zipcleaning

Ok I just added a small thing.. Zipcleaning...
How does it work?
Use FTPServerTools.ini..
[Zip]
Clean=TRUE (or FALSE) to actually allow cleaning to happen.
CleanComments=TRUE (or FALSE) to clean the global zip comment
CleanFileComments=TRUE (or FALSE) to clean the file comments of the files in the zip
CleanExtraNfo=TRUE (or FALSE) to clean extra nfo's in the file, the proper nfo will be kept.
SkipFile=c:\program files\zipclean\purge.txt (clean the files mentioned in this skipfile).
KeepFile=c:\program files\ioftpd\scripts\extractnfo.txt (keep these files in the nfo and dont clean them out).

O yes it is fast, due to the point that FTPLogger parses the zipfiles with my own algorithms.

As a nice side effect it corrects some badly created zipfiles by some other tool as well.
FTPServerTools is offline   Reply With Quote
Old 03-16-2004, 11:27 AM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Why don't u use the same files as zr-tools for keep/skipfile ?
Mouton is offline   Reply With Quote
Old 03-16-2004, 03:05 PM   #3
Zer0Racer
Senior Member
ioFTPD Scripter
 
Join Date: Oct 2002
Posts: 703
Default Re: FTPLogger update, now adds zipcleaning

Quote:
Originally posted by FTPServerTools
As a nice side effect it corrects some badly created zipfiles by some other tool as well.
And what tool would that be?

Quote:
Originally posted by Mouton
Why don't u use the same files as zr-tools for keep/skipfile ?
Mouton.. As if I would let him use them
Zer0Racer is offline   Reply With Quote
Old 03-16-2004, 04:21 PM   #4
thewarden
Senior Member
 
Join Date: Jan 2003
Posts: 194
Default Re: FTPLogger update, now adds zipcleaning

Quote:
Originally posted by FTPServerTools
Ok I just added a small thing.. Zipcleaning...

Thanks for the addition to an already great set of addons...

Now to copy and paste some items
thewarden is offline   Reply With Quote
Old 03-16-2004, 07:51 PM   #5
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

There are multiple reasons for that. First there is zipclean, if people use that then the purge.txt file from that is easy to use to remove junk from the zips. Second a keeplist might be handy if one insists on keeping certain files in there. Third the autocleaninf of useless nfo's doesnt even need any skiplist or keeplist. It works all by itself.
Some zipfiles are in a bad format because some tool (dont ask me which I dont know) doesnt adhere to the zip standard.
Quote:
Such a zipfile looks like (tech talk coming up....):
local file header
local file header
...
central directory header
central directory header
..
end of central directory
central directory header
central directory header
..
end of central directory

Now this is absolutely incorrect. pkunzip will for example immediately yell the file is bad. The solution is easy, cut off the junk and voila no more odd screwy non standard zip....
I think it is probably some nux tool.
A proper zip ends after the zip comment after the first end of central directory...
FTPServerTools is offline   Reply With Quote
Old 03-17-2004, 06:35 AM   #6
Zer0Racer
Senior Member
ioFTPD Scripter
 
Join Date: Oct 2002
Posts: 703
Default

Quote:
Originally posted by FTPServerTools
Third the autocleaninf of useless nfo's doesnt even need any skiplist or keeplist. It works all by itself.
Built-in AI then? Just HOW does it work all by itself?
Zer0Racer is offline   Reply With Quote
Old 03-17-2004, 08:00 AM   #7
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

file dates ?
if date the file was added is much more than creation date of the zip, u del it ? that could be dangerous if some packer creates a zip and modify it instead of rebuilding it in following hours...
Mouton is offline   Reply With Quote
Old 04-01-2004, 05:03 AM   #8
shufty
Junior Member
 
Join Date: Jan 2004
Posts: 4
Default

Just wondering if it's possible to to read the file_id.diz, in the same way that it does for the filecount, to create/insert into a directory based on the date also in the file. Would be ideal for 0-day and DOX.

Possibly work by using `onuploadcomplete` to read the file and then move the directory if possible, but only if the dir is 100%.

just a thought
shufty is offline   Reply With Quote
Old 04-01-2004, 05:39 PM   #9
FTPServerTools
Senior Member
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: Sep 2002
Posts: 543
Default

And yes the file_id.diz can be read (in fact it already is being read completely to parse the count out using some pattern matching similar to project-zs just better).
For the date I would first need to gather the various date formats. It is more tricky then the count tho since 01-02-03 is not always clear, it could be 1 feb 2003 or 2 jan 2003 or even 2002 feb 01 etc... So only an intelligent check with the current date and the point that the current date isnt supposed to be too far away from the diz date could guess the right date. As I looked basically in about 70% I could extract the date from the diz and if not available from the nfo. Those 30% is the problem..

And Mouton I dont use the file dates, it would fail too often since sometimes the dates are several years back or in advance. The algorithm is similar to what I suspect zipclean uses. Try it on a regular release and you'll see it works quite well.

Maybe I can make an OnComplete mover... That might be usefull. It'd have to think about how to implement the date recognition in case of unrecognisable dates (the 30%).

I havent looked into the keep/skipfiels from zr tools. The nfo name is also partially deducted from the dirname.
FTPServerTools is offline   Reply With Quote
Old 04-02-2004, 03:58 AM   #10
shufty
Junior Member
 
Join Date: Jan 2004
Posts: 4
Default

cool, could be a possibility that if it cant be read correctly, to move it to another directory. Would atleast cut down the majority
shufty is offline   Reply With Quote
Reply

Tags
clean, false, files, nfo, zip

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:47 AM.

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