update readme
@@ -11,12 +11,19 @@
|
||||
|
||||
#### Get Necessary Data:
|
||||
+ Get /data/data/com.tencent.mm/MicroMsg/long-long-name/EnMicroMsg.db from root filesystem, possible ways are:
|
||||
+ `adb root`, `adb pull /xxx/xxx.db`
|
||||
+ `adb root`, `adb pull /data/data/com.tencent.mm/MicroMsg/long-long-name/EnMicroMsg.db`
|
||||
+ Use your rooted file system manager app
|
||||
+ Get WeChat user resource directory from user filesystem, for example: sdcard:/tencent/MicroMsg/long-long-name. (could be different)
|
||||
+ Get WeChat user resource directory from user filesystem, possibly at: /mnt/sdcard/tencent/MicroMsg/long-long-name:
|
||||
+ adb pull /mnt/sdcard/tencent/MicroMsg/long-long-name
|
||||
+ Get Wechat uin, possible ways are:
|
||||
+ Login to [web-based wechat](https://wx.qq.com); get wxuin=1234567 from `document.cookie`
|
||||
+ Get ``default_uin`` from /data/data/com.tencent.mm/shared_prefs/system_config_prefs.xml.
|
||||
+
|
||||
```
|
||||
adb pull /data/data/com.tencent.mm/shared_prefs/system_config_prefs.xml
|
||||
grep 'default_uin' system_config_prefs.xml | grep -o 'value="[0-9]*' | cut -c 8-
|
||||
```
|
||||
|
||||
|
||||
+ Get phone IMEI, possible ways are:
|
||||
+ Call `*#06#` on your phone
|
||||
+ Find IMEI in system settings
|
||||
@@ -37,9 +44,8 @@
|
||||
```
|
||||
|
||||
### TODO
|
||||
+ Parse uncommon message types
|
||||
+ Separate messages into multiple html files
|
||||
+ Group message
|
||||
+ Change max size for custom emoji
|
||||
+ Fix smiley spacing in html
|
||||
+ Show name of emoji in text output
|
||||
+ Search by uid/username..
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: msg.py
|
||||
# Date: Mon Dec 22 23:04:02 2014 +0800
|
||||
# Date: Wed Dec 24 22:00:42 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
from datetime import datetime
|
||||
@@ -51,7 +51,7 @@ class WeChatMsg(object):
|
||||
label = poiname
|
||||
except:
|
||||
pass
|
||||
return label + " ({},{})".format(loc['x'], loc['y'])
|
||||
return "LOCATION:" + label + " ({},{})".format(loc['x'], loc['y'])
|
||||
elif self.type == TYPE_VOIP:
|
||||
return "REQUEST VIDEO CHAT"
|
||||
elif self.type == TYPE_LINK:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: msgslice.py
|
||||
# Date: Mon Dec 22 23:56:55 2014 +0800
|
||||
# Date: Wed Dec 24 22:06:41 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
class MessageSlicerByTime(object):
|
||||
@@ -52,7 +52,7 @@ class MessageSlicerBySize(object):
|
||||
now = [m]
|
||||
continue
|
||||
now.append(m)
|
||||
if len(now) > self.size / 2:
|
||||
if len(now) > self.size / 2 or len(ret) == 0:
|
||||
ret.append(now)
|
||||
else:
|
||||
ret[-1].extend(now)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: smiley.py
|
||||
# Date: Mon Dec 22 16:50:15 2014 +0800
|
||||
# Date: Wed Dec 24 22:16:33 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
import os
|
||||
@@ -13,7 +13,8 @@ UNICODE_SMILEY_FILE = os.path.join(LIB_PATH, 'static', 'unicode-smiley.json')
|
||||
TENCENT_SMILEY_FILE = os.path.join(LIB_PATH, 'static', 'tencent-smiley.json')
|
||||
TENCENT_EXTRASMILEY_FILE = os.path.join(LIB_PATH,
|
||||
'static', 'tencent-smiley-extra.json')
|
||||
UNICODE_SMILEY_RE = re.compile(u'[\U00010000-\U0010ffff]|[\u2600-\u2764]|\u2122|\u00a9|\u00ae')
|
||||
UNICODE_SMILEY_RE = re.compile(
|
||||
u'[\U00010000-\U0010ffff]|[\u2600-\u2764]|\u2122|\u00a9|\u00ae|[\ue000-\ue5ff]')
|
||||
|
||||
class SmileyProvider(object):
|
||||
def __init__(self, html_replace=True):
|
||||
@@ -36,9 +37,13 @@ class SmileyProvider(object):
|
||||
# 1f35c -> "\ue340"
|
||||
#self.unicode_smiley_code = gUnicodeCodeMap
|
||||
|
||||
# u'\U0001f35c' -> "e340"
|
||||
# u'\U0001f35c' -> "e340" # for iphone
|
||||
# u'\ue415' -> 'e415' # for android
|
||||
unicode_smiley_dict = json.load(open(UNICODE_SMILEY_FILE))
|
||||
self.unicode_smiley = {unichr(int(k, 16)): hex(ord(v))[2:] for k, v in
|
||||
json.load(open(UNICODE_SMILEY_FILE)).iteritems()}
|
||||
unicode_smiley_dict.iteritems()}
|
||||
self.unicode_smiley.update({v: hex(ord(v))[2:] for _, v in
|
||||
unicode_smiley_dict.iteritems()})
|
||||
self.used_smiley_id = set()
|
||||
|
||||
|
||||
@@ -75,6 +80,6 @@ class SmileyProvider(object):
|
||||
|
||||
if __name__ == '__main__':
|
||||
smiley = SmileyProvider()
|
||||
msg = u"[挥手]哈哈呵呵hihi\U0001f684\u2728\u0001 /::<"
|
||||
msg = u"[挥手]哈哈呵呵hihi\U0001f684\u2728\u0001 /::<\ue415"
|
||||
msg = smiley.replace_smileycode(msg)
|
||||
print msg
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: gen_smiley_css.py
|
||||
# Date: Mon Dec 22 21:44:00 2014 +0800
|
||||
# Date: Wed Dec 24 22:20:08 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
import os
|
||||
@@ -13,7 +13,7 @@ OUTPUT_FILE = os.path.join(DIR_PATH, 'smiley.css')
|
||||
|
||||
HEAD = """.smiley {
|
||||
padding: 1px;
|
||||
background-position: 0px -2px;
|
||||
background-position: -1px -1px;
|
||||
background-repeat: no-repeat;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
# File: down2.sh
|
||||
# Date: Sun Dec 14 01:18:45 2014 +0800
|
||||
# Date: Wed Dec 24 22:31:37 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
# This script is used to download unicode emoji
|
||||
|
||||
emojis=$(cat ../../emojiname.py | grep -o '\\ue[^"]*' | cut -c 3-)
|
||||
emojis=$(cat ../unicode-smiley.json | grep -o '\\ue[^"]*' | cut -c 3-)
|
||||
for i in $emojis; do
|
||||
size=$(wc -c "$i.png" 2>/dev/null | cut -f 1 -d ' ')
|
||||
if [[ -n "$size" && $size -ge 0 ]]; then
|
||||
echo "File $i Already There!"
|
||||
else
|
||||
wget http://www.easyapns.com/emoji/$i.png
|
||||
wget http://www.easyapns.com/emoji/$i.png &
|
||||
fi
|
||||
done
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 572 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1016 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 875 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1009 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 961 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 939 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 686 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 944 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 917 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 833 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 952 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 882 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 944 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 915 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 742 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 831 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 729 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 743 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 939 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 909 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 769 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 848 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 749 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 760 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 857 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 921 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 943 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 949 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 664 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 687 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 944 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 980 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 927 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 926 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 910 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 841 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 972 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 528 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 915 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 659 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 661 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 663 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 653 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 816 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 818 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.2 KiB |