# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import hashlib,bs4,requests
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
md5="21232f297a57a5a743894a0e4a801fc3"
def MD5_encryption(content):
m=hashlib.md5()
byte_content=content.encode('utf-8')
m.update(byte_content)
md5_encrypted_content=m.hexdigest() #返回摘要,作為十六進位制資料字串值
return md5_encrypted_content
browser = webdriver.Firefox()
url="http://md5decryption.com/"
#ur1="http://baidu.com/"
browser.get(url)
elem=browser.find_element_by_name('hash')
elem.send_keys("21232f297a57a5a743894a0e4a801fc3")
#相當於提交點選
elem.send_keys(Keys.RETURN)
decryption_elem=browser.find_element_by_class_name("main")
content=decryption_elem.text
list1=content.split("\n\n\n\n")
decryption=list1[2]
print (decryption)
破解成功
測試文字,用於處理字串
'Encrypt MD5 hash, Decrypt MD5 hash\nMD5Decryption.com allows you to enter a MD5 hash and we will look into our database\nand try to decrypt MD5. Basically it is a MD5 decrypter.\n\nWhat is an MD5 hash, or MD5 Checksum?\nMD5 is a 128-bit message digest function.\nIt is used commonly in user authentication and MD5 checksum for data integrity.\n\nHow many MD5 hashes are in our database?\nWe have encrypted more than 105,300,000 words, phrases, acronyms, etc since 2006.\n\n\n\nMD5Decryption.com is proudly hosted by Hostgator\n\nDecrypt It!\nPlease input the MD5 hash that you would like to be decrypted:\n\n\nMd5 Hash: 21232f297a57a5a743894a0e4a801fc3\n\n\n\nDecrypted Text: admin'
MD5加密解密網址
http://md5decryption.com/ (免費)
http://www.cmd5.com/ (中文的,付費)
http://www.cmd5.com/
中文的網址,比較快,簡單的可以搜出結果
Python3版本的md5加密值與http://md5decryption.com/ 網站加密值是一樣的。
http://md5decryption.com/ 提供常用md5破解值
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 23 21:27:37 2016
md5加密函式
@author: daxiong Python 3.0
"""
import hashlib
#content="2015063000000001godblessme143566028812345678"
def MD5_encryption(content):
m=hashlib.md5()
byte_content=content.encode('utf-8')
m.update(byte_content)
md5_encrypted_content=m.hexdigest() #返回摘要,作為十六進位制資料字串值
return md5_encrypted_content