PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: RDB on 24 April, 2004, 13:07:24

Title: Share Check and reporting
Post by: RDB on 24 April, 2004, 13:07:24
Is it possible to look for keywords in someones share and send a message to an operator of each file that contains this keyword for each user and the folder in which it can be found?
Title:
Post by: plop on 24 April, 2004, 13:48:26
QuoteOriginally posted by RDB
Is it possible to look for keywords in someones share and send a message to an operator of each file that contains this keyword for each user and the folder in which it can be found?
search for illegalist/badfiles or other names, there are over 10 versions of those scripts posted on the forum.

plop
Title:
Post by: RDB on 24 April, 2004, 14:23:33
I have done so, but there is no real script that can report back to the ops as to which user is sharing it and in which folder, for the opertor to take control of the situation from there as opposed to an automated actio such as warn/kick/ban...
Title:
Post by: nErBoS on 24 April, 2004, 14:52:21
Hi,

Try this one...

--Requested by RDB
--Made by nErBoS
--Based on the Illegalist/Bad-Files

sBot = "Note-ME"

Files = {
".dll",
".tmp",
".temp",
".vob",
".met",
".met.part",
".part.met.bak",
"incest",
"preteen",
"download0",
"download1"
}

function Main()
frmHub:RegBot(sBot)
end

function NewUserConnected(user, data)
frmHub:EnableSearchData(1)
for i=1, getn(Files) do
user:SendData("$Search Hub:"..sBot.." F?F?0?1?"..Files[i])
end
end

function DataArrival(user, data)
if( strsub(data, 1, 3) == "$SR" ) then
if (not user.bOperator) then
local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
SendPmToOps(sBot, "The User "..user.sName.." is sharing ilegal stuff in "..path)
frmHub:EnableSearchData(0)
end
end
end

Best regards, nErBoS
Title:
Post by: jsjen on 26 April, 2004, 14:52:36
Does this only pick up illegal files on registered users?

it seems to work on files not on the list "lol"

here is a message.

"is sharing ilegal stuff in RHCP Audios\rhcp-1986-uncensored.txt"

this is what files I have in the script

Files = {
".dll",
".tmp",
".temp",
"mothers milk",
".met",
".met.part",
".part.met.bak",
"incest",
"preteen",
"download0",
"program files",
"system32",
"windows",
"download1"
}


am I wrong some how?
Title:
Post by: nErBoS on 26 April, 2004, 23:47:56
Hi,

Sorry you are right forgot something...

--Requested by RDB
--Made by nErBoS
--Based on the Illegalist/Bad-Files

sBot = "Note-ME"

Files = {
".dll",
".tmp",
".temp",
".vob",
".met",
".met.part",
".part.met.bak",
"incest",
"preteen",
"download0",
"download1"
}

function Main()
frmHub:RegBot(sBot)
end

function NewUserConnected(user, data)
frmHub:EnableSearchData(1)
for i,v in Files do
user:SendData("$Search Hub:"..sBot.." F?F?0?1?"..i)
end
end

function DataArrival(user, data)
if( strsub(data, 1, 3) == "$SR" ) then
if (not user.bOperator) then
if (FindWhat(data) == 1) then
local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
SendPmToOps(sBot, "The User "..user.sName.." is sharing ilegal stuff in "..path)
frmHub:EnableSearchData(0)
end
end
end
end

function FindWhat(data)
local found = 0
for i=1, getn(Files) do
if( strfind(strlower(data), Files[i]) ) then
found = 1
end
end
return found
end

Best regards, nErBoS
Title:
Post by: jsjen on 02 May, 2004, 03:06:16
still bringing up things that are not related to items to be searched for.

eg "is sharing ilegal stuff in Audios\rhcp-1986-track1.mp3"

have tested for 5 days with guys bringing in supposibly illegal files/ :S and it doesnt pick them up at all. Just seems to pick random files.

hope we can get this one going. It will be awsome to have
Title:
Post by: NotRabidWombat on 02 May, 2004, 05:43:50
It's a BAD idea to run this as a script on the hub. You're taking away precious bandwidth, shame on you.

A better idea is to run these sort of things as operator clients.

DC++k has a forbidden file option (and many other features)
http://www.fukt.bth.se/~k/dcpp/

BCDC++ has client side scripting, which could do ANYTHING.

-NotRabidWombat
Title:
Post by: jsjen on 02 May, 2004, 09:42:12
can you have it so it checks as they enter? isnt that what it does.
We are sick of shares with windows files and program files so this would be a valuable tool for ops to sort users who cant read rules.

BTW how much bandwith does this take?
Title:
Post by: Corayzon on 02 May, 2004, 11:03:10
i agree with NotRabidWombat...this would take quite some bandwidth on a large hub...

but instead on running this on socket connect...tri having a timer set x minutes and set it dependent of how large the hub is...then...

u can send this data to all users every say 20 mins..which would be allright in a way...

but the best idea yet i think....is to run a count on the user that the search is up...and have a timer counting through user by user sending the search...on say every 1 min...

this would be better on ya connection (with right times for usercounts and bandwidth), but still keep all those bad files out at a good rate
Title:
Post by: nErBoS on 02 May, 2004, 19:43:58
Hi,

Here is the script fixed..

--Requested by RDB
--Made by nErBoS
--Based on the Illegalist/Bad-Files

sBot = "Note-ME"

Files = {
".dll",
".tmp",
".temp",
".vob",
".met",
".met.part",
".part.met.bak",
"incest",
"preteen",
"download0",
"download1"
}

function Main()
frmHub:RegBot(sBot)
end

function NewUserConnected(user, data)
frmHub:EnableSearchData(1)
for i=1, getn(Files) do
user:SendData("$Search Hub:"..sBot.." F?F?0?1?"..Files[i])
end
end

function DataArrival(user, data)
if( strsub(data, 1, 3) == "$SR" ) then
if (not user.bOperator) then
if (FindWhat(data) == 1) then
local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
SendPmToOps(sBot, "The User "..user.sName.." is sharing ilegal stuff in "..path)
frmHub:EnableSearchData(0)
end
end
end
end

function FindWhat(data)
local found = 0
for i=1, getn(Files) do
if(strfind(strlower(data), Files[i]) ) then
found = 1
end
end
return found
end

I agree with RabidWombat dck++ is better in this type of searches.

Best regards, nErBoS