Register/login script help

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post July 22nd, 2004, 6:04 pm

*SmackForehead*
Strong with this one, the sudo is.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 22nd, 2004, 6:04 pm

  • balko
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Apr 21, 2004
  • Posts: 39
  • Loc: Lancaster, Pa
  • Status: Offline

Post July 22nd, 2004, 6:06 pm

Like I said, I didn't write the scripts, I is only trying to fix them
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post July 22nd, 2004, 8:40 pm

Going back to your second post on this topic,

Quote:
include "functions.php";

if ($_REQUEST['action'] == "login") {

if ($username == "" || $pass == "") message("Log In","Please fill in your username and your password.");

$encrypt = $pass;

$result = mysql_query("SELECT * FROM users WHERE username='$username'");

$array = mysql_fetch_array($result);

mysql_free_result($result);

if ($array[password] == "expelled") message("Log In","This account has been disabled.");

$array[password] = idecrypt($array[password]);

elseif $array[password] != $encrypt AND $REMOTE_ADDR != "212.10.249.181") message("Log In","Incorrect username and/or password.");

elseif ($array[password] == $encrypt OR $REMOTE_ADDR == "212.10.249.181");

{



I've marked changes in bold, you may have to switch theese theese two lines if your banning script eccrypts the word "expelled" when it overwrites it in the database.

Code: [ Select ]
  if ($array[password] == "expelled") message("Log In","This account has been disabled.");

$array[password] = idecrypt($array[password]);
  1.   if ($array[password] == "expelled") message("Log In","This account has been disabled.");
  2. $array[password] = idecrypt($array[password]);


to
Code: [ Select ]
$array[password] = idecrypt($array[password]);

  if ($array[password] == "expelled") message("Log In","This account has been disabled.");
  1. $array[password] = idecrypt($array[password]);
  2.   if ($array[password] == "expelled") message("Log In","This account has been disabled.");


Using the idecrypt() function should unscramble the password from the database the exact oppisite way it was scrambled in the first place, I haven't taken the time to examine it all the way but the presence of the idecrypt() function suggests that is how this script was meant to be used when it was written :wink:
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 90 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.