Category : md5

md5 to receive CTF for classwork import hashlib flag = 0 counter = 0 pass_hash = input("Enter md5 hash: ") wordlist = input("filename: ") try: pass_file = open(wordlist, "r") except: print("No file found") quit() for word in pass_file: enc_wrd = word.encode(‘utf-8’) digest = hashlib.md5(enc_wrd).hexdigest() if digest == pass_hash: print("Password has been found!") print("Password:" + word) ..

Read more

I am trying to convert java code into python for doing some encryption using md5. Can you please help me to solve this. public static void main(String args[]){ String result = ""; JSONObject o1 = new JSONObject(); o1.put("stationId","1298491919448667556"); String body = o1.toJSONString(); System.out.println(body); try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(body.getBytes()); byte[] b = md.digest(); result ..

Read more

I am new to python. Currently I am trying to auto detect how many hard disk in the computer and scan the whole disk without giving the path. Anyone know how to do it or any suggestions? Below is my coding:- import hashlib import os.path import os import stat def md5(fname): hash_md5 = hashlib.md5() try: ..

Read more

I was trying to scan my system32 directory but I get an error. Anyone met this problem before or any solution for it? Below is the error. PermissionError: [Errno 13] Permission denied: ‘C:WindowsSystem32catroot2edb.log’ Below is my coding: import hashlib import os.path import os def md5(fname): hash_md5 = hashlib.md5() with open(fname, "rb") as f: for chunk ..

Read more