|
|
| | #1 | |
| Çevrimiçi ![]() IF Ticaret Sayısı: (0) | proxy ; ============================================ ; Z-Gard v11.5 — Proxy Koruma Sistemi (Final) ; UnrealIRCd 3.2.x + mIRC 6.35 uyumlu ; Yapan: GPT5 & uSer (2025) ; ============================================ on *:LOAD:{ echo -a 3[Z-Gard] Proxy koruma yüklendi. if (!$window(@ZGard)) window -h @ZGard set %ZG_auto_ban 1 set %ZG_ban_duration 0 set %ZG_rate_limit 60 set %ZG_notify_chan # if (!$isfile($mircdir\zg_whitelist.txt)) write $mircdir\zg_whitelist.txt 127.0.0.1 if (!$isfile($mircdir\zg_country_masks.txt)) write $mircdir\zg_country_masks.txt if (!$hget(ZG_LASTBAN)) .hmake ZG_LASTBAN 2000 if (!$hget(ZG_CACHE)) .hmake ZG_CACHE 2000 if (!$hget(ZG_COUNTRYMASKS)) .hmake ZG_COUNTRYMASKS 500 set %ZG_tr_re ^(5\.|31\.|46\.|78\.|85\.|88\.|151\.|176\.|188\.|1 95\.|212\.|213\.) set %ZG_range_re ^(45\.|51\.|57\.|91\.|146\.|147\.|161\.|162\.|172\ .|178\.|185\.|193\.|194\.|195\.|198\.|205\.|206\.| 207\.|208\.) set %ZG_isp_re (ovh|hetzner|contabo|m247|scaleway|leaseweb|google |linode|digitalocean|worldstream|amazon|vultr|netc up) zg_load_country_masks zg_log [INIT] AutoBan:%ZG_auto_ban RateLimit:%ZG_rate_limit } ; === LOG SİSTEMİ === alias zg_log { if (!$window(@ZGard)) window -h @ZGard if ($1) { var %msg = $asctime(HH:nn:ss) - $1- aline -h @ZGard %msg echo -a 4[Z-Gard] %msg if (($gettok(%ZG_notify_chan,1,32) != $null) && ($chan(%ZG_notify_chan))) { msg %ZG_notify_chan %msg } } } ; === WHITELIST === alias zg_is_whitelisted { if ($1 == $null) return $false if ($read($mircdir\zg_whitelist.txt,w,$1)) return $true return $false } ; === COUNTRY MASK === alias zg_load_country_masks { if (!$isfile($mircdir\zg_country_masks.txt)) return .hfree ZG_COUNTRYMASKS .hmake ZG_COUNTRYMASKS 500 var %i = 1 while ($read($mircdir\zg_country_masks.txt,%i)) { var %line = $v1 if ($left(%line,1) isin [#;]) { inc %i | continue } if ($gettok(%line,1,124) == $null) { inc %i | continue } var %mask = $gettok(%line,1,124) var %cc = $gettok(%line,2,124) if (%mask != $null) .hadd ZG_COUNTRYMASKS %mask %cc inc %i } } alias zg_match_country_mask { var %ip = $1 if (%ip == $null) return $null if (!$hgetlen(ZG_COUNTRYMASKS)) return $null var %i = 1 while ($hget(ZG_COUNTRYMASKS,*,%i).item) { var %mask = $v1, %cc = $v2 if ($left(%ip,$len(%mask)) == %mask) return %cc inc %i } return $null } ; === RATE LIMIT === alias zg_can_ban { var %ip = $1 if (%ip == $null) return $false if (!$hget(ZG_LASTBAN,%ip)) return $true if ($calc($ctime - $hget(ZG_LASTBAN,%ip)) < %ZG_rate_limit) return $false return $true } alias zg_mark_ban { if ($1) .hset ZG_LASTBAN $1 $ctime } ; === RAW/SNOTICE TESPİT === raw *:*:{ if ($regex($1-,/Baglanan\:\s*([^\s]+)\s*\(([^\@]+)\@([0-9]{1,3}(?:\.[0-9]{1,3}){3})\)/i)) { zg_handle_connect $regml(1) $regml(2) $regml(3) } } on *:SNOTICE:*Baglanan:*:{ if ($regex($1-,/Baglanan\:\s*([^\s]+)\s*\(([^\@]+)\@([0-9]{1,3}(?:\.[0-9]{1,3}){3})\)/i)) { zg_handle_connect $regml(1) $regml(2) $regml(3) } } ; === ANA KONTROL === alias zg_handle_connect { var %nick = $1, %ident = $2, %ip = $3 if (%ip == $null) return zg_log [CONNECT] %nick (%ip) bağlandı. if (zg_is_whitelisted %ip) { zg_log [WHITELIST] %nick (%ip) atlandı. | return } var %cc = zg_match_country_mask %ip if (%cc != $null) { zg_log [COUNTRY] %nick (%ip) ülke mask:%cc zg_apply_ban %ip Country:%cc %nick return } if ($regex(%ip,$eval(%ZG_tr_re,2))) { zg_log [OK] %nick (%ip) TR muaf. | .hadd ZG_CACHE %ip CLEAN|$ctime | return } if ($hget(ZG_CACHE,%ip)) { var %c = $hget(ZG_CACHE,%ip) if ($left(%c,7) == BLOCKED) { zg_log [CACHE] %ip zaten bloklu. | return } if ($left(%c,5) == CLEAN) { zg_log [CACHE] %ip temiz. | return } } if ($regex(%ip,$eval(%ZG_range_re,2))) { zg_log [DETECT] %nick (%ip) Proxy/Range eşleşti. zg_apply_ban %ip Range %nick return } if ($regex(%ip,$eval(%ZG_isp_re,2))) { zg_log [ISP] %nick (%ip) ISP eşleşti. (Datacenter) zg_apply_ban %ip ISP %nick return } zg_log [OK] %nick (%ip) temiz. .hadd ZG_CACHE %ip CLEAN|$ctime } ; === BAN UYGULA === alias zg_apply_ban { var %ip = $1, %reason = $2, %nick = $3 if (%ip == $null) return if (%ZG_auto_ban != 1) { zg_log [SKIP] %ip şüpheli, AutoBan kapalı. | return } if ($me != Zagor) { zg_log [WARN] Oper değil, ban atılamadı: %ip | return } if (!zg_can_ban %ip) { zg_log [RATE] %ip yakın zamanda banlı, atlandı. | return } var %mask = $+($gettok(%ip,1-3,46),.*) var %msg = $iif(%reason,%reason,Proxy tespit edildi) var %dur = %ZG_ban_duration quote ZLINE %ip :[Z-Gard] %msg quote GLINE *@%mask %dur :[Z-Gard] %msg quote KLINE *@%mask %dur :[Z-Gard] %msg .hadd ZG_CACHE %ip BLOCKED|$ctime zg_mark_ban %ip zg_log [BANNED] %nick (%ip) sebep:%msg } ; === KOMUTLAR === alias zg_add_whitelist { if ($1) { write $mircdir\zg_whitelist.txt $1 | zg_log [WHITELIST] Eklendi: $1 } } alias zg_add_country { if ($2) { write $mircdir\zg_country_masks.txt $1 $+ | $+ $2 | zg_load_country_masks | zg_log [COUNTRY] Eklendi: $1->$2 } } alias zg_test { if ($1) { zg_log [TEST] $1 kontrol ediliyor... | zg_handle_connect Test - $1 } } alias zg_toggle { if (%ZG_auto_ban == 1) { set %ZG_auto_ban 0 | zg_log AutoBan kapatıldı. } | else { set %ZG_auto_ban 1 | zg_log AutoBan açıldı. } } alias zg_status { zg_log Durum: AutoBan=%ZG_auto_ban RateLimit=%ZG_rate_limit Cache=$hgetlen(ZG_CACHE) } bu kodu chatgbt ıle yapıldı ama calısmadı hatalarını duzeltebılırr mısınız tesekkur ederım . | |
| | |
| Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
| |
Benzer Konular | ||||
| Konu | Konuyu Başlatan | Forum | Cevaplar | Son Mesaj |
| Güncel Proxy Listeleri, Online Proxy Site, Proxy Server List, Free Proxy Forum | Sarya | Güncel Proxy | 1 | 01 Kasım 2022 13:13 |
| Proxy Giriş Yapanları #proxy Kanalına Almak ! | diyorumki | mIRC Scripting Sorunları | 30 | 04 Nisan 2013 15:14 |
| Proxy IP Leri proxy.data dosyasından okutarak servere girişte zline atma | ExrimCi | mIRC Scripting Sorunları | 4 | 26 Şubat 2010 15:11 |
| Proxy Koruması ( Koruma Icın Proxy Lıstesı Lazım) | Heavenly | mIRC Scripting Sorunları | 2 | 05 Temmuz 2009 20:09 |