当前位置:网站首页>关于超星脚本出现乱码问题
关于超星脚本出现乱码问题
2022-07-06 09:23:00 【叶、慕】

这种情况在挂载脚本后无法答题,任何关于答题脚本的脚本都无法使用。
看这个字体,已经读不出原文了,一开始以为是加密尝试使用加密算法破解,然后用BP、其他工具尝试解码无果。
之后尝试用编码集解码,结果也以失败告终。网上搜索也没有解决。
最后我抱着试一试的心态去试了试繁简转换,开始不相信居然怎么简单,超星程序员难道划水,然后转换成功了,成功还原的原题。下面是我用Python还原的输出
#coding = utf-8
from zhconv import convert
code_lib = []
scr_lib = []
real_lib = []
code = '俄国十月擛擭擮辟了世掷擩产擪级擨擢主义擛擭的擝时擫'
scr = '俄国十月革命开辟了世界世界无产阶级社会主义革命的新时代'
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('---------差数--------')
print(real_lib)
print(decode)
decode = convert(scr,'zh-hans')
print(decode)

转换成功
pip install zhconv这里需要用到zhconv库
要快速写出修改后的JS脚本:对于Python代码转换为JS代码
pip install jiphy需要使用jiphy库,至于一些JS转换后的一些问题实际问题实际解决
最后总结,乱码问题就是繁简转换,所以只要在原来的JS脚本搜索题目上加上繁简转换功能应该能解决。解决方案比如,让整个网页源代码实现繁体转换为简体后再载入JS脚本。
#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 = '繁体字'
decode = Decode(word)
print(decode)
js = 'JS代码'
py = JsToPy(js)
print(py)边栏推荐
- HackMyvm靶机系列(4)-vulny
- [experiment index of educator database]
- Experiment 7 use of common classes (correction post)
- 7-5 staircase upgrade (PTA program design)
- HackMyvm靶机系列(1)-webmaster
- Hackmyvm Target Series (3) - vues
- Proceedingjoinpoint API use
- 网络基础详解
- [paper reproduction] cyclegan (based on pytorch framework) {unfinished}
- xray與burp聯動 挖掘
猜你喜欢

Markdown font color editing teaching

Detailed explanation of network foundation

HackMyvm靶机系列(1)-webmaster

Hackmyvm target series (1) -webmaster

SystemVerilog discusses loop loop structure and built-in loop variable I

Chain team implementation (C language)

captcha-killer验证码识别插件

Hackmyvm Target Series (3) - vues

JDBC transactions, batch processing, and connection pooling (super detailed)

内网渗透之内网信息收集(一)
随机推荐
UGUI—Text
The difference between layer 3 switch and router
Statistics 8th Edition Jia Junping Chapter 14 summary of index knowledge points and answers to exercises after class
Binary search tree concept
Always of SystemVerilog usage_ comb 、always_ iff
Hackmyvm target series (5) -warez
浅谈漏洞发现思路
Windows platform mongodb database installation
内网渗透之内网信息收集(四)
Solutions to common problems in database development such as MySQL
Low income from doing we media? 90% of people make mistakes in these three points
XSS unexpected event
Hcip -- MPLS experiment
《统计学》第八版贾俊平第八章假设检验知识点总结及课后习题答案
Hackmyvm target series (4) -vulny
《统计学》第八版贾俊平第十四章指数知识点总结及课后习题答案
Wu Enda's latest interview! Data centric reasons
Hackmyvm target series (7) -tron
captcha-killer验证码识别插件
On the idea of vulnerability discovery