data = 'data_field' data_list = [] for row in csv_reader: if data in row: data_list.append(row[6]) #print(data_list)
# 错误的尝试,将每一部分的data加起来再16进制转字符 # passwd_list = [] # for i in range(0,len(data_list)-8,8): # passwd_list.append(int(data_list[i],16)+int(data_list[i+1],16)+int(data_list[i+2],16)+int(data_list[i+3],16)+int(data_list[i+4],16)+int(data_list[i+5],16)+int(data_list[i+6],16)+int(data_list[i+7],16)) # print(passwd_list)
# 每一个data数据16进制转字符 passwd_list = [] for i in range(0,len(data_list)): passwd_list.append(int(data_list[i],16)) #print(passwd_list)
passwd = '' for x in passwd_list: if32<x<125: passwd += chr(x) print(passwd) #??FSSID:HIGDDEN_HOHTPOT8$$\`PPASS:L0QGIC_ANAR1YSIS_CSAN_FOR_TFUN??????FSSID:HIGDDEN_HOHTPOT8$$\`PPASS:L0QGIC_ANAR1YSIS_CSAN_FOR_TFUN????
n = 49 img = Image.open('attach.png') width, height = img.size
# 0 -> black matrix = [] for i inrange(49): tmp = [] for j inrange(49): h = int(i/49*width+5) w = int(j/49*height+5) tmp += [int(img.getpixel((w, h))[0]/255)] matrix += [tmp]
matrix2 = matrix.copy() for i inrange(49): for j inrange(49): matrix2[i][j] ^= (i+j) % 2
img2 = Image.new('RGB', (490, 490)) for i inrange(49): for j inrange(49): px = (matrix2[i][j]*255,) * 3 for p inrange(10): for q inrange(10): img2.putpixel((10*i+p, 10*j+q), px) img2.save('qr.png')
#2 from PIL import Image s=Image.open('attach.png') size=500 p=Image.new('L',(49,49)) for yy inrange(49): for xx inrange(49): a=0 b=0 if s.getpixel((round(500/49*xx+5),round(500/49*yy+5)))[2]>128 : a=1 if (xx+yy)%2==1: b=1 p.putpixel((xx,yy),(a^b)*255) p.save('out.png')
CRYPTO
一眼看出
p、q都相当于直接给了
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import gmpy2 from Crypto.Util.number import * n = 121027298948349995679677982412648544403333177260975245569073983061538581058440163574922807151182889153495253964764966037308461724272151584478723275142858008261257709817963330011376266261119767294949088397671360123321149414700981035517299807126625758046100840667081332434968770862731073693976604061597575813313 r = getPrime(6) e = 65537 a = 11001240791308496565411773845509754352597481464288272699325231395472137144610774645372812149675141360600469640492874223541765389441131365669731006263464699 c = 42256117129723577554705402387775886393426604555611637074394963219097781224776058009003521565944180241032100329456702310737369381890041336312084091995865560402681403775751012856436207938771611177592600423563671217656908392901713661029126149486651409531213711103407037959788587839729511719756709763927616470267 p = gmpy2.next_prime(a - r) q = gmpy2.next_prime(gmpy2.next_prime(a) + r)
phi_n = (p-1)*(q-1) d = gmpy2.invert(e,phi_n) m = pow(c,d,n) print(long_to_bytes(m))