Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void bypassHF(string mainurl)
- {
- //global variable that you must create
- // WebBrowser wb = new WebBrowser() { ScriptErrorsSuppressed = true };
- Uri url = new Uri(mainurl);
- wb.Url = url;
- wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_doccom);
- }
- private void wb_doccom(object sender, WebBrowserDocumentCompletedEventArgs e)
- {
- string value = wb.Document.Cookie;
- string[] separators = { "=" };
- string[] words = value.Split(separators, StringSplitOptions.RemoveEmptyEntries);
- string cvalue = Regex.Replace(words[1], @";.*", "");
- System.Net.Cookie c = new System.Net.Cookie { };
- c.Name = words[0];
- c.Value = cvalue;
- c.Domain = wb.Url.Host;
- //reconfigure this to your liking
- //textBox1.Text = c.ToString();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement