Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 06:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Anti-GmHack V2 + AutoBan

Discussion on [RELEASE]Anti-GmHack V2 + AutoBan within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
[RELEASE]Anti-GmHack V2 + AutoBan

Ok, guys, this was meant to be in IPbanV2, but since it is taking so long, I decided to release this...
This is the Anti-GM-Hack V2.

Current version : 2.1
Changelog:

V2.1
Made it so that all accounts with the login IP of the hacker would get banned.
V2.0
Added auto-ban and logging features
V1.0 (by slikbotter)
The very idea was born, false GM characters are deleted


What does it do?
It automatically tracks all false GMs and bans their IPs in-game, bans all the accounts they are using and logs each ban in a separate table.

What's better then the silkbotter's V1?
1: It automatically bans people who use the GM hack, so they don't get away with trying to hack.
2: No more need to rename the [DEV] chars, nor add them to exceptions.
3: Every attempt to hack is logged, so you have a nice list of hackers to post on your website.
4: The code was rewritten by hand 2 times, to improve stability.
5: It's written by Zombe! This is why you use it!

Anything worse then V1?
It causes a tiny bit more lag on mssql, but the main part of the script is launched only when a hacker is found. So no drastic lag increase.


How to install:

1: Open up your query analyser.

2: Paste this query, but don't execute yet.

Code:
USE master
CREATE DATABASE ban_info ON PRIMARY
(
	NAME = baninfodata,
	FILENAME = 'C:\DATABASES\baninfodata.mdf',
	SIZE = 20MB,
	MAXSIZE = UNLIMITED
)
LOG ON
(
	NAME = baninfolog,
	FILENAME = 'C:\DATABASES\baninfolog.ldf',
	SIZE = 5MB,
	MAXSIZE = UNLIMITED
)
GO

CREATE TABLE ban_info.dbo.ban_log
(
	IP varchar(50) NOT NULL,
	ip2long varchar(50),
	Reason varchar(50),
	ReasonInfo varchar(50),
	DateBanned varchar(50),
	Action_taken varchar(50),
	PRIMARY KEY (IP)
)

GO
USE ban_info;

GO
/*
Name: Anti-GM-Hack

Version: V2.1

Description
1: Deletes all GM characters not stated in this procedure.
2: Automaticly bans their accounts and IPs.
3: Logs each ban.

Author: Zombe
*/
CREATE PROCEDURE AntiGmHack
AS

DECLARE @user_ip_addr varbinary(4);
DECLARE @DecimalIP varchar(20);
DECLARE @character_name varchar(40);
DECLARE @user_no varchar(50);
DECLARE @user_id varchar(50);
DECLARE @reason varchar(50);

SELECT
	@character_name	= character_name,
	@user_ip_addr	= user_ip_addr,
	@user_no	= user_no
FROM character.dbo.user_character
WHERE
	character_name LIKE '_DEV_%'
	AND user_no <> '19999999999991'
	OR character_name LIKE '_DEKARON_%'
	OR character_name LIKE '_GM_%'
	AND character_name <> '[GM]Zombe'
	AND character_name <> '[GM]YourName'
	AND character_name <> '[GM]Etcetera'
;

if (@character_name IS NOT NULL)
BEGIN

	SET @DecimalIP =
		(Cast(Cast(SubString(@user_ip_addr, 1, 1) AS Int) As Varchar(3)) + '.' +
		Cast(Cast(SubString(@user_ip_addr, 2, 1) AS Int) As Varchar(3)) + '.' +
		Cast(Cast(SubString(@user_ip_addr, 3, 1) AS Int) As Varchar(3)) + '.' +
		Cast(Cast(SubString(@user_ip_addr, 4, 1) AS Int) As Varchar(3)));

	DELETE FROM character.dbo.user_character
	WHERE character_name = @character_name;

	SELECT @user_id	= user_id
	FROM account.dbo.Tbl_user
	WHERE
		user_no = @user_no;

	SET @reason =
		'Acc: ' +
		@user_id +
		' for creating a character' +
		@character_name;

	INSERT INTO ban_info.dbo.ban_log
	(
		IP,
		ip2long,
		Reason,
		ReasonInfo,
		DateBanned,
		Action_taken
	)
	VALUES
	(
		@DecimalIP,
		'Auto-Ban',
		'GM hack',
		@reason,
		GetDate(),
		'Banned IP and account, deleted hacked character'
	);
	
	INSERT INTO account.dbo.C_IP_BAN
	(
		start_ip,
		end_ip,
		ipt_time
	)
	VALUES
	(
		@user_ip_addr,
		@user_ip_addr,
		GetDate()
	);
	
	UPDATE account.dbo.USER_PROFILE
	SET
		login_tag = 'N'
	WHERE
		user_no = @user_no OR 
		user_ip_addr = @user_ip_addr
	;
END;
3: Find the place in the query where it says:

AND character_name <> '[GM]Zombe'
AND character_name <> '[GM]YourName'
AND character_name <> '[GM]Etcetera'

Replace the names with the GM names you want to be excluded from banning.
If you would like, you can add more names, or delete. Just add another line under these, like
AND character_name <> 'GM's name'

4: Scroll up to the top of the script, find the place where it says:
FILENAME = 'C:\DATABASES\baninfodata.mdf'
and
FILENAME = 'C:\DATABASES\baninfolog.ldf'
Replace the directory (C:\DATABASES\) to where you keep your database files (sergcool uses C:\ but I think that's stupid.). Make sure the directory exists!

5: Once you have done that, run the query.

6: Turn on the SQL Server Agent from the SQL service manager.

7: Go to the Enterprise Manager,
go Management --> SQL Server Agent --> Jobs.

8: Create a new job, name it for example AntiGmHackV2.

9: Go to steps, press NEW, name it lets say "Execute stored procedure", select database ban_info, and at command write:

Code:
exec AntiGmHack;
Press OK.

10: Create new step, name it lets say "Wait", set database to ban_info (though its not 100% necessary), write the command:

Code:
WAITFOR DELAY '000:00:02';
Go advanced, set both on success and on failure actions to:
Goto step [1] Execute Stored Procedure
We want the on failure to that too, so that if the job accidentally lags for a bit, it still keeps running.

11: Open step 1 again, go advanced, set both on success and on failure actions to:
Goto step [2] Wait

12: Press OK in the job, click YES when it asks you.

13: If you have AntiGmHack V1 by silkbotter running, stop that job.

14: Rightclick the job, click start job, then START.

AntiGmHack V2 is running!


To edit the GMs list (If lets say a new GM joins):
1: Go to Databases --> ban_info --> Stored Procedures --> Doubleclick AntiGmHack

2:
Find

AND character_name <> 'Your 1st gm'
AND character_name <> 'Your 2nd GM'
etc

And delete 1 line, or add 1 line, according to your GM's name.

3: Press OK.

Your GM list is modified.

How to update:
2.0 --> 2.1

I hope this is a big help to all P-server admins!
Zombe is offline  
Thanks
51 Users
Old 10/16/2009, 11:42   #2
 
Bigshow107's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 700
Received Thanks: 227
lol .... now no longer gm hack Wahh
i already hated v1 now you released new one with ip ban xD
bey be to y my gm in rusaki XD

j\k
nice work as always zombe
Bigshow107 is offline  
Old 10/16/2009, 13:22   #3
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
K, well, this works for me, but I would like feedback from others, if it's working for them... Thx.
Zombe is offline  
Thanks
2 Users
Old 10/16/2009, 16:14   #4
 
*JayKay*'s Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 472
Received Thanks: 276
thanks zombe excellent tutorial!!!!
*JayKay* is offline  
Old 10/16/2009, 18:19   #5
 
Nosferatu.'s Avatar
 
elite*gold: 22
Join Date: Jan 2008
Posts: 743
Received Thanks: 450
Quote:
Originally Posted by Zombe View Post
Ok, guys, this was meant to be in IPbanV2, but since it is taking so long, I decided to release this...

This is the Anti-GM-Hack V2. ...
Its nice, but nobody can get gm , server owners too .. that is the problem design and add a table to allow exceptions.

Edit: Okay^^ i have seen:

AND character_name <> '[GM]Zombe'
AND character_name <> '[GM]YourName'
AND character_name <> '[GM]Etcetera'
Nosferatu. is offline  
Old 10/16/2009, 18:32   #6
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
Quote:
Originally Posted by darnus84 View Post
Its nice, but nobody can get gm , server owners too .. that is the problem design and add a table to allow exceptions.

Edit: Okay^^ i have seen:

AND character_name <> '[GM]Zombe'
AND character_name <> '[GM]YourName'
AND character_name <> '[GM]Etcetera'
So you fixed it?
I wanna know, cuz if someone else besides me got it working, that mean I didn't miss anything
Zombe is offline  
Thanks
1 User
Old 10/16/2009, 20:34   #7
 
elite*gold: 0
Join Date: May 2008
Posts: 238
Received Thanks: 8
**** it's amazing dude ...
+10 from me
go ahead with better ones .
lelothebest is offline  
Old 10/16/2009, 20:34   #8
 
Nosferatu.'s Avatar
 
elite*gold: 22
Join Date: Jan 2008
Posts: 743
Received Thanks: 450
Quote:
Originally Posted by Zombe View Post
So you fixed it?
I wanna know, cuz if someone else besides me got it working, that mean I didn't miss anything
the code is 100% okay ;-)
Nosferatu. is offline  
Old 10/16/2009, 20:36   #9
 
elite*gold: 20
Join Date: Mar 2007
Posts: 2,650
Received Thanks: 4,729
You deserve a big thanx zombe
looks like there are still some people developing some stuff for p-servers
i wish i had that script when i was running a server
and i wish i had ya on my team back then..

anyway, keep on developing maybe you'll beat GameHI one day
silkbotter is offline  
Old 10/17/2009, 04:31   #10
 
DXtrmeHack's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 121
Received Thanks: 13
Quote:
Originally Posted by arthurvalenca View Post
thanks zombe excellent tutorial!!!!

just hit thanks and he understand it..
noobie
DXtrmeHack is offline  
Thanks
1 User
Old 10/17/2009, 07:35   #11
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
Quote:
Originally Posted by silkbotter View Post
You deserve a big thanx zombe
looks like there are still some people developing some stuff for p-servers
i wish i had that script when i was running a server
and i wish i had ya on my team back then..

anyway, keep on developing maybe you'll beat GameHI one day
GameHi... Umm, I don't think so =/ I'm aiming for Acclaim only...
Zombe is offline  
Old 10/17/2009, 08:22   #12
 
bellydaniel's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 138
Received Thanks: 26
wonder if the system banned can do the job for a week after detection = ="
bellydaniel is offline  
Old 10/17/2009, 08:56   #13
 
Bigshow107's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 700
Received Thanks: 227
mmm right
most Routers use auto change ip
so you most make auto ban for the ip . denmic ip
Bigshow107 is offline  
Old 10/17/2009, 09:54   #14
 
Zombe's Avatar
 
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
Quote:
Originally Posted by bellydaniel View Post
wonder if the system banned can do the job for a week after detection = ="
So, umm, you want me to make a job that keeps banning IPs of those who'se accounts are already in the banned list?
Yeah, that could be dune, but you see, this script bans the account too, so even if he changes his IP, his account is banned, so he can't log into it, so the last login in the account is the same...
Kind of useless to make a job like that.
Zombe is offline  
Old 10/17/2009, 10:28   #15
 
bellydaniel's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 138
Received Thanks: 26
Quote:
Originally Posted by Zombe View Post
So, umm, you want me to make a job that keeps banning IPs of those who'se accounts are already in the banned list?
Yeah, that could be dune, but you see, this script bans the account too, so even if he changes his IP, his account is banned, so he can't log into it, so the last login in the account is the same...
Kind of useless to make a job like that.
i don't know if it useless or not, but taiwan dekaron also make like this, don't know if there is some reason for it or not. i try 4 time hack on their server and also get banned after a week and the time was correct for 24x7 this mean it's absolutely banned from their auto banned system, just wonder why they set like that for.... nvm. according to what u say that make sense of it's useless job.
they have set released ip that have been banned for , or they have auto purge ip from banned for several day or month.
bellydaniel is offline  
Reply




All times are GMT +2. The time now is 06:25.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.