C++ Client Src root ismini değiştirme

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 40

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Sa arkadaşlar bazı fileslerde root ismi değişmiş oluyor veya değiştirmek isteyenler oluyor.

Anlatım:

UserInterface.cpp açın

Aratın;

Kod:
CEterPackManager::Instance().RegisterRootPack((stFolder + std::string("root")).c_str());

Kod:
(stFolder + std::string("root")

kısmındaki root ismini istediğiniz gibi değiştirin.Packtaki dosyayla aynı isimle olmalıdır.

bkz:




C++ Client Src Root İsmini Değiştirme Rehberi
Metin2 özel sunucu geliştirme sürecinde, client tarafında yer alan kök dizin (root) adını değiştirmek, hem güvenlik hem de yapısal düzen açısından önemli bir işlemdir.
Bu işlem genellikle client src üzerinde yapılan küçük ama kritik değişikliklerden biridir ve doğru yapıldığında, projenin daha özgün ve organize görünmesini sağlar.

Neden Root İsmini Değiştirmeliyiz?
Root dizin adı, client tarafından erişilen temel klasör yapısını belirler.
Varsayılan olarak 'root', 'locale', 'uiscript', gibi isimler kullanılır.
Bu isimler, bir saldırganın sistem yapısı hakkında bilgi edinmesine yardımcı olabilir.
Bu nedenle, root ismini değiştirmek, security by obscurity prensibine uygun davranışı teşvik eder.

Değişiklik İçin Gerekli Adımlar
1. Client Kaynak Kodunu Açın:
Visual Studio veya tercih ettiğiniz IDE ile client src projesini açın.

2. Root Klasörünü Bulun:
Genellikle 'root' isimli klasör, client dosyalarının yüklendiği ana dizindir.
Bu klasörün adını örneğin 'MyGameAssets' olarak değiştirin.

3. Proje İçindeki Tanımlamaları Güncelle:
Client kaynak kodunda root dizinine referans veren yerleri güncellemek gerekir.
Özellikle 'entrypoint.cpp', 'PythonApplication.cpp', 'Locale_inc.h' gibi dosyalarda yer alabilir.
Aşağıdaki örnek kod parçasını göz önünde bulundurun:

Eski Hali:
Kod:
LPCTSTR c_szRootPath = "root";

Yeni Hali:
Kod:
LPCTSTR c_szRootPath = "MyGameAssets";


Python GUI ve UIScript ile Uyum
Root ismi değiştiğinde, Python GUI (PyUI) dosyaları ve UIScript sistemleri de bu yeni yolu tanımak zorundadır.
Python tarafında 'app.py' veya 'system.py' gibi dosyalarda 'root' kelimesinin geçtiği yerleri kontrol edin ve gerekirse güncelleyin.

Dikkat Edilmesi Gerekenler
- Root ismini değiştirdikten sonra client derlenmelidir.
- Pack dosyaları (resource paketleri) doğru dizine göre yeniden oluşturulmuşsa, yeni root adıyla uyumlu olmalıdır.
- Eğer client-server senkronizasyonu varsa, server tarafında tanımlı root yolları da güncellenmelidir.

Sonuç
Root ismini değiştirmek, Metin2 client src üzerinde yapılan küçük ama etkili değişikliklerden biridir.
Güvenliği artırır ve projeyi kişiselleştirir.
Ancak dikkatli yapılması ve tüm dosya yollarının uyumlu hale getirilmesi gerekir.
Bu işlem, martysama tarzı gelişmiş sistemlerde de aynı şekilde uygulanabilir ve source edit süreçlerinde önemli bir adım olarak kabul edilir.


How to Change the C++ Client Src Root Name
In the process of developing Metin2 private servers, changing the root directory name on the client side is an important step for both security and structural organization.
This process is typically one of the small but critical modifications made within the client src, and when done correctly, it helps the project appear more unique and organized.

Why Should We Change the Root Name?
The root directory name determines the main folder structure accessed by the client.
By default, names such as 'root', 'locale', 'uiscript' are used.
These names can assist attackers in gaining information about the system structure.
Therefore, changing the root name supports the principle of security by obscurity.

Steps Required for the Change
1. Open the Client Source Code:
Open the client src project in Visual Studio or your preferred IDE.

2. Locate the Root Folder:
Usually, the folder named 'root' is the main directory where client files are loaded.
Rename this folder to something like 'MyGameAssets'.

3. Update References in the Project:
You need to update any references to the root directory within the client source code.
Look especially in files like 'entrypoint.cpp', 'PythonApplication.cpp', 'Locale_inc.h'.
Consider the following code snippet:

Old Version:
Kod:
LPCTSTR c_szRootPath = "root";

New Version:
Kod:
LPCTSTR c_szRootPath = "MyGameAssets";


Compatibility with Python GUI and UIScript
When the root name is changed, Python GUI (PyUI) files and UIScript systems must recognize the new path.
Check for occurrences of 'root' in Python-side files like 'app.py' or 'system.py', and update them accordingly if necessary.

Important Notes
- After changing the root name, the client must be recompiled.
- If resource packages (pack files) are created based on the correct directory, they must also be compatible with the new root name.
- If there is client-server synchronization, root paths defined on the server side should also be updated.

Conclusion
Changing the root name is a small but effective modification performed on Metin2 client src.
It enhances security and personalizes the project.
However, it requires careful execution and ensuring all file paths are adjusted accordingly.
This procedure can also be applied similarly in advanced systems like martysama and is considered an important step in source edit processes.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt