知道用户名和密码怎样用一个超连接来跳过这个登录界面直接进入系统呢?不能改登录界面的代码。

SBCDJ 2006-11-07 09:40:45
已知username=888888 password=888888
登录界面代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>----------</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
var temp = location.host;

var hostaddr = temp.indexOf(":");
if (hostaddr != -1)
{
hostaddr = temp.substring(0, hostaddr);
// alert("when hostaddr != -1, the host value is "+hostaddr);
}
else
hostaddr = temp;
// alert("when hostaddr == -1, the host value is "+hostaddr);

function setCookie() {
now=new Date();
now.setTime(now.getTime() + 1000 * 60 * 30);
nameValue=escape(document.all.username.value + "#N1"
+ document.all.password.value +"#N2"
+hostaddr + "#N3"
+ "xxxxxxxxx");
document.cookie="ID="+nameValue+";expires="+now.toGMTString();
}
function checkit(i)
{
str_name = document.all.username.value;
str_pwd = document.all.password.value;
if (str_name.length == 0)
{
if (i != 1)
{
alert('用户名不能为空!');
return false;
}
else
{
alert('The Account can NOT be empty!');
return false;
}
}
else if(str_pwd.length == 0)
{
if (i != 1)
{
alert("密码不能为空!");
return false;
}
else
{
alert('The Password can NOT be empty!');
return false;
}
}
else
{
if (i != 1)
{
document.cnsmt.cnname.value = document.all.username.value;
document.cnsmt.cnpwd.value = document.all.password.value;
return true;
}
else
{
document.ensmit.cnname.value = document.all.username.value;
document.ensmit.cnpwd.value = document.all.password.value;
return true;
}
}
}
-->
</SCRIPT>
</head>

<body bgcolor="#636066">
<div id="Layer1" style="position:absolute; left:320px; top:230px; width:380px; height:200px; z-index:1">
<form name = "cnsmt" action="webs/loginHandle" method="post">
<input type="hidden" name="cnname" value="888888">
<input type="hidden" name="cnpwd" value="888888">
</form>
<table width="380" height="200" border="0" cellpadding="0" cellspacing="0" background="img/log_bg.jpg">
<tr>
<td width="70" height="80"> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td rowspan="2"> </td>
<td height="24">用户名称:</td>
<td colspan="2"><input type="text" id="username" name="username" style="font-family: Arial;"></td>
</tr>
<tr>
<td height="24">密码:</td>
<td colspan="2"><input type="password" id="password" name="password" style="font-family: Arial;"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td width="90"> </td>
<td style="vertical-align: middle;"><input type="image" src="img/loginbt.gif" onclick="if(checkit(0)) {setCookie(); document.cnsmt.submit();} else {return false;}"></td>
</tr>
</table>
</div>
</body>
</html>
...全文
598 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
SBCDJ 2006-11-15
  • 打赏
  • 举报
回复
以post方式提交已经试过了。提示我操作超时,可能服务器对数据来源有限制。
正在试
hqcsx(蓝色心灵)
的方法。希望大家提出新的方案。
pzhuyy 2006-11-09
  • 打赏
  • 举报
回复
post过去,在验证页面里检查来源.设定某一页面post过来的才继续.
hqcsx 2006-11-09
  • 打赏
  • 举报
回复
调用下面的函数就可以了
<script language="javascript">
var cc;
var loginname;
var loginpass;
function checklogin(username,password)
{
loginname=username;
loginpass=password;
cc=window.open(登录页面);
cc.focus();
window.setTimeout("cc.document.cnsmt.username.value=loginname;",500);
window.setTimeout("cc.document.cnsmt.password.value=loginpass;",500);
window.setTimeout("cc.document.cnsmt.submit();",1000);
}
</script>
mrbai 2006-11-08
  • 打赏
  • 举报
回复
webs/loginHandle/验证页面的名称 .asp?cnname=888888 cnpwd=888888
就可以了
myvicy 2006-11-07
  • 打赏
  • 举报
回复
向webs/loginHandle以post方式提交cnname值888888和cnpwd值888888
什么都不能 2006-11-07
  • 打赏
  • 举报
回复
给出站点做个测试
我是丁学 2006-11-07
  • 打赏
  • 举报
回复
用xmlhttp试试,看不出处理程序是什么样子的,如果不决断request的类型,可以直接使用get方式提交数据,不过估计是没戏,用xmlhttp POST一下,服务器如果对数据来源有限制那就没办法了
Atai-Lu 2006-11-07
  • 打赏
  • 举报
回复
只有这个验证么????

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