illegalist
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

illegalist

Started by swedal, 04 February, 2011, 00:13:05

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

swedal

Hello can anyone convert this scripts from API 1 to API 2
---------------------------------------------------------------------------------------------------
-- Advanced BadFile Active Search // Stripped from Thor 6
-- By: NightLitch 2005-03-04
---------------------------------------------------------------------------------------------------
tBadFiles = {

	{".raidenftpd.acl" , "Dela inte ut FTP filer. Ta bort den!"},
	{".pls" , "Dela inte ut Playlist filer. Ta bort den!"},
        {".PLS" , "Dela inte ut Playlist filer. Ta bort den!"},
	{".permission" , "Dela inte ut Skit filer. Ta bort den!"},
	{".ccd" , "Dela inte ut CloneCD filer. Ta bort den!"},
	{".checked" , "Remove this file!"},
	{".debug" , "Remove this file!"},
	{".idx" , "Remove this file!"},
	{".ioFTPD" , "Remove this file!"},
	{"Thumbs.db" , "Remove this file! (REMEMBER this file is HIDDEN!!!)"},
	{"Desktop.ini" , "Remove this file! (REMEMBER this file is HIDDEN!!!)"},
	{"autorun.inf" , "NO sharing of installed / packed programs or games"},
	{"valve.avi" , "NO sharing of installed / packed programs or games"},
	{"virscan.dat" , "NO sharing of installed / packed programs or games"},
	{"Netlimiter" , "NO sharing of installed / packed programs or games"},
	{"childporn" , "NO sick kid Porn inhere!"}, 
	{"animalsex" , "NO Animalsex files here!"}, 
	{"svastika" , "NO Nazi/white power music HERE!!!"}, 
	{"part.met" , "NO sharing of incomplete downloads"}, 
	{".getright" , "NO sharing of incomplete downloads"}, 
	{"share faker" , "NO tools for fake sharing allowed"}, 
	{"share hacker" , "No tools for fake sharing allowed"},
	{".dctmp" , "NO sharing of incomplete downloads"}, 
	{"explorer.scf" , "Don't share installed windows, i.e."},
	{"system32.dll" , "Don't share installed windows."},
	{"msgsc.dll" , "Installerade program"},
	{"COMCTL32.DLL" , "Installerade program"},
	{"studio.xnf" , "Installerade program"},
	{"command.com" , "Installerade program"},
	{"wab.exe" , "Installerade program"},
	{"Exempelspelningslista.wpl" , "Dela inte ut mina dokument mappen."},
	{"npdsplay.dll" , "Installerade program"},
	{"Pluton Svea" , "Rasistisk musik"},
	{"Queue.xml" , "Don't share installed"},
	{"Favorites.xml" , "Don't share installed"},
	{"netlimiter" , "netlimiter"},
	{"ws_ftp.log" , "Ta bort dina Loggfiler"},
	{".dll" , "Remove this file!"},
	{"imdb.nfo" , "Remove this file!"},
	{"IMDB.NFO" , "Remove this file!"},
    {"WS_FTP.LOG" , "Ta bort dina Loggfiler"},
    {"desktop.ini" , "Ta bort denna fil. Det ?r en systemfil"},
    {"ufxpcrc.log" , "Ta bort dina Loggfiler"},
    {"Default.PLS" , "Denna fil ska inte finnas i sharen"},
    {"Cdlabel.alb" , "Cdlabel.alb det ?r en typ av playlist fil, TA BORT DEN"},
    {"Rule.of.rose" , "Vi till?ter inte detta spel h?r i hubben, TA BORT DET"},
    {"Rule_of_rose" , "Vi till?ter inte detta spel h?r i hubben, TA BORT DET"},
    {"Rule-of-rose" , "Vi till?ter inte detta spel h?r i hubben, TA BORT DET"},
    {"Vargflock" , "Dela Inte ut Rasistisk musik"},
	{".Torrent." , "G?r inte reklam f?r torrents"},
	{".torrents." , "G?r inte reklam f?r torrents"},
	{".Torrent" , "G?r inte reklam f?r torrents"},
	{"Blackshirts" , "Dela inte ut Rasistisk musik"},
	{"enh?rjarna" , "Dela inte ut Rasistisk musik"},
	{"odinslaw" , "Dela inte ut Rasistisk musik"},
	{"Skullhead" , "Dela inte ut Rasistisk musik"},
	{"www.torrentazos.com" , "Dela Inte ut Torrentsreklam filer"},                
		
	}

---------------------------------------------------------------------------
--// Don't Edit below this point if you don't now what you are doing
---------------------------------------------------------------------------

tTimer = {}

Main = function()
	RegTimer(SearchForBadFiles, 6*1000, "ActiveBadFileSearch") -- Active Search Each 20 Sec
	SetTimer(1000); StartTimer()
end

OnTimer = function()
	for i in ipairs(tTimer) do
		tTimer[i][3] = tTimer[i][3] + 1
		if tTimer[i][3] > tTimer[i][2] then
			tTimer[i][3] = 1; tTimer[i][1]()
		end
	end
end

UDPSRArrival = function(sUser,sData)
	local _,_,From,Path,FileSize,FreeSlots,TotalSlots = string.find(sData, "^%$SR%s+(%S+)%s+(.*)(%d+)%s+(%d+)%/(%d+)")
	if tCall["BadFileSearch"] then pcall(tCall["BadFileSearch"],sUser,Path,FileSize) end
end

tCall = {
	BadFileSearch = function(sUser,Path,FileSize)
		if not sUser.bOperator then 
			local FileFound, FileReason = BadFiles(string.lower(Path))
			if FileFound then
				sUser:SendData(frmHub:GetHubBotName(), "*** You have been kicked for "..FileReason..". "..Path.." "..Units(FileSize))
				SendToOps(frmHub:GetHubBotName(), "*** User "..sUser.sName.." has been kicked for "..FileReason..". "..Path.." "..Units(FileSize))
				sUser:TempBan()
			end
		end
	end
}

RegTimer = function(Function,Interval,str)
	local tmpTrig = Interval / 1000
	table.insert(tTimer,{Function,tmpTrig,1,str})
end

Units = function(intSize)
	if tonumber(intSize) ~= 0 then
		local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
		intSize = tonumber(intSize); local sUnits;
		for i in ipairs(tUnits) do
			if(intSize < 1024) then sUnits = tUnits[i]; break; else intSize = intSize / 1024; end
		end
		return string.format("%0.1f %s",intSize, sUnits);
	else
		return "0 Bytes"
	end
end

BadFiles = function(PathStr)
	for i in ipairs(tBadFiles) do
		if string.find(PathStr, string.lower(tBadFiles[i][1]), 1, true) then
			return 1,tBadFiles[i][2]
		end
	end
	return nil, "Other Files"
end

SearchForBadFiles = function()
	if t == nil then
		t =1
		if tBadFiles[t] then
			SendToAll("$Search "..frmHub:GetHubIp()..":"..frmHub:GetHubUdpPort().." F?F?0?1?"..tBadFiles[t][1])
		end
	elseif t > table.getn(tBadFiles) then
		t = nil
	else
		t = t+1
		if tBadFiles[t] then
			SendToAll("$Search "..frmHub:GetHubIp()..":"..frmHub:GetHubUdpPort().." F?F?0?1?"..tBadFiles[t][1])
		else
			t = 0
		end
	end
end

swedal

hello i has add this one filesearch in my hub 


