Raised This Month: $ Target: $400
 0% 

Need Help: How to use MD5 passwords in the database?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wwzw
Member
Join Date: Feb 2009
Old 02-03-2013 , 10:46   Need Help: How to use MD5 passwords in the database?
Reply With Quote #1

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!
wwzw is offline
wwzw
Member
Join Date: Feb 2009
Old 02-03-2013 , 11:03   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #2

Quote:
Originally Posted by Oshizu View Post
This is not ammx forum
Post Here: https://forums.alliedmods.net/forumdisplay.php?f=11
You do not understand what I mean!
I learn how to use the the SM management of CS: GO server.
Please look carefully to my question! Thank you!
wwzw is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 02-03-2013 , 16:42   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #3

Quote:
Originally Posted by wwzw View Post
You do not understand what I mean!
I learn how to use the the SM management of CS: GO server.
Please look carefully to my question! Thank you!
Yeah sorry. Didn't understand it
__________________
...
Oshizu is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 02-03-2013 , 17:22   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #4

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
setinfo password ducks
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-04-2013 , 03:42   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #5

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.
bl4nk is offline
wwzw
Member
Join Date: Feb 2009
Old 02-04-2013 , 06:20   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #6

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?

Last edited by wwzw; 02-04-2013 at 06:22.
wwzw is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 02-04-2013 , 06:36   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #7

Quote:
Originally Posted by wwzw View Post
Database fields: password AND salt
Players info password: userpass.
MD5 (userpass) == MD5 (password + salt)
Why do you want to md5 them?
Check "userpass == password + salt" is not better?

Or you make a mistake?
Code:
password = MD5 (userpass + salt)
If yes, you doesnt need any md5 native/stock, mysql have md5(str) function.
__________________
sorry, for my poor english.
mcpan313 is offline
Send a message via MSN to mcpan313
wwzw
Member
Join Date: Feb 2009
Old 02-04-2013 , 09:30   Re: Need Help: How to use MD5 passwords in the database?
Reply With Quote #8

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!

Last edited by wwzw; 02-04-2013 at 09:30.
wwzw is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 23:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode