WinAuth是一个Windows下的计算安全令的开源软件.项目地址: http://code.google.com/p/winauth/

以下引用自官方介绍:

WinAuth is a portable, open-source Authenticator for Windows that provides a time-based RFC 6238 authenticator and common implementations, such as the Google Authenticator. WinAuth can be used with many Bitcoin trading websites as well as supporting Battle.net (World of Warcraft, Hearthstone, Diablo III), Guild Wars 2, and Rift.

 

相信很多人都知道,非国服的暴雪战网账号是不能绑定CN开头的安全令的.我美服的账号一直是用手机安全令算出来的外服序列号.

有些人喜欢用WinAuth来算号,但是如果使用Windows下的算号器WinAuth 2.0以上来算号的话,会因为IP问题,算出CN开头的安全令序列号,导致不能绑定非国服的账户.

今天从官网搞到WinAuth 3.0时候,无法创建US开头的号一度让我很郁闷.

还好是开源软件,虽然不熟悉C#,但是大概还是能看得懂一些.在不改动代码重新编译的前提下,得到了一个绕过IP查询机制的办法来获得US开头的序列号.

===============

先说结论:

修改HOSTS文件,加入新的一行:

"127.0.0.1  geoiplookup.wikimedia.org"(不包括引号),

即屏蔽掉"geoiplookup.wikimedia.org".

然后再用WinAuth 3 创建序列号就能得到US开头的安全令.

算号完毕之后,记得把解除屏蔽,毕竟不知道其他程序是否也用到这个东西.

 

原因:

在WinAuth的代码下面,文件"BattleNetAuthenticator.cs"是针对暴雪战网安全令的模块.

代码245行和246行的注释有专门的说明如何取得region:

// Battle.net does a GEO IP lookup anyway so there is no need to pass the region
// however China has its own URL so we must still do our own GEO IP lookup to find the country

第247行到275行是连接至"http://geoiplookup.wikimedia.org", get IP的分区字符串.

第276行到302行是解析得到的字符串,根据不同的值,给region以不同的区域.如果无法解析,则将region赋值为"REGION_US".

 

于是,最简单的办法就是如开头所说,将获取IP的网址屏蔽掉,让程序总是走到无法解析的分支上.

===============

其实WinAuth在版本1.6时,还是用户自己选择region的,但是后来作者升级程序,就将这功能变成了自动.殊不知国服和非国服完全是两个世界,本来各种限制让人毫无招架之力,他还来这一招,让人说什么好呢?

唉,所以就不多说什么了吧.

posted on 2014-02-14 21:36  Athron  阅读(3282)  评论(0编辑  收藏  举报