Konu
:
HackShield Login Proseduru
14-10-2022, 23:46:58
#0
Misafir
Açık Profil bilgileri
Özel Mesaj Gönder
Misafir tarafından gönderilen tüm mesajları bul
Misafir'ı arkadaş olarak ekle
Buyrun HackShield SQL 2000 Login Proceduru:
Kod:
[/FONT][/SIZE][/COLOR]
CREATE PROCEDURE [dbo].[HACKSHIELD_LOGIN]
[I @
account
ID varchar(21),[/I]
[I @
password
varchar(32),[/I]
@nRet smallint OUTPUT
AS
/*
Author: Nero
*/
DECLARE @
account
ID2 varchar(50), @
password
2 varchar(50), @
author
ity smallint, @
ChaR
1 smallint, @
ChaR
2 smallint, @
ChaR
3 smallint
/*SELECT @
ChaR
1 = Authority FROM USERDATA WHERE strUserID = (SELECT strCharID1 FROM ACCOUNT_CHAR WHERE strAccountID = @
account
ID and strCharID1 IS NOT NULL)
SELECT @
ChaR
2 = Authority FROM USERDATA WHERE strUserID = (SELECT strCharID2 FROM ACCOUNT_CHAR WHERE strAccountID = @
account
ID and strCharID2 IS NOT NULL)
SELECT @
ChaR
3 = Authority FROM USERDATA WHERE strUserID = (SELECT strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @
account
ID and strCharID3 IS NOT NULL)
IF @
ChaR
1 = 255 or @
ChaR
2 = 255 or @
ChaR
3 = 255
BEGIN
UPDATE TB_USER SET strAuthority = 255 where strAccountID = @
account
ID
END
ELSE
BEGIN
UPDATE TB_USER SET strAuthority = NULL where strAccountID = @
account
ID
END
*/
-- Otomatik uyelik
SELECT @
account
ID2 = COUNT(strAccountID) FROM TB_USER WHERE strAccountID = @
account
ID
IF @
account
ID2 = 0
BEGIN
INSERT INTO TB_USER (strAccountID, strpasswd, strSocNo, idays) VALUES @
account
ID, @
password
, 1, '6')
END
/* Normal uyelik
SELECT @
account
ID2 = COUNT(strAccountID) FROM TB_USER WHERE strAccountID = @
account
ID
IF @
account
ID2 = 0
BEGIN
SET @nRet = 2 -- Account doesnt exist.
RETURN
END
*/
SELECT @
password
2 = strPasswd, @
author
ity = strAuthority FROM TB_USER WHERE strAccountID = @
account
ID
IF @
password
2 IS null or @
password
2 != @
password
BEGIN
SET @nRet = 3 -- Invalid password.
RETURN
END
ELSE
IF @
author
ity = 255
BEGIN
SET @nRet = 4 -- Account is banned.
RETURN
END
ELSE
BEGIN
DELETE CURRENTUSER WHERE strAccountID = @
account
ID
SET @nRet = 1
RETURN
END
GO4
[/B]