TestParseCore.cs 748 B

123456789101112131415161718192021
  1. 
  2. namespace molilian.core
  3. {
  4. public partial class TestParseCore
  5. {
  6. public static List<string> _test_oaid = [
  7. "C712574A37194CC8AA2C94F4E94BF632069e05173327fe9168cc3829a5a22820",
  8. "E5519EE0E4724362BD71D42F8D5CD0200b57296c00ba6e16d2b0ff67abb97a87",
  9. "8E61FDE9411443F9A3642A6ACAD42747EC7D424979CC9C51CB1670D630EE7D8F",
  10. "FF29AB4ECA4E42A7A4E90DD266AE7B94c4e39ff01b38641d1738a7d57e83511b"
  11. ];
  12. public static bool InWhitelist(string ip, string oaid)
  13. {
  14. if (_test_oaid.Any(e => e.ToLower().Equals(oaid.ToLower()))) return true;
  15. if (!string.IsNullOrEmpty(ip) && ip.StartsWith("127.0.0")) return true;
  16. return false;
  17. }
  18. }
  19. }