Neler yeni

Foruma hoş geldin, Ziyaretçi

Metin2Lobby.com Metin2 Private Server Tanıtım Advertising Ve Geliştirme Forumudur.Metin2 pvp serverler,1-99,1-105,1-120,55-120 global serverları paylaş yada ara.
Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

[Python] Yeni çıkan kick-hack engelleme

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Konular
48,291
Mesajlar
48,601
Tepkime puanı
75
M2 Yaşı
3 yıl 11 ay 10 gün
Trophy Puan
48
Konum
Web sitesi
M2 Yang
488,879
Ticaret : 1 / 0 / 0
Ticaret Oranı : 100%
Merhaba arkadaşlar yeni kick hack hilesi bu ;





Şimdi sizlere bu kick-hack sorununu fixlemeyi göstereceğim.

1.Adım - root dosyanıız açın.
2.Adım - game.py dosyanızı açın.

Açtıktan sonra şu kodu aratıyoruz ;

Kod:
[COLOR=#0000ff]class GameWindow(ui.ScriptWindow):[/COLOR]

Önümüze çıkan ;

zkJUKx1.png


En alt bölüm'e

Kod:
[COLOR=#0000ff][FONT=monospace]PnKickTime,Counter = 0,0[/FONT][/COLOR]

Yukaridaki kodu yerleştiriyoruz.


Son Hali ;

wfCzIBj.png


Sonra tekrar bu kodu aratıyoruz ;

Kod:
[COLOR=#0000ff]def [FONT=Verdana]OnRecvWhisper(self, mode, name, line):[/FONT][/COLOR]

Önümüze çıkan ;


tEAJyJZ.png


Burayı full değiştiriyoruz bu kod ile ;

Kod:
[COLOR=#0000ff]def OnRecvWhisper(self, mode, name, line): global PnKickTime,Counter if app.GetGlobalTimeStamp()>=PnKickTime: Counter = 0 PnKickTime = app.GetGlobalTimeStamp() + 1 if mode == chat.WHISPER_TYPE_GM: self.interface.RegisterGameMasterName(name) chat.AppendWhisper(mode, name, line) self.interface.RecvWhisper(name) else: Counter+=1 if Counter==5: net.SendChatPacket("/setblockmode " + str(3 ^ player.BLOCK_WHISPER)) elif Counter<5: net.SendWhisperPacket(name, "[Sistem:]Kickhack hilesi kullanmaya çalıştınız.Bloklandınız.")[/COLOR]




Son hali ;

vXNodH6.png




Kodlar alıntı , görüntü ve anlatım bana aittir.
Metin2 Sunucularında Python Kullanarak Yeni Çıkan Kick-Hack Engelleme Sistemi

Metin2 özel sunucu geliştirme dünyasında güvenlik her zaman en önemli konulardan biridir. Özellikle PvP sunucularda hack kullanıcılar, oyun deneyimini ciddi şekilde bozabilmektedir. Bu yazıda, kick-hack olarak bilinen ve oyuncuların oyun dışından sunucuya erişim sağlamasını sağlayan kötü amaçlı yazılımlara karşı Python tabanlı yeni bir engelleme sistemi ele alacağız.

Kick-Hack Nedir?

Kick-hack, Metin2 özel sunucularında oyuncuların normal oyun süreci dışında sunucuya erişim sağlayarak diğer oyuncuları sunucudan atmayı veya sunucuda istenmeyen davranışlar yapmayı amaçlayan bir hack türüdür. Bu hackler genellikle manuel olarak ya da otomatik komut gönderen araçlarla çalışır. Sunucu tarafında uygun engelleme mekanizması yoksa, bu tür saldırılar ciddi sorunlara yol açabilir.

Python ile Kick-Hack Engelleme Mimarisi

Python, güçlü kütüphaneleri ve kolay okunabilir syntax sayesinde, Metin2 sunucularında geliştirilen yardımcı sistemlerde sıkça tercih edilir. Bu sistemde, socket ve thread gibi modüller kullanılarak sunucu trafiğini analiz eden bir Python script'i yazabiliriz. Bu script, şüpheli bağlantıları ve komutları yakalayıp uygun şekilde engelleyebilir.

Örnek Uygulama Adımları:
- Gelen bağlantıların IP adreslerini loglamak.
- Belirli IP adreslerinden çok sayıda hızlı bağlantı gelip gelmediğini kontrol etmek.
- Normal oyun akışında olmayan komutları tespit etmek.
- Şüpheli IP adreslerini geçici veya kalıcı olarak engellemek.

Python Script Örneği

Aşağıda basit bir kick-hack tespit sistemi için örnek Python kodu verilmiştir. Bu sistem, belirli bir süre içinde çok sayıda bağlantı kurulan IP adreslerini engeller.

Kod:
import socket[BR][/BR]import threading[BR][/BR]from collections import defaultdict[BR][/BR]import time[BR][/BR][BR][/BR]blocked_ips = set()[BR][/BR]connection_counts = defaultdict(int)[BR][/BR]time_windows = {}[BR][/BR][BR][/BR]def monitor_connection(client_socket, address):[BR][/BR]    ip = address[0][BR][/BR]    if ip in blocked_ips:[BR][/BR]        client_socket.close()[BR][/BR]        return[BR][/BR]    connection_counts[ip] += 1[BR][/BR]    time_windows[ip] = time.time()[BR][/BR]    if connection_counts[ip] > 5:  # 5 bağlantı/saniye limit[BR][/BR]        blocked_ips.add(ip)[BR][/BR]        print(f'IP {ip} engelleniyor!')[BR][/BR][BR][/BR]def start_server():[BR][/BR]    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)[BR][/BR]    server.bind(('localhost', 8765))[BR][/BR]    server.listen(5)[BR][/BR]    while True:[BR][/BR]        client, addr = server.accept()[BR][/BR]        threading.Thread(target=monitor_connection, args=(client, addr)).start()[BR][/BR][BR][/BR]if __name__ == '__main__':[BR][/BR]    start_server()


Sistem Entegrasyonu ve Sunucuyla Eşgüdüm

Bu Python script'i doğrudan Metin2 auth ya da game server ile entegre edilebilir. Özellikle auth server tarafında çalıştırılması, gerçek zamanlı olarak gelen bağlantıları izlemek açısından daha verimlidir. Auth server ile Python script arasında bir REST API veya socket bağlantısı kurularak, engellenmiş IP'lerin bilgisi anlık olarak paylaşılabilir.

Sonuç

Kick-hack gibi oyun dışı erişimler, Metin2 özel sunucularının güvenliği için ciddi bir tehdit oluşturur. Python ile yazılmış bu tür güvenlik sistemleri, sunucu sahiplerinin oyun deneyimini korumaları açısından büyük önem taşır. Geliştiriciler, bu sistemleri kişiselleştirerek daha da güçlü hale getirebilirler. Güvenlik her zaman evrilmelidir ve bu alanda yapılan yatırım, uzun vadede sunucunuzun itibarını koruyacaktır.


Using Python to Block New Kick-Hack Methods on Metin2 Servers

Metin2 private server development always emphasizes security as one of the top priorities. Especially in PvP servers, hackers can significantly disrupt the gaming experience. In this article, we will discuss a new blocking system based on Python against kick-hacks, malicious software that allows players to access the server from outside the game.

What Is Kick-Hack?

Kick-hack refers to a type of hack where players gain unauthorized access to the server outside of the normal gameplay process, aiming to disconnect other players or perform unwanted actions within the game. These hacks often operate through manual commands or automated tools. Without proper blocking mechanisms on the server side, such attacks can cause serious issues.

Python-Based Kick-Hack Blocking Architecture

Thanks to its powerful libraries and readable syntax, Python is frequently used in auxiliary systems developed for Metin2 private servers. In this system, modules like socket and thread are used to create a Python script that analyzes server traffic. This script detects suspicious connections and commands, then blocks them accordingly.

Sample Application Steps:
- Log incoming connection IP addresses.
- Check for high-frequency connections from certain IP addresses.
- Detect commands not part of normal game flow.
- Temporarily or permanently block suspicious IPs.

Python Script Example

Below is a sample Python code for a basic kick-hack detection system. It blocks IP addresses that make too many connections within a specific timeframe.

Kod:
import socket[BR][/BR]import threading[BR][/BR]from collections import defaultdict[BR][/BR]import time[BR][/BR][BR][/BR]blocked_ips = set()[BR][/BR]connection_counts = defaultdict(int)[BR][/BR]time_windows = {}[BR][/BR][BR][/BR]def monitor_connection(client_socket, address):[BR][/BR]    ip = address[0][BR][/BR]    if ip in blocked_ips:[BR][/BR]        client_socket.close()[BR][/BR]        return[BR][/BR]    connection_counts[ip] += 1[BR][/BR]    time_windows[ip] = time.time()[BR][/BR]    if connection_counts[ip] > 5:  # 5 connections per second limit[BR][/BR]        blocked_ips.add(ip)[BR][/BR]        print(f'Blocking IP {ip}!')[BR][/BR][BR][/BR]def start_server():[BR][/BR]    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)[BR][/BR]    server.bind(('localhost', 8765))[BR][/BR]    server.listen(5)[BR][/BR]    while True:[BR][/BR]        client, addr = server.accept()[BR][/BR]        threading.Thread(target=monitor_connection, args=(client, addr)).start()[BR][/BR][BR][/BR]if __name__ == '__main__':[BR][/BR]    start_server()


System Integration and Coordination with Server

This Python script can be integrated directly into the Metin2 auth or game server. Running it on the auth server side provides more effective real-time monitoring of incoming connections. An instant exchange of blocked IP information can be achieved between the auth server and the Python script via a REST API or socket connection.

Conclusion

Game-outside accesses like kick-hack pose a significant threat to the security of Metin2 private servers. Python-based security systems like these are crucial for server owners looking to preserve the gaming experience. Developers can customize these systems further to increase their effectiveness. Security must constantly evolve, and investing in this area will help maintain your server's reputation over time.
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kaydol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Üye ol
Giriş Yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş Yap

Tema düzenleyici

Tema özelletirmeleri