这节课是巡安似海PyHacker编写指南的《打造网站Cms识别工具》
喜欢用Python写脚本的小伙伴可以跟着一起写一写呀。
编写环境:Python2.x
00x1:
需要用到的模块如下:
import hashlib
import requests
00x2:
首先利用hashlib.md5().hexdigest()进行获取md5
r = hashlib.md5('cms.txt').hexdigest()
print r
获取文件md5:
f = open('favicon.png','rb').read()
filemd5 = hashlib.md5(f).hexdigest()
print filemd5
00x3:
获取网站文件的md5:
req=requests.get('http://www.hackxc.cc/content/templates/Adams/images/favicon.ico').content
filemd5 = hashlib.md5(req).hexdi