13 votes

Some people have asked me to tell them how to get the salt out of MCLawl so that they can generate some DirectConnect URLs.

The short answer is that it's not possible,

The long answer is that it is possible, but you need to recompile the software.

If you download the source package from: http://sourceforge.net/projects/mclawl/files/MCLawlSource.rar

In MCLawl/Properties.cs, find the lines that look like:

                        switch (key.ToLower())
                        {
                            case "server-name":
                                if (ValidString(value, "![]:.,{}~-+()?_/\\ "))
                                {
                                    Server.name = value;
                                }  
                                else { Server.s.Log("server-name invalid! setting to default."); }
                                break;

After these lines, add the following:

                            case "salt":
                                Server.salt = value;
                                break;

Then recompile (you'll need a CSharp compiler of some variety. Probably easiest to download Visual C# Express from Microsoft, since it's free) and then edit your properties/server.properties file, and add a line like:


salt = 8fa145a0680ad2932260e142d1b5ed9c

Once you have this in, your server will always use this salt to validate the mppass supplied to it, instead of using a random salt, and you can create a script to generate direct connect URLs.

Here's an example script, written in PHP, but you could easily use any language to do the same things:

<?php
// Change these to the correct values for your server:
  $host = '123.234.132.21';
  $port = 25535;
  $user = 'aUserName';

// This is the salt we put into server.properties:
$salt = '8fa145a0680ad2932260e142d1b5ed9c';

// Print out the direct connect URL:
printf("mc://%s:%d/%s/%s\n", $host, $port, $user, md5($user . $salt));
?>

Noobsloth
WoM Member
Members
WoM Member: 141768
WoM Coins: 0
>=(

I dont like it.

Is it World of Minecraft thats messing up or is it Minecraft.
Note: If its World of Minecraft, i would like the old World of Minecraft back, please.

triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565
Er, what are you talking

Er, what are you talking about???

Who's messing up anything? This post isn't about messing up anything, it's about letting people who run MCLawl servers of their own have the ability to generate Direct Connect URLs for their users.

moujave
Removed from Staff
Members
WoM Member: 21
WoM Coins: 1687
Srsly?

Post this where it belongs not under a completely different thread.

phatrollers
WoM Member
Members
WoM Member: 165418
WoM Coins: 0
soz

I didn't know about the ticket system :O

S0M3ONE
Contributor
Contributor
WoM Member: 110097
WoM Coins: 287
CORRECTION!!

It is possible with mclawl. My friend wrote a custom command to obtain the server's salt for yourself and other people. Here's the link to the command:
http://forums.mclawl.tk/viewtopic.php?f=20&t=2019

gamerkd
WoM Member
Members
WoM Member: 55499
WoM Coins: 55
Few Questions...

While I do use that salt command, I find it annoying it resets on every server reset. So yes, this modifying and creating a constant Salt will be very helpful. Does it matter what salt you set as a constant? Can it really just be random letters and numbers? Does it have to be unique from everyone else's server salts? What's the point of it? Authentication?

Yoshi2
WoM Member
Members
WoM Member: 9367
WoM Coins: 0
This salt is part of how

This salt is part of how Notch wanted to solve the problem with name spoofing.

The salt is like a password to the server
If you have this password, you can login as anybody.
So it's wise to use a very long salt where you use lots of different symbols.

gamerkd
WoM Member
Members
WoM Member: 55499
WoM Coins: 55
But servers are public, so

But servers are public, so can't anyone login already?

triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565
Most salts I see are 16

Most salts I see are 16 character alphanumerics, I do believe there's a length limit on the salt from the minecraft side, so I wouldn't be making a massively long salt because people won't be able to authenticate with you.

Even though the official server only uses letters and numbers, I think that it's probably ok to use other characters as well, but to be safe, I've only ever used letters and numbers.

triddin
WoM Developer
WoM Admins
WoM Member: 16
WoM Coins: 8565
Fixed salt is good.

The only problem with having a random salt is that if/when the server restarts, people who try to use resume, a cached entry or a direct connect url which has the old mppass, the connection will fail.

With a fixed salt, none of these problems occur.

WoM servers have all have fixed salts for the last few years.

so142001
WoM Member
Members
WoM Member: 158858
WoM Coins: 5
trouble compiling

Hi, I am using windows xp, and I tried to install Visual C# Express from Microsoft but I kept getting an error message saying that it needs windows vista. Is it at all possible for you to compile this or help me out with a tutorial on how to compile it in a different compiler?