This commit is contained in:
ppwwyyxx
2015-02-02 13:32:11 +08:00
parent bb2a924e1f
commit 929bd0da89
10 changed files with 29 additions and 41 deletions
+7 -6
View File
@@ -1,6 +1,6 @@
#!/bin/bash -e
# File: android-interact.sh
# Date: Sun Jan 11 23:05:58 2015 +0800
# Date: Sun Feb 01 17:26:48 2015 +0800
# Author: Yuxin Wu <[email protected]>
source compatibility.sh
@@ -13,8 +13,8 @@ cd "$PROG_DIR"
RES_DIR="/mnt/sdcard/tencent/MicroMsg"
MM_DIR="/data/data/com.tencent.mm"
echo "Starting rooted adb server..."
adb root
#echo "Starting rooted adb server..."
#adb root
if [[ $1 == "uin" ]]; then
adb pull $MM_DIR/shared_prefs/system_config_prefs.xml 2>/dev/null
@@ -26,7 +26,7 @@ if [[ $1 == "uin" ]]; then
rm system_config_prefs.xml
echo "Got wechat uin: $uin"
elif [[ $1 == "imei" ]]; then
imei=$(adb shell dumpsys iphonesubinfo | grep 'Device ID' | $GREP -o '[0-9]+')
imei=$(adb shell dumpsys iphonesubinfo | grep 'Device ID' | $GREP -o '[0-9]\+')
[[ -n $imei ]] || {
echo "Failed to get imei. You can try other methods, or report a bug."
exit 1
@@ -34,6 +34,7 @@ elif [[ $1 == "imei" ]]; then
echo "Got imei: $imei"
elif [[ $1 == "db" || $1 == "res" ]]; then
echo "Looking for user dir name..."
sleep 1 # sometimes adb complains: device not found
userList=$(adb ls $RES_DIR | cut -f 4 -d ' ' \
| awk '{if (length() == 32) print}')
numUser=$(echo $userList | wc -l)
@@ -71,9 +72,9 @@ elif [[ $1 == "db" || $1 == "res" ]]; then
fi
elif [[ $1 == "db_decrypt" ]]; then
echo "Getting uin..."
$0 uin | tail -n1 | grep -o '[0-9]*' > /tmp/uin
$0 uin | tail -n1 | grep -o '[0-9]*' | tee /tmp/uin
echo "Getting imei..."
$0 imei | tail -n1 | grep -o '[0-9]*' > /tmp/imei
$0 imei | tail -n1 | grep -o '[0-9]*' | tee /tmp/imei
echo "Getting db..."
$0 db
echo "Decrypting db..."
+3 -4
View File
@@ -1,20 +1,19 @@
#!/bin/bash -e
# $File: compatibility.sh
# $Date: Mon Jan 19 14:27:25 2015 +0800
# $Date: Sun Feb 01 17:22:34 2015 +0800
# Author: Vury Leo <i[at]vuryleo[dot]com>
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
if [ `uname` = 'Darwin' ]
then
if [ `uname` = 'Darwin' ]; then
REALPATH='realpath'
GREP='grep -E'
MD5SUM='md5'
else
REALPATH='readlink -f'
GREP='grep'
GREP=grep
MD5SUM='md5sum'
fi
+4 -4
View File
@@ -1,6 +1,6 @@
#!/bin/bash -e
# File: decrypt_db.sh
# Date: Sun Jan 11 22:30:50 2015 +0800
# Date: Sun Feb 01 17:30:29 2015 +0800
# Author: Yuxin Wu <[email protected]>
source compatibility.sh
@@ -12,7 +12,7 @@ output=decrypted.db
if [[ -z "$1" || -z "$2" || -z "$3" ]]; then
echo "Usage: $0 <path to EnMicroMsg.db> <imei> <uin>"
exit
exit 1
fi
if [[ -f $output ]]; then
@@ -25,8 +25,8 @@ fi
KEY=$(echo -n "$imei$uin" | $MD5SUM | cut -b 1-7)
echo "KEY: $KEY"
uname | grep Darwin > /dev/null || os=linux && os=darwin
uname -m | grep x86_64 > /dev/null || version=32bit && version=64bit
uname | grep Darwin > /dev/null && os=darwin || os=linux
uname -m | grep x86_64 > /dev/null && version=64bit || version=32bit
echo "Use $version sqlcipher of $os."
echo "Dump decrypted database... "
+6 -6
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: render.py
# Date: Sun Jan 11 23:46:06 2015 +0800
# Date: Sun Feb 01 17:46:57 2015 +0800
# Author: Yuxin Wu <[email protected]>
import os
@@ -66,15 +66,15 @@ class HTMLRender(object):
def all_css(self):
# call after processing all messages,
# because smiley css need to be included only when necessary
if hasattr(self, 'final_css'):
return self.final_css
self.css_string.append(self.smiley.gen_used_smiley_css())
def process(css):
css = css_compress(css)
return u'<style type="text/css">{}</style>'.format(css)
if hasattr(self, 'final_css'):
return self.final_css + process(self.smiley.gen_used_smiley_css())
self.final_css = u"\n".join(map(process, self.css_string))
return self.final_css
return self.final_css + process(self.smiley.gen_used_smiley_css())
@property
def all_js(self):
+2 -3
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: smiley.py
# Date: Sun Jan 11 23:40:50 2015 +0800
# Date: Sun Feb 01 17:47:07 2015 +0800
# Author: Yuxin Wu <[email protected]>
import os
@@ -66,6 +66,7 @@ class SmileyProvider(object):
def gen_replace_elem(self, smiley_id):
self.used_smiley_id.add(str(smiley_id))
return '<span class="smiley smiley{}"></span>'.format(smiley_id)
def _replace_unicode(self, msg):
@@ -74,7 +75,6 @@ class SmileyProvider(object):
return msg
for k, v in self.unicode_smiley.iteritems():
if k in msg:
self.used_smiley_id.add(str(v))
msg = msg.replace(k, self.gen_replace_elem(v))
return msg
@@ -84,7 +84,6 @@ class SmileyProvider(object):
return msg
for k, v in self.tencent_smiley.iteritems():
if k in msg:
self.used_smiley_id.add(str(v))
msg = msg.replace(k, self.gen_replace_elem(v))
return msg
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="chatItem {sender_label}">
<div class="chatItemContent">
<img class="avatar">
<span class="avatar"></span>
<div class="cloud cloudImg">
<div class="cloudPannel" title="{time}">
<div class="cloudBody">
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="chatItem {sender_label}">
<div class="chatItemContent">
<img class="avatar">
<span class="avatar"></span>
<div class="cloud cloudImg">
<div class="cloudPannel" title="{time}">
<div class="cloudBody">
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="chatItem {sender_label}">
<div class="chatItemContent">
<img class="avatar">
<span class="avatar"></span>
<div class="cloud cloudText">
<div class="cloudPannel" title="{time}">
<div class="cloudBody">
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="chatItem {sender_label}">
<div class="chatItemContent">
<img class="avatar">
<span class="avatar"></span>
<div class="cloud cloudVoice" onclick="playVoice(event)" style="width:80px">
<div class="cloudPannel" title="{time}">
<div class="sendStatus">
+3 -14
View File
@@ -3269,7 +3269,7 @@ a.iconOperater:active {
width: 36px;
height: 36px;
}
.createNewChat .friendDetail .avatar img {
.createNewChat .friendDetail .avatar span {
display: block;
width: 33px;
height: 33px;
@@ -3336,7 +3336,7 @@ a.iconOperater:active {
-o-text-overflow: ellipsis;
overflow: hidden;
}
.createNewChat a.activeColumn .avatar img {
.createNewChat a.activeColumn .avatar span {
border: 1px solid #FFF;
}
.createNewChat .selectedPanel {
@@ -3717,7 +3717,7 @@ a.iconOperater:active {
float: left;
margin: 0px 13px 0px 0px;
}
.profileMesg .avatar_wrap img.avatar {
.profileMesg .avatar_wrap span.avatar {
height: 60px;
width: 60px;
}
@@ -3821,7 +3821,6 @@ a.iconOperater:active {
margin-right: 14px;
border: 2px solid #FFF;
box-shadow: 0px 1px 0px #B9B9B9;
background: url(../images/avatar_default1844c2.png) no-repeat center;
}
.window .content .personalInfo {
margin-top: -19px;
@@ -4296,7 +4295,6 @@ a.btnGray input {
height: 69px;
border: 2px solid #FFF;
box-shadow: 0px 1px 0px #B9B9B9;
background: url(../images/avatar_default1844c2.png) no-repeat center;
}
/*edit avartor end*/
/*friend card*/
@@ -4351,7 +4349,6 @@ a.btnGray input {
width: 79px;
height: 79px;
margin-right: 10px;
background: url(../images/avatar_default1844c2.png) no-repeat center;
}
.callingCard .cloudBody .footer {
color: #828282;
@@ -4527,7 +4524,6 @@ a.btnBlue:active .btnBluePanel {
height: 250px;
border: 2px solid #FFF;
box-shadow: 0px 1px 0px #A5A5A5;
background: url(../images/edit_avatar1844c2.png) no-repeat center;
}
.preAvartor .editOper {
margin-top: 20px;
@@ -5068,13 +5064,6 @@ a.btnBlue:active .btnBluePanel {
.popupPhotoAlbumPanel .friendCirRPanel .comments ul li a:hover {
text-decoration: none;
}
.popupPhotoAlbumPanel .friendCirRPanel .comments ul img.avatar {
height: 40px;
width: 40px;
border-radius: 0px;
border: none;
box-shadow: none;
}
.popupPhotoAlbumPanel .friendCirRPanel .comments .commentPanel {
margin-left: 52px;
}