Just to make sure no one is ever going to hack a GM account.
Code:
USE [PS_UserData]
GO
/****** Object: Table [dbo].[GM_Hackers_Log] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[GM_Hackers_Log](
[IDX] [int] IDENTITY(1,1) NOT NULL,
[IDGM] [varchar](50) NULL,
[IPGM] [varchar](50) NULL,
[SESSIONID] [bigint] NULL,
[LOGINTIME] [datetime] NULL,
[STATUS] [varchar](50) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[GM_Hackers_Log] ADD CONSTRAINT [DF_GM_Hackers_Log_LOGINTIME] DEFAULT (getdate()) FOR [LOGINTIME]
GO
ALTER TABLE [dbo].[GM_Hackers_Log] ADD CONSTRAINT [DF_GM_Hackers_Log_STATUS] DEFAULT ('Login Error') FOR [STATUS]
GO
Code:
USE [PS_UserData]
GO
/****** Object: StoredProcedure [dbo].[usp_Try_GameLogin_Taiwan] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Try_GameLogin_Taiwan]
@UserID varchar(18),
@InPassword varchar(32),
@SessionID bigint,
@UserIP varchar(15),
@UserUID int = 0,
@LoginType smallint = 1,
@LoginTime datetime = NULL
AS
SET NOCOUNT ON
DECLARE
@Leave tinyint,
@Status smallint,
@gm1IP varchar(15),
@gm2IP varchar(15),
@gm3IP varchar(15),
@TempIP varchar(15),
@Check int
SET @Status = -1
SET @LoginTime = GETDATE()
--------------------------------------------------
SET @gm1IP = '10.0.0.199'
SET @gm2IP = '10.0.0.198'
SET @gm3IP = '10.0.0.197'
SET @UserIP = LTRIM( RTRIM(@UserIP) )
--------------------------------------------------
SET @Check = 0
--------------------------------------------------
SELECT @UserUID=UserUID, @Status=Status, @Leave=Leave FROM Users_Master WHERE UserID = @UserID
-- NotExist User OR Leave User
IF( @UserUID = 0 OR @Leave = 1 )
BEGIN
SET @Status = -3
END
ELSE
BEGIN
-- Check Password
EXEC dbo.sp_LoginSuccessCheck @UserID, @InPassword, @Check output
IF ( @@ERROR = 0 )
BEGIN
IF( @Check <> 1 )
BEGIN
SET @Status = -1
END
END
ELSE
BEGIN
SET @Status = -1
END
/* Old
SET @InEnPassword = master.dbo.fn_md5(@InPassword)
IF ( @InEnPassword <> @EnPassword )
BEGIN
SET @Status = -1
END
*/
END
-- BlockUser Check
IF( (@Status >= 2) AND (@Status <= 6) )
BEGIN
-- Get Block Limit Date AND Replace date text
DECLARE @BlockEndDate datetime
SELECT @BlockEndDate = BlockEndDate FROM Users_Block WHERE UserUID = @UserUID
IF ( @@ROWCOUNT <> 0 )
BEGIN
-- Block Release
IF ( @BlockEndDate <= @LoginTime )
BEGIN
SET @Status = 0
UPDATE Users_Master SET Status = @Status WHERE UserUID = @UserUID
END
END
END
-- Admin IP Check(********.com [Twilight] - FIXED)
IF(@Status = 16 OR @Status = 32 OR @Status = 48 OR @Status = 64 OR @Status = 80 )
BEGIN
SET @TempIP = LEFT(@UserIP, 9)
IF(@UserIP = @gm1IP OR @UserIP = @gm2IP OR @UserIP = @gm2IP)
BEGIN
--SET @Status = -999
insert into PS_userdata.dbo.GM_Hackers_Log(IDGM,IPGM,SESSIONID,[STATUS]) values(@UserID,@UserIP,@SessionID,'Correct GM Login')
END
---------------------
ELSE
BEGIN
SET @Status = -999
insert into PS_userdata.dbo.GM_Hackers_Log(IDGM,IPGM,SESSIONID) values(@UserID,@UserIP,@SessionID)
END
---------------------
END
-- Select
SELECT @Status AS Status, @UserUID AS UserUID
-- Log Insert
IF( @Status = 0 OR @Status = 16 OR @Status = 32 OR @Status = 48 OR @Status = 64 OR @Status = 80 )
BEGIN
EXEC usp_Insert_LoginLog_E @SessionID=@SessionID, @UserUID=@UserUID, @UserIP=@UserIP, @LogType=0, @LogTime=@LoginTime, @LoginType=@LoginType
if @useruid=(select useruid from PS_userdata.dbo.UserLoginStatus
where useruid=@useruid)
update PS_userdata.dbo.UserLoginStatus
set loginstatus=1,LoginTime=@LoginTime,LogoutTime=@LoginTime,loginSession=@SessionID,lastplaytime=0
where useruid=@useruid
else
insert into PS_userdata.dbo.UserLoginStatus(useruid,userid,loginstatus,logintime,logouttime,loginsession,lastplaytime) values(@useruid,@userid,1,@LoginTime,@LoginTime,@SessionID,0)
END
SET NOCOUNT OFF
Not fully my script i got it from a freind a few months back but have edited it ALOT!!! since lol so about 50% is mine
That is a MSSQL script..i was just to LAZY to run it through MMSQL xD :P go bane!
IF(@UserIP = @gm1IP OR @UserIP = @gm2IP OR @UserIP = [COLOR="Red"]@gm2IP[/COLOR])
To
IF(@UserIP = @gm1IP OR @UserIP = @gm2IP OR @UserIP = [COLOR="green"]@gm3IP[/COLOR])
before peoples without brain.exe asking about the problems.
I did this and it works other gms cant come in. But problem is when our own gms try to log in we get account is still restricted error. Anyone know a fix for this?
I did this and it works other gms cant come in. But problem is when our own gms try to log in we get account is still restricted error. Anyone know a fix for this?
Static String oO 01/12/2011 - S4 League - 3 Replies Hi, habe mir ebend KS4 installiert, gepatcht, wollt starten dann kommt dieser Fehler und das Game beendet sich.
http://www.imgbox.de/users/public/images/WhA1OQxc KM.jpg
DMA to Static 05/27/2010 - Tutorials - 3 Replies This is the best tut on defeating dma with code injection, that I found out there:
Static Ip 03/16/2010 - Browsergames - 2 Replies Hi, I am on a static ip. How do I use the Bot? Please help. Is there way to change my ip to dynamic? Or is there way i can use static.
[Help]How to use my Static IP 09/15/2009 - CO2 Private Server - 2 Replies I want to know how to use my static Ip to make my server Non-Hamachi
DMA to Static 04/24/2006 - General Coding - 7 Replies Also ich suche ein Tutorial über DMA to Static (dieses ewige neu suchen eienr adresse geht mir fett aufn sack) hab über gugel keins gefunden
sprache ist egal wobei deutsch vieleicht nen bisschen besser wär
so und wo wir schonmal dabei sind wüsst ich noch gern ob die health und ammo sowie money bei cs serverseitig oda clientseitig sind (ich denk mal clientseitig bin mir aber nicht so sicher)
und zum schluss wüsst ich noch gern warum man bei wc3 nicht die rohstoffe increasen kann :D da ja...