Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Web Site Advisor

Recommended Posts

  • Administrators

Web Site Advisor

 

logo.jpg

 

 

This Script uses McAfee SiteAdvisor to check posted links for problems. Script was designed for a bot.

Links will Return:

 

•Safe = No Problems found.

 

•Warning = Security risks have been reported by trusted users.

 

•Danger = Suspicious behavior has been reported by trusted users.

 

Setup:

 

•Paste this code in a new remote and save with a unique file name.

 

•Type +advisor in each channel you want to run advisor.(Must have Ops)(-advisor to turn it back off)

 

•Script will check for links and display results automatically

 

2ufqe52.jpg

 

;WebSiteAdvisor by Ford_Lawnmower irc.geekshed.net #Script-Help

alias -l Getadvisor {

;;Change %ShowSafe if you do/don't want to see Safe results. 1 = show , 0 = Don't show

  var %ShowSafe 1

  var %sockname $+(advisor,$network,$r(1,1000),$ticks)

  sockopen %sockname www.siteadvisor.com 80

  sockmark %sockname .msg $1 $+(/sites/,$2) %ShowSafe

}

menu Channel,Status {

  .$iif($group(#advisor) == On,$style(1)) WebSite Advisor

  ..$iif($group(#advisor) == On,$style(2)) On: .enable #advisor

  ..$iif($group(#advisor) == Off,$style(2)) Off: .disable #advisor

}

#advisor On

On *:Quit: if ($regex($1-,/(www\.|http\x3A\x2F\x2F)([\w\.]+)/giS)) MassAdvise $regsubex(advisor,$str(.,$calc($regml(0) / 2)),/./g,$+($chr(32),$regml($calc(\n * 2)))) 

On *:Part:#: if ($regex($1-,/(www\.|http\x3A\x2F\x2F)([\w\.]+)/giS)) Advisor $chan $regsubex(advisor,$str(.,$calc($regml(0) / 2)),/./g,$+($chr(32),$regml($calc(\n * 2)))) 

On $*:Text:/^([\+-])advisor$|(www\.|http\x3A\x2F\x2F)([\w\.]+)/giS:#: {

  if ($regml(1) isin +-) && ($regex(Opcheck,$nick($chan,$nick).pnick,/(!|~|&|@)/)) {

    if ($regml(1) == +) {

      if ($istok(%advisorChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is already running the Website Advisor Script }

      else { 

        .enable #advisor

        Set %advisorChanList $addtok(%advisorChanList,$+($network,$chan),32)

        .msg $chan $nick has activated the Website Advisor Script for $chan .

      }

    }

    else {

      if (!$istok(%advisorChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is not running the Website Advisor Script }

      else { 

        Set %advisorChanList $remtok(%advisorChanList,$+($network,$chan),1,32)

        .msg $chan $nick has deactivated the advisor script for $chan . 

      }

    }

  }

  elseif (!$timer($+(advisor,$network,$nick))) && ($istok(%advisorChanList,$+($network,$chan),32)) {

    .timer $+ $+(advisor,$network,$nick) 1 3 noop

    Advisor $chan $regsubex(advisor,$str(.,$calc($regml(0) / 2)),/./g,$+($chr(32),$regml($calc(\n * 2))))

  }

}

#advisor end

alias -l Advisor {

  var %count 2, %string, %chan $1

  while (%count 00,03Safe No problems found with $nopath($gettok($sock($sockname).mark,3,32)) 00,03Safe

      sockclose $sockname

    }

    elseif (class="siteYellow" isin %advisor) { 

      put $gettok($sock($sockname).mark,1-2,32) 01,08Caution Found potential suspicious behavior on $nopath($gettok($sock($sockname).mark,3,32)) 01,08Caution

      sockclose $sockname

    }

    elseif (class="siteRed" isin %advisor) {

      put $gettok($sock($sockname).mark,1-2,32) 00,04Danger Found potential security risks with $nopath($gettok($sock($sockname).mark,3,32)) 00,04Danger

      sockclose $sockname

    }

    elseif (-- /siteVerdict -- isin %advisor) sockclose $sockname

  }

}

alias -l Put {

  if (!$regex($1,/(\.|^)(msg|notice|echo)$/Si)) || (!$3) { echo -st **Put error** Syntax /Put msg #channel text - or - /Put notice nickname text  | return }

  var %tokens $0, %Tstart 3, %Dtimer 1500

  if ($timer($+(Put,$2,$network)).secs) { %Dtimer = $calc($v1 * 1000) }  

  while ($len($($+($,%Tstart,-,%tokens),2)) > 430) {

    dec %tokens

    if ($len($($+($,%Tstart,-,%tokens),2)) 

Link to comment
Share on other sites



×
×
  • Create New...