Possible duplicate:Is it possible to decrypt md5 hashes?
I used md5.new(); md5.update("aaa"),md5.digest()
md5.new()
md5.update("aaa")
md5.digest()
to generate a md5 data hash "aaa". How to return data using python?
"aaa"
- md5, - , ( , , , , , , , "" ).
, :
,,.
,
.
:
, Python ( , Stackoverflow ).
. , - , , .
, . . John the Ripper , , .
Rainbow Table, . , .
- python script, md5().
Python, - . , , - - , ( 3 1 ). , - , , , , . - ( ), ( , )
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
, BlueRaja Sean . MD5 ( -) , .
, , - ( ), .
, MD5 . , , . - MD5 - . , , , - . / .
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.
Source: https://habr.com/ru/post/1743887/More articles:ASP.net still displays cached versions - c #Focus Prevention Applet in IE - jqueryOverride Find function of browser - javascriptHow can I automatically handle form events in another class / module in VB.NET? - event-handlingUnable to overwrite .dll files in Visual Studio 2008. Access denied - dllFree cryptography libraries - c ++Python reporting structures - pythonAre classes necessary for creating methods (defs) in Python? - pythonAvoid copying data between user and kernel space and vice versa - linuxКак узнать, существует ли метод в Obj-C при задании NSString - objective-cAll Articles