|
You last visited: Today at 18:03
Advertisement
Static IP a GM
Discussion on Static IP a GM within the Shaiya PServer Development forum part of the Shaiya Private Server category.
02/16/2011, 04:41
|
#1
|
elite*gold: 0
Join Date: Mar 2010
Posts: 2,334
Received Thanks: 1,777
|
[Release]Static IP a GM
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!
|
|
|
02/18/2011, 15:38
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 647
|
Bane, please add RELEASE to your post or someone might report it :/
|
|
|
02/18/2011, 16:25
|
#3
|
elite*gold: 0
Join Date: Jul 2010
Posts: 498
Received Thanks: 449
|
Haha fair enough
|
|
|
02/18/2011, 21:26
|
#4
|
elite*gold: 0
Join Date: Mar 2010
Posts: 2,334
Received Thanks: 1,777
|
Quote:
Originally Posted by ProfNerwosol
Bane, please add RELEASE to your post or someone might report it :/
|
True, sadly i can't fully change the title.
#request LPH would
|
|
|
02/19/2011, 07:49
|
#5
|
elite*gold: 0
Join Date: Aug 2010
Posts: 241
Received Thanks: 255
|
Click edit and press the "Go Advanced" button near Save.
|
|
|
02/20/2011, 04:48
|
#6
|
elite*gold: 0
Join Date: Mar 2010
Posts: 2,334
Received Thanks: 1,777
|
No, you can't fully edite it.
|
|
|
03/11/2011, 16:18
|
#7
|
elite*gold: 0
Join Date: Feb 2011
Posts: 214
Received Thanks: 205
|
Dear,Bane
you will need to change this:
Code:
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.
|
|
|
03/11/2011, 19:18
|
#8
|
elite*gold: 0
Join Date: Mar 2010
Posts: 2,334
Received Thanks: 1,777
|
Ty, but i got to warn you i don't give things that easy to people...
|
|
|
03/11/2011, 21:57
|
#9
|
elite*gold: 0
Join Date: Oct 2009
Posts: 262
Received Thanks: 812
|
Quote:
Originally Posted by [GM]Bane
Ty, but i got to warn you i don't give things that easy to people...
|
Why are you warning him? He was just pointing out a bug in your script
|
|
|
03/11/2011, 23:40
|
#10
|
elite*gold: 0
Join Date: Mar 2010
Posts: 2,334
Received Thanks: 1,777
|
I did sound mean in that did'nt is  sorry bud...
|
|
|
05/09/2011, 13:30
|
#11
|
elite*gold: 0
Join Date: Jan 2011
Posts: 279
Received Thanks: 164
|
bane u should highlight where to edit your [dbo].[usp_Try_GameLogin_Taiwan]
becuase some people have diff [dbo].[usp_Try_GameLogin_Taiwan]
|
|
|
09/17/2011, 08:14
|
#12
|
elite*gold: 0
Join Date: Sep 2011
Posts: 140
Received Thanks: 147
|
My brain.exe isnt fully updated on sql.
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?
|
|
|
09/17/2011, 09:30
|
#13
|
elite*gold: 0
Join Date: Mar 2010
Posts: 2,334
Received Thanks: 1,777
|
Quote:
Originally Posted by [ADMIN]Cryptic
My brain.exe isnt fully updated on sql.
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?
|
Is the GM's IP static? :O
|
|
|
09/17/2011, 20:27
|
#14
|
elite*gold: 0
Join Date: Sep 2011
Posts: 140
Received Thanks: 147
|
Sorry had a blonde moment lol was up for 32 hours trying to get my server secured hehe thanks for all!
|
|
|
 |
Similar Threads
|
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...
|
All times are GMT +1. The time now is 18:03.
|
|