How to remove the Motd in AzerothCore

Azayaka

Allelujah
Administrator
Azayaka Rep
3
0
0
Rep
9
Azayaka Vouches
0
0
0
Vouches
0
Posts
321
Likes
219
2 YEARS
2 YEARS OF SERVICE
LEVEL 99 60 XP
Hello everyone,

I've been somewhat conflicted about sharing this. I know that the team working on AzerothCore does great work, and it’s important to recognize their contributions.

In the name of education, and despite their somewhat poor attempt at obfuscation, I feel it's necessary to share this knowledge with you. Obfuscation is a technique that makes code harder to read and modify, often to protect intellectual property or prevent tampering.

However, I hope the team working on AzerothCore, who cares about their work, will consider improving their obfuscation techniques to make them more effective if that aligns with their goals. Effective obfuscation can better protect their hard work and make unauthorized modifications more challenging.

Thank you for understanding, and I hope this serves as constructive feedback for the AzerothCore team.

thank you,

Allelujah


I recently started using AzerothCore, switching from TrinityCore, and I realized that the string for 'This server runs on AzerothCore' was not in the config files or the database. So, I did some searching and discovered this is intentional. The AzerothCore team does not want you to change or remove this message, and they have even stated in one post that doing so is not "authorized." They go as far as to insult people who ask how to do so (which I disagree with).

I decided to look in their Motdmgr.cpp file and see what's going on.

Around lines 84-86, you will see their attempt at obfuscation. If you didn't notice it or thought it was required, that's okay. Not everyone will pick up on this. That's why I'm sharing it here.

C++:
motd = /* fctlsup << //0x338// "63"+"cx""d2"+"1e""dd"+"cx""ds"+"ce""dd"+"ce""7D"+ << */ motd
        /*"d3"+"ce"*/ + "@|" + "cf" +/*"as"+"k4"*/"fF" + "F4" +/*"d5"+"f3"*/"A2" + "DT"/*"F4"+"Az"*/ + "hi" + "s "
        /*"fd"+"hy"*/ + "se" + "rv" +/*"nh"+"k3"*/"er" + " r" +/*"x1"+"A2"*/"un" + "s "/*"F2"+"Ay"*/ + "on" + " Az"
        /*"xs"+"5n"*/ + "er" + "ot" +/*"xs"+"A2"*/"hC" + "or" +/*"a4"+"f3"*/"e|" + "r "/*"f2"+"A2"*/ + "|c" + "ff"
        /*"5g"+"A2"*/ + "3C" + "E7" +/*"k5"+"AX"*/"FF" + "ww" +/*"sx"+"Gj"*/"w." + "az"/*"a1"+"vf"*/ + "er" + "ot"
        /*"ds"+"sx"*/ + "hc" + "or" +/*"F4"+"k5"*/"e." + "or" +/*"po"+"xs"*/"g|r"/*"F4"+"p2"+"o4"+"A2"+"i2"*/;;

This is the variable in question. Someone who isn't experienced or doesn't know what obfuscation is will most likely be intimidated by seeing this and not want to proceed. That's okay, and that means their attempt to stop modification has succeeded. However, I can provide some clarity here. This is a poor attempt at obfuscation as it just concatenates strings and comments to make it harder to read. It's not very effective.

So you're probably asking how to change it. I'd recommend that you don't or at least find another way to give credit where credit is due. If you still want to proceed, delete the variable for motd on line 85 or change it to whatever you want. Make sure to leave the call to motd inside the motd variable or your database motd will not appear.

Here's an example after some edits:
C++:
motd = motd + "@|cffFF4A2DThis server runs on EmuDevs|r |cff3CE7FFEmuDevs.gg|r";

Cleaner and easier to read.

Again, I encourage you to continue learning and expanding your knowledge. My hope in sharing this is that AzerothCore will continue to grow and improve as a whole. If you would like to learn more about obfuscation and potentially use it on some of your projects, check out some additional resources.

 

Sylian

Trusted
Trusted
Sylian Rep
2
0
0
Rep
10
Sylian Vouches
0
0
0
Vouches
0
Posts
86
Likes
199
Bits
2 YEARS
2 YEARS OF SERVICE
LEVEL 28 56 XP
Probably the best release ever made!
This is going to help lots of users with their servers :HACKERMANS:
 

3,389

1,271

9,555

428

Top