微信本地聊天图片缓存用的是异或0xDC的方法。(微信电脑版3.0.0.47)
C代码解密:
//#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(int argc, char * argv[]) { if (argc != 3) { printf("Usage: %s <input filename> <output filename>
", argv[0]); return 0; } FILE* fin; fin = fopen(argv[1], "rb"); if (fin == NULL) { printf("Can not open %s
", argv[1]); return -1; } FILE* fout; fout = fopen(argv[2], "wb"); if (fout == NULL) { printf("Can not open %s
", argv[2]); fclose(fin); return -1; } while (!feof(fin)) { unsigned char b; b = fgetc(fin); fputc(b ^ 0xDC, fout); } fclose(fin); fclose(fout); return 0; }