mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
I am writing a quick bot to check to see if a user is a spam bot we are gettin plagued with. these spam bots message everyone in the channel "come watch me on my webcam!" and has a link that is http:// + their hostmask + /me.mpg

i have the code to get their hostmask when they connect to my network:

Code:
on *:snotice:*client connecting*: {
  if ($6 == on) {
    /whois $9
  }
  if ($6 == at) {
    /whois $8
  }
}
raw 378:*: {
  set %host $remove($6, @)
  set %host1 $remove(%host, *)
}


now i need to know how to check to see if the address http://theirhostmask/me.mpg is valid or not. how do i do that?


thanks for your help!

Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
heres what the spam messages look like:

<^u{]> Come watch me on my webcam and chat /w me :-) url removed


Disclaimer: DO NOT CLICK ON THIS LINK IT IS A TROJAN. Im just puttin this here so that you all can see what im talkin about.

Last edited by d00dman; 09/12/03 04:22 PM.
Joined: Sep 2003
Posts: 112
E
Vogon poet
Offline
Vogon poet
E
Joined: Sep 2003
Posts: 112
how about you look for webcam/pic/photo/*jpg/*mpg/*mpeg ...
instaead of searching for "on" and "at" in the message ...
...
i am thinking if my boss doc leaves a message for me on irc, while my pc is on and i am not on the desk, which is like
" you take the peads ward on sunday at 7 am and you have no off... "
i would kick my boss for typing on and at and not spamming me ?

and i think you spammed the forum and the disclaimer thing does make it legal you know ...

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
on *:TEXT:$(http://*/me.mpg):#:

?


If it ain't broken, don't fix it!
Joined: Dec 2002
Posts: 111
E
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
you all arent getting it lol

u dont want to wait for the thing to message my bot, i want to check to see if it is infected before it even has a chance to message anyone, hence why i have the on *:snotice etc etc

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Try this:

Code:
on *:START: {
  /hmake spam 10
  if ($isfile(spam.hsh)) /hload spam spam.hsh
}
on *:JOIN:#: {
  var %mask = $gettok($address($nick, 5), 2, $asc(@))
  if ($hget(spam, %mask)) {
    if (($me isop $chan) || ($me ishop $chan)) /kick $chan $nick Don't spam here
    else /msg $chan Notice: $nick is a known spammer.
  }
}
on *:TEXT:*: {
  var %msg = Come watch me on my webcam and chat /w me :-)
  if (%msg isin $1-) {
    var %mask = $gettok($address($nick, 5), 2, $asc(@))
    /hadd spam %mask
    /hsave spam spam.hsh
    if (($me isop $chan) || ($me ishop $chan)) /kick $chan $nick Don't spam here
    else /msg $chan Notice: $nick is a known spammer.
  }
}


8note: I didn't test it, but let me know if it works ok. Also note that if they have a "rejoin on kick" script/preference, this will go in an infinite loop. If you want it to ban also, let me know and I'll modify it.


-KingTomato
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
on *:START:{
  hmake spam 10
  if ($isfile(spam.hsh)) /hload spam spam.hsh
}
on *:JOIN:#:{
  if ($hget(spam,[color:green]$site[/color])) {
    if (($me isop $chan) || ($me ishop $chan)) /kick $chan $nick Don't spam here
    else /msg $chan Notice: $nick is a known spammer.
  }
}
on *:TEXT:*:[color:red]#:[/color]{
  if (*Come watch me on my webcam and chat /w me* iswm $strip($1-)) {
    hadd spam [color:green]$site[/color] [color:red]&lt;value&gt;[/color]
    hsave spam spam.hsh
    if (($me isop $chan) || ($me ishop $chan)) /kick $chan $nick Don't spam here
    else /msg $chan Notice: $nick is a known spammer.
  }
}


Link Copied to Clipboard