--[[

	FileSearch 1.0l LUA 5.11 [Strict] [API 2]

	By Mutor	11/03/07

	In as much as I despise scripting this, I am truly tired of
	seeing requests for it. My meager efforts at educating the masses
	with 'why this shouldn't be done' have failed. Hmm...  Go figure.
	My will broken, here is a bad file search for the new PtokaX API.
	For LUA 5.1x only

	System resources be damned!

	- Endlessly searches for preset 'illegal' filenames / strings, one every 15 [or more] seconds.
	- Sends search strings in random order until all are used, then list is cycled again.
	- Sends a message to online ReportNick or operators in Main chat if file is found [once per user].
	- Sends status message to status bar to ReportNick or online Operators.
	- Runs garbage collection if memory usage is 20% or more that startup memory usage.


	+Changes from 1.0	11/04/07
		~Fixed search list cycle method
		+Added stop timer once all terms have been used.
		+Seach is begun again with new connection or MyINFO string.
		+Added OnError messages to Report function

	+Changes from 1.0b	11/06/07
		+Added user search checking/blocking, per profile. Returns fraudulent result.
		+Added log to file function.
		~Cleaned up timer function a bit.

	+Changes from 1.0c	11/22/07
		+Added kick option, after much prompting and against my better judgement.  :P
		+Added nick exclusion table [protect by nick].
		+Added log entry for kick, MaxLog variable [log file size restriction]
		
	+Changes from 1.0d	12/01/07
		+Added choice of kick/ban

	+Changes from 1.0e	12/05/07
		+Added search results pattern table
		+Added additional status/debug messages

	+Changes from 1.0f	12/25/07
		~Changed search mode to active in order to get SR from all users.

	+Changes from 1.0g	12/25/07
		+Added user' IP to report and log messages. Requested by [NL]Scooby?
		+Added option to always repy in private message. Requested by [NL]Scooby?

	+Changes from 1.0g	04/13/08
		+Added support for TTH searches. Requested by [NL]Scooby?

	+Changes from 1.0i	04/13/08
		-Removed support for API 1, now API 2 strict

	+Changes from 1.0k	10/17/08
		+Added passive search string.
		~Changed SendToAll to SendToUser.
		+Added Passive string sent to activeusers, active string sent to passive users.
		+Search string is only sent to users with > 0 share.
		+Added option to always use TTH root in fraudulent search results.
]]

--//-- Start Settings --//--

-- Add your 'illegal' files in the Words array, use quotes and separate with comma.
-- Keep this list as short and it's contents as precise as possible.
-- Consider that many triggers may be found in legitimate files
-- ie. rape will be found in "The Grapes Of Wrath" and the title 'Lolita'
-- is an actual film, not a good one mind you, but it is a film.

