Jump to content

[Help] PHPBB Registration inject in realmd DB


Guest dragoran

Recommended Posts

how can I change the following code, which is also an entry made in mw_account_extend [account_id] and [account_level]

[== PHP ==]
// //////////////////////////////////////////////////////////////////////////////////// // PWS USER ADD FOR MANGOS // MOD BY FROSTBYTE JULY 2009 // CHANGE THE FOLLOWING TO YOUR CHARACTER ACCOUNTS DATABASE $email = $user_row['user_email']; // GRAB THE PW FROM ABOVE $username = $user_row['username']; // SAME WITH USERNAME $password = $raw_pw; // AND THE PASSWORD SEE UCP_REGISTER.PHP #331 $dbhost="IP Adress"; // SET VARIABLES FOR MYSQL HOST $dbid="user"; // ID $dbpw="pass"; // AND PW $dbrealmd="database"; // INCASE NOT USING DEFAULT MANGOS VARIABLE $today = date("Y-m-d h"); // GET TODAYS DATE (I DIDNT SEE IT UP THERE) $ip = $_SERVER['REMOTE_ADDR']; // GET THE IP, SAME DIDNT SEE IT UP THERE $expansion = 2; // DEFAULT TO WOTLK, LATER I'LL MAKE IT USER SELECTABLE // LOAD UP THE DATABASE // replace with your stuff of course if(!$con = mysql_connect($dbhost,$dbid,$dbpw)){ die('Unable to connect to '.$dbhost.'
'.mysql_error()); } if(!mysql_select_db($dbrealmd,$con)){ die('Unable to access to the realm db
Check the includes/funtions_users.php'.mysql_error()); } // SETUP THE PASSWORD  $name = strtoupper($username); // CHANGE USERNAME TO UPPERCASE $password = strtoupper($password); // DO THE SAME WITH THE PW $hashed_pw = sha1($name.':'.$password); // SET THE NEW PW AS NAME COLON PASSORD COMBO  // PUT IT ALL TOGETHER if(!mysql_query("INSERT INTO account (username, sha_pass_hash, gmlevel, email, joindate, last_ip, expansion) values ( '".$username."', '".$hashed_pw."', 0, '".$email."', '".$today."', '".$ip."', $expansion)")){ die('Unable to add user.
'.mysql_error()); }; mysql_close($con); 

I hope you understand what I mean my english is really bad

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use