SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 06/07/2016, 06:25 AM   #1
Ankon
Little Clucker
 
Join Date: May 2015
Posts: 37
Reputation: 0
Question Help in MySQL Login/Register System

Hey friends I am a noob scripter(just started).. So I would feel good if you helped me.
I have heard a lot about MySQL login/register systems and it feels good too..(good for big servers)

I have researched a lot and saw a lot of tutorials but none fit my needs.
I need some clear explanation on building a MySQL login/register system.
And I want it to be safe.
Basically I have heard a lot about editing values of a player and so and so in MySQL and I want my login/register system to be protected against it.
I also want the system(the login part) to give players a number of 10 attempts to login before he is kicked(not banned)... Because I want to protect it from brute force attacks and such.

I would also love if anyone gave some information about protection against MySQL injections.

So the conclusion:
A clearly explained MySQL login/register system(code with explanations(I am a noob)) with 10 attempts for login and then a kick, protection against value edits and protection against injections(if you know what I mean.)...

Thanks
Would be great if anyone helped...
__________________
Ankon is offline   Reply With Quote
Old 06/07/2016, 07:23 AM   #2
iKarim
Banned
 
Join Date: Oct 2015
Posts: 579
Reputation: 142
Default Re: Help in MySQL Login/Register System

Hmmmm, just ******..

http://forum.sa-mp.com/showthread.php?t=56564
http://forum.sa-mp.com/showthread.php?t=574714
https://en.wikipedia.org/wiki/SQL_injection
https://en.wikipedia.org/wiki/MySQL_AB
iKarim is offline   Reply With Quote
Old 06/07/2016, 09:10 AM   #3
CodeStyle175
Banned
 
Join Date: Apr 2014
Posts: 455
Reputation: 35
Default Re: Help in MySQL Login/Register System

rly what the fuck are you talking about, register/login system is so simple to make and well safety also.
for safety just use mysql_format it wont let player enter harmful sql commands, like entering
DROP DATABASE samp and so one.
CodeStyle175 is offline   Reply With Quote
Old 06/07/2016, 01:18 PM   #4
Ankon
Little Clucker
 
Join Date: May 2015
Posts: 37
Reputation: 0
Default Re: Help in MySQL Login/Register System

Thanks a lot friend..But still a problem..
I visited OverHaul's tutorial and it said..

"Ideally, you would add a check for the amount of times the player has tried to log in so they can't float the server with login request to guess someone's password."

But there is nowhere I see it on the script..
__________________
Ankon is offline   Reply With Quote
Old 06/07/2016, 04:29 PM   #5
Luicy.
Banned
 
Join Date: Dec 2014
Location: Sweden, Skövde
Posts: 775
Reputation: 79
Default Re: Help in MySQL Login/Register System

Quote:
Originally Posted by Ankon View Post
Thanks a lot friend..But still a problem..
I visited OverHaul's tutorial and it said..

"Ideally, you would add a check for the amount of times the player has tried to log in so they can't float the server with login request to guess someone's password."

But there is nowhere I see it on the script..

Outside any callback:
PHP Code:
new loginAttempts[MAX_PLAYERS]; 
OnPlayerConnect:
PHP Code:
loginAttempts[playerid] = 0
In dialog response->login->wrong password
PHP Code:
loginAttempts[playerid]++;
if(
loginAttempts[playerid] > 9)
   
Kick(playerid); 
Luicy. is offline   Reply With Quote
Old 25/07/2016, 07:08 AM   #6
Ankon
Little Clucker
 
Join Date: May 2015
Posts: 37
Reputation: 0
Default Re: Help in MySQL Login/Register System

Thanks Meller..
REP+ to you..
__________________
Ankon 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
[Tutorial] Mysql Register/Login system! FireCat Tutorials 55 21/04/2016 06:14 PM
MySQL Login/Register system Rocky2k12 Scripting Help 5 15/04/2014 03:48 PM
mysql login/register system logoster Server Support 8 16/01/2014 04:34 PM
[FilterScript] Login Register System - MySQL Omirrow Filterscripts 5 07/09/2013 10:33 PM
MySQL Register and login System help??? Finn707 Scripting Help 0 06/04/2012 08:04 PM


All times are GMT. The time now is 02:32 AM.


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