<?php
/////////////////////////////////////////////////////////////////////////////////////////////////////////
# You can use salted and hashed password in config.php for the admin password.
# Use this script to generate the hash for whatever password you want and then enter it 
# into the config.php.
#
# Run this script in your browser with 'pass' set to the password you want to use in config.php.
# Example.
# http://example.com/wmdsedxx/lib/php/salt-has.php?pass=mysecret
# Please use this only if you are entering it in config.php using a text editor. Don't use a 
# salted-hashed password if you are using the application interface to set the password. The
# application will hash the password entered through the interface.
#
# Please note that the weakest link is your database credentials. If the "config.php" file is exposed 
# the database credentials are also exposed. So using a salted and hashed password for 'admin user'
# is not going to make it any more secure.
/////////////////////////////////////////////////////////////////////////////////////////////////////////

require_once("../../config.php");
include('base.php');

/////////////////////////////////////////////////////////////////////////////////////////////////////////

if(!isset($_REQUEST['pass']))
{
	echo "Please specify a password";
	exit;
}
$password = $_REQUEST['pass'];

/////////////////////////////////////////////////////////////////////////////////////////////////////////

echo generateHash($password);

/////////////////////////////////////////////////////////////////////////////////////////////////////////
?>
