当前位置:网站首页>About the garbled code problem of superstar script
About the garbled code problem of superstar script
2022-07-06 14:42:00 【Ye, Mu】
In this case, you cannot answer the question after mounting the script , Any script about the answer script cannot be used .
Look at this font , I can't read the original , At first, I thought it was encryption and tried to use encryption algorithm to crack , And then use BP、 Other tools tried to decode without success .
Then try to decode with the code set , The result also ended in failure . Online search has not been solved .
Finally, I tried the transformation of complexity and simplicity with a try mentality , At first, I didn't believe how simple it was , Superstar programmers can't paddle , Then the conversion succeeded , Successfully restored original title . Here is what I use Python Restored output
#coding = utf-8
from zhconv import convert
code_lib = []
scr_lib = []
real_lib = []
code = ' In October, Russia set up a world-class promotion system, such as the time of '
scr = ' The October Revolution in Russia ushered in a new era of proletarian socialist revolution in the world '
for i in code:
decode = ord(i)
code_lib.append(decode)
for j in scr:
decode = ord(j)
scr_lib.append(decode)
for k in range(len(code_lib)):
real = code_lib[k] - scr_lib[k]
real_lib.append(real)
print(code_lib)
print(scr_lib)
print('--------- Difference --------')
print(real_lib)
print(decode)
decode = convert(scr,'zh-hans')
print(decode)
Conversion success
pip install zhconv
I need to use zhconv library
Write the revised... Quickly JS Script : about Python Code conversion to JS Code
pip install jiphy
Need to use jiphy library , As for some JS Some problems after conversion are actually solved
The final summary , The problem of garbled code is complex and simple conversion , So as long as the original JS The script search question plus the complex and simple conversion function should be able to solve . Solutions such as , Let the whole web page source code realize the conversion from traditional Chinese to simplified Chinese before loading JS Script .
#coding = utf-8
from zhconv import convert
import jiphy
def Decode(scr):
decode = convert(scr,'zh-hans')
return decode
def PyToJs(scr):
js = jiphy.to.python(scr)
return js
def JsToPy(scr):
py = jiphy.to.javascript(scr)
return py
if __name__ == '__main__':
#test
word = ' The original complex form of a simplified Chinese character '
decode = Decode(word)
print(decode)
js = 'JS Code '
py = JsToPy(js)
print(py)
边栏推荐
猜你喜欢
“Hello IC World”
Solutions to common problems in database development such as MySQL
Internet Management (Information Collection)
Library management system
5分钟掌握机器学习鸢尾花逻辑回归分类
ES全文索引
Résumé des points de connaissance et des réponses aux exercices après la classe du chapitre 7 de Jia junping dans la huitième édition des statistiques
Statistics 8th Edition Jia Junping Chapter IX summary of knowledge points of classified data analysis and answers to exercises after class
“Hello IC World”
Intranet information collection of Intranet penetration (4)
随机推荐
《统计学》第八版贾俊平第三章课后习题及答案总结
使用 flask_whooshalchemyplus jieba实现flask的全局搜索
循环队列(C语言)
Lintcode logo queries the two nearest saplings
Windows platform mongodb database installation
flask实现强制登陆
Apache APIs IX has the risk of rewriting the x-real-ip header (cve-2022-24112)
Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
Function: calculates the number of uppercase letters in a string
【指针】统计一字符串在另一个字符串中出现的次数
《统计学》第八版贾俊平第一章课后习题及答案总结
Realize applet payment function with applet cloud development (including source code)
Function: string storage in reverse order
《统计学》第八版贾俊平第七章知识点总结及课后习题答案
《統計學》第八版賈俊平第七章知識點總結及課後習題答案
Database monitoring SQL execution
Statistics 8th Edition Jia Junping Chapter 7 Summary of knowledge points and answers to exercises after class
Binary search tree concept
Hcip -- MPLS experiment
数据库多表链接的查询方式