Code: Select all
set kickreas [lindex $text 1]
Code: Select all
set kickreas [lrange $text 1 end]
Code: Select all
set text [split $text]
Code: Select all
set kicknick [lindex $text 0]
Code: Select all
bind pub o .kick kickcommand
Code: Select all
.match * 999
[15:57] #alex# match * 999
*** Matching '*':
HANDLE PASS NOTES FLAGS LAST
alex yes 0 jmnoptx 15:44 (#.Power )
#.Power - 15:44
HOSTS: -telnet!*@*, *!type@125.84.*
Without criticizing the scripts, from the standpoint of strict authentication, both these scripts are flawed. Without going into all details, some other tcl flaws/weird things and problems, below are some minor comments.ppslim wrote:A quick note on this.
There are 2 script in the Tcl archive, which will provide and conduct all the all the authorisation for you.
Visit This link
Although a bit more difficult, it is sometimes possible for a malicious user to have the exact same user@host as the already authenticated user (but a different nick of course). If in the above script the setting "auth_clones" is "0", then such a malicious user is automatically also authenticated.proc authok {nick host hand} {
global auth_clones
if { [validuser $hand] == 0 } { return 0 }
if { [getuser $hand XTRA auth] < 1 } { return 0 }
if { [getuser $hand XTRA authhost] != $host } { return 0 }
if { $auth_clones == 1 && [getuser $hand XTRA authnick] != $nick} { return 0 }
return 1
}
Code: Select all
bind msg o auth authuser
proc authuser {nick host hand text} {
set authpass [lindex $text 0]
if {$authpass == "password"} {
setuser $hand XTRA "AUTHYES 1"
}
}