[Math] C3: shredded xp0int Posted on Nov 23 2018 一个切碎的二维码。把不确定的爆破就好了。 ```python import itertools import os from PIL import Image import concurrent.futures import random import string from pyzbar.pyzbar import decode as qrdecode # 0 9 11 5 6 2 16 25 15 26 3 4 10 20 19 21 7 8 1 22 23 24 18 14 12 13 17 count = 0 chrset = string.ascii_lowercase + string.digits for v6, v15 in itertools.permutations([6, 15]): for v2, v16, v25 in itertools.permutations([2, 16, 25]): for v4, v20, v21 in itertools.permutations([4, 20, 21]): for v10, v19 in itertools.permutations([10, 19]): for v8, v14 in itertools.permutations([8, 14]): for v1, v18 in itertools.permutations([1, 18]): for v22, v23, v24 in itertools.permutations([4, 22, 23, 24], 3): group = [ 0, 9, 11, 5, v6, v2, v16, v25, v15, 26, 3, v4, v10, v20, v19, v21, 7, v8, v1, v22, v23, v24, v18, v14, 12, 13, 17 ] imgnames = [ os.path.join('shredded', str(g) + '.png') for g in group ] imgs = list(map(Image.open, imgnames)) widths, heights = zip(*(i.size for i in imgs)) total_width = sum(widths) max_height = max(heights) new_img = Image.new('RGB', (total_width, max_height)) x_offset = 0 for img in imgs: new_img.paste(img, (x_offset, 0)) x_offset += img.size[0] count += 1 print(count, end='\r') decoded = qrdecode(new_img) if decoded: new_img.save('qrcode_%s.png' % ''.join(random.choice(chrset) for _ in range(7))) for d in decoded: print(d.data.decode()) ``` ![title](https://leanote.com/api/file/getImage?fileId=5bed8796ab64412530007e1d) ![title](https://leanote.com/api/file/getImage?fileId=5bed87d4ab6441233f00846b) ![title](https://leanote.com/api/file/getImage?fileId=5bed87e1ab64412530007e36) 打赏还是打残,这是个问题 赏 Wechat Pay Alipay [Math] C8: captcha [Programming] C1: dot-n-dash
没有帐号? 立即注册