De Wiki inetshell
Saltar a: navegación, buscar
(Página creada con «https://www.shellhacks.com/linux-generate-password-hash/»)
 
 
Línea 1: Línea 1:
 
https://www.shellhacks.com/linux-generate-password-hash/
 
https://www.shellhacks.com/linux-generate-password-hash/
 +
 +
* MD5:
 +
<pre>
 +
python -c "import random,string,crypt;
 +
randomsalt = ''.join(random.sample(string.ascii_letters,8));
 +
print crypt.crypt('MySecretPassword', '\$1\$%s\$' % randomsalt)"
 +
---
 +
$1$YjOzcqrf$Zqx4sx5CQRuEIFCdOLAJV0
 +
</pre>
 +
 +
* SHA-256
 +
<pre>
 +
python -c "import random,string,crypt;
 +
randomsalt = ''.join(random.sample(string.ascii_letters,8));
 +
print crypt.crypt('MySecretPassword', '\$5\$%s\$' % randomsalt)"
 +
---
 +
$5$LgsPuaeR$OCtm.3tpbS/wyOZAIy6dsVNP4x0GyohyGebkIz15e88
 +
</pre>
 +
 +
* SHA-512
 +
<pre>
 +
python -c "import random,string,crypt;
 +
randomsalt = ''.join(random.sample(string.ascii_letters,8));
 +
print crypt.crypt('MySecretPassword', '\$6\$%s\$' % randomsalt)"
 +
---
 +
$6$HMpFTkgb$WqzuqMqYbjWsXFrOtvZPo.1gIkH6HiXJGr4QPv.k26jE.3mE.sdf3dds[...]
 +
</pre>

Revisión actual del 17:16 9 ago 2019

https://www.shellhacks.com/linux-generate-password-hash/

  • MD5:
python -c "import random,string,crypt;
randomsalt = ''.join(random.sample(string.ascii_letters,8));
print crypt.crypt('MySecretPassword', '\$1\$%s\$' % randomsalt)"
---
$1$YjOzcqrf$Zqx4sx5CQRuEIFCdOLAJV0
  • SHA-256
python -c "import random,string,crypt;
randomsalt = ''.join(random.sample(string.ascii_letters,8));
print crypt.crypt('MySecretPassword', '\$5\$%s\$' % randomsalt)"
---
$5$LgsPuaeR$OCtm.3tpbS/wyOZAIy6dsVNP4x0GyohyGebkIz15e88
  • SHA-512
python -c "import random,string,crypt;
randomsalt = ''.join(random.sample(string.ascii_letters,8));
print crypt.crypt('MySecretPassword', '\$6\$%s\$' % randomsalt)"
---
$6$HMpFTkgb$WqzuqMqYbjWsXFrOtvZPo.1gIkH6HiXJGr4QPv.k26jE.3mE.sdf3dds[...]