Walter.Net.HoneyPot
Item Property (IPortScannerDetectionService)
Example 
Walter.Net.HoneyPot Assembly > Walter.Net.HoneyPot Namespace > IPortScannerDetectionService Interface : Item Property
Gets the IHoneyPotPortListner at the specified index.
Overload List
OverloadDescription
Gets the IHoneyPotPortListner at the specified index.  
Gets the Nullable with the specified alias.  
Example
using Microsoft.Extensions.DependencyInjection;
using System;
            
public class Example
{
    public static void Main()
    {
        // Configure services
        var serviceProvider = new ServiceCollection()
            .UsePortScannerProtection(option =>
            {
                option.Echo = 7;
                option.IgnoreAfterDetection = IgnoreScope.IPAddressAndPort;
            })
            .BuildServiceProvider();
            
        // Retrieve the port scanner detection service
        var portScannerService = serviceProvider.GetRequiredService<IPortScannerDetectionService>();
            
        // Access a HoneyPotPortListener by index
        IHoneyPotPortListner listener = portScannerService[0];
        listener.OnDetecting += (sender, e) =>
        {
            Console.WriteLine("Ping detected from IP: " + e.IPAddress);
        };
            
        // Start the service
        portScannerService.Start();
            
        // Additional logic here
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IPortScannerDetectionService Interface
IPortScannerDetectionService Members