From 6026c696446443a96b14825e06256274abec0790 Mon Sep 17 00:00:00 2001 From: Ken Fong Date: Wed, 2 Jan 2019 14:17:48 +0800 Subject: [PATCH] python script for generating password and SHA512 hash --- myrandom.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 myrandom.py diff --git a/myrandom.py b/myrandom.py new file mode 100755 index 0000000..68c0200 --- /dev/null +++ b/myrandom.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +import string +import crypt +import threading +from random import * +characters = string.ascii_letters + "~@#%^*()-_+=23456789" + +def genOne(): + password = "".join(choice(characters) for x in range(randint(12, 16))); + salt = crypt.mksalt(method=crypt.METHOD_SHA512); + print (password, "|", crypt.crypt(password,salt=salt)); + +for i in range(4): + threading.Thread(target=genOne, args=()).start()