Linux Python Sha512 Hashing

View previous topic View next topic Go down

Linux Python Sha512 Hashing

Post by jamied_uk on 13th June 2016, 19:33

Linux Example

Code:


#!/usr/bin/python
import hashlib
import sys
# python hashlib_new.py sha1 cleartextpass_here
# python hashlib_new.py sha512 cleartextpass_here


try:
    hash_name = sys.argv[1]
except IndexError:
    print 'Specify the hash name as the first argument.'
else:
    try:
        data = sys.argv[2]
    except IndexError:   
        from hashlib_data import lorem as data
   
    h = hashlib.new(hash_name)
    h.update(data)
    print h.hexdigest()






jamied_uk
Admin

Posts : 1981
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum