menu * { IRCop Tool:Trace } alias trace { window $+(-,$iif(!$window(@Bot-Tracker),aen1,n1)) @Bot-Tracker dialog -md IRCopTool IRCopTool } dialog IRCopTool { title "IRCop Tool" size -1 -1 317 235 option dbu tab "Bot Finder",13,0 0 317 235 tab "Trace",14 tab "Help",40 text "Idents Added",1,79 66 50 15, tab 13 list 2, 54 73 100 100 vsbar hsbar, tab 13 text "Nicknames Added",3,184 66 50 15, tab 13 list 4, 164 73 100 100 vsbar hsbar, tab 13 button "Add Ident",5,54 168 50 20, tab 13 button "Del Ident",6,104 168 50 20, tab 13 button "Add Nickname",7,164 168 50 20, tab 13 button "Del Nickname",8,214 168 50 20, tab 13 edit "",9,54 188 80 10, tab 13 button "Add",10,134 188 20 10, tab 13 edit "",11,164 188 80 10, tab 13 button "Add",12,244 188 20 10, tab 13 edit "", 15, 59 24 111 10, autohs, tab 14 button "Trace", 16, 176 23 37 12, tab 14 text "Search Criteria:", 17, 16 25 41 8, tab 14 list 18, 15 49 84 113, group size extsel, tab 14 button "Execute", 19, 187 199 37 12, disable, tab 14 combo 47, 133 200 50 72, size drop, tab 14 box "Search", 20, 6 15 304 155, tab 14 box "With Selected...", 21, 6 173 304 46, disable, tab 14 edit "", 22, 52 183 50 10, disable autohs, tab 14 text "Expire after:", 23, 14 184 35 8, disable, tab 14 text "(e.g 1d)", 24, 106 185 25 8, disable, tab 14 edit "", 25, 178 184 123 10, disable autohs, tab 14 text "Reason:", 26, 152 185 23 8, disable, tab 14 button "Cancel", 27, 262 222 37 9, ok cancel, tab 14 list 28, 99 49 117 113, group size extsel, tab 14 text "Nickname:", 29, 16 40 25 8, tab 14 list 30, 216 49 84 113, group size extsel vsbar, tab 14 text "Hostname:", 31, 101 40 27 8, tab 14 text "Realname:", 32, 220 40 27 8, tab 14 button "Clear", 33, 263 39 35 9, tab 14 edit "", 34, 28 222 140 10, read autohs, tab 14 text "Status:", 35, 6 223 20 8, tab 14 check "After Akill/Kill, delete match from list", 36, 14 195 107 10, disable, tab 14 button "Clonesxs Check",37,213 23 42 12, tab 14 button "I",38,255 23 10 12, tab 14 button "N",39,265 23 10 12, tab 14 edit "This script is designed to easily and quickly ban botnets without accidentally labeling SwiftSwitch users as bots.",41, 0 14 317 15, read multi, tab 40 edit "The Bot Finder tab allows you to add %, ?, and & in place of letters, numbers, and ^_}{[]`|, as well as regex to detect bots when they connect, switch nicks, and quit.",42, 0 29 317 20, read multi, tab 40 edit "The Trace tab uses the 'os trace' command to make finding and akilling bots more effective. The Clonesxs search will check for typical Clonesxs nicks and idents, or will check nicks and idents separately if you press and N or I buttons.",43, 0 49 317 20, multi read, tab 40 edit "This script will also detect when multiple nicks in the pattern *%%%%, such as 'bot1234' and 'bot4321', connect within 10 minutes of eachother from different hosts and will notify you of it.",44,0 69 317 20, multi read, tab 40 edit "The aliases in this script are '/origsettings', which will reset the values in the Bot Finder tab to some common bot defaults. The '/nickexc nick' command will exempt a nick from being labeled as a bot if they match a bot pattern.",45,0 89 317 20, multi read tab 40 } on *:dialog:IRCopTool:init:*: { did -a $dname 47 Akill did -c $dname 47 1 did -a $dname 47 Kill ;did -a $dname 47 Silence ;did -c $dname 36 1 } on *:notice:*:?:{ if ($nick == OperServ && $regex($1-,/Match: (.*) => .* (.*) on/) && $dialog(IRCopTool)) { tokenize 33 $regml(1) did -a IRCopTool 18 $1 did -a IRCopTool 28 $2 did -a IRCopTool 30 $remove($regml(2),$chr(40),$chr(41)) } if ($nick == OperServ && $regex($1-,/Found (\d+) matches(?:[.,])(?: truncated list to (\d+))?/) && $dialog(IRCopTool)) { did -ar IRCopTool 34 Returned $qt($iif($regml(2),$regml(2),$regml(1))) matches. } if ($nick == OperServ && $regex($1-,/Unknown search criteria: (.*)/) && $dialog(IRCopTool)) { did -ar IRCopTool 34 Unknown search $qt($strip($regml(1))) } } on *:dialog:IRCopTool:sclick:16,37,38,39:{ if ($did != 16) { if ($did == 37) { did -o $dname 15 1 $(nick ?%%%* ident ~?%%%%,0) } if ($did == 38) { did -o $dname 15 1 $(ident ~?%%%%,0) } if ($did == 39) { did -o $dname 15 1 $(nick ?%%%* !ident *ss*,0) } } if ($did(15)) { msg OperServ trace print $did(15) did -r $dname 18,28,30 did -ar $dname 34 Search $qt($did(15)) initiated. } else { did -ar $dname 34 Search not intiated - Must enter search string! } } on *:dialog:IRCopTool:sclick:33:{ did -r $dname 18,28,30 did -b $dname 21-26,22,19,36 did -ar $dname 34 List Cleared. } on *:dialog:IRCopTool:sclick:18,28,30:{ var %x = 1 while (%x <= $did($did,0).sel) { did -c $+ $iif($did($did,0).sel > 1,k) $dname $replace($remtok(18.28.30,$did,1,46),$chr(46),$chr(44)) $did($did,%x).sel inc %x } did -e $dname $iif($did($dname,47).text == kill,19 21 23 24 25 26 36,19 21 22 23 24 25 26 36) } on *:dialog:IRCopTool:sclick:19:{ var %x = $did(28,0).sel var %y = 1 if ($did($dname,47).text == 1) { while (%x > 0) { msg OperServ akill add $iif($did(22),$+($iif($left($did(22),1) != +,+),$did(22)),+7d) $+(*@,$gettok($did(28,$did(28,%x).sel).text,$numtok($did(28,$did(28,%x).sel).text,64),64)) $iif($did(25),$did(25),Abuse) if ($did(36).state == 1) { did -d $dname 18,28,30 $did(28,%x).sel } dec %x inc %y } if ($did(22).state == 1) { did -b $dname 21-26,22,19,36 } did -ar $dname 34 $calc(%y - 1) users AKilled for reason: $iif($did(25),$ifmatch,Abuse) } elseif ($did($dname,47).text == kill) { while (%x > 0) { kill $did(18,%x) $iif($did(25),$did(25),Abuse) if ($did(36).state == 1) { did -d $dname 18,28,30 $did(28,%x).sel } dec %x inc %y } if ($did(22).state == 1) { did -b $dname 21-26,22,19,36 } did -ar $dname 34 $calc(%y - 1) users Killed for reason: $iif($did(25),$ifmatch,Abuse) } } == 1) { did -b $dname 21-26,22,19,36 } did -ar $dname 34 $calc(%y - 1) users Killed for reason: $iif($did(25),$ifmatch,Abuse) } }