curl-users
Re: Enable javascript with curl
Date: Wed, 11 May 2016 16:12:38 +0530
Hello Ray,
Thanks for your reqply but It didn't help, I ran a session which is still
running and copied the cookie from there
curl --cookie "JSESSIONID=0000TKAoqeIkeu21-1eyOKL-8zq:180reu25m; path=/"
--data-binary @postdata.txt -H "Content-Type: text/plain;charset=utf-8"
--referer "http://xxxxxxxxx.yyyyy.net:xxxxx/AirShopMonitor/monitor"
"http://xxxxxxxxx.yyyyy.net:xxxxx
/AirShopMonitor/monitor/UIDL?repaintAll=1&sh=768&sw=1364&cw=1364&ch=629&vw=1364&vh=629&fr="
below is the response
for(;;);[{"changes":[], "meta" : {"appError": {"caption":"Communication
problem","message" : "Take note of any unsaved data, and <u>click here<\/u>
to continue.<br\/><br\/>Invalid security key.","url" : null}}, "resources":
{}, "locales":[]}]
I tried different combination by removing sh sw cw strings, but result is
same for all requests.
here postdata.txt has only "init"
5 May 11 10:02 postdata.txt
Thanks,
Sourin
On 11 May 2016 at 00:29, Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
wrote:
> On 5/8/2016 11:49 PM, Sourin Maiti wrote:
>
>>
>> I am still not able to use the curl in correct way in my case. I have
>> checked it in fiddler and can see the data is available on third request,
>> will you be able to verify the fiddler and suggest me the correct steps to
>> fetch the data?
>>
>
>
> see below
>
>
> On 5/5/2016 6:57 AM, Sourin Maiti wrote:
>
>> The Raw fiddler entry is:
>>
>> POST
>> http://vhlxxxxxxxxx.xxxxxxx.xxx:00000/AirShopMonitor/monitor/UIDL?repaintAll=1&sh=768&sw=1364&cw=1364&ch=629&vw=1364&vh=629&fr=
>> HTTP/1.1
>> Accept: */*
>> Content-Type: text/plain;charset=utf-8
>> Referer: http://vhlxxxxxxxxx.xxxxxxx.xxx:00000/AirShopMonitor/monitor
>> Accept-Language: en-US
>> Accept-Encoding: gzip, deflate
>> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0)
>> like Gecko
>> Host: vhlxxxxxxxxx.xxxxxxx.xxx:00000
>> Content-Length: 5
>> Connection: Keep-Alive
>> Pragma: no-cache
>> Cookie: JSESSIONID=0000QLuOOXg2GAujSyot2ncD_Yf:180reu25m
>>
>> init
>>
>> I am able to see the required data in TEXT view and Syntax View but not
>> in Raw response, I am not able to create the curl request with it.
>>
>
>
> Did you write the company to find out if they have an API or any advice
> for you? The request will look like:
>
> curl -b cookies.txt -c cookies.txt --data-binary @postdata.txt -H
> "Content-Type: text/plain;charset=utf-8" --referer "
> http://vhlxxxxxxxxx.xxxxxxx.xxx:00000/AirShopMonitor/monitor" "
> http://vhlxxxxxxxxx.xxxxxxx.xxx:00000/AirShopMonitor/monitor/UIDL?repaintAll=1&sh=768&sw=1364&cw=1364&ch=629&vw=1364&vh=629&fr=
> "
>
> In postdata.txt you should put the request body. Right-click on the POST
> session in Fiddler and Save > Request > Request Body. The file should
> contain 5 bytes, the first four 'init'.
>
> In cookies.txt it should contain your JSESSIONID. You will have to login
> to get the ID. That is likely another POST which comes first, or you could
> try exporting cookies from an already logged in session. How well that
> works depends on how long it keeps you logged in.
>
> Look at the URL you are posting to, there is a lot of uniqueness there, sh
> sw cw, I don't know what any of that is. You may end up initializing some
> old test and not the one you want.
>
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-users
> FAQ: https://curl.haxx.se/docs/faq.html
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>
-- with regards, Sourin Maiti
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-11