Anti-Spam Software
Moderator: Moderators
-
- Posts: 82
- Joined: 2004-03-18 15:15
Anti-Spam Software
Hello, i am trying to use this anti-spam software which can be found at http://mitglied.lycos.de/dirtyfinger01/download.html , it is the "SpamBan 1.2" and i can get it onto my hub and everything but it doesnt seem to work, what could be the problem?? plz help me out
[Changed to a not so missleading title //joakim_tosteberg]
[Changed to a not so missleading title //joakim_tosteberg]
-
- Posts: 82
- Joined: 2004-03-18 15:15
-
- Posts: 82
- Joined: 2004-03-18 15:15
This is what the script is like :
--=====================================
-- SpamBan
---------------------------------------
-- version: 1.2 (06.2.2003)
-- author: DirtyFinger
-- email: [email protected]
-- ICQ : 145873101
-- HomePage: http://mitglied.lycos.de/dirtyfinger01/
-- (Yes, i know i still suck as Web Designer)
--=====================================
-- This script automatically bans pm-spammers and mainchat-spammers.
--
-- This does not protect from spam, but at least the spammer can't come back (at least not with the same ip)
-- For the script to work you might have to change the PtokaX flood-protection values (chat limit in the 'Rules and bots' section)
-- The script bans by default after 30 pms are being sent within 10 seconds.
-- But if the hub disconnects BEFORE the script triggers, no banning is possible and the spammer can come back.
-- So choose some quite generous settings, e.g. the first line of the above spam contains about 400 characters.
-- For the script to trigger you have to allow the users to send 8000 characters per second so the script can trigger.
--
-- Don't worry, real flooders send much much more so you'll be fine.
--
-- Version Changes :
-- 1.2 : bans mainchat flooder too. I didn't implement it in previous versions because i thought ptokax dealt with it.
-- 1.1 : removed the mainchat flooding of ban notifications
-- 1.0 : first version
sBotName = "Desi Police"
PMCount = {}
MainCount = {}
MaxPM = 20 -- more than 20 pms within 10 seconds cause a ban
MaxMain = 20 -- more than 20 mainchat msgs within 10 seconds cause a ban
timeslice = 10*1000 -- 10 seconds
function Main()
frmHub:RegBot(sBotName)
SendToAll(sBotName.." "..date(" launched at %B %d %Y %X "))
SetTimer(timeslice)
StartTimer()
end
--// This function is fired when a new data arrives
function DataArrival(curUser, sData)
if strfind(sData,"$To:") then
if PMCount[curUser.sIP] ~= nil then
PMCount[curUser.sIP] = PMCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if PMCount[curUser.sIP] > MaxPM then
FloodDetected (curUser, sData)
PMCount[curUser.sIP] = -100
end
else
PMCount[curUser.sIP] = 1
end
elseif strfind(sData,curUser.sName,1,plain) == 2 then
if MainCount[curUser.sIP] ~= nil then
MainCount[curUser.sIP] = MainCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if MainCount[curUser.sIP] > MaxMain then
FloodDetected (curUser, sData)
MainCount[curUser.sIP] = -100
end
else
MainCount[curUser.sIP] = 1
end
end
end
function OnTimer()
--for k,v in PMCount do
-- SendToAll("---------",k.."\t"..v)
--end
PMCount = {}
MainCount = {}
end
function FloodDetected (curUser,sData)
local message = " -= Spam Warning =-"
local name,ip = curUser.sName,curUser.sIP
SendToAll ("# "..sBotName.."-Alert #--> "..name .. " has been banned for spamming.")
message = message .."\r\n\t\t"
.. "Violation detected by: " .. name .."\r\n\t\t"
.. "IP: " .. ip .. "\t\r\n\t\t"
.. "Last packet : \t" .. sData
SendPmToOps (sBotName,message)
curUser:Ban()
curUser:Disconnect()
end
--=====================================
-- SpamBan
---------------------------------------
-- version: 1.2 (06.2.2003)
-- author: DirtyFinger
-- email: [email protected]
-- ICQ : 145873101
-- HomePage: http://mitglied.lycos.de/dirtyfinger01/
-- (Yes, i know i still suck as Web Designer)
--=====================================
-- This script automatically bans pm-spammers and mainchat-spammers.
--
-- This does not protect from spam, but at least the spammer can't come back (at least not with the same ip)
-- For the script to work you might have to change the PtokaX flood-protection values (chat limit in the 'Rules and bots' section)
-- The script bans by default after 30 pms are being sent within 10 seconds.
-- But if the hub disconnects BEFORE the script triggers, no banning is possible and the spammer can come back.
-- So choose some quite generous settings, e.g. the first line of the above spam contains about 400 characters.
-- For the script to trigger you have to allow the users to send 8000 characters per second so the script can trigger.
--
-- Don't worry, real flooders send much much more so you'll be fine.
--
-- Version Changes :
-- 1.2 : bans mainchat flooder too. I didn't implement it in previous versions because i thought ptokax dealt with it.
-- 1.1 : removed the mainchat flooding of ban notifications
-- 1.0 : first version
sBotName = "Desi Police"
PMCount = {}
MainCount = {}
MaxPM = 20 -- more than 20 pms within 10 seconds cause a ban
MaxMain = 20 -- more than 20 mainchat msgs within 10 seconds cause a ban
timeslice = 10*1000 -- 10 seconds
function Main()
frmHub:RegBot(sBotName)
SendToAll(sBotName.." "..date(" launched at %B %d %Y %X "))
SetTimer(timeslice)
StartTimer()
end
--// This function is fired when a new data arrives
function DataArrival(curUser, sData)
if strfind(sData,"$To:") then
if PMCount[curUser.sIP] ~= nil then
PMCount[curUser.sIP] = PMCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if PMCount[curUser.sIP] > MaxPM then
FloodDetected (curUser, sData)
PMCount[curUser.sIP] = -100
end
else
PMCount[curUser.sIP] = 1
end
elseif strfind(sData,curUser.sName,1,plain) == 2 then
if MainCount[curUser.sIP] ~= nil then
MainCount[curUser.sIP] = MainCount[curUser.sIP] +1
--SendToAll("----",PMCount[curUser.sIP])
if MainCount[curUser.sIP] > MaxMain then
FloodDetected (curUser, sData)
MainCount[curUser.sIP] = -100
end
else
MainCount[curUser.sIP] = 1
end
end
end
function OnTimer()
--for k,v in PMCount do
-- SendToAll("---------",k.."\t"..v)
--end
PMCount = {}
MainCount = {}
end
function FloodDetected (curUser,sData)
local message = " -= Spam Warning =-"
local name,ip = curUser.sName,curUser.sIP
SendToAll ("# "..sBotName.."-Alert #--> "..name .. " has been banned for spamming.")
message = message .."\r\n\t\t"
.. "Violation detected by: " .. name .."\r\n\t\t"
.. "IP: " .. ip .. "\t\r\n\t\t"
.. "Last packet : \t" .. sData
SendPmToOps (sBotName,message)
curUser:Ban()
curUser:Disconnect()
end
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
-
- Posts: 82
- Joined: 2004-03-18 15:15
-
- Posts: 82
- Joined: 2004-03-18 15:15
This script should do the trick:
http://www.snooze.no-ip.com/sk/viewtopic.php?t=216
More scripts on plop's site:
http://www.plop.nl/ptokaxbots/ptokaxbots.php
Hope you find what you're looking for.
http://www.snooze.no-ip.com/sk/viewtopic.php?t=216
More scripts on plop's site:
http://www.plop.nl/ptokaxbots/ptokaxbots.php
Hope you find what you're looking for.