今晚研究了一下TBS3,发现一个疑点,感觉如果有正常的TBS帐号,也许能用随意密码登录TBS,使用软件。( Z2 ?1 V$ g" h- }: v
% V6 A/ n4 G; d E' M ; ~' I5 _) f0 \1 [确实TBS的数据都在服务器,而且每次重要操作都要和服务器验证一下,贴一段TBS更新词库的函数代码:
private void DownloadSynFile() : f B* A- a J) }* u5 g& N8 B
{ % f" B7 W" y! v) v3 t, k
WebClient client = new WebClient();0 H+ d: j8 O3 l. c9 U, p( ^
Hashtable hashtable = new Hashtable();9 @% d+ i5 @: W( N6 i
Encoding encoding = Encoding.UTF8;+ Z, i, i: q! `, t( z- s
Stream stream = client.OpenRead("http://thebestspinner.com/?action=app_syns_date&uniq=" + GlobalCode.g_uniq); <font color="#ff0000">//这句代码很可疑呀</font>1 i6 Q0 \' H1 a; C7 u y! p
string left = new StreamReader(stream).ReadToEnd(); ) N* ^: A9 ^4 U! h
stream.Close(); : m- l: U1 h4 W& i
if (Conversions.ToBoolean(Operators.OrObject(Operators.CompareObjectGreater(left, GlobalCode.g_settings["syns_db_date"], false), !File.Exists(Application.LocalUserAppDataPath + @"\tbssf.dat")))) 8 w$ |; I& `5 H$ Y
{ ) |" ?- A9 P% ^2 d
DialogResult oK;$ |- Y' G/ m& e0 y2 V$ A
this.Show(); * o: n5 z+ v2 v$ _6 O, [( u' {
Application.DoEvents();# l7 X$ o% U# o6 o I! A9 i
if (File.Exists(Application.LocalUserAppDataPath + @"\tbssf.dat")): s6 D1 D0 n2 h1 B% D, O& r6 K, H
{6 l) z# }5 d5 m8 g) Y- c
oK = MessageBox.Show("A new version of the English synonyms database is available. Would you like to download it now? You will still be able to work while the new database downloads.", "Synonyms Db Update", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); K/ m/ ?! p+ G" m
} & U1 u, o% K% p7 X) c/ Q
else : z; O6 ?8 c: \! Y" `2 b
{ $ G, O6 K+ s% f; v
oK = DialogResult.OK;/ z' l% ~# \# k
}) U; o# C1 q, T
if ((oK == DialogResult.Yes) | (oK == DialogResult.OK))+ T+ n3 R5 Q& k
{$ C# k3 J2 s, \ {0 U
if (oK == DialogResult.OK)& l7 b6 Q4 Z% h5 z" i$ u
{ ) Y7 k4 r# T2 j8 I
MessageBox.Show("The English synonyms database has not yet been installed, or has undergone a format change. Click OK to download and install the database. This usually takes less than one minute for a broadband connection, but may take longer for slower connections.\r\n\r\nYou may begin working in the software while the database downloads, but it's recommended that you wait until it's finished in order to get the most out of The Best Spinner.", "Synonyms Db", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);( s- o$ Q) w6 S% O