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

C# WebRequests Finding variables for request header (Yahoo)

Discussion in 'C, C++, C#' started by Gooze, Sep 10, 2014.

  1. Gooze

    Gooze Newbie

    Joined:
    Oct 19, 2009
    Messages:
    39
    Likes Received:
    8
    Currently working on a project with yahoo emails, and I am trying to replicate a request header I've captured in Fiddler. Many of the variables I scrape beforehand from a previous GET response, but there's one that I can't figure out how is being generated.

    It's a key-value pair with the key being "rand" and the value a 13 digit number. Reading through a response before making this request there are a lot of similar numbers (same first 4-5 digits) that seem to be related with a serverTime variable. I'm just unsure how to go about finding how this is generated. Is this usually found in a javascript file?


    If what I wrote is unclear above, this is what I am trying to replicate:

    Creating this URL so I can POST to it
    Code:
    htt:/us-mg5.mail.yahoo.com/ws/mailPreferences/v1/jsonrpc?appid=YahooMailOptions&wssid=inHNvViK&ymreqid=13e9d8d-bf26-45-010008010000&rand=1410343316407
    wssit & reqid are found in a response before, but I don't know how to generate the rand variable.
     
  2. Parlez

    Parlez Regular Member

    Joined:
    Aug 23, 2011
    Messages:
    266
    Likes Received:
    362
    The value "1410343316407" is unix time, but the year is seems wrong.

    It's most likely generated by Javascript. You'll have dig into all the scripts on the webpage. Use Firebug on firefox and you'll be able to trace it easily.