PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Daywalker on 27 February, 2005, 19:52:45

Title: Bad search checker with totalkey
Post by: Daywalker on 27 February, 2005, 19:52:45
I used an old script from Hawk that we modifyed with a totalkey so we cld check what the user realy was searching for, it gave the total search string ....is it possible that some1 cld write such a script for me again?

badsearchfiles:
preteen
lolita
r@ygold
animalsex
incest
etc...

i prefer message to opchat and no autokick  :)

we want to judge that ourself  ;)
Title:
Post by: [NL]Pur on 27 February, 2005, 20:13:08
can you post that modified script?
Title:
Post by: Daywalker on 27 February, 2005, 20:34:07
Sure no problem  :)


-- pm to ops chat of any one
-- searching for bad files
-- by ??????Hawk??????
-- Modded by [NL-DC]Tosty_82 & Daywalker?
-- 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\nTotalkey:- \t".. sSearch .."\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\nTotalkey:- \t".. sSearch .."\r\n\r\n" )  
end
end
end
end
end


the end result is something like this:

This user is searching for Bad files Please check their share:-

Username:-   xxxxxxxx
IP:-      xx.x.xx.x.x
Searched for:-   rape
Totalkey:-    raped
Title:
Post by: Daywalker on 08 March, 2005, 23:00:12
just wanted it back in attention...it worked alway fine for us  :D
Title:
Post by: TTB on 13 May, 2005, 00:47:34
Hi...

for the ppl who get also search intercepts from TTH: hashing codes, add this line:

if strsub(sSearch,1,4) ~= "TTH:" thenafter line:
if (strfind(strlower(sSearch),key)) then
Don't forget to put an extra "end" in the for loop! You have to do this twice (there are 2 for-loops).

*edited* >> was lua5, now lua4
Title: Error
Post by: CaSaNoVa on 13 May, 2005, 02:55:08
Syntax ...a\Desktop\0.3.3.0.b17.05.nt.rls\scripts\badfiles.lua:21: attempt to call method `EnableFullData' (a nil value)
Title:
Post by: Madman on 13 May, 2005, 04:33:28
This one is in lua 4 click here for Lua 5 (http://board.univ-angers.fr/thread.php?threadid=4048&boardid=26&sid=7efb0be7a0205d2ca34b4e51527d74d3) version