This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

spam detector?

Old posts that have not been replied to for several years.
Locked
d
dossi
Voice
Posts: 30
Joined: Mon Dec 20, 2004 9:21 pm

spam detector?

Post by dossi »

This might be complicated, any help would be appriciated:

I'm looking for a script which sits in channel, and looks for spam. Spam being something like "Selling my CDKey, PM me with offers!" etc. etc.

Once it finds the spam, the bot would opnotice, or message it's main channel with a log of the user spamming, and in what channel.

e.g. [Billy:#spam] says "Selling my CDKey!"
[Bot:#bothouse] says [timestamp] "[Billy:#spam] Selling my CDKey!"


Would this be too complicated? Am I asking too much?
Thanks in advance.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

What you requested in itself is quite easy. The hard part would be getting the bot to destinguish what was spam and what was legitimate text. the only real way to do this is have a set of specific badwords like "http" or "cd key" and if someone who is not a registed user on the bot says one of the 'badwords' then they get reported. the easiest thing to do is in your IRC client just add a list of badwords to hilite :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
d
dossi
Voice
Posts: 30
Joined: Mon Dec 20, 2004 9:21 pm

Post by dossi »

Yes, I've seen scripts with a list (that can be addded to) with a list of badwords, e.g. *selling cdkey* or *trading cdkey* -

The only reason I'm not using my IRC client to do this is because I don't want to have to be in all of the spam channels at once, I'd rather the bot sit in them and report to it's main channel.

I did find a script called Spam Detective by MarlbMan, although it looks pretty old.

Could this be changed to suit my needs?

Code: Select all

##### 23.08.03
# Spam Detective v1.0 by MarlbMan
# irc.newnet.net #complete-chat
#####
#####
#####
# Detects on join/on part spam in one channel, and alerts in another channel.
#####
#####
# Credits: I got the idea from Torr/MC_8's Spam Check. I wanted a script that would
#          join/part a channel at specified intervals, but instead of kicking/banning
#          I wanted it to alert the ops in another channel. This is my 5th script, but
#          the first I've made public. Critism is welcome. I will be releasing a few
#          more very soon.
#####
#####
# Settings:
#####

# Which channel shall we monitor for spam?
set spamdet(monitor_chan) "#complete-warez"
# Which channel shall we posts alerts in?
set spamdet(alert_chan) "#complete-servers"
# How many minutes shall we idle in channel?
set spamdet(idle_time) "9"
# How many seconds shall we stay gone?
set spamdet(gone_time) "60"
# Exempt by nick (seperate by ,)
set spamdet(nexempt) "ChanServ, MarlbMan"
# Exempt by host (seperate by ,)
set spamdet(hexempt) "cwbot@64.124.16.33"
# CTCP Keys to ignore (should always include action to prevent actions being reported)
set spamdet(kexempt) "ACTION"

#####
# Code (If you edit below this line you will hemmorage uncontrollably from your rectum)
#####
set spamdet(ver) "1.0"
if {![string match *spamdetect* [timers]]} {timer $spamdet(idle_time) spamdetect}

proc spamdetect {} {
global spamdet botnick
channel set $spamdet(monitor_chan) +inactive
utimer $spamdet(gone_time) "channel set $spamdet(monitor_chan) -inactive"
if {![string match *spamdetect* [timers]]} {timer $spamdet(idle_time) spamdetect}
}
spamdetect

proc EchoMESG { nick uhost handle args } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: MESG"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $args"
  }
 }
}

proc EchoNOTC { nick uhost handle args target } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: NOTC"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $args"
  }
 }
}

proc EchoCTCP { nick uhost handle target key args } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
if {![string match *$key* $spamdet(kexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: CTCP"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $key $args"
   }
  }
 }
}

bind ctcp -|- * EchoCTCP
bind notc -|- * EchoNOTC
bind msgm -|- * EchoMESG

putlog "Spam Detective v1.0 by MarlbMan loaded"

Thanks again.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

i think your best bet is to use a decent spam detect script like spamcop by demond. check the archives.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You mean spambuster :P
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Err yeah lol I knew what I meant. :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked