Under Windows, this function puts stringinto double-quotes, not single, and replaces %(percent sign) with a space, that's why it's impossible to pass a filename with percents initsnamethrough this function.
┌──(kali㉿kali)-[~/桌面] └─$ python3 exp.py [*] Checking for new versions of pwntools To disable this functionality, set the contents of /home/kali/.cache/.pwntools-cache-3.9/update to'never' (old way). Or add the following lines to ~/.pwn.conf or ~/.config/pwn.conf (or /etc/pwn.conf system-wide): [update] interval=never [*] A newer version of pwntools is available on pypi (4.7.0.dev0 --> 4.7.0b0). Update with: $ pip install -U pwntools==4.7.0b0 [+] Opening connection to node4.buuoj.cn on port 25868: Done /home/kali/桌面/exp.py:14: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes p.recvuntil('choose one [r] Red Team,[b] Blue Team:\n') /home/kali/桌面/exp.py:16: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes p.sendline(list[i]) The number of successful predictions 0 /home/kali/桌面/exp.py:33: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes p.sendline('y') /home/kali/桌面/exp.py:28: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes p.recvuntil('choose one [r] Red Team,[b] Blue Team:\n') The number of successful predictions 1 The number of successful predictions 3 The number of successful predictions 4 The number of successful predictions 9 The number of successful predictions 10 The number of successful predictions 12 The number of successful predictions 13 The number of successful predictions 18 The number of successful predictions 20 The number of successful predictions 22 The number of successful predictions 24 The number of successful predictions 26 The number of successful predictions 28 The number of successful predictions 29 The number of successful predictions 31 The number of successful predictions 32 The number of successful predictions 33 The number of successful predictions 35 The number of successful predictions 38 The number of successful predictions 39 The number of successful predictions 40 The number of successful predictions 41 The number of successful predictions 44 The number of successful predictions 45 The number of successful predictions 46 The number of successful predictions 48 The number of successful predictions 50 The number of successful predictions 53 The number of successful predictions 54 The number of successful predictions 55 The number of successful predictions 58 The number of successful predictions 60 The number of successful predictions 61 The number of successful predictions 66 [*] Closed connection to node4.buuoj.cn port 25868 [+] Flag: flag{b'c069b2d7-0fca-4819-a656-44e4451deaaf'} [+] Time: 50.63801121711731s
img=Image.open('Just_a_GIF.gif') os.mkdir('./png') for i inrange(img.n_frames): img.seek(i) new = Image.new("RGB", img.size) new.paste(img) new.save('png\\'+str(i)+'.png')
#处理分离出来的png os.mkdir('./flag')
path1=r"./flag/" path2=r"./png/"
for i inrange(11): img=Image.open(path2+str(i)+'.png') #隐藏的图片尺寸为83*83 img1=Image.new('RGB',(83,83),(255,255,255)) #图片每帧跟同内容的第一帧进行像素比较,不同处用黑色,叠加起来 for h inrange(40): im=Image.open(path2+str((h+1)*11+i)+'.png') width,height=img.size for j inrange(0,width): for k inrange(0,height): tmp = img.getpixel((j,k)) tmp1 = im.getpixel((j,k)) if tmp != tmp1: img1.putpixel((j,k),(0,0,0)) img1.save(path1+str(i+1)+'.png')
pic = Image.open('Nuclear wastewater.png') a, b = pic.size list1 = [] #将三个像素值都存入列表元素 for y inrange(0,b,10): for x inrange(0, a, 10): pixel = pic.getpixel((x, y)) if pixel == (255, 255, 255): continue r, g, b1 = pixel list1.extend([r, g, b1]) #print(list1)
dic1 = {} for i in list1: dic1[i] = dic1.get(i, 0) + 1 result = sorted(dic1.items(), key=lambda x: x[1], reverse=True) for s in result: print(chr(s[0]), end='')