#!/usr/bin/php " Example: {$script} "mynewpassword" All arguments are long options. --help Print this page. "" ["" ["" ...]] One or more plan-text passwords enclosed by double quotes. The output hash may be manually entered into the {users}.pass field to change a password via SQL to a known value. EOF; exit; } /** * Fake variable_get() since we are not bootstrapping Drupal. */ function variable_get($name, $default = NULL) { return $default; } require_once dirname(__FILE__) . '/password.inc'; foreach ($_SERVER['argv'] as $password) { print("\npassword: $password \t\thash: ". user_hash_password($password) ."\n"); } print("\n");