more oops. still not 100% sure on the php one.
This commit is contained in:
parent
6f53d09b04
commit
0102ca26c3
@ -20,9 +20,9 @@ There are many ways in which you can generate a salted hash.
|
||||
|
||||
python -c "import crypt, getpass, pwd; print crypt.crypt('PASSWORD','\$6\$aBcDeFgHiJ\$')"
|
||||
|
||||
3.) php:
|
||||
3.) php (extras/bin/hashgen.php) (UNTESTED):
|
||||
|
||||
php -r "\$password = readline('Password: '); \$saltRaw = random_bytes(8); \$salt = base64_encode(\$saltRaw); \$result = crypt(\$password,'\$6' . '\$' . \$salt .'\$'); print \$result . \"\n\";"
|
||||
php -r "\$password = 'PASSWORD'; \$saltRaw = 'aBcDeFgHiJ'; \$salt = base64_encode(\$saltRaw); \$result = crypt(\$password,'\$6' . '\$' . \$salt .'\$'); print \$result . \"\n\";"
|
||||
|
||||
4.) even grub-crypt (if using legacy grub):
|
||||
|
||||
|
7
extra/bin/hashgen.php
Normal file
7
extra/bin/hashgen.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$password = readline("Password: ");
|
||||
$saltRaw = random_bytes(8);
|
||||
$salt = base64_encode($saltRaw);
|
||||
$result = crypt($password,'$6' . '$' . $salt .'$');
|
||||
print $result . "\n";
|
||||
?>
|
Loading…
Reference in New Issue
Block a user