summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author尹姜谊 <[email protected]>2024-03-18 14:03:56 +0800
committer尹姜谊 <[email protected]>2024-03-18 14:03:56 +0800
commit359f9bf841f6d42ea28e9bb88542880d93a1faff (patch)
treef2f46b4c530d67644ab71abfb9653f30db2561c2
parent1ae6493db25b9dcdf0be3a302e4afc2f443458f2 (diff)
Add: 过滤局域网IP
-rw-r--r--config24.01.yaml2
-rw-r--r--detection/vpn_detector.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/config24.01.yaml b/config24.01.yaml
index 4008c3a..7f7dc7d 100644
--- a/config24.01.yaml
+++ b/config24.01.yaml
@@ -93,7 +93,7 @@ protonvpn:
plugin_id: 4
object_type: ip
confidence: confirmed
- sql: SELECT server_ip, groupUniqArray(server_port) AS ports FROM {$db_name}.{$table_name} WHERE {$time_filter} AND (server_port IN (443, 7770, 8443, 88, 5060, 51820, 500, 80, 1224, 4500, 4569, 5060, 1194)) GROUP BY server_ip HAVING length(ports) > 10
+ sql: SELECT server_ip FROM {$db_name}.{$table_name} WHERE {$time_filter} AND (server_port IN (443, 7770, 8443, 88, 5060, 51820, 500, 80, 1224, 4500, 4569, 5060, 1194)) GROUP BY server_ip HAVING length(ports) > 10
# tsg系统内置Cyberghost-UDP APP获取新增活跃IP
diff --git a/detection/vpn_detector.py b/detection/vpn_detector.py
index 78bea7d..a08c1c2 100644
--- a/detection/vpn_detector.py
+++ b/detection/vpn_detector.py
@@ -20,7 +20,7 @@ from clickhouse_driver import Client
from tool.Config import Config
from tool.KnowledgeBaseTool import KnowledgeApi
import concurrent.futures
-from tool.Functions import is_valid_ip
+from tool.Functions import is_valid_public_ip
import awdb
@@ -175,7 +175,7 @@ class VpnDetector:
def filtered_by_ip(self, original_ip_list, delete_ip_list):
for ip in delete_ip_list:
- if is_valid_ip(ip):
+ if is_valid_public_ip(ip):
if ip in original_ip_list:
original_ip_list.remove(ip)
elif ip.endswith('*'):