Advertisement
dancewtd

Untitled

Mar 10th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import hashlib
  2.  
  3. def Archive():
  4.     file1 = raw_input('Type the file name or path: ')
  5.     Read=open(file1,"rw")
  6.     print "You've just opened %s" % (file1)
  7.     print "Content inside %s" % (file1)
  8.     x = str(Read.read())
  9.     print x
  10.     Read.close()
  11.     xz = raw_input('Want to hash the file content? ')
  12.     if xz == ("Y") or ("y"):
  13.         print hashlib.md5(x).hexdigest()
  14.     else:
  15.         return
  16.     return x
  17.  
  18. Archive()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement