Beispiel #1
0
        private void timer_cleardata_Tick(object sender, EventArgs e) // clear cache cookies history etc
        {
            nsIBrowserHistory historyMan = Xpcom.GetService <nsIBrowserHistory>(Gecko.Contracts.NavHistoryService);

            historyMan = Xpcom.QueryInterface <nsIBrowserHistory>(historyMan);
            historyMan.RemoveAllPages();


            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();

            // https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/imgICache
            Gecko.Cache.ImageCache.ClearCache(true);
            Gecko.Cache.ImageCache.ClearCache(false);
//            Gecko.Cache.CacheService.Clear(new CacheStoragePolicy());

            nsICacheStorageService cache;

            cache = Xpcom.GetService <nsICacheStorageService>("@mozilla.org/netwerk/cache-storage-service;1");
            try { cache.Clear(); }
            catch (Exception ex) { throw new ApplicationException("Could not clear cache:", ex); }

            imgICache icache;

            icache = Xpcom.GetService <imgITools>("@mozilla.org/image/tools;1").GetImgCacheForDocument(null);
            try { icache.ClearCache(false); }
            catch (Exception ex) { throw new ApplicationException("Could not clear image cache:", ex); }

            timer_cleardata.Stop();
        }
Beispiel #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            lblfm12fm2.Visible = false;
            lbl12lbl3.Visible  = false;
            //if (MessageBox.Show("Do you want to delete cookies?", "About to delete all cookies", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
            //{
            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();

            geckoWebBrowser1.Navigate("http://www.quikr.com/SignIn");

            while (geckoWebBrowser1.IsBusy)
            {
                Application.DoEvents();
            }

            string redir1 = "http://www.quikr.com/SignIn?aj=1&for=login_popup&GreetingName=";
            //string redirmid = Uri.EscapeDataString(lblfm12fm2.Text);
            string redirmid = Uri.EscapeDataString("*****@*****.**");
            string redir2   = "&Password="******"wRt*2014");
            string result    = String.Concat(redir1 + redirmid + redir2 + redirmid2);

            geckoWebBrowser1.Navigate(result);
            //}
        }
Beispiel #3
0
        public static void XoaCookie()
        {
            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();
        }
Beispiel #4
0
        private void clear_cookie()
        {
            nsIBrowserHistory historyMan = Xpcom.GetService <nsIBrowserHistory>(Gecko.Contracts.NavHistoryService);

            historyMan = Xpcom.QueryInterface <nsIBrowserHistory>(historyMan);
            historyMan.RemoveAllPages();
            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();
        }
Beispiel #5
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //
            Xpcom.Initialize(String.Format("{0}\\xulrunner\\", Path.GetDirectoryName(Application.ExecutablePath)));
            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();
            //
            Application.Run(new frmMain());
        }
Beispiel #6
0
 private void Mesajidasectikdevambtn_Click(object sender, EventArgs e)
 {
     if (mesajidasectikdevambtn.BackgroundImage == null)
     {
         islemloglabel.Text = "";
         nsICookieManager CookieMan;
         CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
         CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
         CookieMan.RemoveAll();
         MessageBox.Show("Yeni gönderim başlatılıyor3");
         Gizle();
         barkoduokutpnl.Visible = true;
         Wpbarkodvemesaj();
     }
 }
        void clearCookie()
        {
            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();

            ////nsIBrowserHistory historyMan = Xpcom.GetService<nsIBrowserHistory>(Gecko.Contracts.NavHistoryService);
            ////historyMan = Xpcom.QueryInterface<nsIBrowserHistory>(historyMan);
            ////historyMan.RemoveAllPages();

            //// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/imgICache
            //ImageCache.ClearCache(true);
            //ImageCache.ClearCache(false);
            //// Defaults to all devices(0) - https://bitbucket.org/geckofx/geckofx-9.0/issue/7/idl-translation-bug-for-enums
            //CacheService.Clear(new CacheStoragePolicy());
        }
Beispiel #8
0
        public BrowerGecko()
        {
            InitializeComponent();

            rqAdword             = new AdwordRequest();
            _googleAdwordService = new GoogleAdwordService();
            excutePath           = Path.GetDirectoryName(Application.ExecutablePath);

            Xpcom.Initialize(excutePath + @"\Gecko");
            //Xpcom.Initialize(@"F:\Sample\Gecko33\xulrunner-sdk\bin");
            nsIBrowserHistory historyMan = Xpcom.GetService <nsIBrowserHistory>(Gecko.Contracts.NavHistoryService);

            historyMan = Xpcom.QueryInterface <nsIBrowserHistory>(historyMan);
            historyMan.RemoveAllPages();
            // https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/imgICache
            nsICookieManager CookieMan;

            CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
            CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
            CookieMan.RemoveAll();
            IPPublic = getPublicIP();
            WriteLog(IPPublic.ToString());
            WriteLogIP("Activated");
        }
Beispiel #9
0
        private void ViewLink()
        {
            if (numberURL <= lstAdwordConfigs.Count - 1)
            {
                if (lstAdwordConfigs != null && lstAdwordConfigs.Count > 0)
                {
                    objAdwordConfig = lstAdwordConfigs[numberURL];
                }


                string[] arrKeyWord    = objAdwordConfig.KeyWord.Split(',');
                string[] arrclickLimit = objAdwordConfig.LinkQuantityClick.Split(',');
                if (arrclickLimit.Length > 0)
                {
                    Random rdClickLimit = new Random();
                    clickLimit = rdClickLimit.Next(int.Parse(arrclickLimit[0]), int.Parse(arrclickLimit[1]));
                    //MessageBox.Show("số lần click tối đa : " + clickLimit.ToString());
                }
                if (arrKeyWord.Length > 0)
                {
                    int i = 0;
                    //rdKeyWord.Next(0,arrKeyWord.Count()-1]
                    Random rdKeyWord = new Random();
                    string strQuery  = HttpUtility.UrlEncode(arrKeyWord[i]);
                    // geckoBrower.Dispose();
                    geckoBrower.Navigate(googleURL + strQuery);
                }
            }
            else
            {
                clickLinkTimer.Stop();
                clickLinkTimer.Enabled = false;
                clickLinkTimer.Dispose();
                //MessageBox.Show("Done Number URL : " + numberURL);
                WriteLogIP("NewIP");


                //click adsen

                //clickAdsenTimer = new Timer();
                //clickAdsenTimer.Interval = (1 * 20 * 1000);
                //clickAdsenTimer.Tick += new EventHandler(clickAdsenTimer_Tick);
                //clickAdsenTimer.Start();

                ////Loop khi reset IP

                System.Threading.Thread.Sleep(3 * 60000);
                IPPublic = getPublicIP();
                WriteLog(IPPublic.ToString());
                if (!IPPublic.Equals(IPPublic.ToString()))
                {
                    MessageBox.Show(IPPublic);
                }

                numberURL = 0;
                nsIBrowserHistory historyMan = Xpcom.GetService <nsIBrowserHistory>(Gecko.Contracts.NavHistoryService);
                historyMan = Xpcom.QueryInterface <nsIBrowserHistory>(historyMan);
                historyMan.RemoveAllPages();
                //clear cache

                nsICookieManager CookieMan;
                CookieMan = Xpcom.GetService <nsICookieManager>("@mozilla.org/cookiemanager;1");
                CookieMan = Xpcom.QueryInterface <nsICookieManager>(CookieMan);
                CookieMan.RemoveAll();
                loop_ViewLinkWithIP();
            }
        }