程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python crawler series reverse cracking the font encryption of a sex web house number

編輯:Python

Python Reverse cracking of font encryption of a sexual web house number in the crawler series

If you have any questions > Click here to communicate with me <

Please scan the QR code below for wechat

The code is for learning and communication only , Do not use for illegal purposes

from fontTools.ttLib import TTFont
import json
import xmltodict
font = TTFont("./1.woff")
font.saveXML("1.xml")
xml_file = open("1.xml", 'r', encoding="utf-8")
xml_str = xml_file.read()
json_data = xmltodict.parse(xml_str, encoding='utf-8')
info = json.loads(json.dumps(json_data))
fontMaps = info['ttFont']['cmap']['cmap_format_4'][0]['map']
# Ciphertext
enstr = "H2wHeleH2we"
destr = ""
for _ in range(len(enstr)):
hexAscii = hex(ord(enstr[_:_ + 1]))
for fontMap in fontMaps:
if str(fontMap['@code']) == str(hexAscii):
destr += ‘’
break
print(" Encrypted ciphertext :{}\n Decrypt plaintext :{}".format(enstr, destr))

A running screenshot is attached

If you have any questions > Click here to communicate with me <


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved