scripts

Random assortment of scripts
Log | Files | Refs

commit d492272324f0c1e0c544a3752c583fb50c5a01cd
parent 1ee35fcda5d88cd3c3fc9251ad324db8ea65f737
Author: andersuno <anders.hedman01@gmail.com>
Date:   Mon, 17 Aug 2020 21:39:53 +0200

added: gensha512pass.py

Diffstat:
Agensha512pass.py | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/gensha512pass.py b/gensha512pass.py @@ -0,0 +1,18 @@ +#!/bin/python + +import random +import string +import crypt +import sys + +if sys.version_info[0] < 3: + print("Looks like you are using Python 2, running Python 2 compatible code\ + instead") + passwd = raw_input("Enter password to digest: ") + + randomsalt = ''.join(random.sample(string.ascii_letters, 8)) + print(crypt.crypt(passwd, '$6$%s$' % randomsalt)) + +else: + passwd = input("Enter password to digest: ") + print(crypt.crypt(passwd, crypt.METHOD_SHA512))