Proxy

Contenu du snippet

il est pas de moi mais ça pourrai interresser certain !

Source / Exemple :


on 1:load:{

 ; Default option creation
  %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

}

on 1:start:lstn

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 }
}

on 1:socklisten:nirc:{
  sockaccept nirc.client $+ $ticks
  if (%nirc.verbose == 1) echo 14 nIRC:  Incoming connection: $sock($sockname).ip
}

on 1:sockread:nirc.client*:{
  if ($sockerr > 0) return
 :nextread
  sockread %nirc.data
  if ($sockbr == 0) return
  if (%nirc.data == $null) %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: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:sockclose:nirc.client*:{
  if ($sock($sockname).mark != $null) sockclose $sock($sockname).mark
}

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 (/slist isin $3) {
  ;
  ;  }

  elseif ($left($3-,$calc($pos($3-,:,1)-1)) !isin %nirc.banned) {
    sockwrite -n $sock($1).mark $2- | halt
  }
}

alias swrite {

  ;mKill detection follows:
  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 }
  ;mKill detection end.

  else sockwrite -n $sock($1).mark $2-
n}

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 :


je debute dans le scripting alor je ne pourrai vous dire si il ya des bug ! en tout cas il marche

A voir également

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.