經(jīng)典css字體反爬案列解析流程
目標(biāo)站點(diǎn):http://match.yuanrenxue.com/match/7 - 猿人云字體反爬
[圖片上傳中...(image.png-45e848-1604054980083-0)]
所需結(jié)果:輸出勝點(diǎn)最高的男人的名字
站點(diǎn)分析:
- 勝點(diǎn)數(shù)據(jù)用css加密字體進(jìn)行映射
- css樣式通過(guò) Request URL: data:font/truetype;charset=utf-8;base64,AAEAAAAKAI··· 動(dòng)態(tài)獲取
-
數(shù)據(jù)展示html標(biāo)簽動(dòng)態(tài)生成
難點(diǎn):css樣式動(dòng)態(tài)標(biāo)記映射關(guān)系
image.png
解題流程:
- 數(shù)據(jù)為ajax異步數(shù)據(jù) 斷電定位到請(qǐng)求數(shù)據(jù)的位置
-
梳理數(shù)據(jù)展示邏輯 如圖
image.png - 下載樣式數(shù)據(jù)文件,或者 拿到base64字符串解碼成可識(shí)別的woff文件 (具體可看下方完整代碼)
- 生成woff 文件和 xml css映射文件后 使用 fontCearter 工具 查看映射關(guān)系 使用 fontTools 生成css-xml文件
-
映射關(guān)系一般在生成xml文件的三個(gè)位置 通過(guò)工具慢慢找邏輯
image.png
image.png - 由上圖可知 映射關(guān)系就是psName標(biāo)簽的序號(hào)和name值映射
-
No BB show me the code档痪!
image.png
作者: Silva
Github: js逆向-經(jīng)典css反爬
參考推薦:https://blog.csdn.net/qq_36078992/article/details/110409579