Example #1
0
        public static void cheeck(ado a, string ip, string mac, string Time, int id)
        {
            Console.WriteLine("Are You Ching The Router {0}", Environment.MachineName);
            Console.WriteLine("The old Data IP address: {0}, Mac address {1}, Time : {2} , And Interface : {3} , and ID = {4}", ip, mac, Time, Hinter, id);

            Console.Write(Environment.NewLine);
            Console.WriteLine("Yas   If You Chose Yas the Catch will consider this is You Router");
            Console.WriteLine("No    if You Chose No the Catch will consider this is Attack So please be careful what You chose ");
            string ch = Console.ReadLine();

            if (ch == "Yas")
            {
                //Delete old
                //
                a.Delete(id);
                Console.WriteLine("Delete Old Data {0}", id.ToString());

                Data d = new Data()
                {
                    inter = Hinter, date = DateTime.Now.ToString(), ip = Rip, mac = Rmac, name = "Router"
                };
                a.insert(d);
            }
            if (ch == "no")
            {
                Console.WriteLine("********************* You Have Been Attacked **************************");
            }
        }
Example #2
0
        public static void cheeck(ado a, string ip, string mac, string Time, int id)
        {
            Console.WriteLine("你在处理路由器吗 {0}", Environment.MachineName);
            Console.WriteLine("The old Data IP address: {0}, Mac address {1}, Time : {2} , And Interface : {3} , and ID = {4}", ip, mac, Time, Hinter, id);

            Console.Write(Environment.NewLine);
            Console.WriteLine("Yas   如果你选择了Yas,Catch会考虑这是你的路由器");
            Console.WriteLine("No    如果你没有选择,Catch会认为这是攻击,所以请小心你选择的 ");
            string ch = Console.ReadLine();

            if (ch == "Yas")
            {
                a.Delete(id);
                Console.WriteLine("Delete Old Data {0}", id.ToString());

                Data d = new Data()
                {
                    inter = Hinter, date = DateTime.Now.ToString(), ip = Rip, mac = Rmac, name = "Router"
                };
                a.insert(d);
            }
            if (ch == "no")
            {
                Console.WriteLine("********************* You Have Been Attacked **************************");
            }
        }