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!

[Release] WZ_MD5_MOD for SQL Server x64 by xakumm

Newbie Spellweaver
Joined
Nov 24, 2010
Messages
29
Reaction score
124
Extended Stored Procedure for create and check WZ MD5 Hash on x64 systems.

1. Copy the 'WZ_MD5_MOD_x64.dll' in C:\Program Files\Microsoft SQL Server\MSSQL\Binn\
2. Run this script "Install WZ_MD5_MOD_x64.sql"
3. Run script "Test.sql" [optional]
4. Enjoy!

Download + fix :eek:tt1:
 
Last edited:
Newbie Spellweaver
Joined
Nov 24, 2010
Messages
29
Reaction score
124
This already posted 4 o 5 years ago..
what are you talking about? I made it 9 months ago and released just now.
if there is another version of this library for SQL Server x64 - show it me. :rolleyes:
 
Experienced Elementalist
Joined
May 16, 2009
Messages
205
Reaction score
101
I search for this on net one month ago, no results, this not exist in another place, only exist for x86 systems
 
Junior Spellweaver
Joined
Sep 12, 2004
Messages
134
Reaction score
14
what are you talking about? I made it 9 months ago and released just now.
if there is another version of this library for SQL Server x64 - show it me. :rolleyes:

Well, maybe it exists, but is not public...

Test script
Code:
-- XP_MD5_EncodeKeyVal

SET NOCOUNT ON


DECLARE @[I][B][URL="http://forum.ragezone.com/members/2000135421.html"]login1[/URL][/B][/I] char(10), @pass1 char(10), @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]1 binary(16)
set @[I][B][URL="http://forum.ragezone.com/members/2000135421.html"]login1[/URL][/B][/I] = 'login'
set @pass1 = 'pass'


EXEC master.dbo.XP_MD5_EncodeKeyVal @[I][B][URL="http://forum.ragezone.com/members/2000135421.html"]login1[/URL][/B][/I], @pass1, @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]1 OUT


---------------------------------------------------------------------


DECLARE @[I][B][URL="http://forum.ragezone.com/members/2000135421.html"]login1[/URL][/B][/I]n nchar(10), @pass1n nchar(10), @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]1n binary(16)
set @[I][B][URL="http://forum.ragezone.com/members/2000135421.html"]login1[/URL][/B][/I]n = N'login'
set @pass1n = N'pass'


EXEC master.dbo.XP_MD5_EncodeKeyVal @[I][B][URL="http://forum.ragezone.com/members/2000135421.html"]login1[/URL][/B][/I]n, @pass1n, @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]1n OUT


---------------------------------------------------------------------


DECLARE @[I][B][URL="http://forum.ragezone.com/members/1333401102.html"]LogiN[/URL][/B][/I]2 varchar(10), @pass2 varchar(10), @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]2 binary(16)
set @[I][B][URL="http://forum.ragezone.com/members/1333401102.html"]LogiN[/URL][/B][/I]2 = 'login'
set @pass2 = 'pass'


EXEC master.dbo.XP_MD5_EncodeKeyVal @[I][B][URL="http://forum.ragezone.com/members/1333401102.html"]LogiN[/URL][/B][/I]2, @pass2, @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]2 OUT


---------------------------------------------------------------------


DECLARE @[I][B][URL="http://forum.ragezone.com/members/1333401102.html"]LogiN[/URL][/B][/I]2n nvarchar(10), @pass2n nvarchar(10), @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]2n binary(16)
set @[I][B][URL="http://forum.ragezone.com/members/1333401102.html"]LogiN[/URL][/B][/I]2n = N'login'
set @pass2n = N'pass'


EXEC master.dbo.XP_MD5_EncodeKeyVal @[I][B][URL="http://forum.ragezone.com/members/1333401102.html"]LogiN[/URL][/B][/I]2n, @pass2n, @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]2n OUT


---------------------------------------------------------------------


declare @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]3 binary(16)
EXEC master.dbo.XP_MD5_EncodeKeyVal 'login', 'pass', @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]3 OUT


---------------------------------------------------------------------


declare @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]3n binary(16)
EXEC master.dbo.XP_MD5_EncodeKeyVal N'login', N'pass', @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]3n OUT


---------------------------------------------------------------------


select @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]1 as 'char', @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]1n as 'nchar'
select @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]2 as 'varchar', @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]2n as 'nvarchar' 
select @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]3 as 'literal', @[I][B][URL="http://forum.ragezone.com/members/193257.html"]Hash[/URL][/B][/I]3n as 'nliteral'