-- Search the hub for these strings/hashes...
local Words = {
	--TTH strings must begin with TTH: ie: 
	--"TTH:ZDAWKJRHFFEJ7IOXZ2A5HTTHOY36GQLFAQWTM6Q",
	"5PLWTH46UI433BS3BMRYEFUYRXCL2WU7UFIHECQ",
	"badfile","stealthdc","r@ygold","animalsex","beastiality","lolita",
	"preteen","incest","rape ","underage","childsex","childporn"
}
-- In an effort to be more specific on 'illegal' files,
-- Search results for these patterns. There should be one for each item in the Words table.
-- It may well be the same entry in the words table [ie. exact match] else use Reg-Exp
-- ["string"] = {# of warnings, 0 = disable,*action,"reply string"},
-- *Action to take against user 0=none, 1=kick, 2 = ban
local Patts = {
	--TTH patterns should be the exact TTH hash root
	["ZDAWKJRHFFEJ7IOXZ2A5HTTHOY36GQLFAQWTM6Q"] = {0,1,"***Badfiles are not allowed here."},
	["5PLWTH46UI433BS3BMRYEFUYRXCL2WU7UFIHECQ"] = {0,2,"Anti-Piracy trojan files are not allowed here."},
	["stealthdc"] = {0,1,"StealthDC is not allowed here."},
	["badfile"] = {3,1,"Badfiles are not allowed here."},
	["stealthdc"] = {0,1,"StealthDC is not allowed here."},
	["r@ygold"] = {0,1,"Underage pornography is not allowed here."},
	["animalsex"] = {0,1,"Beastality content is not allowed here."},
	["beastiality"] = {0,1,"Beastality content is not allowed here."},
	["preteen"] = {0,1,"Underage pornography is not allowed here."},
	["underage"] = {0,1,"Underage pornography is not allowed here."},
	["childsex"] = {0,1,"Underage pornography is not allowed here."},
	["childporn"] = {0,1,"Underage pornography is not allowed here."},
	[".*lolita.*(%.png|%.jpg|%.gif|%.bmp|%.avi|%.wmv|%.xvid|%.mov|%.ogg|%.mp(g|eg|^3))"] = {0,1,"Underage pornography is not allowed here."},
	[" *rap(e|ed|ing).*(%.avi|%.wmv|%.xvid|%.mov|%.ogg|%.mp(g|eg|^3))"] = {0,1,"Rape content is not allowed here."},
	[" *incest.*(%.png|%.jpg|%.gif|%.bmp|%.avi|%.wmv|%.xvid|%.mov|%.ogg|%.mp(g|eg|^3))"] = {0,1,"Incest content is not allowed here."},
}

-- "BotName" [ "" = hub bot ]
local Bot = "[FileSearch]"
-- Admin's nick / chatroom name for status messages, "" = disable
-- If disabled, report will be sent to all online operators.
local ReportNick = "Mutor"
-- Send extended status information to ReportNick or Operators , true/false
local Verbose = false
-- Reporting level 0=disabled, 1=critical errors, 2=extended status, 3=all messages
local ReportLevel = 3
-- Always report in PM?  true/false
local PmOnly = true
-- Seconds between file searches [should be >= 15 seconds]
local Secs = 15
-- Always use TTH root in fraudulent $SR, true/false
local AlwaysTTH = true
-- Action to take against user 0=none, 1=kick, 2 = ban
local Action = 1
-- Number of warns before Action is taken, when Action > 0. [0 = disable]
local Warns = 3
-- Perm. ban level, used ony if Action = 2 [1 = Nick Ban, 2 = IP Ban, 3 = Nick/IP Ban]
local BanLevel = 1
-- Exclude these users from check/kick
local Exc = {
	["Mutor"] = true,
	["OtherNick"] = true,
	}
-- Maximum permissable size of log file [in bytes]
local MaxLog = 5000
-- Set your profiles permissions here.
-- profile_idx, Allowed to search for illegal files? [0=no 1=yes], "Profile Name"
local Profiles = {
	[-1] = {false,"Unregistered User"},
	[0] = {true,"Master"},
	[1] = {true,"Operator"},
	[2] = {true,"Vip"},
	[3] = {false,"Registered User"},
	}

local ReportProfiles = {
	[-1] = {false,"Unregistered User"},
	[0] = {true,"Master"},
	[1] = {true,"Operator"},
	[2] = {false,"Vip"},
	[3] = {false,"Registered User"},
	}
--//-- End Settings --//--

local T,Tm,Used,Nicks,Log,HubIp,HubUdp = {},0,{},{},""
OnStartup = function()
	if Bot == "" then Bot = SetMan.GetString(21) else Core.RegBot(Bot,"","",true) end
	if not Core.GetHubIP() and not SetMan.GetBool(43) then SetMan.SetBool(43,true) SetMan.Save() end
	HubIp,HubUdp = Core.GetHubIP(),SetMan.GetString(4)
	if HubIp and HubUdp then Tm = TmrMan.AddTimer(1000 * Secs) end
	collectgarbage("collect")
end

OnTimer = function(Id)
	if Id and Id == Tm then
		local x,z = ChkWrd(),string.rep("\t",12).."is kicking because:"
		if x then
			local s,msg,t = Words[x],"Searching user shares for: [ "..x.." ]  ",1
			local tth = s:find("^TTH%:")
			if tth then t = 9 end
			for _,usr in ipairs(Core.GetOnlineUsers()) do
				if Core.GetUserValue(usr,16) > 0 then
					local s = "$Search "..HubIp..":"..HubUdp.." F?T?0?"..t.."?"..s.."|"
					if Core.GetUserValue(usr,10) then
						s = "$Search Hub:"..Bot.." F?T?0?"..t.."?"..s.."|"
					end
					Core.SendToUser(usr,s)
				end
			end
			Core.SendToAll("$Search "..HubIp..":"..HubUdp.." F?T?0?"..t.."?"..s.."|")
			if ReportLevel > 1 then Report(msg..s.." ...",msg..s.." ..."..z) else Report(nil,msg..s.." ..."..z) end
		end
		if ChkNicks() > 0 then
			local tm = os.date()
			for i,v in pairs(Nicks) do
				--Nicks[nick] = {sr,v,Warns}
				--["badfile"] = {0,1,"Badfiles are not allowed here."},
				local Warns,Action,Response,Warned = v[2][1],v[2][2],v[2][3]
				if Action > 0 and not Exc[i] then
					local file = string.format("%q",v[1])
					local rsn,msg,rpt,wmsg = "Illegal file: "..file,"You are being kicked for "..file..
					" in your share. Please remove it before you return. "..Response,
					i.." with I.P. ? was kicked for illegal file: "..file,"You have an illegal file your "..
					"share: : "..file..". Please remove it. You have [0] warnings left."
					local log = "[Kick][I.P.: ? ] User: "..rpt.." - "..tm
					local t = Core.GetUser(i)
					if t then
						if not ChkUsr(t.iProfileNumber) then
							rpt = rpt:gsub("?",t.sIP)
							log = log:gsub("?",t.sIP)
							if Action == 2 then
								if Warns > 0 then
									v[2][1] = (Warns - 1)
									if not Warned then Warned = tostring(v[2][1]) end
									wmsg = wmsg:gsub("%b[]","["..Warned.."]")
									rpt = rpt:gsub("kicked","warned")
									log = log:gsub("%[Kick%]","[Warned]")
									Core.SendToUser(t,"<"..Bot.."> "..wmsg.."|")
								else
									msg = msg:gsub("kicked","banned")
									rpt = rpt:gsub("kicked","banned")
									log = log:gsub("%[Kick%]","[Ban]")
									Core.SendToUser(t,"<"..Bot.."> "..msg.."|")
									local BanTab = {
									[1] = BanMan.BanNick(t.sNick, rsn, Bot), --Nick Ban
									[2] = BanMan.BanIP(t.sIP, rsn, Bot, false), -- IP Ban
									[3] = BanMan.Ban(t, rsn, Bot, false), -- Nick/IpBan
									}
									if not BanTab[BanLevel] then
										Report("Banning of "..t.sNick.." has failed.")
									end
								end
							else
								if Warns > 0 then
									v[2][1] = (Warns - 1)
									if not Warned then Warned = tostring(v[2][1]) end
									wmsg = wmsg:gsub("%b[]","["..Warned.."]")
									rpt = rpt:gsub("kicked","warned")
									log = log:gsub("%[Kick%]","[Warned]")
									Core.SendToUser(t,"<"..Bot.."> "..wmsg.."|")
								else
									Core.SendToUser(t,"<"..Bot.."> "..msg.."|")
									Core.Kick(t,Bot,rsn)
								end
							end
							if ReportLevel >= 1 then Report(rpt) end
							Logger(log)
						end
					end
				end
				Nicks[i] = nil
			end
		end
		local count = ChkNicks()
		if count == 0 and next(Used) and #Used >= #Words then
			TmrMan.RemoveTimer(Tm) Tm = nil
			if ReportLevel ==3 then Report("Stopping timer...") end
		end
	end
end

UserConnected = function(user)
	if not Tm then
		Tm = TmrMan.AddTimer(1000 * Secs)
		if ReportLevel == 3 then Report("FileSearch timer has started again.") end
	end
	math.randomseed(os.clock())
	Used = {}
end
OpConnected,RegConnected,MyINFOArrival = UserConnected,UserConnected,UserConnected

Report = function(msg,sb)
	if msg and msg ~= "" then
		if ReportNick ~= "" then
			local rn = ReportNick
			local op = Core.GetUser(rn)
			if op then
				if PmOnly then Core.SendPmToUser(op,Bot,msg.."|") else Core.SendToUser(op,"<"..Bot.."> "..msg.."|") end
				if sb then Core.SendToUser(op,"<"..Bot.."> "..sb.."|") end
			else
				SendToChat(Bot,msg)
			end
		else
			if PmOnly then Core.SendPmToOps(Bot,msg.."|") else Core.SendToOps("<"..Bot.."> "..msg.."|") end
			if sb then Core.SendToOps("<"..Bot.."> "..sb.."|") end
		end
	end
end

OnError = function(msg) if ReportLevel > 0 then Report(msg) end end
ChkUsr = function(i) if Profiles[i] then return Profiles[i][1] else return false end end
ChkUsed = function(x) for a,b in ipairs(Used) do if b == x then return true end end return false end
ChkNicks = function() local x = 0 for i,_ in pairs(Nicks) do x = x + 1 end return x end

ChkWrd = function()
	if next(Used) and #Used >= #Words then
		Used = {}
		math.randomseed(os.clock())
		if ReportLevel ==3 then Report("Word list expended...") end
		return nil
	end
	local x = math.random(#Words)
	while ChkUsed(x) do x = math.random(#Words) end
	table.insert(Used,x)
	local M = collectgarbage("count")
	local pct = math.floor(((M/Mem) * 100))
	if pct > 120 then collectgarbage("collect") end
	return x
end

SearchArrival = function(user, data)
	local nick = user.sNick
	if not Exc[nick] then
		if not ChkUsr(user.iProfile) then
			local _,_,s = data:find("([^?]+)|$")
			if s then
				if ReportLevel == 3 then Report(nick..": "..s) end
				for i,v in ipairs(Words) do
					if s:lower():find(v:lower()) then
						local Send,U,B,H,I,P,X
						Send,U,B,X = Core.SendToNick,user.sNick,SetMan.GetString(21),true
						H,I,P = SetMan.GetString(0),Core.GetHubIP(),SetMan.GetString(4)
						local Res = s..string.char(92)..U..", Illegal string "..
						"detected, search disabled."..string.rep("\t",20)
						Log = Log.."[Search] User: "..U.."\tPattern: "..string.format("%q",i)..
						"\tSearch String: "..string.format("%q",s).."\tI.P.\t"..user.sIP.."\tDate: "..
						os.date("%B %d, %Y at: %I:%M")..string.sub(string.lower(os.date("%p")),1,1).."\n"
						local msg = "*Illegal file search from: "..U..
						". Using I.P: "..user.sIP.." Searched For: "..s..".*"
						msg = msg:gsub(" ",string.char(160))
						local x,z = 1,string.rep("\t",50).."is kicking because:"
						if ReportLevel > 1 then Report(msg,msg..z) end
						Logger(Log)
						if AlwaysTTH then H = "TTH:ZDAWKJRHFFEJ7IOXZ2A5HTTHOY36GQLFAQWTM6Q" end
						return Send(U,"$SR "..B.." "..Res.." 0 0/0"..H.." ("..I..":"..P..")"),X
					end
				end
			end
		end
	end
end

SRArrival = function(user, data)
	local nick = user.sNick
	if not Exc[nick] then
		if not ChkUsr(user.iProfile) then
			if nick and not Nicks[nick] then
				local c5 = string.char(5)
				local _,_,hash = data:find(c5.."TTH%:(%w+) %(")
				local _,_,sr = data:find("^$SR %S+ ([^"..c5.."]+)"..c5)
				if sr then
					if ReportLevel == 3 then Report("Search result from "..nick..": "..sr) end
					for i,v in pairs(Patts) do
						local match = false
						if hash then 
							if hash:find(i,1,true) then match = true hash = "\tTTH:"..hash end
						else
							hash = ""
						end
						if sr:lower():find(i:lower():gsub("[%p%c]","%%%1")) then match = true end
						if match then
							if ReportLevel > 1 then
								Report(nick.." - responded to an illegal file search for: "..
								"["..i:gsub("|","&#124;").."] Matching item: "..sr..hash)
							end
							Nicks[nick] = {sr,v[3]}
							T[i] = T[i] + 1
							Log = Log.."[File] User: "..nick.."\tPattern: "..string.format("%q",i)..
							"\tFile: "..string.format("%q",sr).."\tI.P.\t"..user.sIP.."\tDate: "..
							os.date("%B %d, %Y at: %I:%M")..string.sub(string.lower(os.date("%p")),1,1).."\n"
							local msg = "*Illegal file result from "..nick..": "..
							sr..hash..". Found [ "..T[i].." ] times this session.*"
							msg = msg:gsub(" ",string.char(160))
							local z = string.rep("\t",50).."is kicking because:"
							if ReportLevel > 1 then Report(msg,msg..z) end
							Logger(Log)
							break
						end
					end
				end
			end
		end
	end
end
UDPSRArrival = SRArrival

ToArrival = function(user,data)
	local _,_,to = data:find("^$To: (%S+) From:")
	if to and to:lower() == ReportNick:lower() then
		if ReportProfiles[user.iProfile] then
			local _,_,msg = data:find("%b<> (.+)|$")
			if msg then SendToChat(user.sNick,msg) end
		else
			return Core.SendPmToNick(user.sNick,ReportNick,"Sorry "..user.sNick..", this chat is for "..
			"select profiles only. Your message has not been sent. :("),true
		end
	end
end

SendToChat = function(nick,msg)
	local Tab = Core.GetOnlineUsers()
	for _,usr in ipairs(Tab) do
		if ReportProfiles[usr.iProfile] then
			if usr.sNick:lower() ~= nick:lower() then
				Core.SendToNick(usr.sNick,"$To: "..usr.sNick.." From: "..Bot..
				" $<"..nick.."> " ..msg.."|")
			end
		end
	end
	collectgarbage("collect")
end

Logger = function(str)
	local f,e = io.open("FileSearch.log")
	if f then
		local e = f:seek("end")
		f:close()
		if e > MaxLog then
			f,e = io.open("FileSearch.log","w")
			f:write("") f:close()
		end
	else
		if ReportLevel > 0 then local err = e:sub(1,-2) Report(err,err) end
	end
	f,e = io.open("FileSearch.log","a+")
	if f then
		f:write(str) f:flush() f:close()
	else
		if ReportLevel > 0 then local err = e:sub(1,-2) Report(err,err) end
	end
	Log = ""
end
for i,v in pairs(Patts) do T[i] = 0 end
Secs = math.max(Secs,15)
math.randomseed(os.clock())
Mem = collectgarbage("count")


can some one convert this. so i dont see when the scripts serach for illegal files..
and add this files so the scripts kick user with this..



{".raidenftpd.acl" , "Dela inte ut FTP filer. Ta bort den!"},
   {".pls" , "Dela inte ut Playlist filer. Ta bort den!"},
        {".PLS" , "Dela inte ut Playlist filer. Ta bort den!"},
   {".permission" , "Dela inte ut Skit filer. Ta bort den!"},
   {".msg" , "Dela inte ut Message filer. Ta bort den!"},
   {".ccd" , "Dela inte ut CloneCD filer. Ta bort den!"},
   {".checked" , "Remove this file!"},
   {".debug" , "Remove this file!"},
   {".idx" , "Remove this file!"},
   {".ioFTPD" , "Remove this file!"},
   {"Thumbs.db" , "Remove this file! (REMEMBER this file is HIDDEN!!!)"},
   {"Desktop.ini" , "Remove this file! (REMEMBER this file is HIDDEN!!!)"},
   {"autorun.inf" , "NO sharing of installed / packed programs or games"},
   {"valve.avi" , "NO sharing of installed / packed programs or games"},
   {"virscan.dat" , "NO sharing of installed / packed programs or games"},
   {"Netlimiter" , "NO sharing of installed / packed programs or games"},
   {"childporn" , "NO sick kid Porn inhere!"},
   {"animalsex" , "NO Animalsex files here!"},
   {"svastika" , "NO Nazi/white power music HERE!!!"},
   {"part.met" , "NO sharing of incomplete downloads"},
   {".getright" , "NO sharing of incomplete downloads"},
   {"share faker" , "NO tools for fake sharing allowed"},
   {"share hacker" , "No tools for fake sharing allowed"},
   {".dctmp" , "NO sharing of incomplete downloads"},
   {"explorer.scf" , "Don't share installed windows, i.e."},
   {"system32.dll" , "Don't share installed windows."},
   {"Ultima Thule" , "Rasistisk musik"},
   {"msgsc.dll" , "Installerade program"},
   {"COMCTL32.DLL" , "Installerade program"},
   {"studio.xnf" , "Installerade program"},
   {"command.com" , "Installerade program"},
   {"wab.exe" , "Installerade program"},
   {"Exempelspelningslista.wpl" , "Dela inte ut mina dokument mappen."},
   {"npdsplay.dll" , "Installerade program"},
   {"Pluton Svea" , "Rasistisk musik"},
   {"Queue.xml" , "Don't share installed"},
   {"Favorites.xml" , "Don't share installed"},
   {"netlimiter" , "netlimiter"},
   {"ws_ftp.log" , "Ta bort dina Loggfiler"},
   {".dll" , "Remove this file!"},
   {"imdb.nfo" , "Remove this file!"},
   {"IMDB.NFO" , "Remove this file!"},
    {"WS_FTP.LOG" , "Ta bort dina Loggfiler"},
    {"desktop.ini" , "Ta bort denna fil. Det ?r en systemfil"},
    {"ufxpcrc.log" , "Ta bort dina Loggfiler"},
    {"Default.PLS" , "Denna fil ska inte finnas i sharen"},
    {"Ultima Thule - Sverige Fosterland.mp3" , "Dela inte ut Rasistisk musik"},
   {"Ultima_Thule" , "Dela inte ut Rasistisk musik"},
    {"Cdlabel.alb" , "Cdlabel.alb det ?r en typ av playlist fil, TA BORT DEN"},
    {"Rule.of.rose" , "Vi till?ter inte detta spel h?r i hubben, TA BORT DET"},
    {"Rule_of_rose" , "Vi till?ter inte detta spel h?r i hubben, TA BORT DET"},
    {"Rule-of-rose" , "Vi till?ter inte detta spel h?r i hubben, TA BORT DET"},
    {"Vargflock" , "Dela Inte ut Rasistisk musik"},
   {".Torrent." , "G?r inte reklam f?r torrents"},
   {".torrents." , "G?r inte reklam f?r torrents"},
   {".Torrent" , "G?r inte reklam f?r torrents"},
   {"Blackshirts" , "Dela inte ut Rasistisk musik"},
   {"enh?rjarna" , "Dela inte ut Rasistisk musik"},
   {"odinslaw" , "Dela inte ut Rasistisk musik"},
   {"Skullhead" , "Dela inte ut Rasistisk musik"},
   {"www.torrentazos.com" , "Dela Inte ut Torrentsreklam filer"},   



tnx for all help // Swedal

SMF spam blocked by CleanTalk