一直想下大決心把win7換成ubuntu11.04,無奈捨不得一些遊戲,今日下想來徹底解決下linux 上drcom登陸的問題。學校的伺服器不提供直接的web認證的方式,本來想直接用開源的drcom-1.4.8,編譯安裝成功,但總是無法登陸,首頁上 說已經不支援現在的3.73(u33)版本想來也不支援我們所用的3.73(u60)版本。但坊間一直流傳著一個神一樣的html檔案,用以登陸,既然說 是神一樣的檔案,當然,我們這裡也是可以用的。但是我每次關機總是忘記登出,所以經常在關機後很長一段時間內無法再次登陸。因為,就寫了兩個指令碼,用以開機自動登陸,關機自動登出。
#!/bin/sh
#filename drcomlogin
#this is drcom-client script .use "chkconfig --level 35 drcomlogin off" to disable script
#chkconfig:35 88 09
#description:drcom login
curl -d "DDDDD=username@mingzheng&upass=password&0MKKey=%B5%C7%C2%BC+Login" xxx.xxx.xxx.xx
exit 0
[root@localhost /]#chkconfig --add drcomlogin
[root@localhost /]#chkconfig --level 35 drcomlogin on
#!/bin/sh
#filename drcomlogout
#this is drcom-client script .use "chkconfig --level 06 drcomlogout off" to disable script
#chkconfig:06 00 95
#description:drcom logout
curl "xxx.xxx.xxx.xxx/F.htm?Submit=Logout"
exit 0
[root@localhost /]#chkconfig --add drcomlogout
[root@localhost /]#chkconfig --level 06 drcomlogout on
#########以上username替換成帳號,將password替換成密碼,XXX替換成證明伺服器IP,此IP在windows下drcom安裝目錄下的edata.dat檔案裡面有。
作者“淩昶”