Need Help: How to use MD5 passwords in the database?
Hello, everybody
I know a little bit about AMXX, now I want to learn to use the the SM management of CS: GO server. First of all, I want to use MySQL to save the administrator information, the password is stored in the database after secondary MD5 encryption. Like this: Database fields: password AND salt Players info password: userpass. MD5 (userpass) == MD5 (password + salt) I can not achieve this, because I know which plug-in access to the player's "PassInfoVar" value, and then compare and eventually kicked out of the players: "Your name is reserved by SourceMod; set your password the to use it" I just want to reach the AMXX the effect: query the database MD5 calculation compared! If the password is wrong then kicked players, after players connected to the server and get STEAM_ID. Sorry! My English is poor, use Google Translator Please help me! Thank you very much! |
Re: Need Help: How to use MD5 passwords in the database?
Quote:
I learn how to use the the SM management of CS: GO server. Please look carefully to my question! Thank you! |
Re: Need Help: How to use MD5 passwords in the database?
Quote:
|
Re: Need Help: How to use MD5 passwords in the database?
As far as this goes I don't think you would really want to do anything with the PassInfoVar setting. What you need to do is get the client's username and pass through GetClientInfo() when the client connects, use the cURL and Hash extension or a library like SMLIB to calculate the md5 hash of the username and the password + salt, then you could send your (preferably threaded) query and check against your database.
All the user would need to do is to do something like this before joining your server: Code:
setinfo username minimoney1 |
Re: Need Help: How to use MD5 passwords in the database?
Or alternatively use the Connect extension's OnClientPreConnectEx forward, which will give you the password they used to connect to the server, and their SteamID.
|
Re: Need Help: How to use MD5 passwords in the database?
Now I want to try to modify the admin-sql-threaded.sp file,
but I was the first contact with SM, I do not know how to get Cvar string values at Core.cfg. I want to get the value of the "PassInfoVar", but I do not know how to do it? |
Re: Need Help: How to use MD5 passwords in the database?
Quote:
Check "userpass == password + salt" is not better? Or you make a mistake? Code:
password = MD5 (userpass + salt) |
Re: Need Help: How to use MD5 passwords in the database?
I search for a MD5 function, I hope can use! https://forums.alliedmods.net/showpo...37&postcount=2
But I first need to GET CVAR STRING to get "PassInfoVar" values in the core.cfg is in the plugin admin-sql-threaded.sp function "OnReceiveUser". Who can tell me how to achieve specific? Thank you! |
| All times are GMT -4. The time now is 23:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.