private void cmdSpiderUrl_click(object sender, System.EventArgs e)
        {
            string strNewGuid = "" + System.Guid.NewGuid();

            System.IO.Directory.CreateDirectory(Server.MapPath("~/temp/" + strNewGuid + "/"));

            m_spider            = new Spider.Spider();
            m_spider.OutputPath = Server.MapPath("~/temp/" + strNewGuid + "/");
            m_spider.sessionId  = intSessionId;
            m_spider.Start(new Uri(this.txtBaseSpiderUrl.Text), 1);

            lstUrls_bind();

            lblUrlCount_bind();
        }
예제 #2
0
        private void cmdSpider_Click(object sender, System.EventArgs e)
        {
            lstUrls.Items.Clear();

            string strNewGuid = "" + System.Guid.NewGuid();
            string strNewPath = "" + Application.StartupPath + "/temp/" + strNewGuid + "/";

            System.IO.Directory.CreateDirectory(strNewPath);

            m_spider            = new Spider.Spider();
            m_spider.OutputPath = Application.StartupPath + "/temp/" + strNewGuid + "/";
            m_spider.rootPath   = strNewPath;
            m_spider.sessionId  = 0;
            m_spider.Start(new Uri(this.txtBaseUrl.Text), 1);

            System.Threading.Thread.Sleep(6000);

            string strUrl = "";

            string[] strTmpUrl;

            try
            {
                System.IO.StreamReader oRead;
                oRead  = System.IO.File.OpenText(strNewPath + "tmpUrl.txt");
                strUrl = oRead.ReadToEnd();
                oRead.Close();
                oRead = null;

                System.IO.Directory.Delete(strNewPath, true);

                strTmpUrl = strUrl.Split(';');

                foreach (string strTmp in strTmpUrl)
                {
                    lstUrls.Items.Add(strTmp);
                }
            }
            catch
            {
                MessageBox.Show("No urls found, is the base url correct?");
            }
        }
예제 #3
0
        public void SpiderThread()
        {
            m_spider            = new Spider.Spider();
            m_spider.OutputPath = "";

            int threads = 1;

            if (threads < 1)
            {
                threads = 1;
            }

            try
            {
                m_spider.Start(new Uri(this.txtBaseUrl.Text), threads);
            }
            catch
            {
                return;
            }
        }
        public void SpiderThread()
        {
            m_spider = new Spider.Spider();
            //m_spider.re = this;
            m_spider.OutputPath = "";

            int threads = 1;

            if (threads < 1)
            {
                threads = 1;
            }

            try
            {
                m_spider.Start(new Uri(this.txtBaseSpiderUrl.Text), threads);
            }
            catch (UriFormatException ex)
            {
                Response.Write(ex.Message);
                return;
            }
        }
예제 #5
0
        private void cmdSpider_Click(object sender, System.EventArgs e)
        {
            lstUrls.Items.Clear();

            string strNewGuid="" + System.Guid.NewGuid();
            string strNewPath="" + Application.StartupPath + "/temp/" + strNewGuid + "/";

            System.IO.Directory.CreateDirectory(strNewPath);

            m_spider = new Spider.Spider();
            m_spider.OutputPath = Application.StartupPath + "/temp/" + strNewGuid + "/";
            m_spider.rootPath=strNewPath;
            m_spider.sessionId=0;
            m_spider.Start(new Uri(this.txtBaseUrl.Text), 1);

            System.Threading.Thread.Sleep(6000);

            string strUrl="";
            string[] strTmpUrl;

            try
            {

                System.IO.StreamReader oRead;
                oRead = System.IO.File.OpenText(strNewPath + "tmpUrl.txt");
                strUrl=oRead.ReadToEnd();
                oRead.Close();
                oRead=null;

                System.IO.Directory.Delete(strNewPath, true);

                strTmpUrl=strUrl.Split(';');

                foreach(string strTmp in strTmpUrl)
                {
                    lstUrls.Items.Add(strTmp);
                }

            }
            catch
            {
                MessageBox.Show("No urls found, is the base url correct?");
            }
        }
예제 #6
0
        public void SpiderThread()
        {
            m_spider = new Spider.Spider();
            m_spider.OutputPath = "";

            int threads = 1;

            if(threads<1) threads = 1;

            try
            {
                m_spider.Start(new Uri(this.txtBaseUrl.Text),threads);
            }
            catch
            {

                return;
            }
        }
        private void cmdSpiderUrl_click(object sender, System.EventArgs e)
        {
            string strNewGuid="" + System.Guid.NewGuid();

            System.IO.Directory.CreateDirectory(Server.MapPath("~/temp/" + strNewGuid + "/"));

            m_spider = new Spider.Spider();
            m_spider.OutputPath = Server.MapPath("~/temp/" + strNewGuid + "/");
            m_spider.sessionId=intSessionId;
            m_spider.Start(new Uri(this.txtBaseSpiderUrl.Text), 1);

            lstUrls_bind();

            lblUrlCount_bind();
        }
        public void SpiderThread()
        {
            m_spider = new Spider.Spider();
            //m_spider.re = this;
            m_spider.OutputPath = "";

            int threads = 1;

            if(threads<1) threads = 1;

                try
                {
                    m_spider.Start(new Uri(this.txtBaseSpiderUrl.Text),threads);
                }
                catch( UriFormatException ex)
                {
                    Response.Write(ex.Message);
                    return;
                }
        }