GET and POST requests

Discussion in 'Programming & Reversing Discussion' started by awji, Mar 6, 2020.

  1. awji

    awji United States Premium Premium

    Post Count:
    429
    Likes Received:
    14
    Stats
    Does anyone know how to get like cookie, uaid, etc that's used as a header of a post request? I was trying to make some post requests to websites and some websites require those, which I do not know how to get.

    Any help would be appreciated!
     

    Mr. Ad Advertisement

     
  2. Rain

    Rain United States Premium Premium

    Post Count:
    266
    Likes Received:
    797
    Stats
    It really depends on what language you use.

    In C#, you wanna create a cookie container which is basically where all the cookies your HTTP client retrieves and stores them.
    Code:
    var cookieContainer = new CookieContainer();
    var proxy = new WebProxy(proxyInfo)
        {
     UseDefaultCredentials = false
                };
                using (var cHandler = new HttpClientHandler
                {
                    CookieContainer = cookieContainer,
                    UseCookies = true,
                    Proxy = proxy,
                    UseProxy = true
                })
    The code looks something like this.
     
  3. awji

    awji United States Premium Premium

    Post Count:
    429
    Likes Received:
    14
    Stats
    I'm trying to use python! So if a browser requires a cookie as a header for POST request, do I just get cookie using GET request and then use the same cookie for POST?
     
  4. Rain

    Rain United States Premium Premium

    Post Count:
    266
    Likes Received:
    797
    Stats
    HTTP Clients collect cookies as they send requests and get responses back from endpoints. So if you need to send a certain GET request that has specific cookies you need, then you'll need to do that before sending your POST request.
     
  5. awji

    awji United States Premium Premium

    Post Count:
    429
    Likes Received:
    14
    Stats
    Man I just give up haha it's too complicated for me
     
  6. she40841

    she40841 Sweden BIG‏‏‏‏‎ ‎‏‏‎‏‏‎ ‎ ‎‏‏‎BRAIN‏‏‎ ‎‏‏‎ ‎‏‏‏‏‎ ‎CLUB

    Post Count:
    621
    Likes Received:
    261
    Stats
    Fiddler
     
    Qybah likes this.
  7. yazhivu

    yazhivu Netherlands The New Guy

    Post Count:
    31
    Likes Received:
    107
    Stats

    You can use the requests lib. It is very easy to understand.
     

Share This Page

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