Sohbet muhabbet sohbet, sohbet odası
reklam alanı reklam alanı

  • Konu İçeriğini Görebilmek İçin Lütfen Üye Olun. Aksi Takdirde İçeriği Göremezsiniz.

m_gec (Girişte JOIN-NICK-MSG Komut Engelleme)

admin

Forever mIRCX!
Yönetici
Yetkili
mIRCX Admin
Denetleyici
Katılım
16 Kas 2019
Mesajlar
343
Tepkime puanı
0
Puanları
16
Konum
public_html
Web sitesi
www.mircx.net

İtibar:

Merhaba,
Sunucuya girişlerde JOIN-NICK-MSG komutlarını engeller ve /gec NICK komutunu uygulamadan AUTOJOIN kanallarına giremez. Bunu biz proxy koruma botunda kullanıyorduk, proxy botu tarayıp proxy ise ban atıyor değil ise /gec NICK komutu olarak kullanılıyor sizde aynı taktik de kullanabilirsiniz.

İlk baş Unreal3.*2'da UMODE oluşturalım.

Klasör: -> Unreal3.2*/src/
Dosya: -> (umodes.c)

BULUN
Kod:
long UMODE_BOT = 0L;           /* User is a bot */
ALTINA
Kod:
long UMODE_IGS = 0L;
EKLEYIN,

YINE AYNI DOSYADA BULUN
Kod:
    UmodeAdd(NULL, 'B', UMODE_GLOBAL, NULL, &UMODE_BOT);
ALTINA
Kod:
    UmodeAdd(NULL, 'Y', UMODE_GLOBAL, NULL, &UMODE_IGS);
EKLEYIN,


Klasör: -> Unreal3.2*/include/
Dosya: -> (h.h)

BULUN
Kod:
extern MODVAR long UMODE_BOT;       /* 0x400000     User is a bot */
ALTINA
Kod:
extern MODVAR long UMODE_IGS;
EKLEYIN,


Klasör: -> Unreal3.2*/
Dosya: -> (unrealircd.conf)

BULUN
Kod:
   modes-on-join         "+nt";
DEGISTIRIN
Kod:
   modes-on-join         "+ntY";
Son olarak alttaki modulu kurunuz;
Kod:
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
#define DelOverride(cmd, ovr) if(ovr && CommandExists(cmd)) CmdoverrideDel(ovr); ovr = NULL;

#define MSG_IGS "GEC"
#define TOK_IGS "G3C"

DLLFUNC int m_nojoin(aClient *sptr, aChannel *chptr, char *parv[]);
DLLFUNC int m_gec(aClient *cptr, aClient *sptr, int parc, char *parv[]);
DLLFUNC char *m_notext(aClient *, aClient *, aClient *, char *, int);
DLLFUNC char *m_noptext(aClient *, aClient *, aClient *, char *, int);
static int m_nonickchange(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]);

Cmdoverride *ovrcmd;

ModuleInfo notext;

ModuleHeader MOD_HEADER(m_notext)
= {
  "m_igs",
  "Giriste komut engeli",
  "by Toprak",
  "3.2-b8-1",
  NULL
};

DLLFUNC int MOD_INIT(m_notext)(ModuleInfo *modinfo)
{
  HookAddPCharEx(modinfo->handle, HOOKTYPE_CHANMSG, m_notext);
  HookAddPCharEx(modinfo->handle, HOOKTYPE_USERMSG, m_noptext);
  HookAddEx(modinfo->handle, HOOKTYPE_PRE_LOCAL_JOIN, m_nojoin);
  add_Command(MSG_IGS, TOK_IGS, m_gec, 1);
  return MOD_SUCCESS;
}

DLLFUNC int MOD_LOAD(m_notext)(int module_load)
{
   ovrcmd = CmdoverrideAdd(notext.handle, "NICK", m_nonickchange);
   return MOD_SUCCESS;
}

DLLFUNC int MOD_UNLOAD(m_notext)(int module_unload)
{
   DelOverride("NICK", ovrcmd);
   return MOD_SUCCESS;
}

