Skip to content

Instantly share code, notes, and snippets.

@MatiasBjorling
Created April 23, 2012 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MatiasBjorling/2470735 to your computer and use it in GitHub Desktop.
Save MatiasBjorling/2470735 to your computer and use it in GitHub Desktop.
phpass hashing
#!/usr/bin/php
<?php
$PHPASS_PATH = "/path/to/your/wordpress/wp-includes/class-phpass.php";
require($PHPASS_PATH);
if (count($argv) < 3)
return 0;
$ph = new PasswordHash(8, TRUE);
$clear = base64_decode($argv[1]);
$hash = base64_decode($argv[2]);
$return = $ph->CheckPassword($clear, $hash);
exit($return +1);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment