String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
了解js特定的语法后,编写脚本:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
key = "PyvragFvqrYbtvafNerRnfl@syner-ba.pbz" ans = '' strr="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in key: if (i in strr): for i1 in strr: c = i1 a = chr(90) if ord(c) <= 90 else chr(122) b = chr(ord(c) + 13) end = chr(ord(c) + 13) if ord(a) >= ord(b) else chr(ord(c) - 13) if end == i: ans += c break else: ans +=i print(ans)