-
-
看雪CTF2019Q2-第6题 消失的岛屿
-
发表于: 2019-6-18 23:58 2965
-
base64
1 2 3 4 5 6 7 8 | .text:004016A4 call _base64_encode .text:004016A9 mov dword ptr [esp+48h], offset aNgvH1f4s32pHkq ; "!NGV%,$h1f4S3%2P(hkQ94==" .text:004016C0 call _strcmp .rdata:00404064 aTuvwxtulmnopqr db 'tuvwxTUlmnopqrs7YZabcdefghij8yz0123456VWXkABCDEFGHIJKLMNOPQRS9+/',0 字符映射 .text:004013C0 ; char __cdecl charEncrypt |
1 2 3 4 5 6 7 8 | .text:004016A4 call _base64_encode .text:004016A9 mov dword ptr [esp+48h], offset aNgvH1f4s32pHkq ; "!NGV%,$h1f4S3%2P(hkQ94==" .text:004016C0 call _strcmp .rdata:00404064 aTuvwxtulmnopqr db 'tuvwxTUlmnopqrs7YZabcdefghij8yz0123456VWXkABCDEFGHIJKLMNOPQRS9+/',0 字符映射 .text:004013C0 ; char __cdecl charEncrypt |
脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | import base64 import binascii import string def test(): old_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' new_chars = 'tuvwxTUlmnopqrs7YZabcdefghij8yz0123456VWXkABCDEFGHIJKLMNOPQRS9+/' chars_map = [''] * 256 for i in range ( len (new_chars)): v = ord (new_chars[i]) if 0x41 < = v < = 0x5A : v = 0x9B - v elif 0x61 < = v < = 0x7A : v = v - 0x40 elif 0x30 < = v < = 0x39 : v = v + 0x32 elif v = = 0x2B : v = 0x77 elif v = = 0x2F : v = 0x79 chars_map[v] = new_chars[i] s = '!NGV%,$h1f4S3%2P(hkQ94==' b64 = '' for i in range ( len (s)): b64 + = chars_map[ ord (s[i])] b64 + = '==' print binascii.a2b_base64(b64.translate(string.maketrans(new_chars, old_chars))) return test() |
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
- KCTF2022春季赛 第三题 石像病毒 9112
- KCTF2022春季赛 第二题 末日邀请 16450
- KCTF2021秋季赛 第二题 迷失丛林 19187
- KCTF2020秋季赛 第十题 终焉之战 9199
- KCTF2020秋季赛 第九题 命悬一线 6709
赞赏
雪币:
留言: