[MySQL/SQLite] Advance Login & Register System (base script) -
Gammix - 29.12.2016
Advance Login & Register System
MySQL and SQLite - v2.0 - last updated 5th Jan, 2017
- Dialogs based login and register. There is a limit on login attempts (default is 3) you can edit the limit in script:
PHP Code:
#define MAX_LOGIN_ATTEMPTS 3
#define MAX_ACCOUNT_LOCKTIME 2 // in minutes - this is the time interval for locking the account when a user fails to login in Max Attempts given
http://i.imgur.com/lD8XDLm.jpg
- SECURE_PASSWORD_ONLY
This forces the user to have atleast 1 Lowercase, 1 Highercase and 1 Number in their password while registration or changing password.
Modify in script:
PHP Code:
//#define SECURE_PASSWORD_ONLY // this forces the user to have atleast 1 Lowercase, 1 Highercase and 1 Number in their password
- Per player based password salts, every player has their own SALT for SHA256 salt.
- When you are unsure about your login credentials, there is a button "OPTIONS" in login or register dialog:
- Forgot password: gives a dialog where you can answer your security question and reset password:
When you answer it right (note: you are given the same number of max tries as given in login)
- Forgot username: gives a dialog where you can get all the accounts that are registered on your IP Address (it cover IP range)!
- This is what happens when you fail all login attempts:
The accounts gets temp locked for the given time "MAX_ACCOUNT_LOCKTIME" only for your IP. in case the original user isn't being abused by fake attempts from other IP.s.
You can also set the maximum login attempts via setting: (note this value also sets maximum attempts to reset password through answering security question)
PHP Code:
#define MAX_LOGIN_ATTEMPTS 3
Account getting locked (when you fail all 3 attempts):
When you try to come back right after:
- /changepass
Change your account's password. (salt remains the same)
- /changeques
Change your account's security question and answer. (salt remains the same)
You can also add your own questions list by editing this constant array:
PHP Code:
new const SECURITY_QUESTIONS[][MAX_SECURITY_QUESTION_SIZE] =
{
"What was your childhood nickname?", ...
};
- /stats
Download
SQLite Version -
https://github.com/Agneese-Saini/SA-...ase/sqlite.pwn
MySQL Version -
https://github.com/Agneese-Saini/SA-...base/mysql.pwn
Libraries required:
zcmd.inc -
https://sampforum.blast.hk/showthread.php?tid=576114
sscanf2.inc -
https://sampforum.blast.hk/showthread.php?tid=602923
easydialog.inc -
https://sampforum.blast.hk/showthread.php?tid=602886
kickban.inc -
https://github.com/Agneese-Saini/SA-...kickbanfix.inc
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
TopShooter - 29.12.2016
Awesome and very useful for beginners, keep it up.
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
RyderX - 29.12.2016
Nicely done!
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
RedRex - 29.12.2016
Nice Job, But didn't this a Filterscirpt? Because its a Login & Register System not a gamemode...
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Gammix - 29.12.2016
Quote:
Originally Posted by RedRex
Nice Job, But didn't this a Filterscirpt? Because its a Login & Register System not a gamemode...
|
Its a starter gamemode; you can implement this as a filterscript if you want it to be as a seperate script as an admin system maybe. But i always integrate with my gamemode, so that's why.
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
KokyZ - 29.12.2016
hey dude, good job for a simple gamemode
but i have question about this
and its why did you use '|=' and please explain the usage of this '|' and why have you used it with '='
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Gammix - 30.12.2016
Quote:
Originally Posted by KokyZ
hey dude, good job for a simple gamemode
but i have question about this
and its why did you use '|=' and please explain the usage of this '|' and why have you used it with '='
|
https://www.tutorialspoint.com/cprog..._operators.htm
I used it to convert everything to lowercase, as security answers are not case sensitive.
0x20 is equal to a ' ' (space), so "|=" sets the character to a lowercase if its in upper.
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
TheMaskedGamer - 30.12.2016
Great man :O
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
SilverGaming - 30.12.2016
Anyone have register system =)?, great joob man
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
bogushas - 04.01.2017
Is there gonna be the mysql version as u mentioned
Gammix?
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Gammix - 04.01.2017
Quote:
Originally Posted by bogushas
Is there gonna be the mysql version as u mentioned Gammix?
|
Ofcourse, this week I'll release it. Busy in work for now.
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Stones - 04.01.2017
Thanks for the release Gammix, great work! I'm mixing it with the login system i have for my Zombie Apocalypse Roleplay server
https://sampforum.blast.hk/showthread.php?tid=609856
I'll be waiting for the mysql version very anxiously !
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Wolfe - 04.01.2017
Nice
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Lordzy - 04.01.2017
I don't like the idea of account being temporarily locked. Imagine someone who could simply get other accounts temporarily locked by typing in the wrong password. What if it's there's an emergency to be in server? Servers having limited offers could get this to be a problem. I'd block the IP temporarily if they kept on exceeding the limits over MULTIPLE accounts at a short period of time.
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Wolfe - 04.01.2017
Quote:
Originally Posted by Lordzy
I don't like the idea of account being temporarily locked. Imagine someone who could simply get other accounts temporarily locked by typing in the wrong password. What if it's there's an emergency to be in server? Servers having limited offers could get this to be a problem. I'd block the IP temporarily if they kept on exceeding the limits over MULTIPLE accounts at a short period of time.
|
Just remove the feature then?
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Gammix - 04.01.2017
Quote:
Originally Posted by Lordzy
I don't like the idea of account being temporarily locked. Imagine someone who could simply get other accounts temporarily locked by typing in the wrong password. What if it's there's an emergency to be in server? Servers having limited offers could get this to be a problem. I'd block the IP temporarily if they kept on exceeding the limits over MULTIPLE accounts at a short period of time.
|
Actually that's a better solution. I'll make a new table for temp blocked IPs to a specific account ID (foreign key).
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Lordzy - 04.01.2017
Quote:
Originally Posted by Wolfe
Just remove the feature then?
|
It's not up to me because I'm not going to use this. But a lot of others might find it helpful which is why I've suggested it to the script developer.
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
GhostKiller123 - 04.01.2017
Great Login/Register system
+rep
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
bogushas - 04.01.2017
Quote:
Originally Posted by Gammix
Ofcourse, this week I'll release it. Busy in work for now.
|
Are u gonna release it with the newest mysql version (r41-2 ( think so ))?
Re: [MySQL/SQLite] Advance Login & Register System (base script) -
Bolex_ - 04.01.2017
Nicely done man! Going to use it maybe!