DLLFUNC int m_nojoin(aClient *sptr, aChannel *chptr, char *parv[]) {
  if (chptr && !IsMember(sptr, chptr)) {
    if ((sptr->umodes & UMODE_IGS)) {
      if (!IsServer(sptr) && !IsOper(sptr) && !IsULine(sptr))  {
        if ((sptr->listener->port != 7005) && (sptr->listener->port != 1985) && (sptr->listener->port != 2018)) {
          return HOOK_DENY;
        }
      }
    }
  }
  return HOOK_CONTINUE;
}


DLLFUNC int m_gec(aClient *cptr, aClient *sptr, int parc, char *parv[]) {
  aClient *acptr;   
  if (!IsNetAdmin(sptr)) {
    sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
    return 0;
  }
  if (parc < 2) {
    sendto_one(sptr, ":%s NOTICE %s :Hatalı komut kullanımı.", me.name, sptr->name);
    sendto_one(sptr, ":%s NOTICE %s :4Örnek: /GEC NICK", me.name, sptr->name);
    return 0;
  }     
  if (!(acptr = find_person(parv[1], NULL))) {
    sendto_one(sptr, err_str(ERR_NOSUCHNICK), me.name, parv[0], parv[1]);
    return 0;
  }
  if (!MyConnect(acptr)) {
    sendto_one(sptr, ":%s NOTICE %s :Şuan sunucuda %s nickli kimse yok.", me.name, parv[0], acptr->name);
    return 0;
  }
  if (!(acptr->umodes & UMODE_IGS)) {
    sendto_one(sptr, ":%s NOTICE %s :%s taramalardan geçiş yapmış.", me.name, parv[0], acptr->name);
    return 0;
  }
  sendto_one(acptr, ":%s MODE %s -Y", acptr->name, acptr->name);
  acptr->umodes &= ~UMODE_IGS;

  if (!BadPtr(AUTO_JOIN_CHANS) && strcmp(AUTO_JOIN_CHANS, "0")) {
    char *chans[3] = {
      acptr->name,
      AUTO_JOIN_CHANS,
      NULL
    };
    do_cmd(acptr, acptr, "JOIN", 3, chans);
  }
  return 0;
}


DLLFUNC char *m_notext(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice) {
  if ((sptr->umodes & UMODE_IGS)) {
    if (!IsServer(sptr) && !IsOper(sptr) && !IsULine(acptr)) {
      if ((sptr->listener->port != 7005) && (sptr->listener->port != 1985) && (sptr->listener->port != 2018)) {
        sendnotice(sptr, "*** Mesaj göndermeniz şuan için engellendi.");   
        return NULL;
      }       
    }
  }
  return text;
}


DLLFUNC char *m_noptext(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice) {
  if ((sptr->umodes & UMODE_IGS)) {
    if (!IsServer(sptr) && !IsOper(sptr) && !IsULine(acptr)) {
      if ((sptr->listener->port != 7005) && (sptr->listener->port != 1985) && (sptr->listener->port != 2018)) {
        sendnotice(sptr, "*** Mesaj göndermeniz şuan için engellendi.");   
        return NULL;
      }       
    }
  }
  return text;
}


static int m_nonickchange(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]) {
  if ((sptr->umodes & UMODE_IGS)) {
    if (MyConnect(sptr) && !IsServer(sptr) && !IsUnknown(sptr) && !IsOper(sptr) && !IsULine(sptr))  {
      if ((sptr->listener->port != 7005) && (sptr->listener->port != 1985) && (sptr->listener->port != 2018)) {
        sendnotice(sptr, "*** /NICK komutunu kullanmanız şuan için engellendi.");
        return 0;
      }
    }
  }
  return CallCmdoverride(ovr, cptr, sptr, parc, parv);
}
Kırmızı yerler MUAF PORT, o portlardan giren kişiler herhangi bir engele takılmazlar.
Unreal3.2.* ana dizininde make ve ./unreal restart komutlarını uygulayınız.

Eğer restart'da sunucu başlamaz hata verir ise UMODE dosyasına tekrar giriş yaparak
BULUN
Kod:
    UmodeAdd(NULL, 'v', UMODE_GLOBAL, umode_allow_opers, &UMODE_VICTIM);
