1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Logging into Gmail/Youtube Service by HTTP requests

Discussion in 'YouTube' started by omnipotent, Jun 19, 2012.

  1. omnipotent

    omnipotent Newbie

    Joined:
    Jun 7, 2012
    Messages:
    23
    Likes Received:
    4
    Hey guys,

    This question is directed to the ones that are experienced with logging in to Gmail by using the GET/POST HTTP request (bot). I have tried sniffing this scenario, but the primary problem is the SSL tunnel encrypting the whole thing, perhaps I am not experienced enough with this but when I tried doing a simple GET request on the login page, I keep getting the "302 Moved Temporarily" redirect, which I redirect to the page in the response but it keeps giving the same response. Am I missing something here?

    Thanks!
     
    Last edited: Jun 19, 2012
  2. izSpK

    izSpK BANNED BANNED

    Joined:
    Sep 5, 2010
    Messages:
    1,546
    Likes Received:
    1,666
    Go to programming section.
     
  3. omnipotent

    omnipotent Newbie

    Joined:
    Jun 7, 2012
    Messages:
    23
    Likes Received:
    4
    Damn then, mod please move this thread!
     
  4. cool0403

    cool0403 BANNED BANNED

    Joined:
    Dec 29, 2008
    Messages:
    565
    Likes Received:
    718
    Thats because all requests to google are now https, so doing a request without ssl to google or the login page will just redirect you to https. Since i think your not using some http wrapper that automatically redirect all 302,303 to the destination location you probably didn't get redirected.

    Use some sort of http wrapper, if you are literally making your own packets (as in construct the package yourself and sending it through tcp without really some sort of wrapper) then is going to be really hard to do the https, since you will need to connect to port 443 to do that.

    I use WinHttp for all of my http shit and it has been working well, i mean .net has an easy wrapper to use since it has a cookies container, but i like more WinHttp i already got used to it.
     
  5. skrode

    skrode Junior Member

    Joined:
    Nov 13, 2011
    Messages:
    103
    Likes Received:
    16
    Follow the redirect.
     
  6. omnipotent

    omnipotent Newbie

    Joined:
    Jun 7, 2012
    Messages:
    23
    Likes Received:
    4
    I followed the redirect, but what cool0403 said is true. I was making a socket implementation of HTTP from the ground up and had no support for HTTPS. I nearly got it working now, had to move to a different language to find libraries that would support HTTPS (not .NET ;) ).
     
  7. omnipotent

    omnipotent Newbie

    Joined:
    Jun 7, 2012
    Messages:
    23
    Likes Received:
    4
    Since I got the HTTPS to work, I scraped a lot of the required params from the HTML such as "GALX" and "dsh", however, I have a problem with the "checkConnection" value. In the html the value for this variable is empty, is it somehow modified when another GET request is done to check the connection by Google? There is a CheckConnection request (it can be scrapped also), but I don't know how to calculate the timestamp, perhaps its unix time. But in the request I don't see the checkConnection value being returned anywhere.. How can I find it?
     
    Last edited: Jun 20, 2012
  8. cool0403

    cool0403 BANNED BANNED

    Joined:
    Dec 29, 2008
    Messages:
    565
    Likes Received:
    718
    honestly thats basically a value that will be something like this youtube:xxx:1 , if you don't input anything youtube assumes you had javascript turned off. That value is not possible to grab without converting some processing some javascript functions.
     
    • Thanks Thanks x 1
  9. omnipotent

    omnipotent Newbie

    Joined:
    Jun 7, 2012
    Messages:
    23
    Likes Received:
    4
    Solved! :)
     
    Last edited: Jun 20, 2012