32bit support

This commit is contained in:
ppwwyyxx
2014-12-26 00:17:23 +08:00
parent 0bb1104d98
commit 2b6f4c6d28
7 changed files with 31 additions and 22 deletions
+1 -2
View File
@@ -25,7 +25,7 @@
+ `adb shell dumpsys iphonesubinfo | grep 'Device ID' | grep -o '[0-9]*'`
#### Run:
+ Decrypt database, will produce decrypted_db.db (for now, Linux x64 only):
+ Decrypt database, will produce decrypted_db.db (for now, Linux only):
```
./decrypt_db.sh <path to EnMicroMsg.db> <imei> <uin>
```
@@ -41,6 +41,5 @@
### TODO
+ Group message
+ Change max size for custom emoji
+ Fix smiley spacing in html
+ Show name of emoji in text output
+ Search by uid/username..
+12 -13
View File
@@ -1,9 +1,9 @@
#!/bin/bash -e
# File: android-interact.sh
# Date: Thu Dec 25 00:25:07 2014 +0800
# Date: Thu Dec 25 23:26:56 2014 +0800
# Author: Yuxin Wu <[email protected]>
# Please check that your path is the same, since this might be differnt on devices
# Please check that your path is the same, since this might be different among devices
RES_DIR="/mnt/sdcard/tencent/MicroMsg"
MM_DIR="/data/data/com.tencent.mm"
@@ -43,17 +43,16 @@ elif [[ $1 == "db" || $1 == "res" ]]; then
echo "Pulling resources... this might take a long time..."
mkdir resource
cd resource
adb pull $RES_DIR/$chooseUser/image2
adb pull $RES_DIR/$chooseUser/voice2
adb pull $RES_DIR/$chooseUser/emoji
adb pull $RES_DIR/$chooseUser/avatar
[[ -d image2 && -d voice2 && -d emoji && -d avatar ]] && {
echo "Resource pulled."
echo "Total size: $(du -sh $chooseUser | cut -f1)"
} || {
echo "Failed to download resource directory: $RES_DIR/$chooseUser"
exit 1
}
for d in image2 voice2 emoji avatar; do
adb pull $RES_DIR/$chooseUser/$d
[[ -d $d ]] || {
echo "Failed to download resource directory: $RES_DIR/$chooseUser/$d"
exit 1
}
done
cd ..
echo "Resource pulled at ./resource"
echo "Total size: $(du -sh resource | cut -f1)"
else
echo "Pulling database file..."
adb pull $MM_DIR/MicroMsg/$chooseUser/EnMicroMsg.db
+18 -7
View File
@@ -1,11 +1,12 @@
#!/bin/bash -e
# File: decrypt_db.sh
# Date: Thu Dec 25 00:30:10 2014 +0800
# Date: Fri Dec 26 00:16:12 2014 +0800
# Author: Yuxin Wu <[email protected]>
MMSGDB=$1
MSGDB=$1
imei=$2
uin=$3
output=decrypted.db
if [[ -z "$1" || -z "$2" || -z "$3" ]]; then
echo "Usage: $0 <path to EnMicroMsg.db> <imei> <uin>"
@@ -15,11 +16,21 @@ fi
KEY=$(echo -n "$imei$uin" | md5sum | cut -b 1-7)
echo "KEY: $KEY"
export LD_LIBRARY_PATH=./lib
./lib/sqlcipher $MMSGDB << EOF
uname -m | grep x86_64 > /dev/null || version=32bit && version=64bit
echo "Use $version sqlcipher."
echo "Dump decrypted database... "
echo "Don't worry about libcrypt.so version warning."
SQLCIPHER=./sqlcipher/$version
export LD_LIBRARY_PATH=$SQLCIPHER
$SQLCIPHER/sqlcipher $MSGDB << EOF
PRAGMA key='$KEY';
PRAGMA cipher_use_hmac = off;
ATTACH DATABASE "decrypted_database.db" AS decrypted_db KEY "";
SELECT sqlcipher_export("decrypted_db");
DETACH DATABASE decrypted_db;
ATTACH DATABASE "$output" AS db KEY "";
SELECT sqlcipher_export("db");
DETACH DATABASE db;
EOF
echo "Database dumped to $output"
Binary file not shown.
BIN
View File
Binary file not shown.