|
楼主 |
发表于 2015-3-24 12:03:43
|
显示全部楼层
本帖最后由 329616 于 2015-3-24 12:11 编辑
带了cookie也不行
这是识别验证码的
public static string dianer()
{
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.zhoucheng.co/util.php?action=seccode&t=1427168552600",
Method = "get",//URL 可选项 默认为Get
ResultType = ResultType.Byte,
};
HttpResult result = http.GetHtml(item);
cookie=result.Cookie;
byte[] bytes = result.ResultByte;
COMFrameLib.COMFrameSoft yydama = new COMFrameSoft(); //新建类接口
string result1 = yydama.SendAndAceeptByByte("2F88F3Dasdasdasdasdasdsa4A02AA083096C", "ccqyy", "1003", bytes, bytes.Length , 60);
string[] code = result1.Split('#');
return code[0];
} //这是识别验证码的
这是post的
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.zhoucheng.co/admin.php?model=login",
Method="post",
Postdata = "uname=a11111in&pass=8111116&seccode="+dianer()+"",
Referer = "http://www.zhoucheng.co/admin.php?model=login",
Cookie=cookie,
};
HttpResult result1 = http.GetHtml(item);
string html = result1.Html;
Console.WriteLine(html);
}这是post的
|
|