Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Log-in with web-browser then save the log-in cookie

So what I'm trying to make is a program that logs me in to a website... Okay this is really basic and I know how to do it. But the problem is that sometimes the login has a captcha and I don't know how to handle them using webrequests so I'm forced to use a webbrowser. Now how would one go about saving the cookie from the webbrowser after logging in so that I could then continue navigating the site using webrequests?

I hope this text made any sense.
Code
Dim request As HttpWebRequest = DirectCast(WebRequest.Create("Your url"), HttpWebRequest)
request.CookieContainer = New CookieContainer()
request.CookieContainer.SetCookies("Your url", YourWebBrowser.Document.Cookie)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by iTHXJan 25, 2019 05:26 PM 3 131 Jan 25, 2019 05:26 PM
Last Post: iTHX
[.NET] by Moon RockAug 19, 2017 12:30 PM 15 623 Aug 19, 2017 12:30 PM
Last Post: SNAKEGOTCHA
[.NET] by FiltrationNov 9, 2016 10:38 AM 8 172 Nov 9, 2016 10:38 AM
Last Post: Nikola Тesla