- 论坛徽章:
- 0
|
这个是我对于字符串的连接:
snprintf(buf, BUFFER_SIZE, "GET %s?%s=%s.3322.org&%s=%s&username=%s&password=%s HTTP/1.1\015\012", request,"hostname",host,"wildcard",wildcard ? "ON" : "OFF",user_name,password);
output(buf);
snprintf(buf,BUFFER_SIZE,"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\015\012");
output(buf);
snprintf(buf,BUFFER_SIZE,"Accept-Language: zh-cn\015\012");
output(buf);
snprintf(buf,BUFFER_SIZE,"Accept-Encoding: gzip, deflate\015\012");
output(buf);
snprintf(buf,BUFFER_SIZE,"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 360SE)\015\012");
output(buf);
snprintf(buf,BUFFER_SIZE,"Host: %s\015\012",server);
output(buf);
snprintf(buf,BUFFER_SIZE,"Connection: Keep-Alive\015\012");
output(buf);
snprintf(buf,BUFFER_SIZE,"Authorization: Basic d2lzaGVzMTIzOjE5OTA3Mg==\015\012");
output(buf);
snprintf(buf, BUFFER_SIZE,"Cookie: username=%s;\015\012",user_name);
output(buf);
抓包也是和输入的顺序是一样的,但是就是在解析不了,
读取的数据就是 Cookie: username=ss
还请各位高人指点一下 |
|