Jump to content
×
×
  • Create New...

Disable Loading MIX, ASI, M3D... Files From Client Directory


Recommended Posts

M2 Download Center

Download Here ( Internal )

Hey again :D

 

Yesterday I was looking into mss32.dll and just found out this is the library being responsible for loading asi, mix, m3d, etc.. files. So I made a library that will hook the Miles Sound System so that it won't load unwanted files, only what is needed.

 

Download: https://distraught.hu/DistraughtProtector/

VirusTotal: 

Hidden Content

    Give reaction to this post to see the hidden content.

 

There are 3 files in the zip:

  • .lib -> put it in your extern/lib folder
  • .h -> put it in your extern/include folder
  • .dll -> put it in your client

 

Open UserInterface/UserInterface.cpp and find the WinMain function.

Add this to the beginning of the function:

DistraughtProtector::Initialize();

DistraughtProtector::SetFileBlockedCallback(&HackerDetected);

DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssmp3.asi", 125952);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssvoice.asi", 197120);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssa3d.m3d", 83456);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssds3d.m3d", 70656);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssdx7.m3d", 80896);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\msseax.m3d", 103424);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssrsx.m3d", 354816);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\msssoft.m3d", 67072);
DistraughtProtector::AddAllowedMilesProviderLibrary("miles\\mssdsp.flt", 93696);

You have to specify the files that are enabled to load by the Miles Sound System (path, file size in bytes).

 

 

And add this before that function:

static void _stdcall HackerDetected(const char* blockedFile)
{
	MessageBox(NULL, blockedFile, ApplicationStringTable_GetStringz(IDS_APP_NAME, "APP_NAME"), MB_ICONSTOP);
}

This is a callback where you get notified if the user would load a file that he/she shouldn't :D

You don't have to specify a callback, in that case remove DistraughtProtector::SetFileBlockedCallback(&HackerDetected); from WinMain and the client just simply won't load the dangerous files. 

 

Here's an image what it should look like:

image_howto.jpg

 

 

After that just add

DistraughtProtector::Destroy();

to the end of WinMain (surely before the return!).

 

Hope you like it! If you have ideas what new features should I add to the library, let me know in the comments! :)

  • Metin2 Dev 9
  • Love 9
  • Love 2
  • Good 3

WRnRW3H.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 0

      Looking for Someone to create the queries etc for armors and weapons

    2. 13

      Official Private Shop Search

    3. 944

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    4. 79

      GUI Teleport System

    5. 0

      inventory slot marking system cant compile

    6. 8

      Inventory Bug

    7. 63

      Metin2 Dev - Changelogs

  • Recently Browsing

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.