Your DLL
Code:
char                               nchar
---------------------------------- ----------------------------------
0x49192D0074BA77460E1AC359D3DDEABA [COLOR=#ff0000]0x36B759A7F6A79F205FE9271ACB1722F8[/COLOR]


varchar                            nvarchar
---------------------------------- ----------------------------------
0x2450781554F7806EC1A4DE67E7A762C4 [COLOR=#ff0000]0x406800C0B012934AD1CA13562EEC3F2B[/COLOR]


literal                            nliteral
---------------------------------- ----------------------------------
[COLOR=#ff0000]0x2450781554F7806EC1A4DE67E7A762C4 0x406800C0B012934AD1CA13562EEC3F2B[/COLOR]

Original x86
Code:
char                               nchar
---------------------------------- ----------------------------------
0x49192D0074BA77460E1AC359D3DDEABA 0xABEF31793325B11D7DBBF98C8F3C2794


varchar                            nvarchar
---------------------------------- ----------------------------------
0x2450781554F7806EC1A4DE67E7A762C4 0xEA4C79D5CF04F00860937968F60C7EFC


literal                            nliteral
---------------------------------- ----------------------------------
0x19522F64C31DD4CB2DA20AADC2CE924D 0x2A6985F2ECB9C4F4B37439125F7B4C4E
 
Newbie Spellweaver
Joined
Nov 24, 2010
Messages
29
Reaction score
124
navossoc, wolfulus,
you should use only varchar (or char), because the use unicode is a big mistake and unsafe - for password guessing need only the first character ( check it: )
Code:
DECLARE @btInStr0 NVARCHAR(10), @btInStr1 NVARCHAR(10), @btInStr2 NVARCHAR(10)
DECLARE @btInStrIndex	NVARCHAR(10)
DECLARE	@btOutVal	BINARY(16)
set @btInStr0 = N'[COLOR="#B22222"]password[/COLOR]'
set @btInStr1 = N'[COLOR="#B22222"]pass[/COLOR]'
set @btInStr2 = N'[COLOR="#FF0000"]p[/COLOR]'
set @btInStrIndex = N'login'
EXEC master..XP_MD5_EncodeKeyVal @btInStr0, @btInStrIndex, @btOutVal OUT
print @btOutVal
EXEC master..XP_MD5_EncodeKeyVal @btInStr1, @btInStrIndex, @btOutVal OUT
print @btOutVal
EXEC master..XP_MD5_EncodeKeyVal @btInStr2, @btInStrIndex, @btOutVal OUT
print @btOutVal

/* result: 
	0x124C67DED6D675FE458137B70BBDC41E
	0x124C67DED6D675FE458137B70BBDC41E
	0x124C67DED6D675FE458137B70BBDC41E */

I changed the library (download from first post), what would the outcome was in the original library x86, but my dll already correctly worked with varchar.
 
Junior Spellweaver
Joined
Sep 12, 2004
Messages
134
Reaction score
14
navossoc, wolfulus,
you should use only varchar (or char), because the use unicode is a big mistake and unsafe - for password guessing need only the first character ( check it: )
Code:
DECLARE @btInStr0 NVARCHAR(10), @btInStr1 NVARCHAR(10), @btInStr2 NVARCHAR(10)
DECLARE @btInStrIndex    NVARCHAR(10)
DECLARE    @btOutVal    BINARY(16)
set @btInStr0 = N'[COLOR=#B22222]password[/COLOR]'
set @btInStr1 = N'[COLOR=#B22222]pass[/COLOR]'
set @btInStr2 = N'[COLOR=#FF0000]p[/COLOR]'
set @btInStrIndex = N'login'
EXEC master..XP_MD5_EncodeKeyVal @btInStr0, @btInStrIndex, @btOutVal OUT
print @btOutVal
EXEC master..XP_MD5_EncodeKeyVal @btInStr1, @btInStrIndex, @btOutVal OUT
print @btOutVal
EXEC master..XP_MD5_EncodeKeyVal @btInStr2, @btInStrIndex, @btOutVal OUT
print @btOutVal

/* result: 
    0x124C67DED6D675FE458137B70BBDC41E
    0x124C67DED6D675FE458137B70BBDC41E
    0x124C67DED6D675FE458137B70BBDC41E */

I changed the library (download from first post), what would the outcome was in the original library x86, but my dll already correctly worked with varchar.

TBH, i really don't care about it or even use it...

It just don't mimic the original behavior, so it's broken in my opinion, but now seems you have fixed it...

[]'s
 
Skilled Illusionist
Joined
Mar 5, 2015
Messages
308
Reaction score
119
Thanks! Man! Thanks! I'd been seaching foor this like 3 days.
 
Joined
Mar 23, 2013
Messages
416
Reaction score
28
Please help I have this error. but I already paste the WZ_MD5_MOD_x64.dll

DBCC cannot free the DLL "WZ_MD5_MOD_x64.dll". The DLL is not loaded.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 17750, Level 16, State 0, Procedure XP_MD5_EncodeKeyVal, Line 1
Could not load the DLL WZ_MD5_MOD_x64.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).

Edit: by the way Im using 32bit
 
Last edited:
Junior Spellweaver
Joined
Sep 12, 2004
Messages
134
Reaction score
14
Please help I have this error. but I already paste the WZ_MD5_MOD_x64.dll

DBCC cannot free the DLL "WZ_MD5_MOD_x64.dll". The DLL is not loaded.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 17750, Level 16, State 0, Procedure XP_MD5_EncodeKeyVal, Line 1
Could not load the DLL WZ_MD5_MOD_x64.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).

Edit: by the way Im using 32bit

If are you using a sql server 32 bits, why want you use this DLL?
Just use the original one...

[]'s
 
Back
Top