1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
í³Ôdc@sddlZddlZddlZddlZddlTddlZddlZdZda    d„Z
e
edddƒZ e
eddd    ƒZ e
edd
d ƒZ d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„ZedkreƒndS(iÿÿÿÿN(t*sSuffixAccID.inicCstdkrItjƒaytj|ƒWqIdGHtjdƒ|SXntrútj||ƒrätj||ƒ}yGt|ƒt    kr£t|ƒt
|ƒƒ}nt|ƒ|ƒ}|SWqäd||fGHtjdƒ|SXnd|||fGH|Sd|GHtjdƒ|SdS(NsSuffixAccID.ini Read Failtpasues&ReadConfig SuffixAccID.ini %s %s errors3ReadConfig file< %s >  (Section:%s, Section:%s) DefsReadConfig file< %s > Error( tcftNonet ConfigParsertreadtostsystemt
has_optiontgetttypetbooltint(tFilePathtSectiontOptiontDeftvalue((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pyt
ReadConfigs2         tRenametSuffixttIsBase64itEncodingtgbkcCs%tj|dƒ}tj|ƒ}|S(Ns%Y-%m-%d %H:%M:%S(ttimetstrptimetmktime(tstrTimet
TimeStructtSeconds((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytStringTimeToseconds6scCs.yt||ƒ}Wnt|fSXt|fS(N(tunicodetFalsetTrue(t srcEncodingtinputtresult((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytEncodingToUnicode;s
 cCs.y|j|ƒ}Wnt|fSXt|fS(N(tencodeR!R"(t dstEncodingR$R%((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytUnicodeToEncodingBs
 cCs7t|tƒr3tr"tj|ƒStt|ƒdS|S(Ni(t
isinstanceR tisBase64tbase64t    b64decodeR)R(ttext((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytfix_outgoingTextIs
 cCs7t|tƒr3tr"tj|ƒStt|ƒdS|S(Ni(R*tstrR+R,t    b64encodeR&R(R.((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytfix_incomingTextQs
 c    Cs¹|t}|jiƒ}g}xl|D]d}t|dƒ}i|dd6}|jƒt}iit|ƒd6d6}|j||fƒq&Wx$|D]\}}|j||ƒq•WdS(NtACCIDs$set(t UCN_DSAccounttfindR/tstripRR2tappendtupdate(    tUserDBtcolDBAcctaccListt
updateListtrectaccidtspectnewAccidt    updateDoc((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pyt
ReplaceAccZs
 c    Cs¹|t}|jiƒ}g}xl|D]d}t|dƒ}i|dd6}|jƒt}iit|ƒd6d6}|j||fƒq&Wx$|D]\}}|j||ƒq•WdS(NtAccIDs$set(t UCN_DBPlayerR5R/R6RR2R7R8(    R9t colDBPlayert
playerListR<R=R>R?R@RA((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytReplaceDBPlayerAccjs
 cCsd}d}d}d}d}ttjƒdkr•tjdjƒ}tjdjƒ}tjdjƒ}tjdjƒ}tjdjƒ}ngttjƒdkrætjdjƒ}tjdjƒ}tjdjƒ}nd    GHtjd
ƒdSyt|ƒ}Wnd |GHtjd
ƒdSXyWtj||ƒ}|j    }|j
||ƒsƒd ||||fGHtjd
ƒdSWn*d ||||fGHtjd
ƒdSXy||}Wnd|GHtjd
ƒdSXt |ƒt |ƒtjd
ƒdS(NRiiiiiiisarg count error!tpausesarg port type error!port = %ss+MongoDB %s:%s@%s:%s authentication failed!
s%s:%s@%s:%s login failed!s#UserDBName < %s >connection failed!( tlentsystargvR6RRR tpymongot
Connectiontadmint authenticateRBRG(tiptporttusertpswt
UserDBNamet
connectiontdbR9((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pytmain|sX                 
 
t__main__(RJRRLRtCollectionDefineRR,t Ini_FilePathRRRRR+RRR&R)R/R2RBRGRWt__name__(((s:.\\ServersRoute\Tools\Tool_SuffixAccID\Tool_SuffixAccID.pyt<module>s,    
                                          8