Created
August 2, 2018 13:45
-
-
Save geek-id/624dd90e2cc5a7f170500d109d4dfde5 to your computer and use it in GitHub Desktop.
Read all file in directory and create hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import hashlib | |
import time | |
import os | |
userdata = glob.glob('/home/geekid/Github/ssl/*') | |
userdata.sort(key=os.path.getmtime) | |
def new(): | |
data = '' | |
for getdata in userdata: | |
data += getdata + '\n' | |
gethash = hashlib.sha1(data).hexdigest() | |
print "data baru" | |
# return data | |
print gethash | |
print data | |
new = new() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment