SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 17/08/2009, 10:09 PM   #1
StrickenKid
Gangsta
 
Join Date: Feb 2009
Posts: 762
Reputation: 44
Default [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks


- Anti Auto Reconnect -
MySQL Based

This filter script will stop cheater's auto reconnect cheats, and hackers auto reconnecting bot attacks!

- How It Works -
When a player disconnects, their ip is added to a table on your game servers database, and then a timer will delete it from the database at your defined time, default is 5 seconds. So if a player re-connects and their ip matches to whats on the database table, they will be banned. Stopping cheaters and auto-reconnect bots / flooders.


- What You Need -
This filterscript uses ADreNaLiNe's MySQL plugin and of course you will need a MySQL database.

- How To Install -
First of all, you will need to create the table on the database, you can do so by running the following SQL query:
Code:
CREATE TABLE `YOUR SERVER DB NAME`.`recent` (
`ip` VARCHAR( 16 ) NOT NULL DEFAULT '255.255.255.255'
) ENGINE = MYISAM ;
Remember to change "YOUR SERVER DB NAME" to the name of the database your game server is using.
Important: Make a backup if your database before doing this, if you mess up your database it isn't my problem.

Then open up the FS and change the settings:

Code:
#define DEBUG 0         // Debug toggle
#define DELAY_TIME 5      // Allowed reconnect time in seconds
#define DB_HOST "127.0.0.1"   // MySQL host address
#define DB_USER "root"     // MySQL username
#define DB_PASS ""       // MySQL password
#define DB_NAME "SAMP" 		// Replace this with your server DB name

Put the filterscript in your filterscripts directory and add it to the server config:
Code:
filterscripts AntiAutoRec

Start your server and if all is set up right it will be working! If the server exits on start up, check the logs, the script will terminate the server if i cannot connect to the mysql for some reason.

- Download -

Anti Auto Reconnect 1.0



- Enjoy! -
StrickenKid is offline   Reply With Quote
Old 17/08/2009, 10:45 PM   #2
James_Alex
Gangsta
 
Join Date: Dec 2008
Posts: 570
Reputation: 0
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

very awesome
James_Alex is offline   Reply With Quote
Old 17/08/2009, 11:20 PM   #3
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

Sounds nice, good work.
Correlli is offline   Reply With Quote
Old 18/08/2009, 12:03 AM   #4
StrickenKid
Gangsta
 
Join Date: Feb 2009
Posts: 762
Reputation: 44
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

Quote:
Originally Posted by djlobo[Awesome-games.tk
]
really good work etthans also its only of me or your scripts are recently mysql related things
1. im not ettans, im <__Ethan__>
2. "also its only of me or your scripts are recently mysql related things " doesn't make sense
:S
StrickenKid is offline   Reply With Quote
Old 18/08/2009, 12:30 AM   #5
Jay_
Gangsta
 
Jay_'s Avatar
 
Join Date: Jul 2009
Posts: 654
Reputation: 204
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Att

Instead of using a timer to remove the record, you could just check if 5 mins or whatever has passed when that IP reconnects and if so remove the record there. If the IP doesn't reconnect, could could store the time to the database and check when initialising it whether any IPs have expired.

GetTickCount is a useful function for things like these.
Jay_ is offline   Reply With Quote
Old 18/08/2009, 12:37 AM   #6
StrickenKid
Gangsta
 
Join Date: Feb 2009
Posts: 762
Reputation: 44
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Att

Quote:
Originally Posted by Jay_
Instead of using a timer to remove the record, you could just check if 5 mins or whatever has passed when that IP reconnects and if so remove the record there. If the IP doesn't reconnect, could could store the time to the database and check when initialising it whether any IPs have expired.

GetTickCount is a useful function for things like these.
There is no need to get difficult with all that, the way it works is very sufficient and simple.

On disconnect, their ip is added to a table, a 5 second timer is then set to remove it.
If the player rejoins before its removed (rejoins within 5 seconds) the ip s banned. There is no way to load back in that fast.
It also takes into consideration of reason on disconnect, if its a timeout, it wont add the ip because their is a delay from actual timeout and the server noticing.
StrickenKid is offline   Reply With Quote
Old 18/08/2009, 02:02 AM   #7
XCultz
Big Clucker
 
Join Date: Aug 2009
Posts: 160
Reputation: 0
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

nice job
XCultz is offline   Reply With Quote
Old 18/08/2009, 04:26 AM   #8
.::: Ecko :::.
Huge Clucker
 
Join Date: May 2009
Posts: 389
Reputation: 2
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

Sounds good

Ecko
.::: Ecko :::. is offline   Reply With Quote
Old 18/08/2009, 04:58 AM   #9
GTA967
Big Clucker
 
GTA967's Avatar
 
Join Date: Apr 2009
Posts: 98
Reputation: 0
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

wow Nice job Ethan now if only i could use mysql
__________________


GTA967 is offline   Reply With Quote
Old 18/08/2009, 08:02 AM   #10
Burridge
High-roller
 
Join Date: Nov 2008
Location: England
Posts: 1,842
Reputation: 52
Default Re: [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks

Wow! Now this might be useful for me, being ZO is on SQL.

But, what if they timeout? Because i've seen that people have reconnected in a second after the server registers that they've timed out. So if they timeout and have a fast PC, woulden't they get banned?
Burridge is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd issue - Auto click/Auto CTRL SpitxFirew Client Support 0 17/06/2010 01:09 AM
While playing sa-mp I dissconnect/reconnect every 3 seconds, unable to spawn.... mkolesar25 Client Support 6 15/06/2010 06:47 PM
[Problem] Auto Stops walking/running & disables anims [GTA]Rockstar Help Archive 2 28/01/2010 11:27 PM
/disconnect and /reconnect? Jake Canfield Help Archive 9 03/10/2009 09:41 PM
Anti crash or Auto reconnect? NEW_IE General 7 21/01/2009 07:25 AM


All times are GMT. The time now is 05:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.