有一条通过 xor 加密的行。该字符串包含子字符串“𧂳𒒲”。
如果在 JS 中循环遍历一遍,会发出一件事:
var testS = "𧂳𒒲";
for (var i = 0; i < testS.length; i++) {
console.log(i + ": " + testS.charCodeAt(i));
}
0: 55388
1: 56499
2: 55305
3: 56498
4: 55307
5: 56546
如果您在 python 中循环遍历它,则会发出其他内容:
testS = "𧂳𒒲"
for i in range(0, len(testS)):
print(f"{i}: {ord(testS[i])}")
0: 159923
1: 74930
2: 77026
如何在 python 中获取类似于 JS 中的输出的数字?数字及其数量的差异打破了整个后续文本。