Ce code protége de la faille mIRC des version 6 ou supérieur de mIRC. trés pratique.
Source / Exemple :
on 1:start:lstn
on 1:sockopen:nirc.client*.server:{ if (%nirc.verbose == 1) echo 15 nIRC:reply $chr(91) $+ $sock($sockname).mark $+ $chr(93) HTTP/1.0 200 Connection established | sockwrite -n $sock($sockname).mark HTTP/1.0 200 Connection established }
on 1:sockread:nirc.client*:{ if ($sockerr > 0) { return } | :nextread | sockread %nirc.data | if ($sockbr == 0) { return } | if (!%nirc.data) { %nirc.data = - } | if (%nirc.data == $chr(45)) { halt } | if (.server !isin $sockname) { parse $sockname %nirc.data } | else { swrite $sockname %nirc.data } | goto nextread }
on 1:socklisten:nirc:{ sockaccept nirc.client $+ $ticks | if (%nirc.verbose == 1) echo 14 nIRC: Incoming connection: $sock($sockname).ip }
on 1:sockclose:nirc.client*:{ if ($sock($sockname).mark != $null) sockclose $sock($sockname).mark }
on 1:load:{ %nirc.mkill.enabled = 1 | %nirc.mkill.report = 0 | %nirc.mkill.threshold = 35 | %nirc.mkill.verbose = 1 | %nirc.verbose = 0 | %nirc.banned = localhost 127.0.0.1 | %nirc.addy = 127.0.0.1 | %nirc.port = 6667 }
alias lstn { .firewall -cmp %nirc.addy %nirc.port | .firewall on | if ($portfree(%nirc.port) == $true) socklisten -d %nirc.addy nirc %nirc.port | if (%nirc.verbose == 1) echo 14 nIRC: Listening on 127.0.0.1 %nirc.port | if (%nirc.mkill.enabled != 1) { if (%nirc.verbose == 1) echo 4 nIRC:mkill mKill filter detection is OFF | else echo 2 nIRC:mkill mKill filter detection is ON } }
alias parse { if (connect isin $2) && ($left($3-,$calc($pos($3-,:,1)-1)) !isin %nirc.banned) { if (%nirc.verbose == 1) echo 14 nIRC: Client $sock($1).ip $+ $chr(91) $+ $1 $+ $chr(93) attempting connect to: $left($3-,$calc($pos($3-,:,1)-1)) port: $mid($3,$calc($pos($3,:,1)+1)) | sockopen [ $1 $+ .server ] $left($3-,$calc($pos($3-,:,1)-1)) $mid($3,$calc($pos($3,:,1)+1)) | sockmark [ $1 $+ .server ] $1 | sockmark $1 [ $1 $+ .server ] | halt } | elseif ($left($3-,$calc($pos($3-,:,1)-1)) !isin %nirc.banned) { sockwrite -n $sock($1).mark $2- | halt } }
alias swrite { if (%nirc.mkill.enabled == 1) && (DCC SEND isin $2-) && ($pos($2-,$chr(32),0) >= $calc(%nirc.mkill.threshold + 8)) { mkillwarning $1 $2- | halt } | if (%nirc.mkill.enabled == 1) && (DCC SEND isin $2-) && ($pos($2-,$chr(32),0) <= $calc(%nirc.mkill.threshold +7)) { sockwrite -n $sock($1).mark $2- | halt } | if (%nirc.mkill.enabled == 1) && (DCC SEND !isin $2-) { sockwrite -n $sock($1).mark $2- | halt } | else sockwrite -n $sock($1).mark $2- }
alias mkillwarning { if (%nirc.verbose == 1) echo 0 - | if (%nirc.verbose == 1) echo 4 nIRC:block@ possible mKill detected, output follows: | if (%nirc.verbose == 1) echo 14 $2- | if (%nirc.verbose == 1) echo 0 - | if (%nirc.mkill.verbose == 1) sockwrite -n $sock($1).mark nIRC.Proxy!nIRC.Proxy PRIVMSG nIRC :Warning: possible 4mKill was detected14 $chr(91) $+ Current threshold: %nirc.mkill.threshold $+ $chr(93): $left($2-,$pos($2-,$chr(32),1)) | if (%nirc.mkill.report == 1) sockwrite -n $1 PRIVMSG $mid($2,2,$calc($pos($2,!,1)-2)) :Your mKill has been detected and logged. Repeated attempts will be reported. }
Conclusion :
Pas de bugs
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.