ppwwyyxx / wechat-dump

Cracking encrypted wechat message history from android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows 10 dump-html successfully !!!

AncientTree opened this issue · comments

One using Windows 10 may met gbk Encoding error, to fix that any py script that open(file, 'w') should be replaced by open(file, 'w', encoding='utf-8').

Git Bash for Windows 10 with gcc 13.1.0:

XXX@XXX MINGW64 .../third-party$ ./compile_silk.sh
g++  -L./ test/Decoder.o -lSKP_SILK_SDK -o decoder
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find C:/Users/▒▒▒▒ΰ/gcc/bin/mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/c directory
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find C:/Users/▒▒▒▒ΰ/gcc/bin/mingw32/13.1.0/crtbegin.o: No such file or directory
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lstdc++: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmingw32: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lgcc: No such file or
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmoldname: No such fil
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmingwex: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmsvcrt: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lkernel32: No such fil
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -ladvapi32: No such fil
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lshell32: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -luser32: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lkernel32: No such fil
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmingw32: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lgcc: No such file or
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmoldname: No such fil
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmingwex: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lmsvcrt: No such file
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find -lkernel32: No such fil
C:/Users/▒▒▒▒ΰ/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.1.64-mingw32/bin/ld.exe: cannot find C:/Users/▒▒▒▒ΰ/gcc/bin/mingw32/13.1.0/crtend.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:124: decoder] Error 1

It look like some file path wrong, but I can't find out method to fix it. Before fix that I can only get htmls without available sound. Any ideas? Thanks.

Later I try to do it on Ubunto 23.04, that's where I failed:
When I compile and install pysqlcppher3:

xxx@xxx-VMware-Virtual-Platform:~/程序/pysqlcipher3$ python3 ./setup.py build_amalgamation
running build_amalgamation
Builds a C extension using a sqlcipher amalgamation
building 'pysqlcipher3._sqlite3' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/amalgamation
creating build/temp.linux-x86_64-cpython-311/src
creating build/temp.linux-x86_64-cpython-311/src/python3
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DMODULE_NAME=\"pysqlcipher3.dbapi2\" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_HAS_CODEC=1 -DSQLITE_TEMP_STORE=2 -Iamalgamation -I/usr/include/python3.11 -c amalgamation/sqlite3.c -o build/temp.linux-x86_64-cpython-311/amalgamation/sqlite3.o
amalgamation/sqlite3.c:107820:10: fatal error: openssl/crypto.h: 没有那个文件或目录
107820 | #include <openssl/crypto.h>
       |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

I compiled it on Ubuntu 23.04, decode is a bin file look like this :

0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0600 0000 0400 0000 4000 0000 0000 0000
4000 0000 0000 0000 4000 0000 0000 0000
......

Usually binary make on Linux can't work on Windows, same here:

python ./dump-html.py "XXX"
......


[22:49:10 19@audio.py:wechat.audio] Error when parsing audio file resource\voice2\31\89\msg_422258072023473c54fe893102.amr:
[22:49:10 31@procutil.py:wechat.common.procutil] Command 'E:\Projects\Python\΢▒▒▒▒▒▒▒¼\wechat-dump-master\wechat\../third-party/silk/decoder resource\voice2\30\c3\msg_122300072023473c54f4670100.amr C:\Windows\Temp\wechatdump_audio0bi7bhlg\msg_122300072023473c54f4670100.raw' failed, return code=1
[22:49:10 32@procutil.py:wechat.common.procutil] 'E:\Projects\Python\΢▒▒▒▒▒▒▒¼\wechat-dump-master\wechat\../third-party/silk/decoder' is not recognized as an internal or external command,
operable program or batch file.

[22:49:10 19@audio.py:wechat.audio] Error when parsing audio file resource\voice2\30\c3\msg_122300072023473c54f4670100.amr:
[22:49:10 31@procutil.py:wechat.common.procutil] Command 'E:\Projects\Python\΢▒▒▒▒▒▒▒¼\wechat-dump-master\wechat\../third-party/silk/decoder resource\voice2\69\d7\msg_402300072023473c54fb3ea105.amr C:\Windows\Temp\wechatdump_audiowuyef640\msg_402300072023473c54fb3ea105.raw' failed, return code=1
[22:49:10 32@procutil.py:wechat.common.procutil] 'E:\Projects\Python\΢▒▒▒▒▒▒▒¼\wechat-dump-master\wechat\../third-party/silk/decoder' is not recognized as an internal or external command,
operable program or batch file.

[22:49:10 19@audio.py:wechat.audio] Error when parsing audio file resource\voice2\69\d7\msg_402300072023473c54fb3ea105.amr:
[22:49:10 31@procutil.py:wechat.common.procutil] Command 'E:\Projects\Python\΢▒▒▒▒▒▒▒¼\wechat-dump-master\wechat\../third-party/silk/decoder resource\voice2\50\d6\msg_190912072123473c54fb1ba105.amr C:\Windows\Temp\wechatdump_audiob8b5ub01\msg_190912072123473c54fb1ba105.raw' failed, return code=1
[22:49:10 32@procutil.py:wechat.common.procutil] 'E:\Projects\Python\΢▒▒▒▒▒▒▒¼\wechat-dump-master\wechat\../third-party/silk/decoder' is not recognized as an internal or external command,
operable program or batch file.

Then how could I fix this? Windows 10 can't compile silk... can't run decode file build on Linux.

Sad...

Download decoder file in https://github.com/kn007/silk-v3-decoder/blob/master/windows/silk_v3_decoder.exe to replace decoder from ubuntu 23.03.

wechat/audio.py:
replace

SILK_DECODER = os.path.join(os.path.dirname(__file__),
                            '../third-party/silk/decoder')

by

SILK_DECODER = os.path.join(os.path.dirname(__file__),
                            '../third-party/silk/decoder.exe')

Puthttps://www.dll-files.com/libmp3lame.dll.html libmp3lame.dll inC:\Program Files (x86)\sox-14-4-2(your sox install path)

[23:21:10 21@audio.py:wechat.audio] Error when parsing audio file resource\voice2\94\3e\msg_00003007262367df55f63b7101.amr:
[23:21:10 31@procutil.py:wechat.common.procutil] Command 'sox -r 24000 -e signed -b 16 -c 1 C:\Windows\Temp\wechatdump_audiosfiz8ujq\msg_000030072623473c54f63b5106.raw C:\Windows\Temp\wechatdump_audiosfiz8ujq\msg_000030072623473c54f63b5106.mp3' failed, return code=2
[23:21:10 32@procutil.py:wechat.common.procutil] sox FAIL util: Unable to load LAME encoder library (libmp3lame).
sox FAIL formats: can't open output file `C:\Windows\Temp\wechatdump_audiosfiz8ujq\msg_000030072623473c54f63b5106.mp3':

[23:21:10 21@audio.py:wechat.audio] Error when parsing audio file resource\voice2\e8\05\msg_000030072623473c54f63b5106.amr:
[23:21:10 31@procutil.py:wechat.common.procutil] Command 'sox -r 24000 -e signed -b 16 -c 1 C:\Windows\Temp\wechatdump_audioz98kngmr\msg_00003007262367df55f63b2103.raw C:\Windows\Temp\wechatdump_audioz98kngmr\msg_00003007262367df55f63b2103.mp3' failed, return code=2
[23:21:10 32@procutil.py:wechat.common.procutil] sox FAIL util: Unable to load LAME encoder library (libmp3lame).
sox FAIL formats: can't open output file `C:\Windows\Temp\wechatdump_audioz98kngmr\msg_00003007262367df55f63b2103.mp3':

It look like I near to end point !?