Bad files search with command
 

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

Bad files search with command

Started by Loading, 27 June, 2005, 21:26:01

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Loading

hello ppl

i have this script :

---------------------------------------------------------------------------------------------------
-- Advanced BadFile Active Search // Stripped from Thor 6
-- By: NightLitch 2005-03-04
---------------------------------------------------------------------------------------------------
tBadFiles = {

	{"explorer.scf" , "NaO partilhar programas instalados"},
	{".temp.mp3" , "Nao partilhar downloads incompletos"},
	{"_INCOMPLETE_" , "Nao partilhar downloads incompletos"},
	{"download123456789.dat" , "Nao partilhar downloads incompletos"},
	{"part.met" , "Nao partilhar downloads incompletos"},
	{".getright" , "Nao partilhar downloads incompletos"},
	{"autorun.inf" , "NaO partilhar programas instalados"},
	{"DCPlusPlus.exe" , "Nao partilhar o directorio do DC++ / Programas instalados"},
	{"valve.avi" , "NaO partilhar programas instalados"},
	{"virscan .dat" , "NaO partilhar programas instalados"},
	{"Netlimiter" , "Nao permitimos este tipo de programas a ser partilhado no nosso hub"},
        {"explorer.exe" , "Nao partilhar o directorio do windows"},
        {".temp" , "Nao partilhar downloads incompletos"},
        {".dctemp" , "Nao partilhar downloads incompletos"},
        {".dll" , "Nao ? permitida a partilha de DLL's"},

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

tTimer = {}

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

function OnTimer()
	for i=1,table.getn(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

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

tCall = {}
tCall["BadFileSearch"] = function(sUser,Path,Who,FileSize)
	if sUser.bOperator then return 0 end
	if Who == "SlotFetch" then
		local FileFound, FileReason = BadFiles(Path)
		if FileFound then
			sUser:SendPm(frmHub:GetHubBotName(), "*** Foste kikado porke "..FileReason..". "..Path.." "..Units(FileSize))
			SendPmToOps(frmHub:GetHubBotName(), "*** O User "..sUser.sName.." Foi kikado porke "..FileReason..". "..Path.." "..Units(FileSize))
                        SendToAll(frmHub:GetHubBotName(), "*** O User "..sUser.sName.." Foi kikado porke "..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 index = 1, table.getn(tUnits) do
			if(intSize < 1024) then
				sUnits = tUnits[index];
				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 = 1, table.getn(tBadFiles) do
		if string.find(PathStr, tBadFiles[i][1]) 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

i want is disable check user on login and the timer
and add this command :  !scan

just the op's can use this command

and when find a user with bad files sends a pm to operator with the directory ho the file is stored

can anyone amake this modification ?

Best regards

Loading

Loading

but i tried the dcdm and i don't like it

:(

best regards


Loading

Loading

ok

can anyone make this change or tell me were i can find one script with this commands an functions ?



best regards



Loading

SMF spam blocked by CleanTalk