[Guide] Добавяне на MD5 към DataBase

pich

New Member
Joined
Apr 24, 2009
Messages
23
Reaction score
25
1. Отидете на Enterprise Manager > MuOnline > Tables > Design Table/Дизайн таблица MEMB_INFO и задайте:

Code:
memb__pwd varbinary 16 NO NULL


2. Сложете "WZ_MD5_MOD.dll" в C: \ Program Files \ Microsoft SQL Server \ MSSQL \ Binn \
3. Стартирайте този скрипт (това го пишете в Query Analyzer):

Code:
USE [master]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[XP_MD5_EncodeKeyVal]') and OBJECTPROPERTY(id, N'IsExtendedProc') = 1)
exec sp_dropextendedproc N'[dbo].[XP_MD5_EncodeKeyVal]'
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

exec sp_addextendedproc N'XP_MD5_EncodeKeyVal', N'WZ_MD5_MOD.dll'
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[XP_MD5_CheckValue]') and OBJECTPROPERTY(id, N'IsExtendedProc') = 1)
exec sp_dropextendedproc N'[dbo].[XP_MD5_CheckValue]'
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

exec sp_addextendedproc N'XP_MD5_CheckValue', N'WZ_MD5_MOD.dll'
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

USE [MuOnline]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SP_MD5_ENCODE_VALUE]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SP_MD5_ENCODE_VALUE]
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE SP_MD5_ENCODE_VALUE 

	@btInStr		VARCHAR(10),
	@btInStrIndex		VARCHAR(10)

--RETURNS BINARY(16)
--Created By WebZen
--Adapted By [CzF]Deathway
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
	RETURN 	@btOutVal
END
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

4. Заменете Вашият JoinServer с този по-долу
5. Инсталирайте си уеб сайта с вкючен MD5
6. Инсталирайте си едитора с вкючен MD5

И това е всичко. ;)
 

Attachments

  • JoinServer.rar
    262.6 KB · Views: 66
  • MD5 DLL.rar
    28.7 KB · Views: 41
Use Master Database For MD5 Encrypt ! :) for all sql server! :) sry 4 my bad english :)