|
我抓的包:
POST http://api.buyer.vdian.com/wd_device_uploadStatus.do HTTP/1.1
Content-Encoding: geili-zip
Accept-Encoding: geili-zip
Accept-Language: en-us
encryType: 1
gzipType: 0
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.1.1; Bambook S1 Build/NS4.1)
Host: api.buyer.vdian.com
Connection: Keep-Alive
Content-Length: 1147
apiv=46&edata=DS%2BU%2B0HyR809Bc2cj6sE%2FET4Ck1hlmgwjUAjYUcoztuG15dvMUeRACzHSQxDotCNtlcA0UmFpXuv%2Bsffd7QCi%2BX6a3EyGrwA%2Fp6a53y8ysnOUgOGFu2u4Onlx3Rs3xaWSV5KHBeDenmQ9xhGB8pnGDiNtlEkAmOY9ywAU0QBniFwvi7apBgNL9REQAL%2BIR6T0jEZvv0rACnaXImRsMxTj24jlXE3QqecUqLI0hk6A2m9ycQhk%2FD1YGnHdx1rhxM8tM%2F8G9FoqukE%2BLCZ6bejLouIPIrOdUtQ6UbduSJ%2Ferp0CF%2BCy3jAgpvjEqpfV2iZQi5YFQZh4pm0sbhju2mPbL4J92ArfzvA2OlA2RMoooz%2F01rtvbVwlRMXeCreWAhTMG%2FBffcmiBNDXOa0rQI7twLL6WHiZiKZbAZEjcocHovd9F258Ch4JMPI907Pg2yf0UvpQWNowcd%2FnXNtOL10DJPThOc%2BMpCyD67z4m1ssoFWlyF3%2Bz36sftuNMiR2FVBFHiJzaguyfAy4dXjSzJaijDnGbeVweqfr9CO3nLI1sBgzXXDDI9zgdUbISUFzrt6QyCboiuftc3OSl7f2DhHQVbboT%2BjVyNYrGx0Ve932CwUj0d5ywKdp0Lfgbg4tFJHXwpEqwq4bj9EHkqjZQ4iyTaDtIN97LS8O52nRkgg7RWVthhilABfGBHkyeq9JAoSQ8pZMXW18kwWrmUDzcxPe5BJBa7pwpkaXyI3gkh0hARjF%2BzS29VXXks%2BoAWIDRoSfYP0y5TO8L%2BXktvQqwtQyNJOAxiUHHu2jhwVPfk42yndSNGT%2B1rjt29Jp8hG%2B2eBbp0HGptwTQDPzLEy%2Fe67I4UXmPwT7t%2F3HWbdYTBAvukC2fqoFkgJon5R47A5Sx6zxanR5nIblCD51%2FBAGauyaU6%2Bq8eCYFmnnYNidBXMcuFTLvF7zy%2BvCh6I4ZDMx5HaM71%2BpEFhXgf3QG7e12aiDA%3D%3D&platform=android&encryType=1&crc=9d47a2ed487789f63b1bb0d32c105085&gzipType=0&kid=1.8.0
=============
我的代码:
private void btn_1_Click(object sender, EventArgs e)
{
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://api.buyer.vdian.com/wd_device_uploadStatus.do",
Method = "GET",//URL 可选项 默认为Get
//Encoding = "System.Text.UTF8Encoding",//编码格式(utf-8,gb2312,gbk) 可选项 默认类会自动识别
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
Cookie = "rZmA_05a9_saltkey=eAzomoDi;rZmA_05a9_lastvisit=1435379830;",//字符串Cookie 可选项
UserAgent = "Dalvik/1.6.0 (Linux; U; Android 4.1.1; Bambook S1 Build/NS4.1)",//用户的浏览器类型,版本,操作系统 可选项有默认值
Accept = "text/html, application/xhtml+xml, */*",// 可选项有默认值
//ContentType = "text/html",//返回类型 可选项有默认值
ContentType = "application/x-www-form-urlencoded; charset=UTF-8",
Referer = "http://www.qq.com",//来源URL 可选项
Allowautoredirect = false,//是否根据301跳转 可选项
//CerPath = "d:\123.cer",//证书绝对路径 可选项不需要证书时可以不写这个参数
//Connectionlimit = 1024,//最大连接数 可选项 默认为1024
Postdata = "apiv=46&edata=DS%2BU%2B0HyR809Bc2cj6sE%2FET4Ck1hlmgwjUAjYUcoztuG15dvMUeRACzHSQxDotCNtlcA0UmFpXuv%2Bsffd7QCi%2BX6a3EyGrwA%2Fp6a53y8ysnOUgOGFu2u4Onlx3Rs3xaWSV5KHBeDenmQ9xhGB8pnGDiNtlEkAmOY9ywAU0QBniFwvi7apBgNL9REQAL%2BIR6T0jEZvv0rACnaXImRsMxTj24jlXE3QqecUqLI0hk6A2m9ycQhk%2FD1YGnHdx1rhxM8tM%2F8G9FoqukE%2BLCZ6bejLouIPIrOdUtQ6UbduSJ%2Ferp0CF%2BCy3jAgpvjEqpfV2iZQi5YFQZh4pm0sbhju2mPbL4J92ArfzvA2OlA2RMoooz%2F01rtvbVwlRMXeCreWAhTMG%2FBffcmiBNDXOa0rQI7twLL6WHiZiKZbAZEjcocHovd9F258Ch4JMPI907Pg2yf0UvpQWNowcd%2FnXNtOL10DJPThOc%2BMpCyD67z4m1ssoFWlyF3%2Bz36sftuNMiR2FVBFHiJzaguyfAy4dXjSzJaijDnGbeVweqfr9CO3nLI1sBgzXXDDI9zgdUbISUFzrt6QyCboiuftc3OSl7f2DhHQVbboT%2BjVyNYrGx0Ve932CwUj0d5ywKdp0Lfgbg4tFJHXwpEqwq4bj9EHkqjZQ4iyTaDtIN97LS8O52nRkgg7RWVthhilABfGBHkyeq9JAoSQ8pZMXW18kwWrmUDzcxPe5BJBa7pwpkaXyI3gkh0hARjF%2BzS29VXXks%2BoAWIDRoSfYP0y5TO8L%2BXktvQqwtQyNJOAxiUHHu2jhwVPfk42yndSNGT%2B1rjt29Jp8hG%2B2eBbp0HGptwTQDPzLEy%2Fe67I4UXmPwT7t%2F3HWbdYTBAvukC2fqoFkgJon5R47A5Sx6zxanR5nIblCD51%2FBAGauyaU6%2Bq8eCYFmnnYNidBXMcuFTLvF7zy%2BvCh6I4ZDMx5HaM71%2BpEFhXgf3QG7e12aiDA%3D%3D&platform=android&encryType=1&crc=9d47a2ed487789f63b1bb0d32c105085&gzipType=0&kid=1.8.0",//Post要发送的数据
//ProxyIp = "192.168.1.105:2020",//代理服务器ID 可选项 不需要代理 时可以不设置这三个参数
//ProxyPwd = "123456",//代理服务器密码 可选项
//ProxyUserName = "administrator",//代理服务器账户名 可选项
ResultType = ResultType.Byte,//返回数据类型,是Byte还是String
};
item.Header.Add("wang", "2");//设置请求头信息(Header)
item.Header.Add("x-requested-with", "XMLHttpRequest"); //主要就是这一句,赶集服务器只接受ajax请求。
HttpResult result = http.GetHtml(item);
string html = result.Html;
debugwindow.AppendText(html);
MessageBox.Show(html);
SufeiNet_Test models=new SufeiNet_Test();
models = (SufeiNet_Test)SerializerJsonHelper.JsonToObject(html, models);
MessageBox.Show(models.result.ToString());
MessageBox.Show(models.status.code.ToString());
}
}
现在就是密码很复杂,有谁有这方面的思路?
主要是实现,多帐号,一个登陆,签到!
|
|