Repositorio de scripts de irc.terrachat.cl desde los canales #TRAFFIC y #LATINWAREZ.
⬅️ Volver# cu�l deber�a ser la longitud m�xima de la contrase�a :
set maxpass "30"
bind pub -|- "!pass" generate:pass
proc generate:pass {nick uhost hand chan text} {
if {[string is space [lindex [split $text] 0]]} {
puthelp "privmsg $chan : Uso: $::lastbind <cu�ntos d�gitos debe tener la contrase�a>"
return 0
} elseif {![string is digit -strict [lindex [split $text] 0]]} {
puthelp "privmsg $chan :Uso indebido... deber�a haberse ingresado como un n�mero..."
return 0
} elseif {[lindex [split $text] 0] > $::maxpass} {
puthelp "privmsg $chan :Maximum la longitud de la contrase�a es $::maxpass limitada..."
return 0
} else {
putserv "privmsg $chan 7Clave: [random:pass [lindex [split $text] 0]]"
}
return
}
# http://wiki.tcl.tk/3757
proc random:pass {length {chars "ABC#$%&��.,/*+-=)([��?!]DEFGHIJKLMNOPQRSTUVWXYZabcdefghiijklmnopqrstuvwxyz0123456789"}} {
set range [expr {[string length $chars]-1}]
set txt ""
for {set i 0} {$i < $length} {incr i} {
set pos [expr {int(rand()*$range)}]
append txt [string range $chars $pos $pos]
}
return $txt
}
putlog "#########################"
putlog "### GENERADOR DE PASS ###"
putlog "#########################"
👁️ 4 vistas • 📥 0 descargas