[FilterScript] [FS] Anti Auto Reconnect - MySQL | Stops Cheaters And Auto Reconnect Bot Attacks
#1

- 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:
Код:
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:

Код:
#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:
Код:
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! -
Reply
#2

very awesome
Reply
#3

Sounds nice, good work.
Reply
#4

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
Reply
#5

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.
Reply
#6

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.
Reply
#7

nice job
Reply
#8

Sounds good

Ecko
Reply
#9

wow Nice job Ethan now if only i could use mysql
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)