From 66c84cedfb411ad6ca0508d9f45d6d33c8ad474d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Nov 2011 11:13:51 -0500 Subject: This directory was identified as ltshell-2.2-1. I think it is rebranded phpshell-2.2. --- shell/pwhash.php | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 shell/pwhash.php (limited to 'shell/pwhash.php') diff --git a/shell/pwhash.php b/shell/pwhash.php new file mode 100644 index 0000000..08e8171 --- /dev/null +++ b/shell/pwhash.php @@ -0,0 +1,107 @@ + + + + + Password Hasher for PHP Shell <?php echo PHPSHELL_VERSION ?> + + + + + + + + +

Password Hasher for PHP Shell

+ +
+ +
+ Username + +
+ +
+ Password + +
+ +
+ Result + +Enter a username and a password and update.

\n"; +} else { + + $u = strtolower($username); + + if (preg_match('/[[ |&~!()]/', $u) || $u == 'null' || + $u == 'yes' || $u == 'no' || $u == 'true' || $u == 'false') { + + echo '

Your username cannot contain any of the following reserved + word: "null", "yes", "no", "true", or + "false". The following characters are also prohibited: + " " (space), "[" (left bracket), "|" (pipe), + "&" (ampersand), "~" (tilde), "!" (exclamation + mark), "(" (left parenthesis), or ")" (right + parenthesis).

' . "\n"; + + echo '

Please choose another username and try again.

' . "\n"; + + } else { + echo "

Write the following line into config.php " . + "in the users section:

\n"; + + if ( function_exists('sha1') ) { $fkt = 'sha1' ; } else { $fkt = 'md5' ; } ; + $salt = dechex(mt_rand()); + + $hash = $fkt . ':' . $salt . ':' . $fkt($salt . $password); + + echo "
\n";
+    echo htmlentities(str_pad($username, 8) . ' = "' . $hash . '"') . "\n";
+    echo "
\n"; + } +} +?> + +

+ +
+ +
+ + +
+ +
+ Copyright © the Phpshell-team, please see AUTHORS. + This is PHP Shell , get the latest version at http://phpshell.sourceforge.net/. +
+ + + -- cgit v1.2.3