View Full Version : SFV cleaning script
fobban
01-13-2004, 02:53 PM
This script removes unwanted entries from sfv-files. It removes comments, partitial lines, bad crc lines, duplicates etc. It's also possible to add your own comment.
You find it at the scripts page (if you're lazy click here (http://www.ioftpd.com/scripts/script.php?id=102)).
On help to install etc, read the ReadMe , duh :)
a feature you can add is a correcting feature for sfv. I mean correcting SFV that are resumed or badly sent (done before the SFV checking).
I know how to do it but i don't the knoweldge and the time to make it. Here's the idea:
put every line of the sfv in an array and if an element of this array is the end of another, you can delete it.
Example:
ABCD hj12345k
CDBD 1kolgy45
BCD hj12345k
here you can delete the third line. Bad lines are not everytime at the end of the sfv. It can be in the middle or in the start of the sfv. (Sorry for my bad english)
fobban
01-14-2004, 06:25 AM
Done :)
DR. GiGa BYTe
01-14-2004, 06:57 AM
I just tested your script... and had a little problem with a sfv file.
Original:
; File Size (Bytes) Time/Date
; ------------ ------------ ---------
; dev-cdht.rar 171.698 00:30:31 14.01.2004
;
dev-cdht.rar B4F27D6A
; End of SFV file.
cleaned:
;
dev-cdht.rar B4F27D6A
; End
of SFV
Is it possible to fix it?
btw. thanx for this nice script to clean the files...
cu
DR.GB
fobban
01-14-2004, 07:02 AM
Maybe i should tell how it works :)
if the fileextension of the uploaded file is sfv
First it scans through the sfv-file and store each line that doesn't start with a ; or is an empty row in an array.
After that it checks for duplicates; i.e. if the filename of row 1 equals the filename of row 2, the row 2 entry in the array is removed.
Now its time for the partitial check
First it compares the fileextention of all files and if 2 or more has the same extension it checks the length of the filename and if one or more entry has a shorter filename, same extension and same crc that entry is removed.
rewriting file with the clean sfv and eventual comments
fobban
01-14-2004, 07:12 AM
Originally posted by DR. GiGa BYTe
I just tested your script... and had a little problem with a sfv file.
Original:
; File Size (Bytes) Time/Date
; ------------ ------------ ---------
; dev-cdht.rar 171.698 00:30:31 14.01.2004
;
dev-cdht.rar B4F27D6A
; End of SFV file.
cleaned:
;
dev-cdht.rar B4F27D6A
; End
of SFV
Is it possible to fix it?
btw. thanx for this nice script to clean the files...
cu
DR.GB
Weird: copied your SFV and tested it, my cleaned file was
;my comment
;
dev-cdht.rar B4F27D6A
try to download the latest and test again and tell me if its the same, also make sure that ioSFV's line is the last of you OnUploadComplete (shouldnt matter tho, but just in case)
DaPhreak
01-14-2004, 07:29 AM
thank ya very much fooban :)
searchd around for a script like this / to lazy to code it by myself :p
works just fine, and removes all empty lines and partitial lines :banana:
DR. GiGa BYTe
01-14-2004, 07:51 AM
I made some tests and removed all other OnUploadComplete entries... but nothing changed :(
I attached the original SFV file... perhaps you can tell me whats wrong with it...
DaPhreak
01-14-2004, 07:55 AM
Same here with your SFV....
Cleaned SFV
dev-cdht.rar B4F27D6A
; End
of SFV
fobban
01-14-2004, 09:48 AM
fixed now i hope :)
I got a 404 when I try to download your script
fobban
01-14-2004, 01:24 PM
found another little efvil bug so i removed the file.. gonna fix it when i get time (friday)
DR. GiGa BYTe
01-14-2004, 02:35 PM
thanx for the fast fix :banana:
...looking forward to the next version :)
Thanx
DR.GB
fobban
01-14-2004, 06:04 PM
Updated now (early friday this week :)
Let me know if you find something that doesnt work (haven't had time to test it THAT much)
karmacoma
01-15-2004, 03:17 PM
Funkar kanon än så länge!
Thanks a lot!:D
fobban
01-16-2004, 01:46 PM
Have fixed a few things now, so if you were using the script you really should upgrade :)
DaPhreak
01-16-2004, 10:53 PM
fobban, is it possible to clean sfv-entries like this:
de2.rar b63f9bfb
5b7934c5 de2.rar
fobban
01-17-2004, 07:49 AM
Originally posted by DaPhreak
fobban, is it possible to clean sfv-entries like this:
de2.rar b63f9bfb
5b7934c5 de2.rar
Done
DR. GiGa BYTe
01-17-2004, 02:52 PM
Hi,
it's me again :)
I had some problems after updating from version 1.03. I tested 1.05 and 1.06 (I missed 1.04 :) ) and both version did a very thoroughly job. I mean they left nothing :confused:
I made a clean ioFTPD installation with just the ioSFV script installed. I use ioSFV without the cfg so that he just cleans the sfv files... some sfv files work others not... I attached some of the troublemakers. These files were empty after the cleaning :) Yeah, I think they are cleaned, but hey where are the CRCs?!? :)
Perhaps you can find something special. I throw a look at them, but didn't find anything erroneous.
cu
DR.GB
fobban
01-17-2004, 03:11 PM
yes i found some weird error (check this thread: http://www.ioftpd.com/board/showthread.php?s=&threadid=2421 )
not sure how i should fix it :|
fobban
01-17-2004, 03:57 PM
Fixed the problem now DR. GiGa BYTe. i had a the same prob with some of my sfv's and it works perfect now
DR. GiGa BYTe
01-18-2004, 07:37 AM
Thanx! Great and fast work... everything works fine now...
Great script and support!
Thanx
DR.GB
fobban
01-19-2004, 02:07 PM
New version out folks :)
Added an external config so you self can choose what lines you want the script to remove
fobban
01-26-2004, 09:06 AM
Hellooooo... Updated the script to v1.20
Changed the name to ioSC (ioSFVCleaner) because it turned up that _tUFF had a script he had called ioSFV for a rather long time.
Put a link on my homepage too: www.pyttemjukt.com
Have nice day
Could you add a feature that delete a line if file extension is .SFV plz
yup some morons add .sfv/.nfo/.m3u files in their .sfv
fobban
01-30-2004, 04:10 AM
done
fobban
02-09-2004, 04:55 AM
New ver out again folks :>
I've done some optimizations and partitially rewritten it. I also added an option so you can choose which lines the script should remove (like files with .sfv, .m3u extension etc).
See first post for download link.
fobban
04-14-2004, 10:47 AM
Long time since last update people.
I had some spare time and rewrote much of the script, removed some useless stuff, optimized etc etc.
You can find the script at the scripts page (or if you're lazy click here (http://www.ioftpd.com/scripts/script.php?id=102))
Have a nice day :)
PopWeasel
06-13-2004, 05:45 PM
Thx for this nice script; it works great. Only thing is occasionally I come across an .sfv file that ioSC can NOT process without crashing and giving "could not read the memory" pop-up error, which causes that client session to hang until the pop-up error is closed. Was wondering if it would be possible to make ioSC write to an error.log when it crashes instead as this current method is not good to run on a fast site. Thanks again.
fobban
06-14-2004, 10:03 AM
I won't be able to do anything with any of my scripts in the next 2 months (moving and having some kind of 'holiday' :p).
It would be nice if you could save any sfv that causes the script to crash so i can check where the error is.
And to that error.log idea, I guess I could read up on how to do stuff like that, but I would rather have a bug free script that cleans ALL sfv files :)
Have a great summer!
PopWeasel
06-15-2004, 04:18 AM
Yea I noticed some other scripter added writing to an error log instead of showing a pop-up window after crashing for their script, figured something like that would be cool here. :D But of course it would be better to not crash in the first place hehe. :p
Enjoy the holidays. ;) :cool:
FTPServerTools
06-15-2004, 08:58 AM
I would like to see the bad parts of such an sfv file as well since my script (FTPLogger) also cleans out junk from an sfv file.
PopWeasel
06-15-2004, 10:32 AM
Ok I did save one that was causing problems. I can't post it publicly. But if you want to pm me an email addie I'll send it to both of you guys.
fobban
08-19-2004, 02:05 AM
So, I'm finally back after the holiday.
Has anyone except PopWeasel got the script to crash?
I would really need a sfv file that is causing the script to crash so I can fix it. If anyone has one please contact me in #ioFTPD, nick pbq. Thanks :)
fobban
11-29-2004, 08:17 AM
After a long time of inactivity have I finally had the time to rewrite and fix the problem with some sfv's.
The new version can be downloaded here (http://www.ioftpd.com/scripts/script.php?id=102)
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.