如何将网页登录程序改写成本地客户端

软件和网站开发以及相关技术探讨
回复
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

如何将网页登录程序改写成本地客户端

#1

帖子 自由建客 » 2008-12-01 9:14

学校开了 dr.com 的网页登录方式,在 Linux 下一直以来就用网页登录,但前提是必须要进 X 开启浏览器,碰到不能进 X 时就无语了。
下载了 drcom-1.4.8 源码包,但因其工作在内核态而不想用,源码较多也懒得去读。
于是想把网页登录的程序改写成本地命令行工具,以求简单。
关键在于我不知道怎么获取 js 脚本,在浏览器中查看网页源代码只有一页简单的 html ,没其它的。
我不懂 java 等,只会一点 C,但只要有那脚本的源码,查查找找整理出逻辑应该不是难事,将其用 C/C++ 实现就应该更没问题了。

在浏览器中看到的网页源码,未加任何修改

代码: 全选

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Drcom上网登录窗                         </title>
<style><!--
a {text-decoration: none}
.f1 { font-size: 9pt; font-family: Verdana; line-height: 14pt }
.f2 { font-size: 8pt; font-family: Verdana; line-height: 12pt }
-->
</style></head><body><form name=form1 method=post action="">
<center>
<table width=600 border=0 height=80%>
<tr>
<td height=100%>
<div align=center>
<center>
<table width=350 border=0 height=397 bgcolor=#FFFFFF cellspacing=0 cellpadding=0 style="border-collapse: collapse" bordercolor=#111111>
<tr>
<td height=60 width=350 colspan=2>
			<p align=center>
<img border=0 src=4.gif width=350 height=44></td>
</tr>
<tr>
<td height=70 width=350 colspan=2>
<div align=center><font ; font color=000000>                                                                                                                                                                                                        </font></div>
<div align=center style="width: 352; height: 20"><font ; font color=000000></font></div></td></tr>
<tr>
<td height=28 width=350 class=f1 align=right colspan=2 bgcolor=#94A9BE>
			<p align=center class=f1><font color=#FFFFFF>请输入您的帐号和密码</font></td>
</tr>
<tr>
<td height=65 width=163 class=f1 align=right bgcolor=#D3DCE4>帐号 Account :</td>
<td height=65 width=187 class=f1 bgcolor=#D3DCE4>
<p>&nbsp;<input name=DDDDD size=16 maxlength=26 style=" BACKGROUND-COLOR: rgb(255,255,255); BORDER-BOTTOM: rgb(0,0,0) 1px solid; BORDER-LEFT: rgb(0,0,0) 1px solid; BORDER-RIGHT: rgb(0,0,0) 1px solid; BORDER-TOP: rgb(0,0,0) 1px solid"></p>
			</td>
</tr>
<tr>
<td height=15 width=163 class=f1 align=right bgcolor=#D3DCE4>密码 Password :</td>
<td height=15 width=187 class=f1 bgcolor=#D3DCE4>
			<p>&nbsp;<input type=password name=upass size=16 maxlength=16 style=" BACKGROUND-COLOR: rgb(255,255,255); BORDER-BOTTOM: rgb(0,0,0) 1px solid; BORDER-LEFT: rgb(0,0,0) 1px solid; BORDER-RIGHT: rgb(0,0,0) 1px solid; BORDER-TOP: rgb(0,0,0) 1px solid"></p>
</td>
</tr>
<tr>
<td height=70 width=350 colspan=2 bgcolor=#D3DCE4><p align=center>
<input type=submit name=0MKKey value="登录 Login" style=" BACKGROUND-COLOR: rgb(105,130,150); BORDER-BOTTOM: rgb(100,130,160) 1px solid; BORDER-LEFT: rgb(139,141,218) 1px solid; BORDER-RIGHT: rgb(23,24,79) 1px solid; BORDER-TOP: rgb(194,217,227) 1px solid; COLOR: rgb(255,255,255); font-size: 9pt; font-family: Verdana; height: 25; width: 85">&nbsp;&nbsp;&nbsp;
<input type=reset name=1MKKey value="重置 Reset" style=" BACKGROUND-COLOR: rgb(105,130,150); BORDER-BOTTOM: rgb(23,24,79) 1px solid; BORDER-LEFT: rgb(139,141,218) 1px solid; BORDER-RIGHT: rgb(23,24,79) 1px solid; BORDER-TOP: rgb(194,217,227) 1px solid; COLOR: rgb(255,255,255); font-size: 9pt; font-family: Verdana; height: 25; width: 85"></td>
</tr>
<tr>
<td height=28 width=350 colspan=2 bgcolor=#94A9BE>
<p class=f1 align=center><a href=9.htm><font color=#FFFFFF>修改密码 Edit Pass</font></a></td>
</tr>
<tr>
<td height=51 width=350 bgcolor=#D3DCE4 colspan=2>
			<p align=center class=f2><font size=1><br>
</font>&copy; 2003 <a target=_blank href=http://www.doctorcom.com>CITY HOTSPOT</a>. All Rights Reserved.&nbsp;</td></tr>
</table></center></div></td></tr></table></center></form></body></html>
头像
jiangpeng
帖子: 223
注册时间: 2006-07-25 9:33
联系:

Re: 如何将网页登录程序改写成本地客户端

#2

帖子 jiangpeng » 2008-12-01 16:01

Take what man makes and use it, But do not worship it, For it shall pass. -- Anonymous

Twitter @jiangpeng
回复