关闭搜狗输入法的云输入

2014-12-15 00:04:15 -0500

先说结论: 如何关闭

(我没找到 UI (Mac OSX) 上关闭的选项,只好从网络层禁止掉了)

屏蔽对 cloud.pinyin.sogou.com 的域名解析即可关闭云输入。最简单的方法是在 hosts 文件里加入 127.0.0.1 cloud.pinyin.sogou.com

如果觉得不够,可以同时屏蔽包含 /web_ime/pynet.php 的 HTTP 请求

为什么要屏蔽

  1. 云输入的请求不是 HTTPS,中间路由层任何人都可以看到你的键盘输入。密码、电话等敏感信息有可能泄露给电信、移动和联通等网络提供商
  2. 不希望搜狗公司知道我在输入什么东西,即使是匿名的

tcpdump

tcpdump显示搜狗是通过一个非 HTTPS 连接请求数据。例如你输入了 zuotian,它会发送一个不带 Host 头的,Body 为 zuotian 的 POST 请求到 web_ime/pynet.php

我估计不带 Host 头是他们不想让人轻易通过 Host:cloud.pinyin.sogou.com 来屏蔽

12:34:01.865276 IP *** > 106.120.173.29.80: Flags [P.], seq 1:254, ack 1, win 65535, length 253
...
...
    0x0030:  ffff dd3a 0000 504f 5354 202f 7765 625f  ...:..POST./web_
    0x0040:  696d 652f 7079 6e65 742e 7068 703f 6475  ime/pynet.php?du
    0x0050:  7274 6f74 3d31 3339 2664 7572 636f 6e3d  rtot=139&durcon=
    0x0060:  3931 2664 7572 7472 616e 3d34 3826 683d  91&durtran=48&h=
    0x0070:  4439 3531 3741 4444 3037 3744 3543 4534  D9517ADD077D5CE4
    0x0080:  4234 3233 3335 3731 4143 3638 3734 3746  B4233571AC68747F
    0x0090:  2672 3d30 3030 3026 763d 332e 302e 322e  &r=0000&v=3.0.2.
    0x00a0:  3539 3131 3620 4854 5450 2f31 2e31 0d0a  59116.HTTP/1.1..
    0x00b0:  436f 6e74 656e 742d 4c65 6e67 7468 3a20  Content-Length:.
    0x00c0:  3130 340d 0a0d 0a68 0003 0f7a 756f 7469  104....h...zuoti
    0x00d0:  616e 7175 6c65 6e61 6c69 0900 029c 0103  anqulenali......

strings

构建云输入的 HTTP 请求的代码

$ strings "/Library/Input Methods/SogouInput.app/Contents/SogouServices"

POST %@ HTTP/1.1
Content-Length: %lu
SGCloudHttpHelper Error : timeout
cloud.pinyin.sogou.com
 didReadData NotFound Http pack head !
SGCloudHttpHelper Error : read error
durtot=%i&durcon=%i&durtran=%i
/web_ime/pynet.php?
h=%@&r=%@&v=%@
durcon=%i&h=%@&r=%@&v=%@
durtot=%i&durcon=%i&durtran=%i&h=%@&r=%@&v=%@
receiveData

搜狗输入法的所有 HTTP 请求列表

$ strings "/Library/Input Methods/SogouInput.app/Contents/SogouServices" |grep sogou.com

http://ping.pinyin.sogou.com/crash.gif?h=%@&r=%@&v=%@&app=%@&ime=%@&src=mac
cloud.pinyin.sogou.com
http://macime.sogou.com/macinstall.gif?h=%@&r=%@&v=%@&in=1&inst=%@
http://macime.sogou.com/macversion.txt?
http://pinyin.sogou.com/dict/nickname.php
http://pinyin.sogou.com/skins/ime_updateavatar.php
http://account.sogou.com
/act/authtoken?appid=%d&userid=%@&token=%@&livetime=%d&authtype=3&ru=http://profile.pinyin.sogou.com/
http://profile.pinyin.sogou.com/download.php
http://profile.pinyin.sogou.com/upload.php
http://config.pinyin.sogou.com/dict/upt_cell_dict6.5.php
http://ime.sogou.com/pyup.gif?
«Newer      Older»

----Comments(3)----
xiaoliz at 2014-12-24 21:34:
如何屏蔽包含 /web_ime/pynet.php 的 HTTP 请求呢?
@english | @ at 2014-12-15 00:10:
搜狗输入法有其好处

在 Mac 下我没有更好的选择

@ny
@ny | @ at 2014-12-15 00:05:
啊…换个输入法…
Comment:
Name:

Back to home

Subscribe | Register | Login | N