Zenno getting incomplete http headers

V Munich

Пользователь
Регистрация
20.02.2014
Сообщения
85
Благодарностей
3
Баллы
8
Hello,

There's this website that I need to send post requests. Using Live HTTP Replay addon, the header looks like this:

Код:
Host: www.website.com
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.website.com/
Cookie: COOKIE_idioma=en; COOKIE_rep_login=website; __utma=131087754.84555339.1392574749.1333434343403.139324543523432.23; __utmz=131432523554.1392352345749.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); COOKIE_popup_bo=63; __utmc=1324554354; PHPSESSID=cc59~et5omsgvdf3452ss3fdgrdg34253;
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 216
Meanwhile on Zenno, the http headers look like this:

Код:
HTTP/1.1 302 Found
Server: Apache
X-Frame-Options: SAMEORIGIN, SAMEORIGIN
Set-Cookie: PHPSESSID=cc64~8scq0psukreg34tg345erh9if6; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: //www.website.com/login?resource=
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 04 Mar 2014 20:28:26 GMT
X-Varnish: 2347663959
Age: 0
Via: 1.1 varnish
Connection: keep-alive
gzip: false

HTTP/1.1 200 OK
Server: Apache
X-Frame-Options: SAMEORIGIN
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: COOKIE_idioma=en; expires=Sat, 19-Nov-2033 20:28:26 GMT; path=/; domain=www.example.com
Set-Cookie: COOKIE_rep_login=example; expires=Sat, 19-Nov-2033 20:28:26 GMT; path=/; domain=www.example.com
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
Content-Length: 18823
Accept-Ranges: bytes
Date: Tue, 04 Mar 2014 20:28:26 GMT
X-Varnish: 2347664127
Age: 0
Via: 1.1 varnish
Connection: keep-alive
gzip: false
I need this part:
Cookie: COOKIE_idioma=en; COOKIE_rep_login=website; __utma=131087754.84555339.1392574749.1333434343403.139324543523432.23; __utmz=131432523554.1392352345749.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); COOKIE_popup_bo=63; __utmc=1324554354; PHPSESSID=cc59~et5omsgvdf3452ss3fdgrdg34253;

In order to be able to successfully make my POST.

What should I do?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Make a GET request to the url to get the cookie, regex it out and add it to your POST request
 

V Munich

Пользователь
Регистрация
20.02.2014
Сообщения
85
Благодарностей
3
Баллы
8
Is it possible to make a POST request + modify HTTP headers at the same time?
 

riccardo

Новичок
Регистрация
12.10.2013
Сообщения
15
Благодарностей
0
Баллы
1
there are one way to slove this

use c# to fake headers:

project.Profile.UserAgent = project.Variables["useragent"].Value;

set list useragent like this:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; Tablet PC 2.0; InfoPath.3; .NET4.0C; .NET4.0E)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)