Pm to Ops chat of bad file searchers
 

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

Pm to Ops chat of bad file searchers

Started by ??????Hawk??????, 29 June, 2004, 00:37:51

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

??????Hawk??????

heya peeps  :-)

just a little something i did for my hub

thaught id share it...

-- pm to ops chat of any one
-- searching for bad files
-- by ??????Hawk??????  
-- 28-06-2004
BadFiles = { 
["childsex"]=1, 
["childporn"]=2, 
["underage"]=3, 
["animalsex"]=4, 
["preteen"]=5,
["r@ygold"]=6, 
["lolita"]=7, 
["rape"]=8,
["incest"]=9, 
["beastiality"]=10, 
["rape"]=11,
}

function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(tUser, sData)
	if tUser.bOperator == nil then
		if strsub(sData, 1, 12) == "$Search Hub:" then 
			local _,_,  sSearch = strfind(sData, "$Search Hub:%S+%s+%a%?%a%?%d+%?%d+%?(.*)|")
				for key,a in BadFiles do 
					if( strfind( strlower(sSearch), key) ) then 
						SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\n" ) 
					end 
				end	
		elseif strsub(sData, 1, 7) == "$Search" then 
			local _,_, sSearch = strfind(sData, "%$Search %d+%.%d+%.%d+%.%d+:%d+%s+%a%?%a%?%d+%?%d+%?(.*)|")
				for key,a in BadFiles do 
					if( strfind( strlower(sSearch), key) ) then 
						SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\n" ) 
					end 
				end
		end
	end
end

blackwings

I have couple of question about this script

1) This script works both on active and passive user, is that correct?

2) Could you add two tables? Like one talbe with file names that a user should get kicked for and one table with file names that a user should get banned for.


??????Hawk??????

#2
try this m8.

and yes it  works on both passive and active searches



-- pm to ops chat of any one
-- searching for bad files
-- ban or warn user
-- by ??????Hawk??????  
-- 28-06-2004
Bot = "Bad Search"
BadFiles = { 
["childsex"]="ban", 
["childporn"]="ban", 
["underage"]="ban", 
["animalsex"]="ban", 
["preteen"]="ban",
["r@ygold"]="ban", 
["lolita"]="warn", 
["rape"]="warn",
["incest"]="warn", 
["beastiality"]="warn", 
["rape"]="warn",
}

function Main()
	frmHub:EnableFullData(1)
end

function DataArrival(tUser, sData)
	if tUser.bOperator == nil then
		if strsub(sData, 1, 12) == "$Search Hub:" then 
			local _,_,  sSearch = strfind(sData, "$Search Hub:%S+%s+%a%?%a%?%d+%?%d+%?(.*)|")
				for key,a in BadFiles do 
					if( strfind( strlower(sSearch), key) ) then 
						if BadFiles[key] == "ban" then
							SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user has been banned for searching for Bad files:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\n" ) 
							tUser:SendPM(Bot, "\r\n\r\nYou have been banned for searching for Bad files:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\nThese Details have been Logged" ) 
							tUser:Ban()
							tUser:Disconnect()
						elseif BadFiles[key] == "warn" then
							SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nwThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\n" ) 
							tUser:SendPM(Bot, "\r\n\r\nYou are searching for Bad files:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\nThese Details have been Logged \r\n\r\n! ! ! THIS IS A WARNING ! ! !" ) 
						end

					end 
				end	
		elseif strsub(sData, 1, 7) == "$Search" then 
			local _,_, sSearch = strfind(sData, "%$Search %d+%.%d+%.%d+%.%d+:%d+%s+%a%?%a%?%d+%?%d+%?(.*)|")
				for key,a in BadFiles do 
					if( strfind( strlower(sSearch), key) ) then 
						if BadFiles[key] == "ban" then
							SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user has been banned for searching for Bad files:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\n" ) 
							tUser:SendPM(Bot, "\r\n\r\nYou have been banned for searching for Bad files:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\nThese Details have been Logged" ) 
							tUser:Ban()
							tUser:Disconnect()
						elseif BadFiles[key] == "warn" then
							SendPmToOps(frmHub:GetOpChatName(), "\r\n\r\nThis user is searching for Bad files Please check their share:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\n" ) 
							tUser:SendPM(Bot, "\r\n\r\nYou are searching for Bad files:-\r\n\r\nUsername:-\t"..tUser.sName.."\r\n\IP:-\t\t" .. tUser.sIP .. "\r\nSearched for:-\t"..key.."\r\n\r\nThese Details have been Logged \r\n\r\n! ! ! THIS IS A WARNING ! ! !" ) 
						end
					end 
				end
		end
	end
end





just a point m8  ..  this will ban any ops working for other hubs if they'r not opped in your hub

blackwings

#3
another question, can I use file extensions in the script, like .dll?

EDIT: another question, is this script for searching users share for bad files or is it checking on what users search for??


??????Hawk??????

#4
yes you can use file extentions.

but remember if the user has their dc set to automaticaly search for alternative d/l locations
their search string will contain the full file name of anything there downloading ( including extention )  
so you may ban innocent users..

this script ONLY  intercepts users searches.


the script was never meant to be automated because there so many veriables that could ban an innocent user.

it was wrote purely as a tool to assist op's in keeping the Sick users out .

SMF spam blocked by CleanTalk