Is there a md5 decrypt function in python?

Possible duplicate:
Is it possible to decrypt md5 hashes?

I used md5.new(); md5.update("aaa"),md5.digest()

to generate a md5 data hash "aaa". How to return data using python?

+3
source share
8 answers

- md5, - , ( , , , , , , , "" ).

, :

,

,

.

:

  • .

, Python ( , Stackoverflow ).

+18

. , - , , .

+13

, . . John the Ripper , , .

Rainbow Table, . , .

- python script, md5().

+3

Python, - . , , - - , ( 3 1 ). , - , , , , . - ( ), ( , )

+2

MD5. .

import hashlib
import sys

def decryptMD5(testHash):
        s = []
        while True:
                m = hashlib.md5()
                for c in s:
                        m.update(chr(c))
                hash = m.hexdigest()
                if hash == testHash:
                        return ''.join([chr(c) for c in s])
                wrapped = True
                for i in range(0, len(s)):
                        s[i] = (s[i] + 1) % 256
                        if s[i] != 0:
                                wrapped = False
                                break
                if wrapped:
                        s.append(0)

print decryptMD5(sys.argv[1])

:

$ python md5.py 47bce5c74f589f4867dbd57e9ca9f808
aaa
+1

, BlueRaja Sean . MD5 ( -) , .

, , - ( ), .

0

, MD5 . , , . - MD5 - . , , , - . / .

0
source

Hashes map a bunch of data into a finite (albeit large) set of numeric values ​​/ strings.

This is a multi-valued comparison, so decoding a hash is not only “difficult” in a cryptographic sense, but conceptually impossible in that even if you could, you would get an infinite set of possible input lines.

0
source

Source: https://habr.com/ru/post/1743887/


All Articles