Results 1 to 9 of 9

Thread: Cookie Help

  1. #1
    npm's Avatar
    Joined
    Dec 2011
    Posts
    813
    Userbars
    15
    Thanks
    735
    Thanked
    564/219
    DL/UL
    84/3
    Mentioned
    109 times
    Time Online
    83d 21h 28m
    Avg. Time Online
    28m

    Cookie Help

    Background:

    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:



    Im aware that are a few others that are involved but im not getting all of them, but I can login in with these cookies a few times but not for the expiration time of the neoremember cookie. any toughs? do I need all of them to make it work properly? Thanks in advance.
    @(you need an account to see links), @(you need an account to see links), @(you need an account to see links).
    Last edited by npm; 12-22-2016 at 12:04 PM.

  2. #2

    Joined
    Jul 2012
    Posts
    1,888
    Thanks
    1,619
    Thanked
    3,297/1,003
    DL/UL
    223/0
    Mentioned
    469 times
    Time Online
    132d 23h 52m
    Avg. Time Online
    45m
    Quote Originally Posted by hectorvazc View Post
    Background:

    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:


    Im aware that are a few others that are involved but im not getting all of them, but I can login in with these cookies a few times but not for the expiration time of the neoremember cookie. any toughs? do I need all of them to make it work properly? Thanks in advance.
    @(you need an account to see links), @(you need an account to see links), @(you need an account to see links).
    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.

  3. The Following User Says Thank You to Daviid For This Useful Post:

    npm (12-22-2016)

  4. #3
    npm's Avatar
    Joined
    Dec 2011
    Posts
    813
    Userbars
    15
    Thanks
    735
    Thanked
    564/219
    DL/UL
    84/3
    Mentioned
    109 times
    Time Online
    83d 21h 28m
    Avg. Time Online
    28m
    Quote Originally Posted by Daviid View Post
    Can you send me a snippet of the code that logins, and browses some random pages? I'll see what I can find.


    Have the code at home, im at work right now but wrote that pseudo as I remember my code.

    EDIT: It might be the PHPSESSID not sure why its not been retrieve by neither of the two API.
    Last edited by npm; 12-22-2016 at 12:44 PM.

  5. #4

    Joined
    Jul 2012
    Posts
    1,888
    Thanks
    1,619
    Thanked
    3,297/1,003
    DL/UL
    223/0
    Mentioned
    469 times
    Time Online
    132d 23h 52m
    Avg. Time Online
    45m
    Quote Originally Posted by hectorvazc View Post


    Have the code at home, im at work right now but wrote that pseudo as I remember my code.

    EDIT: It might be the PHPSESSID not sure why its not been retrieve by neither of the two API.
    Seems good to me, if you can send me the code later I'll try monitoring with Charles Proxy to see what's going on.

  6. The Following User Says Thank You to Daviid For This Useful Post:

    npm (12-22-2016)

  7. #5
    Accelerator's Avatar
    Joined
    Jul 2013
    Posts
    4,995
    Userbars
    26
    Thanks
    1,986
    Thanked
    3,789/1,696
    DL/UL
    178/0
    Mentioned
    744 times
    Time Online
    335d 1h 18m
    Avg. Time Online
    2h 3m
    Haven't tested which are the exact cookies needed for a session to "keep-alive" (LOL) but these are the ones I use:

    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)
    (you need an account to see links)
    (you need an account to see links)
    (you need an account to see links)

    "Date et dabitur vobis"
    「Let's fight 恐れはない」


    "A quantum supercomputer calculating for a thousand years could not even approach the number of f��ks I do not give"

    「君が望むモノは何?」

  8. The Following 2 Users Say Thank You to Accelerator For This Useful Post:

    Daviid (12-22-2016),npm (12-22-2016)

  9. #6
    npm's Avatar
    Joined
    Dec 2011
    Posts
    813
    Userbars
    15
    Thanks
    735
    Thanked
    564/219
    DL/UL
    84/3
    Mentioned
    109 times
    Time Online
    83d 21h 28m
    Avg. Time Online
    28m
    Ok so after a test from what @accelerator said, I found that I needed to just visit another page before saving the cookies.

    and the cookie that changes every time is: npuid/

    so everything working fine now. thanks @(you need an account to see links) for your help too, will rep you both.


    EDIT: You must spread some Reputation around before giving it to Accelerator again. Remember me to do it later dude.
    Last edited by npm; 12-22-2016 at 04:02 PM.

  10. The Following 2 Users Say Thank You to npm For This Useful Post:

    Accelerator (12-22-2016),Daviid (12-22-2016)

  11. #7
    Accelerator's Avatar
    Joined
    Jul 2013
    Posts
    4,995
    Userbars
    26
    Thanks
    1,986
    Thanked
    3,789/1,696
    DL/UL
    178/0
    Mentioned
    744 times
    Time Online
    335d 1h 18m
    Avg. Time Online
    2h 3m

    (you need an account to see links)
    (you need an account to see links)
    (you need an account to see links)
    (you need an account to see links)

    "Date et dabitur vobis"
    「Let's fight 恐れはない」


    "A quantum supercomputer calculating for a thousand years could not even approach the number of f��ks I do not give"

    「君が望むモノは何?」

  12. The Following User Says Thank You to Accelerator For This Useful Post:

    npm (12-26-2016)

  13. #8
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    @(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

  14. The Following 2 Users Say Thank You to Zachafer For This Useful Post:

    Accelerator (12-28-2016),npm (12-28-2016)

  15. #9
    npm's Avatar
    Joined
    Dec 2011
    Posts
    813
    Userbars
    15
    Thanks
    735
    Thanked
    564/219
    DL/UL
    84/3
    Mentioned
    109 times
    Time Online
    83d 21h 28m
    Avg. Time Online
    28m
    Quote Originally Posted by Zachafer View 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •