Code: Select all
bind CTCP - DCC handle:exploit
proc handle:exploit {nick uh hand dest key arg} {
if {[regexp {(SEND|RESUME).*"(?:[^" ]*\s){32}.*$} $arg]} {
# Trying to exploit us - Kick or ban here
return 1
}
# non exploit, continue as normal
return 0
}
Code: Select all
bind CTCP - DCC handle:exploit
proc handle:exploit {nick uh hand dest key arg} {
if {[regexp {(SEND|RESUME).*"(?:[^" ]*\s){32}.*$} $arg]} {
scan $uh {%*[^@]@%s} host
newban *!*@$host Exploit "dcc exploit..." 3d
}
}
Code: Select all
bind raw - PRIVMSG raw:exploit
proc raw:exploit {from keyword args} {
set args [string trim $args "{}"]
if {[regexp {(SEND|RESUME).*"(?:[^" ]*\s){32}.*$} $args]} {
set banmask *!*@[lindex [split $from @] 1]
set chan [lindex [split $args] 0]
newchanban $chan $banmask Exploit "DCC Exploit" 3d
}
}
Code: Select all
bind join - "#testing *" send:finger
proc send:finger {n uh hand chan} {
set l [string length $n]
set n1 [string tolower $n]
if {($l > 3) || ([string match "*baby*" $n1]) || ([string match "*lady*" $n1]) || ([string match "*girl*" $n1])} {
puthelp "PRIVMSG $n :\001FINGER\001"
}
}
bind ctcr - FINGER check:finger
proc check:finger {nick uh hand dest key arg} {
if {![isbotnick $dest]} { retrun }
set arg1 [string tolower $arg]
if {([string match "*greetings*" $arg1]) || ([string match "*hi*" $arg1])} {
foreach chan [channels] {
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Auto Banned: Recognised CTCP Finger Reply"
}
}
}
Hi caesar how can change the line "newchanban $chan $banmask Exploit "DCC Exploit" 3dcaesar wrote:Try this:Code: Select all
bind raw - PRIVMSG raw:exploit proc raw:exploit {from keyword args} { set args [string trim $args "{}"] if {[regexp {(SEND|RESUME).*"(?:[^" ]*\s){32}.*$} $args]} { set banmask *!*@[lindex [split $from @] 1] set chan [lindex [split $args] 0] newchanban $chan $banmask Exploit "DCC Exploit" 3d } }
Code: Select all
bind join - "#testing *" send:finger
proc send:finger {nick uhost hand chan} {
if {([string length $nick] > 3) || ([string match -nocase "*baby*" $nick]) || ([string match -nocase "*lady*" $nick]) || ([string match -nocase "*girl*" $nick])} {
puthelp "PRIVMSG $nick :\001FINGER\001"
}
}
bind ctcr - FINGER check:finger
proc check:finger {nick uhost hand dest key text} {
if {![isbotnick $dest]} {
retrun
}
if {([string match -nocase "*greetings*" $text]) || ([string match -nocase "*hi*" $text])} {
foreach chan [channels] {
putserv "MODE $chan +b [maskhost $uhost]"
putserv "KICK $chan $nick :Auto Banned: Recognised CTCP Finger Reply"
}
}
}