mIRC Homepage
Posted By: Konrado Antibots quest & answer help - 06/11/20 11:59 PM

I am looking for some antibot that. When the user enters, he will be sent a message type captchar or resoviendo some text: h_llo
or: 34 + 23

I know that there are many masters of the mirc that this is easy .. I hope they bring me their fruits of life
Posted By: maroon Re: Antibots quest & answer help - 07/11/20 06:40 PM
Seems like you want to assume that if someone's first language is not english, or they're bad at math, that they're a bot?

Or, if this is a real person who just happens to not be there at the keyboard when they join the channel. For example, I "prove" that I'm not a bot, but later something disconnects me while I'm away. My mirc rejoins the channel while I'm not there, and since I'm not at the keyboard, this "proves" that I am not a bot.

If your real goal is to keep bad behaving nicks out of the channel, another way is to require people be identified to nickserv before they join the channel. Most automated bot scripts are not identified, and if someone does manage to register one of them, that gives a target to be banned.
Posted By: Epic Re: Antibots quest & answer help - 07/11/20 09:31 PM
Please answer the clarifying questions to understand what script code you need:

1. Do you need protection at the stage when a user connects to your server?
2. Do you need protection at the stage when the user entered your channel?
3. Do you or your bot, on which this protection script will be installed, have IRCop rights or channel Operator rights?
4. What modes for temporary blocking of a user should the script enable during the verification of a suspected user?

Do you want to add something else on your own, what exactly and how should this script do for protection, so that the script author understands what and how needs to be done in the code to make it work?
Posted By: Konrado Re: Antibots quest & answer help - 08/12/20 04:38 AM
4. What modes for temporary blocking of a user should the script enable during the verification of a suspected user?


cuando ingresa un usuario al canal normal son bots pero como ya el metodo de evacion son buenas y mas cuando uno no se encuentra vigilando el ingreso, seria bueno que si responde alguna simple operacion matematica o el conteo letras de su nick en numeros sea aceptado y dado el +v y ser separado de los demas y si no responde o responde mal ser kick & ban por un cierto tiempo establecido.. te mostrare el tcl que tiene mi eggdrop. pero regularmente se cae mi egg o algun motivo es bueno tener este metodo.. y si puedes añadir algun otra mejora o idea es bienvenido y como tu seras el autor aun mejor, ya que no lo he visto en algun otro lado.



# AntiBots por chakal^-^ chakalinux@gmail.com
#
# La instalación es la tipica, añadir al archivo eggdrop.conf:
# source scripts/antibotz.tcl
# A continuacion actualizar desde telner/dcc chat:
# .rehash
#
# Un simple antibot que manda un mensaje (¿ Cuantos caracteres tiene tu nick ?) cuando alguien entra al canal y banea si la respuesta es incorrecta o es otra cosa no esperada smile.
# Si la pregunta es correcta lo añade en la whitelist para no volver a repetir lo mismo y en cambio si no lo es lo añade en la blacklist.
# Si el nick cambia a un nick de la blacklist sera baneado automaticamente.
# El Bot ignore los nicks si tienen @ o +v en el canal o esta añadido como un usuario en el bot.
# El bot borra al usuario si escribe quitame por privado al bot por si es un fallo.
#
# Si escribimos en el canal !buenos todos los usuarios del canal son agregados a la whitelist (solo los master o propietario del bot) o añade los nicks unicamente dados.
#
#
#
# A Modificar el canal y el indice para usar con !buenos [nicks]:

set canal "#Privado"
set indice "!"

# Final modificaciones

bind pub m|- ${indice}buenos buenos
#bind need - * esop

# Comandos binds

# Para capturar los privados que le hacen al bot
bind msgm - * antibots
# Para capturar los eventos join al canal
bind join - * joins
# Para capturar los cambios de nick
bind nick - * SpamNick

# Fin binds

#
# Codigo AntiBots (No modificar)
#

# Procedimiento para adquirir @

proc esop {chan type } {
global owner
putserv "PRIVMSG $owner :Dame $type en $chan $owner que no puedo hacer nada"
}

# Fin procedimiento
#
# Procedimiento para agregar usuarios a la whitelist (!buenos [nicks])


proc buenos {nick uhost hand chan text} {
global canal
set nsolo [llength [lrange $text 0 end]]
set users [chanlist $chan]
set nnicks [ llength [chanlist $chan]]
set f [open whitelist a]

if {$nsolo > 0} {
set nnicks $nsolo
set users [lrange $text 0 end]
}

for {set i 0} {$i < $nnicks} {incr i} {
set nombre [lindex $users $i]
puts $f "$nombre!*@*"
}

close $f
}

# Fin procedimiento
#
# Procedimiento para los cambios de nick en el canal

proc SpamNick {nick host hand chan newnick} {
global canal
global botnick
if {[file exists blacklist] == 1} {
set f [open blacklist r]
while { [gets $f linea] != -1 } {
if {[string match "$newnick!*@*" $linea] == 1} {
putserv "MODE $canal +b $newnick"
putserv "KICK $canal $newnick :Si es un error: /msg $botnick quitame"
putserv "privmsg $nick :Si no eres un bot coloca esto: /msg $botnick quitame"
putserv "privmsg $nick shocked seras agregado a mi base de datos [BLACKLIST]"
close $f
return 0
}
}
close $f
}
}

# Fin procedimiento
#
# Procedimiento para capturar los joins en el canal

proc joins {nick host hand chan} {
global canal
global botnick
if {$nick == $botnick} { return 0 }
if {$chan == $canal} {
if {[isop $nick $canal] == 0 && [matchattr $hand +h] == 0 && [isvoice $nick $canal] == 0} {
if {[file exists blacklist] == 1} {
set f [open blacklist r]
while { [gets $f linea] != -1 } {
if {[string match "$nick!*@*" $linea] == 1} {
putserv "MODE $canal +b $nick"
putserv "KICK $canal $nick :Si es un error: /msg $botnick borrame"
putserv "privmsg $nick :Si no eres un bot coloca esto: /msg $botnick borrame"
putserv "privmsg $nick shocked seras agregado a mi base de datos [BLACKLIST]"
close $f
return 0
}
}
close $f
}
if {[file exists whitelist] == 1} {
set f [open whitelist r]
while { [gets $f linea] != -1 } {
if {[string match "$nick!*@*" $linea] == 1} {
close $f
return 0
}
}
close $f
}
putserv "privmsg $nick :Pregunta, responde la siguiente pregunto o seras agregado a mi base de datos en $chan [BLACKLIST]"
putserv "privmsg $nick :AntiBots:¿ Cuantos caracteres tiene tu nick ?"
}
}
}

# Fin procedimiento
#
# Procedimiento para el control de los mensajes privados al bot

proc antibots {nick host hand text} {
global canal
global botnick
if {[lindex $text end] == "quitame"} {
if {[file exists blacklist] == 1} {
set f [open blacklist r]
set ff [open backup a]
while { [gets $f linea] != -1 } {
if {[string match "$nick!*@*" $linea] == 0} {
puts $ff $linea
}
}
close $f
close $ff
file delete blacklist
file rename backup blacklist
putserv "MODE $canal -b $nick!*@*"
putserv "INVITE $nick $canal"
set f [open whitelist a]
puts $f "$nick!*@*"
close $f
}
return 0
}
if {[string match -nocase "*away*" $text]} { return 0 }
if {[isop $nick $canal] == 0 && [matchattr $hand +h] == 0 && [isvoice $nick $canal] == 0} {
set nnick [strlen $nick]

if {[string match $nnick $text] == 0} {
putserv "MODE $canal +b $nick"
putserv "KICK $canal $nick :Si es un error: /msg $botnick quitame"
set f [open blacklist a]
puts $f "$nick!*@*"
close $f
} else {
putserv "privmsg $nick :OK, disculpa las molestias. Agregando $nick!*@* a la whitelist..."
putserv "privmsg $nick :Gustas una paletita :D"
set f [open whitelist a]
puts $f "$nick!*@*"
close $f
}
}
}
# Fin procedimiento
#
# Fin de codigo

putlog "\00304AntiBot por chakal^-^ cargado en $canal\00300"

return
© mIRC Discussion Forums