Z
zhuxd
Unregistered / Unconfirmed
GUEST, unregistred user!
本人做一个用idhttp自动登陆公司内部网站的工具,用Get没办法登陆它,问题是现在用post也没办法登陆,以前可以...不知道对方改动了什么东西...
服务器端不在本地, 是用Apache架设的, 可能是用PHP写的网页. (小日本搞的)
例子如下:
procedure TForm1.Button1Click(Sender: TObject);
const
URL='http://arcwebdb.yokohama.hitachi.co.jp/webdspovs/login.do'; //内部网址
var
P:TStringList;
begin
P:=TStringList.Create;
P.Add('userid=用户名');
P.Add('passwd=密码');
P.Add('ipaddress=170.90.80.1');
try
try
IdHTTP1.Post(URL,P,Response);
showmessage('登陆成功.');
except
showmessage('登陆失败');
end;
finally
P.Free;
end;
end;
运行后提示403错误. 若把URL的值给成其他的网址,如'http://www.baidu.com',参数也相应改动,程序不会出错.
网页源代码我用遨游浏览器显示如下:
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html lang="zh">
<head>
<META http-equiv="Content-Type" content="text/html; charset=MS932">
<META name="GENERATOR" content="Eclipse">
<title>Login</title>
</head>
<body bgcolor="#ccccff">
<P align="center"><B><FONT size="+3" color="#336633">
<IMG src="Image/title.gif" width="636" height="33" border="0" alt="Web Document Search and Print System Version2.0">
</FONT></B></P>
<HR size="5">
<P align="center"><IMG src="Image/login.gif" width="129" height="37" border="0" alt="Login"></P>
<P align="center"><FONT size="+2" color="#000000"><B>Please Input USERID and PASSWORD.</B></FONT></P>
<CENTER>
<form name="loginForm" method="post" action="/webdspovs/login.do" enctype="application/x-www-form-urlencoded">
<TABLE height="62" width="237" cellpadding="5" cellspacing="0">
<TBODY>
<TR>
<TD align="right"><FONT size="+2" color="#000000" >USERID</FONT></TD>
<TD><input type="text" name="userid" maxlength="12" size="15" value="" onfocus="window.status = 'Please Input USERID.';"></TD>
</TR>
<TR>
<TD align="right"><FONT size="+2">PASSWORD</FONT></TD>
<TD><input type="password" name="passwd" maxlength="10" size="15" value="" onfocus="window.status = 'Please Input PASSWORD.';"></TD>
</TR>
</TBODY>
</TABLE>
<BR>
<input type="submit" value="Login"> <input type="reset" value="Clear">
<BR>
</CENTER>
<input type="hidden" name="ipaddress" value="170.95.82.3">
</form>
<script type="text/javascript" language="JavaScript">
<!--
var focusControl = document.forms["loginForm"].elements["userid"];
if (focusControl.type != "hidden" && !focusControl.disabled) {
focusControl.focus();
}
// -->
</script>
<BR>
<BR>
<BR>
<a href="index.jsp"><IMG src="Image/button/gotoTop.gif" border="0" alt="Go To Top"></a>
<HR size="5">
</body>
</html>
TNND,小日本在挑战我们的智慧,上次改密码,改网址,改权限,这次不知道改了什么东西,让我们大家一起想办法,搞死他的服务器....
服务器端不在本地, 是用Apache架设的, 可能是用PHP写的网页. (小日本搞的)
例子如下:
procedure TForm1.Button1Click(Sender: TObject);
const
URL='http://arcwebdb.yokohama.hitachi.co.jp/webdspovs/login.do'; //内部网址
var
P:TStringList;
begin
P:=TStringList.Create;
P.Add('userid=用户名');
P.Add('passwd=密码');
P.Add('ipaddress=170.90.80.1');
try
try
IdHTTP1.Post(URL,P,Response);
showmessage('登陆成功.');
except
showmessage('登陆失败');
end;
finally
P.Free;
end;
end;
运行后提示403错误. 若把URL的值给成其他的网址,如'http://www.baidu.com',参数也相应改动,程序不会出错.
网页源代码我用遨游浏览器显示如下:
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html lang="zh">
<head>
<META http-equiv="Content-Type" content="text/html; charset=MS932">
<META name="GENERATOR" content="Eclipse">
<title>Login</title>
</head>
<body bgcolor="#ccccff">
<P align="center"><B><FONT size="+3" color="#336633">
<IMG src="Image/title.gif" width="636" height="33" border="0" alt="Web Document Search and Print System Version2.0">
</FONT></B></P>
<HR size="5">
<P align="center"><IMG src="Image/login.gif" width="129" height="37" border="0" alt="Login"></P>
<P align="center"><FONT size="+2" color="#000000"><B>Please Input USERID and PASSWORD.</B></FONT></P>
<CENTER>
<form name="loginForm" method="post" action="/webdspovs/login.do" enctype="application/x-www-form-urlencoded">
<TABLE height="62" width="237" cellpadding="5" cellspacing="0">
<TBODY>
<TR>
<TD align="right"><FONT size="+2" color="#000000" >USERID</FONT></TD>
<TD><input type="text" name="userid" maxlength="12" size="15" value="" onfocus="window.status = 'Please Input USERID.';"></TD>
</TR>
<TR>
<TD align="right"><FONT size="+2">PASSWORD</FONT></TD>
<TD><input type="password" name="passwd" maxlength="10" size="15" value="" onfocus="window.status = 'Please Input PASSWORD.';"></TD>
</TR>
</TBODY>
</TABLE>
<BR>
<input type="submit" value="Login"> <input type="reset" value="Clear">
<BR>
</CENTER>
<input type="hidden" name="ipaddress" value="170.95.82.3">
</form>
<script type="text/javascript" language="JavaScript">
<!--
var focusControl = document.forms["loginForm"].elements["userid"];
if (focusControl.type != "hidden" && !focusControl.disabled) {
focusControl.focus();
}
// -->
</script>
<BR>
<BR>
<BR>
<a href="index.jsp"><IMG src="Image/button/gotoTop.gif" border="0" alt="Go To Top"></a>
<HR size="5">
</body>
</html>
TNND,小日本在挑战我们的智慧,上次改密码,改网址,改权限,这次不知道改了什么东西,让我们大家一起想办法,搞死他的服务器....