Encryption & Bruteforcing

(Zain) #1

Hi y 'all. So I am currently trying to do a project in python2 and python3. Basically I’m trying to study how to bruteforce a encrypted ‘password’ in lets say SHA-1 and MD5. I’m not asking for the answer, but I’m trying to understand why it’s important to use hashes and salts along with the hashes.

Btw, my ‘encryption’ program is here:


Anyways, yeah. I just am confused and have no idea if my sources are correct. Any help is appreciated. Thanks!

With that all being said, ~Cheers!

–Techno Forg–

([email protected] [email protected]) #2

You might wanna check out the theory and explanation behind a hash and a salt in cryptography. Here’s a couple of links I found that I thought explained it quite well.


Well, you are not really using SHA1MD5 with and without salt but plain SHA1/MD5 and bcrypt (which is completely different hashing method).

If you want to implement a simple bruteforce, you can use python’s itertools:

from itertools import product
from hashlib import md5

test_hash = '098f6bcd4621d373cade4e832627b4f6' # md5(test)
n = 4
chars = 'abcdefghijklmnoprstuvxyz'
for i in range(1,n+1):
    for j in product(list(chars), repeat=i):
        s = ''.join(j)
        m = md5()
        if m.hexdigest() == test_hash:
            print "Found: %s" % s

(system) #4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.