Skip to content

Commit

Permalink
1.65 支持日服
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Jan 15, 2014
1 parent 1ca0f35 commit 4309331
Show file tree
Hide file tree
Showing 7 changed files with 1,228 additions and 279 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAClient是一个可以用来装B的百万亚瑟王客户端,用于解放你的双手和智商。目前支持台服、国服全区和韩服
MAClient是一个可以用来装B的百万亚瑟王客户端,用于解放你的双手和智商。目前支持台服、国服全区、韩服和日服

[更新历史](https://github.com/fffonion/MAClient/wiki/HISTORY)

Expand Down Expand Up @@ -35,7 +35,7 @@ MAClient_cli.py [config file] [task]/[commands]

###account_?

?可选cn,cn2,cn3,tw,kr分别对应国服1区,国服2区,国服3区,台服,韩服
?可选cn,cn2,cn3,tw,kr,jp分别对应国服1区,国服2区,国服3区,台服,韩服,日服

session不用管它

Expand Down
1,209 changes: 951 additions & 258 deletions db/card.jp.txt

Large diffs are not rendered by default.

275 changes: 265 additions & 10 deletions db/item.jp.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion db/revision.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cn,218,218
tw,202,171
kr,227,168
jp,0,0
jp,224,171
3 changes: 2 additions & 1 deletion maclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ def initplayer(self, xmldict):
else:
self.player.id = self._read_config('account_%s' % self.loc, 'user_id')
# for jp server, regenerate
self.poster.gen_2nd_key(self.player.id,self.loc)
if self.loc == 'jp':
self.poster.gen_2nd_key(self.username,self.loc)
if self.settitle:
# 窗口标题线程
self.stitle = set_title(self)
Expand Down
12 changes: 6 additions & 6 deletions maclient_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def __init__(self,loc):
self.gen_rsa_pubkey()

def gen_cipher_with_uid(self, uid, loc):
pass
plain = '%s%s%s' % (getattr(maclient_smart, 'key_%s' % loc[:2])['crypt'][:16], uid, '0'*(16-len(uid)))
return self._gen_cipher(plain)

def gen_rsa_pubkey(self):
#pk="""MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAM5U06JAbYWdRBrnMdE2bEuDmWgUav7xNKm7i8s1Uy/\nfvpvfxLeoWowLGIBKz0kDLIvhuLV8Lv4XV0+aXdl2j4kCAwEAAQ=="""
Expand All @@ -77,10 +78,9 @@ def _gen_cipher(self,plain):
def init_cipher(self,loc = 'cn', uid = None):
_key = getattr(maclient_smart, 'key_%s' % loc[:2])
if loc == 'jp':
if not uid:
uid = '0'
_key['crypt'] = '%s%s%s' % (_key['crypt'], uid, '0' * (32 - len(_key['crypt'] + uid)))
print(_key['crypt'])
#if not uid:
# uid = '0'
_key['crypt'] = '%s%s' % (_key['crypt'], '0' * 16)
if sys.platform == 'cli':
pass # import clr
# clr.AddReference("IronPyCrypto.dll")
Expand Down Expand Up @@ -187,7 +187,7 @@ def enable_savetraffic(self):
self.issavetraffic = True

def gen_2nd_key(self, uid, loc='jp'):
self.crypt.gen_cipher_with_uid(uid, loc)
self.crypt.cipher_data = self.crypt.gen_cipher_with_uid(uid, loc)

def load_svr(self, loc, ua=''):
self.servloc = loc
Expand Down
2 changes: 1 addition & 1 deletion maclient_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def update_master(loc, need_update, poster):
strs.append('%s,%s,%s' % (
c.item_id,
c.name,
c.explanation
c.explanation.replace('\n','\\n')
))
if PYTHON3:
open(opath.join(getPATH0, 'db/item.%s.txt' % loc), 'w', encoding = 'utf-8').write('\n'.join(strs))
Expand Down

0 comments on commit 4309331

Please sign in to comment.