コード例 #1
0
ファイル: RDPWatcher.cs プロジェクト: DrabanL/RDPGuard
        private void onAuditFailureLimitReached(string ip)
        {
            var ipAddress = IPAddress.Parse(ip);

            if (ipAddress.IsInRange(_settings.Whitelist))
            {
                // IP is whitelisted
                return;
            }

            var eventArg = new RDPEventArgs(ip);

            OnIPBlocked?.Invoke(this, eventArg);
            if (!eventArg.IsCancel)
            {
                _firewallBlock.Add(ip);
            }
        }