Free Python script to check hash
by QUBIT_MATRIX - Saturday August 31, 2024 at 12:43 AM
#1
import sys, hashlib # function to get hash of a file def get_hash(file_path):     # create a hash object     h = hashlib.sha256()     # open file for reading in binary mode     with open(file_path, 'rb') as file:         # loop till the end of the file         chunk = 0         while chunk != b'':             # read only 1024 bytes at a time             chunk = file.read(1024)             h.update(chunk)     # return the hex representation of the digest     return h.hexdigest() # read parameter from command line file_path = sys.argv[1] # print the hash of the file print(get_hash(file_path))

Save as hash.py.
Usage example: hash.py software.exe
Output example: 9caf72e26bf50ba8f677b96d2b804860be51eb7d6753546a9a13a70b97a332e1

Feel free to refactor.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unlimited Free Cloud who 105 7,360 Today, 04:46 AM
Last Post: cookky1
  [FREE] Database Searcher Telegram odanbtw 1,004 76,954 Yesterday, 09:49 AM
Last Post: screwdrivver
  Python Script To Steal Any TikTok Username bs0d 301 14,642 03-27-2026, 03:56 PM
Last Post: tokon308222
  ? Kleinanzeigen & More Grabber – FOR FREE ? Johannamsb 0 27 02-05-2026, 09:59 PM
Last Post: Johannamsb
  Python open redirect checker cuteshiny 36 6,844 02-03-2026, 01:10 PM
Last Post: linyibaby



 Users browsing this thread: 1 Guest(s)