12-13-2013, 02:52 PM
Who have good work register script ?
|
Register script?
|
|
12-13-2013, 02:52 PM
Who have good work register script ?
12-13-2013, 03:53 PM
U can simpy use the existing one, just change hash from SHA256 to MD5.
12-13-2013, 04:01 PM
U can simpy use the existing one, just change hash from SHA256 to MD5. Its not that easy, you need to MD5 the altready SH256ed password, to get it workin so: md5(sha256($realpassword,$salt,$username))
12-13-2013, 04:28 PM
Its not that easy, you need to MD5 the altready SH256ed password, to get it workin so: md5(sha256($realpassword,$salt,$username)) Why? When you insert a new account on bg_user the only crypt request is md5. Anyway no salt is specified on configuration files, probably EP3 daemons dont need sha256 crypt mode.
12-13-2013, 04:38 PM
You can buy my cms, it supports ep1/2/3 reg/pass change/pass reset/pass update or use md5(password); Creep is wrong. U can simpy use the existing one, just change hash from SHA256 to MD5. this is correct.
12-13-2013, 04:40 PM
<?php $ip = "127.0.0.1"; //ðôрõѠ$sqluser = "root";//ю÷õр $sqlpw = "";//ÿðрþûь $userdb = "newproject_db_auth"; //ñð÷ð $skype = lc.doctor; //Save PW in plain text? yes = on, no = off $plain = "no"; $salt = "phoohie1yaihooyaequae7PuiWoeNgahjieth3ru3yeeghaepahb7aeYaipe2we6zii6mai6uweig8siasheinoungeoyeiLohShi2xoh2xi8ooxee9ahpiehahc9Phe"; function clean_str($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } $str = mysql_real_escape_string($str); $str = preg_replace("/[^a-zA-Z0-9@.]/" , "" , $str); return $str;}If (isset($_POST[username])){ if (empty($_POST[username]) OR empty($_POST[password]) OR empty($_POST[password2]) OR empty($_POST2 2 2 2 2 2 2 2 2 2 222 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 2222 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22
12-13-2013, 04:45 PM
$ip = "127.0.0.1"; //ðôрõѠ$sqluser = "root";//ю÷õр $sqlpw = "";//ÿðрþûь $userdb = "newproject_db_auth"; //ñð÷ð $skype = lc.doctor; //Save PW in plain text? yes = on, no = off $plain = "no"; $salt = "phoohie1yaihooyaequae7PuiWoeNgahjieth3ru3yeeghaepahb7aeYaipe2we6zii6mai6uweig8siasheinoungeoyeiLohShi2xoh2xi8ooxee9ahpiehahc9Phe"; function clean_str($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } $str = mysql_real_escape_string($str); $str = preg_replace("/[^a-zA-Z0-9@.]/" , "" , $str); return $str;}If (isset($_POST[username])){ if (empty($_POST[username]) OR empty($_POST[password]) OR empty($_POST[password2]) OR empty($_POST[email])) { echo "Þôýþ øûø ýõÑÂúþûьúþ ÿþûõù ÿуÑÂтыõ"; ?> setTimeout("location.href=register.php",5000); die;} $user = htmlspecialchars(strtolower($_POST[username])); $pass = htmlspecialchars(clean_str($_POST[password])); $pass2 = htmlspecialchars(clean_str($_POST[password2])); $email = htmlspecialchars(clean_str($_POST[email])); If ($pass != $pass2){ echo "ßðрþûø ýõ ÑÂþòÿðôðют"; ?> setTimeout("location.href=register.php",5000); die;} $conn = new mysqli($ip,$sqluser,$sqlpw,$userdb); if (mysqli_connect_errno() == 0){ $qusr = "SELECT * FROM bg_user WHERE user_id = ".$user.";"; $resusr = $conn->query($qusr); If ($resusr->num_rows > 0) { echo "Þшøñúð.ôðýýþõ øüѠуöõ ÷ðýÑÂтþ."; ?> setTimeout("location.href=register.php",5000); die;} $qmail = "SELECT * FROM bg_user WHERE email = $email"; $mailres = $conn->query($qmail); if ($mailres->num_rows > 0){ echo "Þшøñúð.ýð ÑÂтþт email уöõ ÷ðрõóøÑÂтрøрþòðýð учõтýðѠ÷ðÿøÑÂÑŒ"; ?> setTimeout("location.href=register.php",5000); die;} $realpass = md5($pass); If ($plain == "no"){ $insertusr = "INSERT INTO bg_user (user_id, passwd, email) VALUES (?, ?, ?)"; $qInsert = $conn->prepare ($insertusr); $qInsert->bind_param("sss",$user,$realpass,$email); $qInsert->execute(); if ($qInsert->affected_rows == 1){ echo "ãÑÂÿõшýþ "; ?> setTimeout("location.href=register.php",5000); die;} else;{ echo "Þшøñúð. 2"; die; ?> }} elseif ($plain == "yes");{ $insertusr = "INSERT INTO bg_user (user_id, truepasswd, passwd, email) VALUES (?, ?, ?, ?)"; $qInsert = $conn->prepare ($insertusr); $qInsert->bind_param("ssss",$user,$pass,$realpass,$email); $qInsert->execute(); if ($qInsert->affected_rows == 1){ echo "Òðш ðúúðуýт уÑÂÿõшýþ ÷ðрõóøÑÂтрøрþòðý."; ?> setTimeout("location.href=register.php",5000); ×ðôðть òþÿрþÑÂ."; ?> die; Ûþóøý: ßðрþûь: ßðрþûь(ßþòтþр): Email: ;}?>
12-13-2013, 04:48 PM
untested ofc its not my work an looks not so great.
12-13-2013, 04:52 PM
<?php $ip = "127.0.0.1"; //ðôрõѠ$sqluser = "root";//ю÷õр $sqlpw = "";//ÿðрþûь $userdb = "newproject_db_auth"; //ñð÷ð $skype = ; //ÑÂúðùÿ ðôüøýøÑÂтрðтþрð //Save PW in plain text? yes = on, no = off $plain = "no"; $salt = "phoohie1yaihooyaequae7PuiWoeNgahjieth3ru3yeeghaepahb7aeYaipe2we6zii6mai6uweig8siasheinoungeoyeiLohShi2xoh2xi8ooxee9ahpiehahc9Phe"; function clean_str($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } $str = mysql_real_escape_string($str); $str = preg_replace("/[^a-zA-Z0-9@.]/" , "" , $str); return $str;}If (isset($_POST[username])){ if (empty($_POST[username]) OR empty($_POST[password]) OR empty($_POST[password2]) OR empty($_POST[email])) { echo "Þôýþ øûø ýõÑÂúþûьúþ ÿþûõù ÿуÑÂтыõ"; ?> <script type="text/javascript"> setTimeout("location.href=register.php",5000); </script> <?php die;} $user = htmlspecialchars(strtolower($_POST[username])); $pass = htmlspecialchars(clean_str($_POST[password])); $pass2 = htmlspecialchars(clean_str($_POST[password2])); $email = htmlspecialchars(clean_str($_POST[email])); If ($pass != $pass2){ echo "ßðрþûø ýõ ÑÂþòÿðôðют"; ?> <script type="text/javascript"> setTimeout("location.href=register.php",5000); </script> <?php die;} $conn = new mysqli($ip,$sqluser,$sqlpw,$userdb); if (mysqli_connect_errno() == 0){ $qusr = "SELECT * FROM bg_user WHERE user_id = ".$user.";"; $resusr = $conn->query($qusr); If ($resusr->num_rows > 0) { echo "Þшøñúð.ôðýýþõ øüѠуöõ ÷ðýÑÂтþ."; ?> <script type="text/javascript"> setTimeout("location.href=register.php",5000); </script> <?php die;} $qmail = "SELECT * FROM bg_user WHERE email = $email"; $mailres = $conn->query($qmail); if ($mailres->num_rows > 0){ echo "Þшøñúð.ýð ÑÂтþт email уöõ ÷ðрõóøÑÂтрøрþòðýð учõтýðѠ÷ðÿøÑÂÑŒ"; ?> <script type="text/javascript"> setTimeout("location.href=register.php",5000); </script> <?php die;} $realpass = hash("md5",strtolower(strip_tags($pass))); If ($plain == "no"){ $insertusr = "INSERT INTO bg_user (user_id, passwd, email) VALUES (?, ?, ?)"; $qInsert = $conn->prepare ($insertusr); $qInsert->bind_param("sss",$user,$realpass,$email); $qInsert->execute(); if ($qInsert->affected_rows == 1){ echo "Success! Your Account is ready, Have Fun. <img src=http://toxic-l33t.ddns.net/forum/public/style_emoticons/<#EMO_DIR#>/smile.png class=bbc_emoticon alt= /> Youll be redirected in 5 seconds... Or click "; ?><script type="text/javascript"> setTimeout("location.href=register.php",5000); </script> <?php die;} else;{ echo "Þшøñúð. <a href=Skype:".$skype."?Chat>×ðôðть òþÿрþÑÂ.</a>"; die; ?> <?php }} elseif ($plain == "yes");{ $insertusr = "INSERT INTO bg_user (user_id, truepasswd, passwd, email) VALUES (?, ?, ?, ?)"; $qInsert = $conn->prepare ($insertusr); $qInsert->bind_param("ssss",$user,$pass,$realpass,$email); $qInsert->execute(); if ($qInsert->affected_rows == 1){ echo "Òðш ðúúðуýт уÑÂÿõшýþ ÷ðрõóøÑÂтрøрþòðý."; ?> <script type="text/javascript"> setTimeout("location.href=register.php",5000); </script> <?php die;} else;{ echo "Þшøñúð. <a href=Skype:".$skype."?Chat>×ðôðть òþÿрþÑÂ.</a>"; ?> die; <?php }}}}else;{echo <form method="post" action="register.php"> Ûþóøý:<br><input type="text" size="24" maxlength="12" name="username" required><br> ßðрþûь:<br><input type="password" size="24" maxlength="12"name="password" required><br> ßðрþûь(ßþòтþр):<br><input type="password" size="24" maxlength="12" name="password2" required><br> Email:<br><input type="text" size="24" maxlength="50" name="email" required><br> <input type="submit" value="àõóøÑÂтрðцøÑÂ"></form>;}?> Good work!
12-13-2013, 05:01 PM
Hi. As you got your answer,and your problem is solved, I am gonna move that topic to Solved section and mark it as solved. Thanks, -LCKB Staff |
|
« Next Oldest | Next Newest »
|