当前位置:网站首页>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)
边栏推荐
- Based on authorized access, cross host, and permission allocation under sqlserver
- Es full text index
- Chain team implementation (C language)
- Windows platform mongodb database installation
- What language should I learn from zero foundation. Suggestions
- My first blog
- Statistics, 8th Edition, Jia Junping, Chapter 6 Summary of knowledge points of statistics and sampling distribution and answers to exercises after class
- Intel oneapi - opening a new era of heterogeneity
- Record an edu, SQL injection practice
- Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
猜你喜欢
Chain team implementation (C language)
Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
Interview Essentials: what is the mysterious framework asking?
What is the transaction of MySQL? What is dirty reading and what is unreal reading? Not repeatable?
Statistics 8th Edition Jia Junping Chapter IX summary of knowledge points of classified data analysis and answers to exercises after class
循环队列(C语言)
“Hello IC World”
关于交换a和b的值的四种方法
How to earn the first pot of gold in CSDN (we are all creators)
Intranet information collection of Intranet penetration (3)
随机推荐
Wu Enda's latest interview! Data centric reasons
【指针】统计一字符串在另一个字符串中出现的次数
Matplotlib绘图快速入门
High concurrency programming series: 6 steps of JVM performance tuning and detailed explanation of key tuning parameters
函数:求1-1/2+1/3-1/4+1/5-1/6+1/7-…+1/n
[pointer] octal to decimal
Constants, variables, and operators of SystemVerilog usage
What language should I learn from zero foundation. Suggestions
Pointer -- output all characters in the string in reverse order
Fundamentals of digital circuit (IV) data distributor, data selector and numerical comparator
【指针】求字符串的长度
图书管理系统
浙大版《C语言程序设计实验与习题指导(第3版)》题目集
JDBC read this article is enough
SystemVerilog discusses loop loop structure and built-in loop variable I
ES全文索引
The most popular colloquial system explains the base of numbers
[pointer] solve the last person left
《统计学》第八版贾俊平第三章课后习题及答案总结
关于交换a和b的值的四种方法