Using a simple python script to generate an HTML page with hidden infomation.
-
Dependence: pip install pygame
-
Font file: please add an font to the working space, you can choose any font you like. In my example, I copy the font 'MSYH' (a font for Chinese and English) in my working space. Just copy the font from the Windows OS 'C:\Windows\Fonts\微软雅黑\msyh.ttc', and then change the line 13 in six_nine.py.
-
Image file: please replace the image ./html/images/profile.jpg.
Just run the code, and then open the /html/main.html in the broswer. And then use 'ctrl + F' to search the digit '6'.
用Python生成一个隐藏着信息的网页,就像刮刮乐一样。
注意将windows下的“微软雅黑”字体加到工作目录下,或者你自己选择别的字体,谢谢!
我的是在C:\Windows\Fonts\微软雅黑\msyh.ttc
代码six_nine.py 的第13行 font = pygame.font.Font('msyh.ttc', 50) 为设置字体
请将html/images下的profile.jpg换成你女神的照片,模板的图片是随便找的
在html文件夹下中的main.html即是生成的网页