mIRC Home    About    Download    Register    News    Help

Print Thread
#234765 09/11/11 07:38 PM
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
What do you think about the script? does it work?

Code:
on *:TEXT:!trojanscan*:#:{
  alias trojan 
  .unset %virus
  msg $chan  4Starting the scan on $2
  var %i = 1
  while (%i <= $nick($1,0) ) {
    if ($right($nick($1, %i),1) isnum 0-9) { 
      if ($left($right($nick($1, %i),2),1) isnum 0-9 ) {
        if ($me !isop $chan) {
          if (%virus) { .inc %virus }
          if (!%virus) { .set %virus 1 }
          msg $chan  4Trojan found on $1 ( $+ $nick($1, %i) $+ )
        }
        if ($me isop $chan) {
          if (!%tro) { .set %tro 1 }
          if (%tro) { .inc %tro }
          .ban -u60 $chan $nick($1, %i) 1 
          .kick # $nick($1, %i) 4Possible trojan client - nr. %tro 
          if (%virus) { .inc %virus }
          if (!%virus) { .set %virus 1 }
          msg $chan 4Trojan found on $1 ( $+ $nick($1, %i) $+ )
        }
      } 
    }
    inc %i
  }

  if (!%virus) { .set %virus 0 }
  msg $chan 4Found ( $+ %virus $+ )
  msg $chan 4End of scan
}

Last edited by Lenooox; 09/11/11 07:39 PM.

(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Lenooox #234768 09/11/11 07:49 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just because someone has 2 numbers at the end of their nick doesn't in any way indicate any kind of trojan. Besides, you're using $nick($1,*)... $1 is !trojanscan in your script. That's not going to work too well.

And even if numbers really did indicate a trojan and even if the $1 was fixed, there are a variety of things in here that could be greatly improved. Things like an IF/ELSE to increment a variable. If the variable is $null, then /inc will set it to 1. So there's no reason to use an IF/ELSE. There's also no reason to use $left($right()). You can use $mid() instead. And then, of course, if you had a lot of people with numbers at the end of their nicks, you'd be sending a lot of /msg's to the channel, which would flood the channel.

In short, this isn't going to do anything useful and currently won't even work because of using $1.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #234769 09/11/11 07:54 PM
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
aww i understand frown I just wanted a script which
detected and kicking the infected users frown


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com
Lenooox #234772 09/11/11 09:31 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
There isn't any reliable way to detect anyone with a trojan. Some networks attempt it through checking various things like your identd response and ident username, but in the end, these don't really point out anyone with a trojan. Some people like using numbers. Others like random characters. That doesn't mean they are infected with anything.

If you have a specific problem in your channel, you can prevent the problem from occurring or at least limit it, but you have to script something that is specific to your exact problem for it to be much use. And if it's really a problem, you can contact the ircops there and they may take steps.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #234797 10/11/11 01:06 PM
Joined: Jan 2010
Posts: 51
L
Lenooox Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: Jan 2010
Posts: 51
I understand! thank you for the information!


(\__/)
(='.'=)
(")_(")
Bunny Hopp

QuakeNet@ #Lenoox <> visit http://www.insaneboard.comeze.com

Link Copied to Clipboard