当前位置:网站首页>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)

原网站

版权声明
本文为[Ye, Mu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060918336105.html