javascript - PhantomJS setting cookies as Read and Write -


I am trying to log in to the phantomJS session AUTH cookie on a website, I have terminated the code for it and Everything is working right, the problem is that there is a website like another login system inside with the same cookie, once the security certificate token will be updated on entering the other page cookies, so when I use the first cookie I think it's just reading Is set to the I which is inside the second login system, using the website is trying to update the cookie, which has been manually added but unfortunately fails because the cookie is set to read only is.

The code I am using:

  phantom.addcookie ({'name': 'some names here,' / * required property * / 'value': ' Some hash 'here', 'domain': 'ea.some domain here.com' (* 10000 * 60 * 60) / * required property * / 'path': '/', 'httponly': wrong, 'secure': Wrong, 'Finish': (New Date ()). * * Ends in - 10 hours *);  

I tried to delete the session cookie before reaching my script page on the second need, but it only logs me out because I should have my old session so that it New session Ordinance can be updated.

How to update manually added cookies once requested from server side?

I got the solution,

It seems that the server actually has a Created a new cookie with the same name and new value. No, from the place with new value I searched the web for any help in this matter but I failed, by saving the new cookie value I saved it in a variable and then phantom.clearcookies () < / Code> By executing the cookie and new cookie I fixed this problem, which I store, it was not clear but it did the trick.


Comments