So Im doing some neopets programs again (will upload them soon), they're pretty good IMO.
Im testing new stuff and I've been using HtmlUnit and Selenium, but im having problems with the cookies.
Im able to get and save the cookies and Im even able to read them and login in sucessfully with it but for some reason the cookies seems to be expired fast 4-5 page refreshes and I cant login again with them even when the neoremeber cookie has an expiration date of a year or so.
Im thinking rn that the problem is that Selenium nor HtmlUnit retrieve all the cookies, Im printing them on the console to see what's going on and got the following cookies:
So Im doing some neopets programs again (will upload them soon), they're pretty good IMO.
Im testing new stuff and I've been using HtmlUnit and Selenium, but im having problems with the cookies.
Im able to get and save the cookies and Im even able to read them and login in sucessfully with it but for some reason the cookies seems to be expired fast 4-5 page refreshes and I cant login again with them even when the neoremeber cookie has an expiration date of a year or so.
Im thinking rn that the problem is that Selenium nor HtmlUnit retrieve all the cookies, Im printing them on the console to see what's going on and got the follow cookies:
Can you send me a snippet of the code that logins, and browses some random pages? I'll see what I can find.
Edit:
It's weird that you don't get PHPSESSID. There's also another cookie that's like random letters and numbers, I always get the same so it should be important.
Last edited by Daviid; 12-22-2016 at 12:12 PM.
The Following User Says Thank You to Daviid For This Useful Post:
You're missing two of 'em and I doubt the toolbar one is relevant from the ones in the spoiler.
There's one that changes its value every time you refresh or visit a page (can't remember which one it is right now though e_e)
@(you need an account to see links) ideally you should be storing all cookies that are set by Set-Cookie in the HTTP Response. Remember the goal is to remain undetected and a foundational piece of this is emulate a browser's HTTP requests exactly
@(you need an account to see links) the neologin cookie value is what keeps you logged into Neo
@(you need an account to see links) the PHPSESSID is the PHP identifier of the $_SESSION array and other session variables stored on the Neo server for the current user's session
The Following 2 Users Say Thank You to Zachafer For This Useful Post:
@(you need an account to see links) ideally you should be storing all cookies that are set by Set-Cookie in the HTTP Response. Remember the goal is to remain undetected and a foundational piece of this is emulate a browser's HTTP requests exactly
Thanks, right now im even updating and saving my cookies as per every request so the cookies are exactly as the browser behavior.
My problem was assuming I was getting all the cookies from the beginning.