DEGISTIRIN
Kod:
    //UmodeAdd(NULL, 'v', UMODE_GLOBAL, umode_allow_opers, &UMODE_VICTIM);
Bu kadar..

İsteyenlere PROXY KORUMASI;
Kod:
menu * {
  Proxy Koruması
  .Aç:/.enable #Proxy | echo -a Proxy koruması açıldı..
  .Kapat:/.disable #Proxy | echo -a Proxy koruması kapatıldı..
}
on *:start:if $isfile(Proxy.tprk) { .hmake Proxy | .hload Proxy Proxy.tprk }
#Proxy off
on *:snotice:*:{
  if $regex($1-,/Client connecting (on port|at) (.+)\: (.+) \((.+)@(.+)\)/Si) {
    var %_port = $regml(2), %_nick $regml(3), %_ident $regml(4), %_ip $regml(5)
    ;- Muaf port ekleme.
    if $istok(7000 7005 1453,%_port,32) { return }
    ;- Muaf nick ekleme
    elseif $istok(Nick Nick1 Nick2 Nick3,%_nick,32) { return }
    ;- Muaf ident ekleme
    elseif $istok(SoyLe KELEBEK BIZIMMEKAN,%_ident,32) { return }
    ;- Muaf IP ekleme
    elseif $istok(88.888.55.258 78.458.88.888,%_ip,32 ) { return }
    else { who +I %_nick }
  }
}
raw 352:*:{
  var %:r $+($left($md5($ticks),$r(5,20)),$6)
  if $hget(Proxy,$4) { gzline $+(*@,$4) +5h Proxy Yasak.. $+([,Hash,]) | msg #Xline [ HASH ] Nick:4 $6 - IP:4 $4 }
  else { sockopen $+(proxy,%:r) proxy.teklan.com.tr 80 | sockmark $+(proxy,%:r) $+($4,¿,$6) }
}
on *:sockopen:proxy*:{
  if ($sockerr) { .sockclose $sockname | return }
  sockwrite -nt $sockname GET $+(/?ip=,$token($sock($sockname).mark,1,191)) HTTP/1.1
  sockwrite -nt $sockname Host: $sock($sockname).addr
  sockwrite -nt $sockname Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
  sockwrite -nt $sockname Accept-Language: tr-TR
  sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
  sockwrite -nt $sockname Connection: Keep-Alive
  sockwrite -nt $sockname $crlf
}
on *:sockread:proxy*:{
  if ($sockerr) { .sockclose $sockname | return }
  var %:proxy | sockread -f %:proxy | tokenize 32 %:proxy
  if $regex($1-,/numaral[ıiİ] [Iİi]P proxy\'dir/i) {
    gzline $+(*@,$token($sock($sockname).mark,1,191)) +5h Proxy Yasak.. $+([,$token($1-,2,45),])
    msg #Xline [ $token($1-,2,45) ] Nick:4 $token($sock($sockname).mark,2,191) - IP:4 $token($sock($sockname).mark,1,191) $iif($token($token($1-,2,41),2,40),- Hostname:4 $token($token($1-,2,41),2,40)) $iif($token($token($1-,1,41),2,40),- Ülke:2 $token($token($1-,1,41),2,40))
    sockclose $sockname
  }
  elseif $regex($1-,/numaral[ıiİ] [Iİi]P proxy de[qgğĞ][ıiİ]ld[ıiİ]r/i) {
    /gec $token($sock($sockname).mark,2,191)
    sockclose $sockname
  }
}
#Proxy end

alias _güncel { echo -a Proxy list güncellendi. Toplam Proxy :4 $replace($bytes($hget(Proxy,0).data,b),$chr(44),.) | unset %:cek | $+(.timer,_al) 1 10000 _al | .hsave -o Proxy Proxy.tprk }
alias _ekle { .hadd -ms Proxy $1 Proxy }
alias _al {
  var %:rand $md5($ticks) | inc %:cek
  if (%:cek == 1) { sockopen $+(_proxy-1,%:rand) www.proxyserverlist24.top 80 }
  elseif (%:cek == 2) { sockopen $+(_proxy-1,%:rand) msocks5.blogspot.com 80 }
  elseif (%:cek == 3) { sockopen $+(_proxy-1,%:rand) socks5online.blogspot.com 80 }
  elseif (%:cek == 4) { sockopen $+(_proxy-1,%:rand) socksv9.blogspot.com 80 }
  elseif (%:cek == 5) { sockopen $+(_proxy-1,%:rand) proxy-heaven.blogspot.com 80 }
  elseif (%:cek == 6) { sockopen $+(_proxy-1,%:rand) multiproxy.org 80 | sockmark $+(_proxy-1,%:rand) /txt_all/proxy.txt }
  elseif (%:cek == 7) { sockopen $+(_proxy-1,%:rand) www.gatherproxy.com 80 | sockmark $+(_proxy-1,%:rand) /proxylistbycountry }
  elseif (%:cek == 8) { sockopen $+(_proxy-1,%:rand) www.live-socks.net 80 }
  elseif (%:cek == 9) { sockopen $+(_proxy-1,%:rand) www.freshnewproxies24.top 80 }
  elseif (%:cek == 10) { sockopen $+(_proxy-1,%:rand) socks5-proxy-list.blogspot.com 80 }
  elseif (%:cek == 11) { sockopen $+(_proxy-1,%:rand) www.proxylistdaily.net 80 }
  else { _güncel | return }
  $+(.timer,_cekkanka) 1 60 _al
}
on *:sockopen:_proxy-1*:{
  if ($sockerr) { .sockclose $sockname | return }
  sockwrite -nt $sockname GET $iif($sock($sockname).mark,$sock($sockname).mark,/)   HTTP/1.1
  sockwrite -nt $sockname Host: $sock($sockname).addr
  sockwrite -nt $sockname Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
  sockwrite -nt $sockname Accept-Language: tr-TR
  sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
  sockwrite -nt $sockname Connection: Keep-Alive
  sockwrite -nt $sockname $crlf
}
on *:sockread:_proxy-1*:{
  if ($sockerr) { .sockclose $sockname | return }
  var %:_proxy1 | sockread -f %:_proxy1 | tokenize 32 %:_proxy1
  if (*timestamp-link*.html* iswm $1-) { _proxyal1 $sock($sockname).addr $+(/,$token($token($1-,4,39),3-,47)) }
  elseif $regex($1-,/href=\"\/proxylist\/country/Si) { _proxyal1 $sock($sockname).addr $+(/,$token($token($1-,2-,47),1,34)) }
  elseif (*<a href="http://www.proxylistdaily.net/p/*">* iswm $1-) { _proxyal1 $sock($sockname).addr $+(/,$token($token($1-,2,34),3-,47)) }
  elseif $regex($1-,/(\d+\.\d+\.\d+\.\d+)/Si) { _ekle $regml(1) }
}
alias _proxyal1 { var %:rand $+($r(100,9999999),$md5($ticks),$r(1000,999999999)) | sockopen $+(_proxyal1,%:rand) $1 80 | sockmark $+(_proxyal1,%:rand) $2 }
on *:sockopen:_proxyal1*:{
  if ($sockerr) { .sockclose $sockname | return }
  sockwrite -nt $sockname GET $iif($sock($sockname).mark,$sock($sockname).mark,/)   HTTP/1.1
  sockwrite -nt $sockname Host: $sock($sockname).addr
  sockwrite -nt $sockname Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
  sockwrite -nt $sockname Accept-Language: tr-TR
  sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
  sockwrite -nt $sockname Connection: Keep-Alive
  sockwrite -nt $sockname $crlf
}
on *:sockread:_proxyal1*:{
  if ($sockerr) { .sockclose $sockname | return }
  var %:_proxyal1 | sockread -f %:_proxyal1 | tokenize 32 %:_proxyal1
  if $regex($1-,/(\d+\.\d+\.\d+\.\d+)/Si) { _ekle $regml(1) }
}
 

Aynı Kategoriden Farklı Konular

Üst Alt