PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Thor on 02 June, 2006, 17:40:56

Title: BadFileSearch
Post by: Thor on 02 June, 2006, 17:40:56
This is a "share checker" script: it start search for bad files from a list, and the list can be managed from the remote-computer: to add, delete, and list. There are two list: one for bad file, and one for the exception list: if in the SearchArrival found string from the exceptionlist, the script won't kick the user. The action can be modify, avaible actions are:
- pm - send pm to the user
- disconnect - send a pm to the user, than disconnect
- redirect - redirect the user to the given adress
- kick - kick the user with the given reason
- timeban - temporary ban the user with the given reason and the given time

To add files, use the !addbadfile (!abf) command, syntax is:
!abf file name -format -reason
The file name can contains spaces also, and in the reason there are two replacement:
- filename - that file, which the bot searched
- filepath - give back the full filepath of the found badfile.
For more details, use the !bfhelp command
The script has 3 language support: hungarian, english, and german (thanks to Psycho_Chihuahua)
On my hub, with 143 badfile, and 12 exception file, the memory usage raised just with 4 MB, the CPU usage doesn't chenged.
Script attached, and mirrored in the PtokaX script database:
http://ptxscriptdb.psycho-chihuahua.net/download.php?view.251
It has a GUI (Graphical User Interface) to set it easier, just copy the ini file and the lua file into the scripts folder.
Important things to work:
- UDP and TCP ports will be different
- check "Resolve to IP" on the main page
If somebody find bugs, please send me, thanks.
Title: Re: BadFileSearch
Post by: Dessamator on 02 June, 2006, 18:09:31
Cool, u decided to post it at last.
Title: Re: BadFileSearch
Post by: TTB on 02 June, 2006, 18:30:21
Nice one. I created a script like this a year ago. I decided not to post it because there are a lot of admins who don't know how to use this wisely... If ppl use this script, I hope it will be used very carefully. You can easily ban all your users (by accident) with bots like this. Also... when admins adding a key like "rape" a lot of wrong files could be matched!
Title: Re: BadFileSearch
Post by: Thor on 02 June, 2006, 18:33:58
Yes, it happened before ;D Our hub is registered users only, but unregistered can connect already (just they cant download, search, write to the main, and see the main, and they can write pm just to vips and ops) So, its check just those users. And maybe a well setted-up exception-list will resolve the problem...
Title: Re: BadFileSearch
Post by: TTB on 02 June, 2006, 18:36:33
That was also an option. Just create a GUI where ppl can (un)tap some settings... Problems with wrong keys can be prevented when doing it this way.
Title: Re: BadFileSearch
Post by: Dessamator on 02 June, 2006, 18:48:48
well, u just need to write in BOLD letters," be carefull with the search filenames".