552
社区成员
发帖
与我相关
我的任务
分享
00:00:00.000 0.183 497 772 GET 200 text/html http://www.a1a999.com/
00:00:00.223 0.186 610 2438 GET 200 text/html http://www.a1a999.com/home.php
00:00:01.171 0.200 410 2315 GET 200 image/jpeg http://www.a1a999.com/images/button_bg.jpg
00:00:24.200 0.205 766 623 POST 302 Redirect to http://www.a1a999.com/check_rule.php?PHPSESSID=&password_modify_date=2011-01-31%2011:20:52 http://www.a1a999.com/login.php
00:00:24.407 0.383 741 3057 GET 200 text/html; charset=gb2312 http://www.a1a999.com/check_rule.php?PHPSESSID=&password_modify_date=2011-01-31%2011:20:52
00:00:24.842 1.643 508 35969 GET 200 image/jpeg http://www.a1a999.com/images/banner.wg.jpg
00:00:24.845 0.390 512 2317 GET 200 image/jpeg http://www.a1a999.com/images/button_bg_red.jpg
00:00:24.872 0.364 514 2316 GET 200 image/jpeg http://www.a1a999.com/images/button_bg_green.jpg
//////////
在 00:00:00.000这一步,IE首先获取到一个Cookie.
NSC_63.217.93.116 Received ffffffff091a183545525d5f4f58455e445a4a423660 / www.a1a999.com (Session)
然后在 00:00:24.200这一步,即输入帐号密码登录后,login返回302重定向后IE再次获取PHPSESSID这个Cookie
NSC_63.217.93.116 Sent ffffffff091a183545525d5f4f58455e445a4a423660 / www.a1a999.com (Session)
NSC_63.217.93.116 Received ffffffff091a183545525d5f4f58455e445a4a423660 / www.a1a999.com (Session)
PHPSESSID Received 0vib8n0n4vi9i0m6t0201q45e5 / www.a1a999.com (Session)
RequestData->Clear();
try
{
IdHTTP1->Get(WebAddress,RequestData);
}
catch(...)
{
MemoInfo->Lines->Add("连接错误");
return;
}
RequestData->SaveToFile("login0.txt");
MemoInfo->Lines->Add("请求头:"+IdHTTP1->Request->RawHeaders->Text);
MemoInfo->Lines->Add("响应头:"+IdHTTP1->Response->RawHeaders->Text);
MemoInfo->Lines->Add("Location:"+IdHTTP1->Response->Location);
RequestData->Clear();
try
{
IdHTTP1->Get(WebAddress+"/home.php",RequestData);
}
catch(...)
{
MemoInfo->Lines->Add("连接错误");
return;
}
RequestData->SaveToFile("login1.txt");
MemoInfo->Lines->Add("请求头:"+IdHTTP1->Request->RawHeaders->Text);
MemoInfo->Lines->Add("响应头:"+IdHTTP1->Response->RawHeaders->Text);
MemoInfo->Lines->Add("Location:"+IdHTTP1->Response->Location);
char *ss=strstr(RequestData->DataString.c_str(),"login.php");
if (!ss) {
MemoInfo->Lines->Add("连接错误2");
return;
}
PostParam->Clear();
PostParam->Add("login=登入");
PostParam->Add("username="+UserName);
PostParam->Add("password="+Password);
RequestData->Clear();
try
{
IdHTTP1->Post(WebAddress+"/login.php",PostParam,RequestData);
}
catch(...)
{
MemoInfo->Lines->Add("连接错误3");
return;
}
RequestData->SaveToFile("login2.txt");
MemoInfo->Lines->Add("请求头:"+IdHTTP1->Request->RawHeaders->Text);
MemoInfo->Lines->Add("响应头:"+IdHTTP1->Response->RawHeaders->Text);
MemoInfo->Lines->Add("Location:"+IdHTTP1->Response->Location);