SA-MP Forums Archive
UCP Password Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: UCP Password Problem (/showthread.php?tid=393234)



UCP Password Problem - Dusan01 - 17.11.2012

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>';
									}



Re: UCP Password Problem - Jantjuh - 17.11.2012

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


Re: UCP Password Problem - FUNExtreme - 18.11.2012

Your gamemode uses Whirlpool. In the UCP you use md5


Re: UCP Password Problem - [MM]18240[FMB] - 18.11.2012

Make the gamemode hash MD5 instead of Whirlpool


Re: UCP Password Problem - Dusan01 - 18.11.2012

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?


Re: UCP Password Problem - ca2k - 18.11.2012

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


Re: UCP Password Problem - Riddy - 18.11.2012

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?


Re: UCP Password Problem - Dusan01 - 18.11.2012

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?


Re: UCP Password Problem - [MM]18240[FMB] - 18.11.2012

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


Re: UCP Password Problem - Dusan01 - 19.11.2012

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!