Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

MyWeb for Perfect World (All Versions)

Junior Spellweaver
Joined
Aug 5, 2011
Messages
159
Reaction score
6
Code:
System error. Try again later
what wrong ?
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
Okay, anyone around here know PHP well enough to resolve the following issue? Unfortunately it appears I am not well enough versed in PHP to figure this out >.< (wasted a few days so far trying!):

For some reason, None of the 3 hashes work for me.



Here is what the password (123456) look like

è0æ¯A”#½Ië |N



What hash is this?

This is MD5 (in a binary representation). The following "method":

"0x".md5($Login.$Pass)

Just as mentioned (highlighted) below:

Also, just so you know, that's NOT just the password - hence the "0x".md5($Login.$Password). It's the MD5 of the username+password :wink:

change your protocol authd server with this View attachment 150126
and chose 0x.md5($Login.$Pass) Password encryption on installation myweb.





original release 1.3.6 use encryption md5($Login.$Pass,true);

u need to change protocol authd with support myweb 0x.md5($Login.$Pass) or base64_encode(md5($Login.$Pass, true));

You may, at first glance, assume they're different. However they would actually produce the EXACT same results. That is:

"0x".md5($Login.$Pass) == md5($Login.$Pass, TRUE)

They are the same exact thing (well of course not, technically, but they produce the EXACT SAME results)! That is, if you created a user with the name "sample" and the password "sampler" - BOTH of these would show as "ëg@”}ßHªàÁ,Æñp" in dbo (the DB)...

More can be read on this here: https://forum.ragezone.com/f755/password-encryption-741929/

<security> <entity class="com.goldhuman.Common.Security.NullSecurity" name="NullSecurity" type="0"/>
<entity class="com.goldhuman.Common.Security.Random" name="Random" type="1"/>
<entity class="com.goldhuman.Common.Security.ARCFourSecurity" name="ARCFourSecurity" type="2"/>
<entity class="com.goldhuman.Common.Security.MD5Hash" name="MD5Hash" type="3"/>
<entity class="com.goldhuman.Common.Security.HMAC_MD5Hash" name="HMAC_MD5Hash" type="4"/>
</security>

What hash is this?



In addtion, Here is what a working regster script look like:-

$Salt = $Login.$Pass;
$Salt = md5($Salt);
$Salt = "0x".$Salt; //Encrypts the password

Another one

$Salt = "0x".md5($Login.$Pass);

It's obvious for me that my server is working using

$Salt = "0x".md5($Login.$Pass);

But when ever i choose it while installing myweb, It doesn't allow old accounts in



Any help?

If you look closely, the "choice" for MyWEB is NOT actually "0x".md5($login.$pass) - it's actually '0x'.md5($login.$pass)!!! Notice the difference??? That's right, you're actual "registration" is using "0x".md5($login.$pass) while MyWEB is using '0x'md5($login.$pass) - in case you didn't spot the difference, it's the difference between the DOUBLE and SINGLE quotes... Look again: "0x".md5($login.$pass) - '0x'.md5($login.$pass)

The difference is, " and ' are handled COMPLETELY different in PHP. You can read more on that here: & here:

In short:

<?php
$test = 'hello';
echo "this is a $test"; // returns this is a hello
echo 'this is a $test'; // returns this is a $test
?>

So, when you have "0x".md5($login.$pass) it will parse ("process") the 0x part (which would turn it into the 'binary' that looks like this "ëg@”}ßHªàÁ,Æñp" from my previous example).

But if you have '0x'.md5($login.$pass) it will not parse ("process") the 0x part and will be written out (just like in my other example above borrowed from SOF), so instead that would look like this in dbo (DB) "0xeb186740947ddf48aae0c12cc6f11170".

So as you can see, the mere difference of " or ' winds up with a TOTALLY different result! We're talking " vs ' winding up with "ëg@”}ßHªàÁ,Æñp" or "0xeb186740947ddf48aae0c12cc6f11170" - which even though they technically "mean" the same thing, they're still worlds apart!

So, now that you hopefully understand that all a little better I will go ahead and leave a list for you and everyone else to reference in the future (please note that ALL of these will use the following account data for the example so you can verify all this for yourself):

USERNAME: sample
PASSWORD: sampler

"0x".md5($Login.$Pass) = "ëg@”}ßHªàÁ,Æñp"
md5($Login.$Pass, TRUE) = "ëg@”}ßHªàÁ,Æñp"

md5($Login.$Pass) = "eb186740947ddf48aae0c12cc6f11170"

'0x'.md5($Login.$Pass) = "0xeb186740947ddf48aae0c12cc6f11170"

base64_encode(md5($Login.$Pass, true)) = "6xhnQJR930iq4MEsxvERcA=="
base64_encode(md5($Login.$Pass)) = "6xhnQJR930iq4MEsxvERcA=="


A few exercises you could do to learn all this first hand with hands on experience:

Using 010 editor (or maybe another hex editor?) you can see first hand how "ëg@”}ßHªàÁ,Æñp" == "eb186740947ddf48aae0c12cc6f11170" by creating a new "hex document" and manually typing out the "eb 18 67 40 94 7d df 48 aa e0 c1 2c c6 f1 11 70" and you will then see the following:

md5 - MyWeb for Perfect World (All Versions) - RaGEZONE Forums

You can also use to perform every function necessary to deduce any of these values. You can type "samplesampler" (without quotes) in the [text] box and hit <encode> to get the md5, which will then display in the [text info] box. You can then copy the md5 and paste that into the [hex] box and hit <decode> to get/see the Base64 in the [base64] box! And of course for the "0xeb186740947ddf48aae0c12cc6f11170" you just add a 0x in front of the hex md5 (no further "<decoding>" needed)! You could also paste the Base64 into the [base 64] box and hit <decode> to get the [hex] md5 in the [hex] box!



Now back to the actual problem at hand! All of the above seem to work for MyWEB - EXCEPT the top two >.<. When I add them to MyWEB it results in a "successful" registration, but for some reason the passwd field remains BLANK in the DB (it's not /actually/ 'successful' despite it saying registration was a success)! So the question is, how to get either ""0x".md5($Login.$Pass)" or "md5($Login.$Pass, TRUE)" to work with MyWEB?

The goal here (of course) is to get MyWEB working with the binary/ascii representation of the MD5 rather than the base64 or the hex representation of the md5, rather than swap out authd protocols (because then there's a LOT of other stuff that would need to be changed too [such as: other registration pages, pwAdmin etc etc etc])!
 

Attachments

You must be registered for see attachments list
Last edited:
Skilled Illusionist
Joined
Apr 26, 2011
Messages
380
Reaction score
96
Now back to the actual problem at hand! All of the above seem to work for MyWEB - EXCEPT the top two >.<. When I add them to MyWEB it results in a "successful" registration, but for some reason the passwd field remains BLANK in the DB (it's not /actually/ 'successful' despite it saying registration was a success)! So the question is, how to get either ""0x".md5($Login.$Pass)" or "md5($Login.$Pass, TRUE)" to work with MyWEB?
But can you log on these accounts? The binary representation of md5 hash can also include the "new line" symbol (actually it does often). That would explain why you see some rows as blank. Have you tried copying or selecting the password field in the database? The actual hash value can sometimes contain few rows in a single database field.
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
But can you log on these accounts? The binary representation of md5 hash can also include the "new line" symbol (actually it does often). That would explain why you see some rows as blank. Have you tried copying or selecting the password field in the database? The actual hash value can sometimes contain few rows in a single database field.

No, no login possible - it's truly Blank... Even the usernamepassword/md5 that contain a NL will show as one line in the DB (at least the program I use to connect to my DB), as well. So for some reason "0x".md5($Login.$Pass)" and "md5($Login.$Pass, TRUE)" is not working from MyWEB.
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
I refuse to change either. I will NOT change auth, and there's no need to change dbo since the normal registration works just fine.

The goal is to make MyWEB compliant with my release. That is, CHANGE myweb.

I am NOT going to sit here and change everything else for my friends, I would rather change ONE thing (myweb) - if that's simply "not possible" - well oh well then, I guess it's not that great after all and they can live without it!
 
Joined
Oct 11, 2012
Messages
499
Reaction score
8
I refuse to change either. I will NOT change auth, and there's no need to change dbo since the normal registration works just fine.

The goal is to make MyWEB compliant with my release. That is, CHANGE myweb.

I am NOT going to sit here and change everything else for my friends, I would rather change ONE thing (myweb) - if that's simply "not possible" - well oh well then, I guess it's not that great after all and they can live without it!

xXDDDD it work perfect with your release...like i said i had to chaged just the dbo
 
Skilled Illusionist
Joined
Apr 7, 2012
Messages
312
Reaction score
121
Here is a small sneak peak of the new update I will be releasing... a lot of stuff will change between now and when it's finished...

 
  • Like
Reactions: 343
Back
Top