Click here to Skip to main content
15,914,225 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi brothers i am doing my final year project and i have presentation on this Friday 20-1-2012. my system is personal firewall and i have function which is to block the children from searching about the bad words and this function doesn't work with me so i want you to help me with this. when i insert the bad words in the system it's work means it's saved in the database but when i open the browser and i search about the word which in insert it to the database it is appear on the google result and i can open it, so i need those words i insert them to my database disappear on the browser result for example google result. below is the code which i did.
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace MonitorNetwork
{
    public partial class AddWords : Form
    {
        public AddWords()
        {
            InitializeComponent();
        }

        private void AddWords_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=MonitorNetworkDB;Integrated Security=True");
            SqlCommand cmd = conn.CreateCommand();
            cmd.CommandText = "Insert Into WordsTable (Words) Values (@Words)";

            // Fill our parameters

            cmd.Parameters.Add("@Words", SqlDbType.NVarChar, 50).Value = this.textBox1.Text;
            //cmd.Parameters.Add("@SourceMask", SqlDbType.NVarChar, 50).Value = this.txtIpMask.Text;
            //cmd.Parameters.Add("@SourcePort", SqlDbType.NVarChar, 50).Value = this.txtPort.Text;
            //cmd.Parameters.Add("@DestinatorIP", SqlDbType.NVarChar, 50).Value = this.txtIPAddress1.Text;
            //cmd.Parameters.Add("@DestinatorMask", SqlDbType.NVarChar).Value = this.txtIPMask1.Text;
            //cmd.Parameters.Add("@DestinatorPort", SqlDbType.NVarChar).Value = this.txtport1.Text;
            //cmd.Parameters.Add("@Protocol", SqlDbType.NVarChar).Value = this.comboBox1.Text;

            try
            {
                // Execute the command
                conn.Open();
                cmd.ExecuteNonQuery();
                conn.Close();

                MessageBox.Show("New Word Added Successfully!");
                textBox1.Clear();

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Clear();
        }
    }
}
Posted
Updated 17-Jan-12 20:21pm
v2
Comments
Anuja Pawar Indore 18-Jan-12 2:21am    
Added pre tag
[no name] 18-Jan-12 2:36am    
You simply want how you can filter google results.
Well, i think you can do it by filtering network traffic on Network Interface Card , which wouldnt be an easy way.You need to use WinpCap API for it.
As i said, this isn't an easy way.
Timberbird 18-Jan-12 3:02am    
This code block only shows inserting record to database. As your project is a firewall, you definitely have code that analyzes network traffic - add this code your question
Michel [mjbohn] 18-Jan-12 3:14am    
Well, I hope this is not all you've done so far. You don't mention anything about your traffic analyzing part of the project.
Show us the code that you have problems with.

1 solution

If you block children from bad words in Internet, they will pick up even worse from street. You cannot isolate children from life. But you can try to raise them as decent people by teaching them, trusting them, earning their trust and giving them positive example not from your words but from your behavior.

No one can be educated by isolation from the bad, but only by learning the good.

Please forgive me for this totally off-topic post.

—SA
 
Share this answer
 
v2
Comments
Michel [mjbohn] 18-Jan-12 7:20am    
Maybe off-topic, but true.
Sergey Alexandrovich Kryukov 18-Jan-12 14:05pm    
Thank you for supporting my opinion.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900