Skip to content

Instantly share code, notes, and snippets.

@17

17/实现.py Secret

Last active November 8, 2023 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 17/23cca00b6b647285379f9b0dfee9663b to your computer and use it in GitHub Desktop.
Save 17/23cca00b6b647285379f9b0dfee9663b to your computer and use it in GitHub Desktop.
def decode(imgpath, pageid):
return ''.join(map(chr, map(lambda x: ord(x) - pageid % 10, list(imgpath))))
decode('J+8L+K<+?<+?=+K=+HJ+?=+K;+G:+G=+K?+??+><+K<+>H+><+K;+>>+><+K=+>?+>>+8L;?=+K>+GL+?J+8L', 1501186)
// 1
new Function((function(p, a, c, k, e, d) {
e = function(c) {
return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
}
;
if (!"".replace(/^/, String)) {
while (c--) {
d[e(c)] = k[c] || e(c)
}
k = [function(e) {
return d[e]
}
];
e = function() {
return "\\w+"
}
;
c = 1
}
while (c--) {
if (k[c]) {
p = p.replace(new RegExp("\\b" + e(c) + "\\b","g"), k[c])
}
}
return p
}('4["\\1\\6\\0\\5\\1\\9"](8["\\3\\2\\7\\0\\3\\2"])', 10, 10, "x6f|x70|x65|x64|window|x6d|x72|x63|__cr|x74".split("|"), 0, {})))();
// window["\x70\x72\x6f\x6d\x70\x74"](__cr["\x64\x65\x63\x6f\x64\x65"])
// 2
new Function(eval("\x5f\x5f\x63\x72\x2e\x63\x72\x2e\x72\x65\x70\x6c\x61\x63\x65\x28\x2f\\\x64\x2b\x2f\x67\x2c\x22\x22\x29"))();
// "window.prompt=__cr.charcode"
// 3
decode = "ni`jogp/jnhqbui>ni`jogp/jnhqbui/sfqmbdf)0/0h-gvodujpo)b*|sfuvso!Tusjoh/gspnDibsDpef)b/dibsDpefBu)1*.ni`jogp/qbhfje&21*~*"
charcode = function(x) {
new Function(x.replace(/./g, function(a) {
return String.fromCharCode(a.charCodeAt(0) - 1)
}))()
}
// mh_info.imgpath=mh_info.imgpath.replace(/./g,function(a){return String.fromCharCode(a.charCodeAt(0)-mh_info.pageid%10)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment