0

I downloaded デジタル大辞泉 trial from Microsoft Store to try it out. The interface was not very good in my opinion, so I thought that maybe it is possible to extract the dictionary and convert it to another dictionary format.

I opened Assets\db\resource_A with SQLite Browser, and found some text matching the user interface, but there was a problem:

daijisen

Only the Latin alphabet are the same between these two. Here's some raw data I collected:

db,real
IT㘠敹嶋,IT・数学
冠嶋,区学
凹嶋,地学
煄璲,生物
璲灏㘠再嶋,物理・化学
煄楠,生活
煠嘆,画像
捹謆运劻誌,新規追加語
噷貌,品詞
㐥㐺㈆㐍,ことわざ
囤嶅猄誌,四字熟語
㈢㈀㈢㘮誌,カタカナ語
ABC畓垁,ABC略号
嶣誌,季語
難誒誌,難読語
煺湕㘠䣦掓,用法・下接
捇嶋,文学
杓懚垩,日本史
䣍畞垩,世界史

I can see that for example 学 corresponds to 嶋 in the database, but when I checked if there was a set code point shift or something, the output was pretty messy. Here's some data on that (db, correct, db hex, correct hex, db-correct):

I   T   㘠   敹   嶋
I   T   ・   数   学
0x49    0x54    0x3620  0x6579  0x5d8b
0x49    0x54    0x30fb  0x6570  0x5b66
0x0 0x0 0x525   0x9 0x225

冠   嶋
区   学
0x51a0  0x5d8b
0x533a  0x5b66
-0x19a  0x225

凹   嶋
地   学
0x51f9  0x5d8b
0x5730  0x5b66
-0x537  0x225

煄   璲
生   物
0x7144  0x74b2
0x751f  0x7269
-0x3db  0x249

璲   灏   㘠   再   嶋
物   理   ・   化   学
0x74b2  0x704f  0x3620  0x518d  0x5d8b
0x7269  0x7406  0x30fb  0x5316  0x5b66
0x249   -0x3b7  0x525   -0x189  0x225

煄   楠
生   活
0x7144  0x6960
0x751f  0x6d3b
-0x3db  -0x3db

煠   嘆
画   像
0x7160  0x5606
0x753b  0x50cf
-0x3db  0x537

捹   謆   运   劻   誌
新   規   追   加   語
0x6379  0x8b06  0x8fd0  0x52bb  0x8a8c
0x65b0  0x898f  0x8ffd  0x52a0  0x8a9e
-0x237  0x177   -0x2d   0x1b    -0x12

噷   貌
品   詞
0x5677  0x8c8c
0x54c1  0x8a5e
0x1b6   0x22e

㐥   㐺   ㈆   㐍
こ   と   わ   ざ
0x3425  0x343a  0x3206  0x340d
0x3053  0x3068  0x308f  0x3056
0x3d2   0x3d2   0x177   0x3b7

囤   嶅   猄   誌
四   字   熟   語
0x56e4  0x5d85  0x7304  0x8a8c
0x56db  0x5b57  0x719f  0x8a9e
0x9 0x22e   0x165   -0x12

㈢   ㈀   ㈢   㘮   誌
カ   タ   カ   ナ   語
0x3222  0x3200  0x3222  0x362e  0x8a8c
0x30ab  0x30bf  0x30ab  0x30ca  0x8a9e
0x177   0x141   0x177   0x564   -0x12

A   B   C   畓   垁
A   B   C   略   号
0x41    0x42    0x43    0x7553  0x5781
0x41    0x42    0x43    0x7565  0x53f7
0x0 0x0 0x0 -0x12   0x38a

嶣   誌
季   語
0x5da3  0x8a8c
0x5b63  0x8a9e
0x240   -0x12

難   誒   誌
難   読   語
0x96e3  0x8a92  0x8a8c
0x96e3  0x8aad  0x8a9e
0x0 -0x1b   -0x12

煺   湕   㘠   䣦   掓
用   法   ・   下   接
0x717a  0x6e55  0x3620  0x48e6  0x6393
0x7528  0x6cd5  0x30fb  0x4e0b  0x63a5
-0x3ae  0x180   0x525   -0x525  -0x12

捇   嶋
文   学
0x6347  0x5d8b
0x6587  0x5b66
-0x240  0x225

杓   懚   垩
日   本   史
0x6753  0x61da  0x57a9
0x65e5  0x672c  0x53f2
0x16e   -0x552  0x3b7

䣍   畞   垩
世   界   史
0x48cd  0x755e  0x57a9
0x4e16  0x754c  0x53f2
-0x549  0x12    0x3b7

If you want to see a pattern, there are some characters that are from the same distance of their corresponding character in the database (okay maybe it's just the birthday problem though):

-0x12

  • 0x8a9e
  • 0x7565
  • 0x63a5

-0x3db

  • 0x751f
  • 0x6d3b
  • 0x753b

Also the distance between the real character and the database character isn't very large, none of them are in the 0x1000's.

Here's some patent about character set based obfuscation. Not sure if it's in any way related to this one.

Is this some common character encoding or am I looking at an obfuscated database?

2
  • I don't know what encoding you used to paste your sample data, but maybe try EUC-JP or Shift-JIS.
    – Igor Skochinsky
    Apr 13 '17 at 18:43
  • @IgorSkochinsky I exported the one that should be "IT・数学" and it's 49 54 e3 98 a0 e6 95 b9 e5 b6 8b. Python's shift-jis and euc-jp fail to decode it but utf-8 works, it just outputs the wrong characters
    – siikamiika
    Apr 13 '17 at 19:11
1

Since it's a Store app, most likely it's a .net executable so it shouldn't be too difficult to decompile it and see what it does with the data from the database. I expect they do apply some encryption or obfuscation on the data but it does not seem to be something obvious from your samples.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.