-
-
[原创] KCTF 2019 Q2 第六题 XBase64
-
发表于: 2019-6-24 21:04 4560
-
改版的base64
b64str = 'tuvwxTUlmnopqrs7YZabcdefghij8yz0123456VWXkABCDEFGHIJKLMNOPQRS9+/' ', '.join(["'{}'".format(c) for c in b64str]) a = [] for i in range(0,0x100): if chr(i) in b64str: a.append(b64str.index(chr(i))) else: a.append(0xFF) def charEncrypt(i): global b64str icv = c_ubyte(ord(b64str[i])).value if (icv > 0x40) and (icv <= 0x5A): return chr(c_ubyte(0x9B-icv).value) elif (icv > 0x60) and (icv <= 0x7A): return chr(c_ubyte(icv-0x40).value) elif (icv > 0x2F) and (icv <= 0x39): return chr(c_ubyte(icv+0x32).value) elif icv==0x2B: return chr(c_ubyte(0x77).value) elif icv==0x2F: return chr(c_ubyte(0x79).value) else: return chr(c_ubyte(icv).value) dicv = [] for i in range(0,b64str.__len__()): v = charEncrypt(i) if v not in dicv: dicv.append(v) else: raise Exception("") ''.join(b64str[dicv.index(c)] if c!='=' else '=' for c in "!NGV%,$h1f4S3%2P(hkQ94==" ) "aMTEeld6q4tHserKh69Jyt=="
b64str = 'tuvwxTUlmnopqrs7YZabcdefghij8yz0123456VWXkABCDEFGHIJKLMNOPQRS9+/' ', '.join(["'{}'".format(c) for c in b64str]) a = [] for i in range(0,0x100): if chr(i) in b64str: a.append(b64str.index(chr(i))) else: a.append(0xFF) def charEncrypt(i): global b64str icv = c_ubyte(ord(b64str[i])).value if (icv > 0x40) and (icv <= 0x5A): return chr(c_ubyte(0x9B-icv).value) elif (icv > 0x60) and (icv <= 0x7A): return chr(c_ubyte(icv-0x40).value) elif (icv > 0x2F) and (icv <= 0x39): return chr(c_ubyte(icv+0x32).value) elif icv==0x2B: return chr(c_ubyte(0x77).value) elif icv==0x2F: return chr(c_ubyte(0x79).value) else: return chr(c_ubyte(icv).value) dicv = [] for i in range(0,b64str.__len__()): v = charEncrypt(i) if v not in dicv: dicv.append(v) else: raise Exception("") ''.join(b64str[dicv.index(c)] if c!='=' else '=' for c in "!NGV%,$h1f4S3%2P(hkQ94==" ) "aMTEeld6q4tHserKh69Jyt=="
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)
最后于 2019-6-26 09:33
被HHHso编辑
,原因:
赞赏
他的文章
- [原创] KCTF 2022 Win. 第六题 约束与伪随机 6745
- [原创] KCTF 2021 Win. 第二题 排排坐 21174
- [原创] KCTF 2021 Win. 第一题 算力与攻击模式 4118
- 鸿蒙通识 26029
- [原创] KCTF 2021 Spr. 第二题 未选择的路 9249
谁下载
无
看原图
赞赏
雪币:
留言: