PC端微信会将图片进行异或加密再存储,把原本可以快乐jpg的全部搞成dat格式。某一天我想在PC端想找几个有用的历史图片,发现dat没法打开,研究了一下,搞到了dat转jpg的py代码,如有侵权立删。
就这种简单方法,在百度和知乎还有人忽悠交几十块钱去买他的转化程序,互联网时代割韭菜钱也来得太快了吧?我们不能被忽悠,下面这个python3的代码,复制到你自己的编译器,只需要修改一下导入和导出的文件路径,run一下就全部自动给出来了,免费的。
但是有个条件,这玩意儿对你有用,以后就多访问望江雁的网站。请记住我的域名xianghonghuang.cn,以后还会持续出一些有用的技术贴,即使不炒股、不玩音乐、对文学没兴趣,你来我这也可以掌握真枪实弹的技术。
import os
into_path = r'E:\wendang\WeChat Files\wxid_wa8ztuagwm9q32\FileStorage\Image\2020-07' #请将想导入的dat文件的路径复制到引号里面,修改此处代码
out_path = r"E:\jpgs" #运行代码前记得修改导出路径,此处是导出到E盘的jpgs空文件夹下
def imageDecode(f, fn):
dat_read = open(f, "rb")
xo = Format(f)
out = out_path + fn + ".jpg"
print("导出文件的路径{}".format(out), end='\n\n')
png_write = open(out, "wb")
dat_read.seek(0)
for now in dat_read:
for nowByte in now:
newByte = nowByte ^ xo
png_write.write(bytes([newByte]))
dat_read.close()
png_write.close()
def findFile(f):
fsinfo = os.listdir(f)
print(fsinfo)
for fn in fsinfo:
temp_path = os.path.join(f, fn)
if os.path.isfile(temp_path):
print('导入的文件路径是{}'.format(temp_path))
fn = fn[:-4]
imageDecode(temp_path, fn)
else:
pass
def Format(f):
dat_r = open(f, "rb")
try:
a = [(0x89, 0x50, 0x4e), (0x47, 0x49, 0x46), (0xff, 0xd8, 0xff)]
for now in dat_r:
for xor in a:
i = 0
res = []
nowg = now[:3]
for nowByte in nowg:
res.append(nowByte ^ xor[i])
i += 1
if res[0] == res[1] == res[2]:
return res[0]
except:
pass
finally:
dat_r.close()
if __name__ == '__main__':
findFile(into_path)
https://telegra.ph/%EB%84%A4%EC%9D%B4%EB%B2%84-%EC%95%84%EC%9D%B4%EB%94%94-%ED%8C%90%EB%A7%A4-%ED%95%A9%EB%B2%95%EC%84%B1%EA%B3%BC-%EC%A3%BC%EC%9D%98%EC%82%AC%ED%95%AD-%EC%95%8C%EC%95%84%EB%B3%B4%EA%B8%B0-09-20
https://medium.com/@1kelly76/%EB%B9%84%EC%95%84%EA%B7%B8%EB%9D%BC-%EA%B5%AC%EB%A7%A4-%ED%9B%84-%EB%B6%80%EC%9E%91%EC%9A%A9-%EB%8C%80%EC%B2%98%EB%B2%95-52675767f799
amoxicillin 500 mg price: cost of amoxicillin 875 mg – prescription for amoxicillin
https://medium.com/@1kelly76/%EB%B9%84%EC%95%84%EA%B7%B8%EB%9D%BC-%EA%B5%AC%EB%A7%A4-%EC%8B%9C-%ED%95%84%EC%88%98-%EC%B2%B4%ED%81%AC%EB%A6%AC%EC%8A%A4%ED%8A%B8-7804d3582841
Clom Fast Pharm: can you get clomid price – Clom Fast Pharm
https://zithpharmonline.shop/# buy zithromax
buy generic motilium – buy flexeril pills buy flexeril 15mg generic
Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your weblog? My blog site is in the exact same area of interest as yours and my users would really benefit from a lot of the information you provide here. Please let me know if this okay with you. Cheers!
can i purchase generic clomid without dr prescription: buy clomid without prescription – Clom Fast Pharm