From cee250389cc46cffe9b2518674d9f01ce932fb4a Mon Sep 17 00:00:00 2001 From: iyak Date: Fri, 5 Sep 2025 03:53:21 +0000 Subject: [PATCH] =?UTF-8?q?IsSkipIPorHost()=20PW/SMS=20=EC=9D=B8=EC=A6=9D?= =?UTF-8?q?=ED=8C=A8=EC=8A=A4=20=EA=B8=B0=EB=8A=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/Lib/Helpers.cs | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Base/Lib/Helpers.cs b/Base/Lib/Helpers.cs index 7266cb5..129095b 100644 --- a/Base/Lib/Helpers.cs +++ b/Base/Lib/Helpers.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Security.Cryptography; using System.Text; @@ -569,6 +570,48 @@ public static class Helpers /// true:skip처리, false:skip하지않음 /// public static bool IsSkipIPorHost(IpHostSkipGb gb, string ip, string host) + { + // HS 기존코드 변경 + + bool isReulst = false; + + ip = ip ?? ""; + host = host ?? ""; + + // PassWord 스킵 + string[] skipIpsForPassword = { "218.232.111.111" }; + string[] skipHostsForPassword = { "ynictea.nptc.kr", "admin.ynicte.com" }; + + // SmsAuth 스킵 + string[] skipIpsForSms = { "218.232.111.111" }; + string[] skipHostsForSms = { "ynictea.nptc.kr", "admin.ynicte.com" }; + + switch (gb) + { + case IpHostSkipGb.PassWord: + if (skipIpsForPassword.Contains(ip) || skipHostsForPassword.Any(h => host.Contains(h))) + { + isReulst = true; + } + break; + + case IpHostSkipGb.SmsAuth: + if (skipIpsForSms.Contains(ip) || skipHostsForSms.Any(h => host.Contains(h))) + { + isReulst = true; + } + break; + + default: + isReulst = false; + break; + } + + return isReulst; + } + + /* + public static bool IsSkipIPorHost(IpHostSkipGb gb, string ip, string host) { string ipAddrs, hosts; //ipAddrs1 = "127.0.0.1,218.232.111.111,59.150.105.195,59.150.105.198"; @@ -600,6 +643,8 @@ public static class Helpers } return false; } + */ + /// /// 문자열을 지정된 최대 자리수만큼 자르고 초과하면 "..."을 추가.