Code: Select all
#################################################################
# Meltdowns NickChecker V0.1 (25-09-2004) #
# #
# http://scripts.udp.at #
# #
# Script detects suspicious nicknames on /join and bans them. #
# #
# It detects the nicks by following consonants, which make #
# no sense. Rate is at about 90%. #
# #
# Activate it for a chan with .chanset #CHANNEL +nickcheck #
# #
# Contact: meltdown@gmx.at | #meltdown on quakenet #
# #
# [! LEAVE THESE CREDITS INTACT. !] thx... #
# #
#################################################################
#
# Bantime in seconds
set check(bantime) "600"
bind join - * checkthisnick
setudef flag nickcheck
set check(kmessage) "You were detected as a Spam/Flood-bot. To join this channel, pls change your nick to something... erm...normal"
set check(cons) "bcdfghjklmnpqrstvxyz"
set check(good) "tt ll ss"
set check(affixture) "off bnc \[ \] afk"
proc checkthisnick { nick uhois hand chan} {
global check
if {[lsearch -exact [channel info $chan] +nickcheck] == -1} {return 0}
set const_count 0
set score 0
set txt [list $nick]
# basic l337-translat0r
set txt [string map "0 o 1 l 3 e 7 t 4 a" $txt]
# Remove double-cons
foreach x [split $check(good)] {
set txt [string map -nocase "$x \"\"" $txt]
}
# Remove "off","bnc" etc and lower score
foreach x [split $check(affixture)] {
if {[string match -nocase *$x* $txt]} {
set txt [string map -nocase "$x \"\"" $txt]
set score [expr $score - 10]
}
}
# Check cons frequency
for {set x 0} {$x<[string length $txt]} {incr x} {
if {[string last [string index $txt $x] $check(cons)] > -1} {
incr const_count
if {$const_count >= 3} { set score [expr $score+10] }
} else {
set const_count 0
}
}
if {$score >= 30} {
putlog "Found suspicious nickname in $chan: $nick ($score)"
pushmode $chan +b "$nick!*@*"
flushmode $chan
putkick $chan $nick "$check(kmessage) -blub"
utimer $check(bantime) "[list pushmode $chan -b "$nick!*@*"]"
}
}
w0v43
Code: Select all
proc sb:score {str} {
set score 0
set vowel "aeiouy"
set cnant "bcdfghjklmnpqrstvwxz"
set other "{}\\\[\\\]-_^`|\\\\"
set digit "0123456789"
set str [string tolower $str]
incr score [llength [regexp -all -inline \[$vowel\]{3,} $str]]
incr score [llength [regexp -all -inline \[$cnant\]{3,} $str]]
incr score [llength [regexp -all -inline \[$other\]{2,} $str]]
incr score [llength [regexp -all -inline \[$digit\]{2,} $str]]
incr score [llength [regexp -all -inline \[$vowel$other\]{4,} $str]]
incr score [llength [regexp -all -inline \[$cnant$other\]{4,} $str]]
incr score [llength [regexp -all -inline \[$vowel$digit\]{4,} $str]]
incr score [llength [regexp -all -inline \[$cnant$digit\]{4,} $str]]
incr score [llength [regexp -all -inline \[$other$digit\]{3,} $str]]
incr score $score
}
Code: Select all
set userident [string trimleft [string tolower [lindex [split $uhost "@"] 0]] "~"]
if {([string length $userident] >= 4) && ([string length $nick] >= 7) && ([string length $nick] <= 11) && (![regexp -nocase "a" $nick]) && (![regexp -nocase "e" $nick]) && (![regexp -nocase "i" $nick]) && (![regexp -nocase "o" $nick]) && (![regexp -nocase "u" $nick]) && (![regexp -nocase "mrs" $nick]) && (![regexp -nocase "mr" $nick]) && (![regexp -nocase "xyz" $nick]) && (![regexp -nocase "dj" $nick]) && (![regexp -nocase "chr" $nick]) && (![regexp -nocase "fr" $nick]) && (![regexp -nocase "msn" $nick]) && (![regexp -nocase "dr" $nick]) && (![regexp "\[-|_aeiouxyz0\]" $nick]) && (([regexp {^[^aeiou_^-`]+$} $nick] && [regexp {[^0-9]?$} $nick]) || [regexp {^[A-z][0-9]{1,}$} $nick] || [regexp {^(\w){3}(\d){2}\w(\d){3}$} $nick] || [regexp "_\[0-9\]\[0-9\]$" $nick] || [regexp "^\[a-z\]\[a-z\]-" $nick] || [regexp "\[0-9\]\[0-9\]\[0-9\]$" $nick] || [regexp -nocase "gv" $nick] || [regexp -nocase "gz" $nick] || [regexp -nocase "qb" $nick] || [regexp -nocase "qc" $nick] || [regexp -nocase "qd" $nick] || [regexp -nocase "qf" $nick] || [regexp -nocase "qg" $nick] || [regexp -nocase "qh" $nick] || [regexp -nocase "qk" $nick] || [regexp -nocase "qm" $nick] || [regexp -nocase "qn" $nick] || [regexp -nocase "qp" $nick] || [regexp -nocase "qj" $nick] || [regexp -nocase "qr" $nick] || [regexp -nocase "qs" $nick] || [regexp -nocase "qt" $nick] || [regexp -nocase "qw" $nick] || [regexp -nocase "qv" $nick] || [regexp -nocase "qx" $nick] || [regexp -nocase "qz" $nick] || [regexp -nocase "xd" $nick] || [regexp -nocase "xf" $nick] || [regexp -nocase "xg" $nick] || [regexp -nocase "xh" $nick] || [regexp -nocase "xk" $nick] || [regexp -nocase "xm" $nick] || [regexp -nocase "xn" $nick] || [regexp -nocase "xq" $nick] || [regexp -nocase "xr" $nick] || [regexp -nocase "xt" $nick] || [regexp -nocase "xv" $nick] || [regexp -nocase "xz" $nick] || [regexp -nocase "zb" $nick] || [regexp -nocase "zc" $nick] || [regexp -nocase "zd" $nick] || [regexp -nocase "zf" $nick] || [regexp -nocase "zh" $nick] || [regexp -nocase "zm" $nick] || [regexp -nocase "zq" $nick] || [regexp -nocase "zr" $nick] || [regexp -nocase "zt" $nick] || [regexp -nocase "zv" $nick] || [regexp -nocase "zx" $nick] || [regexp -nocase "kz" $nick] || [regexp -nocase "lx" $nick] || [regexp -nocase "vb" $nick] || [regexp -nocase "vf" $nick] || [regexp -nocase "vg" $nick] || [regexp -nocase "vh" $nick] || [regexp -nocase "vk" $nick] || [regexp -nocase "vm" $nick] || [regexp -nocase "vn" $nick] || [regexp -nocase "vq" $nick] || [regexp -nocase "vx" $nick] || [regexp -nocase "vw" $nick] || [regexp -nocase "wj" $nick] || [regexp -nocase "jwm" $nick] || [regexp -nocase "ql" $nick] || [regexp -nocase "qy" $nick] || [regexp -nocase "xb" $nick] || [regexp -nocase "xc" $nick] || [regexp -nocase "xj" $nick] || [regexp -nocase "xl" $nick] || [regexp -nocase "xp" $nick] || [regexp -nocase "xs" $nick] || [regexp -nocase "xw" $nick] || [regexp -nocase "zg" $nick] || [regexp -nocase "zj" $nick] || [regexp -nocase "zk" $nick] || [regexp -nocase "zl" $nick] || [regexp -nocase "zn" $nick] || [regexp -nocase "zp" $nick] || [regexp -nocase "zs" $nick] || [regexp -nocase "zw" $nick] || [regexp -nocase "zx" $nick] || [regexp -nocase "zy" $nick] || [regexp -nocase "vc" $nick] || [regexp -nocase "vd" $nick] || [regexp -nocase "wx" $nick] || [regexp -nocase "vp" $nick] || [regexp -nocase "vs" $nick] || [regexp -nocase "vt" $nick] || [regexp -nocase "vp" $nick] || [regexp -nocase "vy" $nick] || [regexp -nocase "vz" $nick] || [regexp -nocase "wq" $nick] || [regexp -nocase "wx" $nick] || [regexp -nocase "wz" $nick]) > 0} {
Code: Select all
#################################################################
# Meltdowns NickChecker V0.1 (25-09-2004)
#
# http://scripts.udp.at
#
# Script detects suspicious nicknames on /join and bans them.
#
# It detects the nicks by following consonants, which make
# no sense. Rate is at about 90%.
#
# Activate it for a chan with .chanset #CHANNEL +nickcheck
#
# Contact: meltdown@gmx.at | #meltdown on quakenet
#
# [! LEAVE THESE CREDITS INTACT. !] thx...
#
#################################################################
Code: Select all
<(saavik> [10:06] spambuster v2.6: spam nick [[[mmm]]]!zzzzzzzzzz@sp124.spidernetbg.com (score: 18)
Code: Select all
Would I string match or what?
set spamchecknick [sb:score $nick]
proc sb:score {str} {
set score 0
set vowel "aeiouy"
set cnant "bcdfghjklmnpqrstvwxz"
set other "{}\\\[\\\]-_^`|\\\\"
set digit "0123456789"
set str [string tolower $str]
incr score [llength [regexp -all -inline \[$vowel\]{3,} $str]]
incr score [llength [regexp -all -inline \[$cnant\]{3,} $str]]
incr score [llength [regexp -all -inline \[$other\]{2,} $str]]
incr score [llength [regexp -all -inline \[$digit\]{2,} $str]]
incr score [llength [regexp -all -inline \[$vowel$other\]{4,} $str]]
incr score [llength [regexp -all -inline \[$cnant$other\]{4,} $str]]
incr score [llength [regexp -all -inline \[$vowel$digit\]{4,} $str]]
incr score [llength [regexp -all -inline \[$cnant$digit\]{4,} $str]]
incr score [llength [regexp -all -inline \[$other$digit\]{3,} $str]]
incr score $score
return $str
}
Code: Select all
set score [sb:score $nick!$user]