pycharm font:Learn JS reverse engineering from me - CSS font encryption cracking-Font Tutorial免费ppt模版下载-道格办公

Learn JS reverse engineering from me - CSS font encryption cracking

Target site:

aHR0cHMlM0EvL2subS5hdXRvaG9tZS5jb20uY24vZGV0YWlsL3NoYXJlXzAxZG1xeThmYTE2OHZrYWU5aDYwdmcwMDAwLmh0bWw=

The address is base64 encrypted and can be decrypted via the following address:

https://base64.supfree.net

Preparation tools:

chome browser, python3.7 language environment, pycharm, Baidu font editor: http://fontstore.baidu.com/static/editor/index.html

Crack method:

1. Open the Chrome browser and enter the target address in the browser address bar. After opening the web page, right-click the page and select Inspect. You can see that the relevant text has been encrypted.

Text is encrypted

2. You can verify whether the text is encrypted by copying it. Such as copying:

Recommendation from an old friend

The copied text is:

Recommended by an old friend

3. This phenomenon is that the text is encrypted by CSS styles. The cracking steps are as follows:

1. Use the browser developer mode to find the css style used in the text on the page 2. Find the loaded css file through packet capture and other methods, and use regular expressions to extract the font file URL 3. Parse woff through Baidu font editor File: http://fontstore.baidu.com/static/editor/index.html 4. Use fontTools to process font files and obtain corresponding relationships 5. Parse encrypted fonts through corresponding relationships

4. First use Python's request module to request the page, obtain the font file URL through regular expressions, request the URL, obtain the font file, and write it locally.

5. Parse ttf files through Baidu font editor

6. Through Baidu Font Editor, you can see that the font code corresponding to "" is "$EC2A". Next, read the TTF file through the fontTools module under python, establish a text correspondence, and save it as a dictionary.

7. Traverse the text correspondence dictionary through a for loop, and replace the original web page return to obtain normal data.

Based on the recommendation of an old friend, I looked at several brands, but my head was spinning with no results. I couldn't decide which brand to buy. After consulting my daughter, I decided to choose a model from Roewe. The one with the best value for money is the i5. The reason why I like this model is not because of its high configuration or high power, but because I am short of money and have limited budget. However, the Roewe brand is excellent and has reliable quality. , the failure rate is low, friends who bought it said it is very good. Not yet, but I still feel it’s a bit hard to explain! The decision to buy a car is made after consultation with my daughter. What I value is the popularity and quality of the brand. My daughter says she likes this car model. Girls are all members of the Ten Appearance Association. , the hatchback car is more cool, the shape is fashionable and elegant, and it is suitable for young girls. My daughter liked it after looking at it.

Code reference:

https://github.com/freedom-wy/js-reverse/tree/master/autohome/koubei

Welcome to communicate, learn together, and make progress together.

In addition, I teach courses on MOOCs:

"Python crawler engineers must learn - App data capture practice", please support me. Course address:

https://coding.imooc.com/class/283.html

Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/gen-wo-xue-JS-ni-xiang-CSS-zi-ti-jia-mi-po-jie.html

Like (810)
Reward 支付宝扫一扫 支付宝扫一扫
single-end

Related Suggestion