![]() |
Text to MD5
Hi guys,
What i need is to be able for people to convert text to md5 hash. The aim is i'm using a auth system based of website registration and certain member id's and group id's. Now i'd like to be able for them to authenticate via website name and password typed in the notepad. So the program inputs their text entrys into a sql statement hardcoded in, and send it off for results. One of those things required would be thier password but in MD5 has form. Is this possible? |
PHP Code:
|
Note that vBulletin uses more than a straight MD5 hash.
|
This is my problem. As its not a simple
Code:
md5( $var) |
PHP Code:
|
Quote:
Code:
$salt = "SOME_RANDOM_NUMBERS_HERE"; |
The salt field is contained within the user table. It is three random characters generated at registration. You will need to use the salt from the user table to verify users.
|
Thanks all for your input. I Got this working so thought i would post this php script incase anyone else wanted to use it. It basically asks for the users name fetches all required info from the db then asks for their password in text and prints the password in vBulletin md5 format.
Fill in your host + db info and the rest should be fine as long as your on vBulletin! Code:
<?php |
I would not suggest anyone to use this script as it is vulnerable to SQL-Injections.
|
Any suggestions then to make it secure?
It was more of a 'This is how i got it working' more than a 'Here's how to'. Im not up to date on high security as i'm still learning, Was hoping it may help some |
The first i would suggest is to read up on the articles about creating secure scripts (see the articles section).
1 example of vulnerable code: PHP Code:
|
Googling "SQL Injections PHP Prevent" will probably yield some tutorials on how to secure the script.
|
All times are GMT. The time now is 03:26 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|