for i inrange(0xffffffff):#当前爆破的位置上的字符 real_flag_arr_s=str(hex(i).strip('0x'))#输入到程序中的字符串,hex自带0x所以要去除掉0x #上面都是一些初始化 p = subprocess.Popen(["./flowing"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.stdin.write(real_flag_arr_s.encode()) p.stdin.close()#停止输入 out = p.stdout.read() ifb"PCTF"in out orb"pctf"in out: print(out) exit()