re | [NPUCTF2020]EzObfus-Chapter2

不好玩
参考:https://www.cnblogs.com/lxy8584099/p/13721868.html和https://www.cnblogs.com/harmonica11/p/13073221.html

import subprocess


for i in range(1):
    for j in range(ord('A'),ord('Z')+1):
        for k in range(ord('A'),ord('Z')+1):
            flag ="npuctf{WDNMD_"+chr(j)+chr(k)+"_OBFU!}"
            print(flag.encode())
            p = subprocess.Popen([r"attachment.exe"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            p.stdin.write(flag.encode())
            p.stdin.close()
            out=p.stdout.read()
            p.stdout.close()
            if b"E" not in out:
                print(flag)
                exit()
原文地址:https://www.cnblogs.com/Mz1-rc/p/14471050.html