UCP Password Problem
#1

hy guys, My friend sended me UCP, and i was translating him to my gamemode and tabels, and i vas translated register, but when i wonna to login just say to password not correct, i thing i fuck up somthing so here is code:

PASSWORD IS=Lozinka

Код:
if (isset($_POST['Login']))
				{
					$nimi = $db->Escape($_POST['Nick']);
					$parool = $db->Escape($_POST['Lozinka']);
					$_POST['Nick'] = strip_html_tags(addslashes($_POST['Nick'])); 
					$_POST['Lozinka'] = strip_html_tags(addslashes($_POST['Lozinka']));
					$userid = new UserControl();
					if ($userid->check_user($_POST['Nick'],$_POST['Lozinka']) != 0)
Код:
if(md5($parool) != $test->Lozinka)
									{
										echo '
										<div class="i-box e-box" style="text-shadow: none; position: absolute; margin-left: 691px; margin-top: -660px; width: 195px;">
											Wrong Password!
										</div>';
									}
Reply
#2

Maybe you should add some more information to your topic. (For example, I don't think everybody knows what an UCP is lol.) I can't help you tho
Reply
#3

Your gamemode uses Whirlpool. In the UCP you use md5
Reply
#4

Make the gamemode hash MD5 instead of Whirlpool
Reply
#5

Quote:
Originally Posted by [MM]18240[FMB]
Посмотреть сообщение
Make the gamemode hash MD5 instead of Whirlpool
Wow how to create that?Can u give me example and tell to me its easy or hard?
Reply
#6

Quote:
Originally Posted by [MM]18240[FMB]
Посмотреть сообщение
Make the gamemode hash MD5 instead of Whirlpool
No! Use Whirlpool.
Reply
#7

Quote:
Originally Posted by ca2k
Посмотреть сообщение
No! Use Whirlpool.
Hm.. I've also wondered, how to hash/unhash a whirlpool so, can you explain how to do such things?
Reply
#8

Quote:
Originally Posted by Riddy
Посмотреть сообщение
Hm.. I've also wondered, how to hash/unhash a whirlpool so, can you explain how to do such things?
Yea, and say its that hard or easy.... and what to do in script?
Reply
#9

****** how to hash MD5 with SAMP.
Then update your script accordingly.
Reply
#10

Quote:
Originally Posted by Garu
Посмотреть сообщение
You cannot un-hash whirlpool because hashing is a one way process.

To hash passwords on sa-mp use https://sampforum.blast.hk/showthread.php?tid=65290.

PHP has built in hashing hash('whirlpool', "yourpasswordstring").
look, in my script is whirepool, and in php is md5 and can u give me the example how to edit this in php.. here u go:

Код:
$hash = md5(rand(0,1000));
$pass = mysql_real_escape_string($_POST['signup-password']);
$pass2 = mysql_real_escape_string($_POST['signup-password2']);
THANKS!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)