using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Web;
using System.IO;
using mshtml; 
namespace Php
{
    public partial class FormSqlceshi : Form
    {
        public FormSqlceshi()
        {
            InitializeComponent();
        }

        private void go_Click(object sender, EventArgs e)
        {
           
            String website = "http://www.xxly.com.cn/";
           
            //String website = "http://localhost/";
            Http http = new Http(website);

            http.Scan();

            //richTextBox_response.AppendText(http.HtmlCode);

            //寻找可能的SQL注入点，并显示出来
            ArrayList alLinks = http.alPossibleInjectionPoints;
            Array aLinks = alLinks.ToArray();
            int i = 0;
            listView_InjectionPoints.GridLines = true;//显示各个记录的分隔线 
            listView_InjectionPoints.View = View.Details;//定义列表显示的方式 
            listView_InjectionPoints.Scrollable = true; //需要时候显示滚动条
            listView_InjectionPoints.Columns.Add("可能的注入点", 400);
            listView_InjectionPoints.Columns.Add("是否已处理");
            listView_InjectionPoints.Columns.Add("可否注入");

            for (i = 0; i < aLinks.GetLength(0); i++)
            {
                ListViewItem lt = new ListViewItem();
                lt.SubItems[0].Text = ((InjectionPoint)aLinks.GetValue(i)).Url;
                lt.SubItems.Add(((InjectionPoint)aLinks.GetValue(i)).Isdealed.ToString());
                lt.SubItems.Add(((InjectionPoint)aLinks.GetValue(i)).CanInject.ToString());

                listView_InjectionPoints.Items.Add(lt);
            }  
        }
    }
}
