diff --git a/digger.py b/digger.py index 29d57ab..cc424cf 100644 --- a/digger.py +++ b/digger.py @@ -6,6 +6,7 @@ sys.path.append('modules') sys.path.append('vars') sys.path.append('logger') +import time import locale from dialog import Dialog import glob @@ -55,11 +56,22 @@ def bagAndTag(): tombPath = tomb.getPath() hashes = open(tombPath + "hashes.txt",'a+') + boneList = [] + for root, dirnames, filenames in os.walk(tombPath): for dir in dirnames: for subroot, subdirnames, subfilenames in os.walk(tombPath + dir): for filename in subfilenames: - hashes.write(sha256sum(subroot + "/" + filename) + " " + subroot + "/" + filename + "\n") + boneList.append(subroot + "/" + filename) + + d.gauge_start(title="Hashing all collected artifacts...",width=60,height=10) + boneCount = 0 + for bone in boneList: + d.gauge_update(text=bone,percent=int(boneCount*100/len(boneList)),update_text=True) + hashes.write(sha256sum(bone) + " " + bone + "\n") + boneCount += 1 + d.gauge_update(text="Complete!",percent=100,update_text=True) + time.sleep(1) hashes.close() def finish(allSuccessful):