Sinisterly
HttpWebRequest and cookies - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework)
+--- Thread: HttpWebRequest and cookies (/Thread-HttpWebRequest-and-cookies)



HttpWebRequest and cookies - schockerjo - 09-21-2013

Hello,

I have a problem getting the cookies from a users Browser (Firefox, Chrome, Opera,...).
I wanted to make a Facebook bot, but i dont know how to finde the cookies to load in the HttpWebRequest.

My "source":
Code:
Dim cookies As New CookieContainer For whatever In Idontknow If whatever.domain.contains("facebook") Then Dim cookie As New Cookie cookie.Name = whatever.Name cookie.Domain = whatever.domain cookies.Add(cookie) End If Next Dim Request As HttpWebRequest = CType(WebRequest.Create("yourpage"), HttpWebRequest) Request.CookieContainer = cookies 'Do something


Thank you ! :epic:


RE: HttpWebRequest and cookies - ArkPhaze - 09-22-2013

Why try to find them, make a WebRequest and save the cookies in a CookieContainer.


RE: HttpWebRequest and cookies - schockerjo - 09-22-2013

Hey,

the problem is that I want to post without the users password or username.

Thank You ! Smile


RE: HttpWebRequest and cookies - schockerjo - 09-24-2013

No idea ? Are there any API´s or something ?

Thank You Smile


RE: HttpWebRequest and cookies - ArkPhaze - 09-25-2013

(09-24-2013, 02:14 PM)schockerjo Wrote: No idea ? Are there any API´s or something ?

Thank You Smile

I have an idea, I just didn't feel like posting it because the solution would not be hard to research. If you know how to use cookies, then you should be able to lookup what you can do to login without username and password input numerous ways. And why would there be an API that would allow you to login with a username and password without having to input them and without the user knowing??


RE: HttpWebRequest and cookies - schockerjo - 09-25-2013

I mean the API, to get the Cookies from lets say Firefox.

And are the Cookies in the Enviroment.Cookies folder also the cookies for firefox ? Thank you.