- Joined
- Jun 10, 2011
- Messages
- 48
- Reaction score
- 37
1: Copy WZ_MD5_MOD.dll to C:\Program Files\Microsoft SQL Server\MSSQL\Binn
2: Run MSSQL Query Analyser, in sequence.
3.run sql enterprise go to muonline db click on table
right click on MEMB_INFO and desgain table
found in memb_pwd and change from varchr to varbinary
and change 10 to 16 and remove NULL
2: Run MSSQL Query Analyser, in sequence.
Code:
a: USE master;
exec sp_addextendedproc 'XP_MD5_EncodeKeyVal', 'WZ_MD5_MOD.dll'
b: use MuOnline;
c: CREATE FUNCTION [dbo].[fn_md5] (@data VARCHAR(10), @data2 VARCHAR(10))
RETURNS BINARY(16) AS
BEGIN
DECLARE @hash BINARY(16)
EXEC master.dbo.XP_MD5_EncodeKeyVal @data, @data2, @hash OUT
RETURN @hash
END
d: CREATE PROCEDURE Encript
@btInStr VARCHAR(10),
@btInStrIndex VARCHAR(10)
AS
BEGIN
DECLARE @btOutVal BINARY(16)
EXEC master..XP_MD5_EncodeKeyVal @btInStr, @btInStrIndex, @btOutVal OUT
UPDATE MEMB_INFO SET memb__pwd = @btOutVal WHERE memb___id = @btInStrIndex
END
GO
e: CREATE PROCEDURE DencriptPW
@btInStr VARCHAR(10),
@btInStrIndex VARCHAR(10)
AS
BEGIN
DECLARE @btOutVal BINARY(16)
EXEC master..XP_MD5_EncodeKeyVal @btInStr, @btInStrIndex, @btOutVal OUT
SELECT memb__pwd FROM MEMB_INFO WHERE memb__pwd = @btOutVal AND memb___id = @btInStrIndex
END
GO
right click on MEMB_INFO and desgain table
found in memb_pwd and change from varchr to varbinary
and change 10 to 16 and remove NULL
Last edited:

