public void InsertEvemt_Succeeds()
        {
            //arrange
            string connectionString = @"Data Source=UB1NB092\SQL2012;Initial Catalog=AzureIdsDb;Persist Security Info=True;User ID=cyberproduct;Password=x2000; Connect Timeout=600;Max Pool Size = 200;Pooling = True";
            Ids.Common.Data.Interfaces.ISensorEventAgent isea = new SensorEventDbAgent(connectionString);

            //act
            int numInserted = isea.LogEvent( "100", "123.3.4.3", 80, "199.16.5.7", 80, DateTime.Now,"hello world");

            //assert
            Assert.AreEqual(numInserted, 1);
        }
示例#2
0
        static void Main(string[] args)
        {
            string connectionString = @"Data Source=UB1NB092\SQL2012;Initial Catalog=AzureIdsDb;Persist Security Info=True;User ID=cyberproduct;Password=x2000; Connect Timeout=600;Max Pool Size = 200;Pooling = True";

            //reporters
            List<IAlertReport> reporters = new List<IAlertReport>();
            //AzureSqlDbReportAgent ara = new AzureSqlDbReportAgent(connectionString);
            //reporters.Add(ara);
            reporters.Add(new Ids.Common.Reporters.SimpleReportAgent());

            //data agent
            SensorEventDbAgent dbDataAgent = new SensorEventDbAgent(connectionString);

            SimplePortScanAnalyser psa = new SimplePortScanAnalyser(reporters, 2000, dbDataAgent);

            psa.CheckForHorizontalScan(connectionString, 2, null);
        }
示例#3
0
        static void Main(string[] args)
        {
            string connectionString = @"Data Source=UB1NB092\SQL2012;Initial Catalog=AzureIdsDb;Persist Security Info=True;User ID=cyberproduct;Password=x2000; Connect Timeout=600;Max Pool Size = 200;Pooling = True";

            //reporters
            List<IAlertReport> reporters = new List<IAlertReport>();
            AzureSqlDbReportAgent ara = new AzureSqlDbReportAgent(connectionString);
            reporters.Add(ara);

            //data agent
            SensorEventDbAgent dbDataAgent = new SensorEventDbAgent(connectionString);

            SimpleWebDosAnalyser wda = new SimpleWebDosAnalyser(reporters, 2000, dbDataAgent);

            string webServerAddress = "69.5.9.180";

            wda.CheckForWebServerDosAttack(webServerAddress, 3, null);
        }