I have searched all "badfiles" scripts I've come over and none either work, search spams or is too inaccurate.
Does anyone knows of a good one? Most preferable would be a script that open (for example) a file called ForbiddenFiles.txt and the content of this file could be:
explorer.exe
iexplorer.exe
mspaint.exe
taskman.exe
.dll
.vob
.tmp
.temp
.antifrag
MyList.bz2
c:\windows
d:\windows
and search every user that connects and also actively in DataArrival()
Most preferable the script would tell the user which file that failed to pass the badfile() check.
Most important is that all forbidden files must be defined in a textfile and NOT within the script itself.
I hope that somebody has time and/or interest to help me ;)
get dc++k
illigalist is ok as a script though, and many use it without problems.
-- BadFilesDetecter V: 1.0 by [ES]latinmusic. Date: 05/11/2003
-- Base on Illegalist by Ptaczek, Jan-3, 2003
-- Searches for specified patterns. Useful for illegal share checking
-- Modificed by Leo (for music hub)
-- Modified by nErBoS
-- Operators are now checked as normal users
-- Some extensions added
-- All known bugs fixed by ----------->>> OpiumVolage
BotName = "![BadFilesDetecter]!?"
MessageToSend = " are not allowed in this hub."
time = 3 --Value in minutes
Files = {
[".dll"]="No .dll files in this hub, you have been banned for "..time.." minutes.",
[".sys"]="No .sys files in this hub, you have been banned for "..time.." minutes.",
[".ini"]="No .ini files in this hub, you have been banned for "..time.." minutes.",
[".php"]="No .php files in this hub, you have been banned for "..time.." minutes.",
[".hlp"]="No .hlp files in this hub, you have been banned for "..time.." minutes.",
[".lnk"]="No .lnk files in this hub, you have been banned for "..time.." minutes.",
[".cue"]="No .cue files in this hub, you have been banned for "..time.." minutes.",
[".pkg"]="No .pkg files in this hub, you have been banned for "..time.." minutes.",
[".lib"]="No .lib files in this hub, you have been banned for "..time.." minutes.",
[".ins"]="No .ins files in this hub, you have been banned for "..time.." minutes.",
[".cmd"]="No .cmd files in this hub, you have been banned for "..time.." minutes.",
[".bat"]="No .bat files in this hub, you have been banned for "..time.." minutes.",
[".cod"]="No .cod files in this hub, you have been banned for "..time.." minutes.",
[".cox"]="No .cox files in this hub, you have been banned for "..time.." minutes.",
[".loc"]="No .loc files in this hub, you have been banned for "..time.." minutes.",
[".cnt"]="No .cnt files in this hub, you have been banned for "..time.." minutes.",
[".vxd"]="No .vxd files in this hub, you have been banned for "..time.." minutes.",
[".vga"]="No .vga files in this hub, you have been banned for "..time.." minutes.",
[".stb"]="No .stb files in this hub, you have been banned for "..time.." minutes.",
[".chp"]="No .chp files in this hub, you have been banned for "..time.." minutes.",
[".nrg"]="No .nrg files in this hub, you have been banned for "..time.." minutes.",
[".iso"]="No .iso files in this hub, you have been banned for "..time.." minutes.",
[".vob"]="No .vob files in this hub, you have been banned for "..time.." minutes.",
[".pas"]="No .pas files in this hub, you have been banned for "..time.." minutes.",
[".vcf"]="No .vcf files in this hub, you have been banned for "..time.." minutes.",
[".dfm"]="No .dfm files in this hub, you have been banned for "..time.." minutes.",
[".res"]="No .res files in this hub, you have been banned for "..time.." minutes.",
[".reg"]="No .reg files in this hub, you have been banned for "..time.." minutes.",
[".vdi"]="No .vdi files in this hub, you have been banned for "..time.." minutes.",
[".map"]="No .map files in this hub, you have been banned for "..time.." minutes.",
[".scr"]="No .scr files in this hub, you have been banned for "..time.." minutes.",
[".diz"]="No .diz files in this hub, you have been banned for "..time.." minutes.",
[".lst"]="No .lst files in this hub, you have been banned for "..time.." minutes.",
[".pdf"]="No .pdf files in this hub, you have been banned for "..time.." minutes."
}
function NewUserConnected(curUser)
frmHub:EnableSearchData(1)
for i,v in Files do
curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i)
end
end
function OpConnected(curUser)
frmHub:EnableSearchData(1)
for i,v in Files do
curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i)
end
end
function DataArrival(curUser, data)
if( strsub(data, 1, 3) == "$SR" ) then
_,_,nick = strfind( data, "\05(%S*)|$" )
local s = 5 + strlen(curUser.sName)
local e = strfind(data, "%d+%s%d+/%d+") - 2
local path = strsub(data, s, e)
local s = 5 + strlen(curUser.sName)
Reason = FindWhat(curUser,data)
if (Reason == "Other files") then return end
curUser:SendData(BotName, "Disconnecting.....")
curUser:SendData(BotName, "Reason: "..Reason)
curUser:SendData(BotName, "Path: "..path.. ".")
-- curUser:Disconnect()
curUser:TimeBan(time) --This line tempban a user for an specific amount of time in minutes, to incree/decrease the time change the value in variable 'time'
-- curUser:TempBan() --This line tempban a user for an specific amount of time pre-setted inside ptokax advanced settings, to make it work, uncomment this line and comment the line above
end
end
function FindWhat(curUser,data)
for i,v in Files do
if (strfind(strlower(data), "%"..i.."\005")) then
return v
end
end
return "Other files"
end
Thanks, pal. But could you make it to retrieve the illegal files from a textfile instead of being pre-defined within the script? And maintained the ability to output what kind of a file that triggered the script?
Yeah, I'm being a pain in the a** ;)
Btw: It also generates an -> Search spam detected..
When a user connects..
Generated spam, i test it and no generates something, but i will recheck it again, but not today, i coding another script today, also anyone can take a shoot for me :P
It seems that this line causes the 'spam detected':
curUser:SendData("$Search Hub:"..BotName..random(1, 100) .." F?F?0?1?"..i)
Under NewUserConnected()
QuoteOriginally posted by [ES]latinmusic
Generated spam, i test it and no generates something, but i will recheck it again, but not today, i coding another script today, also anyone can take a shoot for me :P
share more, what i can remember (tryed it a long time back) is that it starts on share around 200GB+.
plop
Oh, plop, it was not tested with big share, i will give another try this week with it, not exacly now, i'm doing another bot currently. I think it can be fixed, but i'm not sure, anyway i need it, so i willl take a look agin.
QuoteOriginally posted by VERMiN
Btw: It also generates an -> Search spam detected..
When a user connects..
it seems it has todo this, it does not cause any problems......;)
Ok, now I'm really confused!
If I use the script by itself it seems to work just fine. No "Spam detected from bot". It finds bad files and everything is just wonderful etc...
But if I cut out the script exactly as it is into a another script (kind of aa all-in-1) and run the combined script it DOES NOT work. Spam detected all over again, and no it doesn't find any bad files while it spams :(
But now to the part that I cannot understand. If I have BOTH the BadFile script and my All-in-1 and all the sudden my script doesn't say anything about any spamming and it start to find badfiles.
Summary: I need to have the above script running in order to get the same script but used within my own to work. If I remove the script posted by latinmusic my script starts to spam all over again.
I'm going mad..
The script i posted was developed to work as an standalone script, use it in that way, if you wanna merger into another script, then probably all data arrival need to be fixed.
I've located the problem. The bot name must not contain any spaces. I named the bot 'File Check' and that's what caused all the spam problem. I had no idea.
However it doesn't always locate 'bad files'. I've shared my windows directory on 3 of my computers, and the script only reports a bad file share when ONE of my computers connects to my testhubb.
Does it matter how much you got in share? Can the script be altered to verify/find more accurate?