Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
powerful cookie deleting method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Fliss committed Jun 9, 2015
1 parent cbd0b19 commit 2d80a5e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bingRewards/Miner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,16 @@ private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentComp
private void startTimer_Tick(object sender, EventArgs e)
{
ReadAccounts(accountNum); //load in the accounts data first, then browse to cookie destroyer. This will trigger the start.
webBrowser1.Navigate("javascript:void((function(){var a,b,c,e,f;f=0;a=document.cookie.split('; ');for(e=0;e<a.length&&a[e];e++){f++;for(b='.'+location.host;b;b=b.replace(/^(?:%5C.|[^%5C.]+)/,'')){for(c=location.pathname;c;c=c.replace(/.$/,'')){document.cookie=(a[e]+'; domain='+b+'; path='+c+'; expires='+new Date((new Date()).getTime()-1e11).toGMTString());}}}})())");
webBrowser1.Navigate(new Uri("https://login.live.com/logout.srf"));
//webBrowser1.Navigate("javascript:void((function(){var a,b,c,e,f;f=0;a=document.cookie.split('; ');for(e=0;e<a.length&&a[e];e++){f++;for(b='.'+location.host;b;b=b.replace(/^(?:%5C.|[^%5C.]+)/,'')){for(c=location.pathname;c;c=c.replace(/.$/,'')){document.cookie=(a[e]+'; domain='+b+'; path='+c+'; expires='+new Date((new Date()).getTime()-1e11).toGMTString());}}}})())");


string[] theCookies = System.IO.Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Cookies));
foreach (string currentFile in theCookies)
{
System.IO.File.Delete(currentFile);
}

webBrowser1.Document.Window.Navigate(new Uri("https://login.live.com/logout.srf"));
countDown = Properties.Settings.Default.desktopsearches;
accountNum = accountNum + 1; //next account
startTimer.Enabled = false;
Expand Down

0 comments on commit 2d80a5e

Please sign in to comment.