diff options
Diffstat (limited to 'detection/vpnservices')
| -rw-r--r-- | detection/vpnservices/hotspotvpn_serverip.py | 2 | ||||
| -rw-r--r-- | detection/vpnservices/ipvanishvpn_servername.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/detection/vpnservices/hotspotvpn_serverip.py b/detection/vpnservices/hotspotvpn_serverip.py index 39aa875..e75cff3 100644 --- a/detection/vpnservices/hotspotvpn_serverip.py +++ b/detection/vpnservices/hotspotvpn_serverip.py @@ -38,7 +38,7 @@ class HotspotvpnServerip(VpnDetector): self.logger.info('Start to query hotspotvpn server ip from clickhouse database') # construct query sql - TIME_FILTER_PATTERN = "(common_recv_time > toDateTime('{$start_time}', '{$time_zone}')) AND(common_recv_time <= toDateTime('{$end_time}', '{$time_zone}'))" + TIME_FILTER_PATTERN = self.config['common']['time_filter_pattern'].replace('recv_time_columnname', self.config['common']['recv_time_columnname']) time_filter = TIME_FILTER_PATTERN.replace("{$start_time}", str(self.start_time)).replace("{$end_time}", str( self.end_time)).replace("{$time_zone}", self.time_zone) self.sql = self.sql.replace("{$db_name}", self.dbname).replace("{$table_name}", self.table_name) diff --git a/detection/vpnservices/ipvanishvpn_servername.py b/detection/vpnservices/ipvanishvpn_servername.py index 3d82074..f9f7890 100644 --- a/detection/vpnservices/ipvanishvpn_servername.py +++ b/detection/vpnservices/ipvanishvpn_servername.py @@ -39,7 +39,7 @@ class IpvanishvpnServername(VpnDetector): self.logger.info('Start to query ipvanishvpn server name from session record') # construct query sql - TIME_FILTER_PATTERN = "(common_recv_time > toDateTime('{$start_time}', '{$time_zone}')) AND(common_recv_time <= toDateTime('{$end_time}', '{$time_zone}'))" + TIME_FILTER_PATTERN = self.config['common']['time_filter_pattern'].replace('recv_time_columnname', self.config['common']['recv_time_columnname']) time_filter = TIME_FILTER_PATTERN.replace("{$start_time}", str(self.start_time)).replace("{$end_time}", str( self.end_time)).replace("{$time_zone}", self.time_zone) self.sql = self.sql.replace("{$db_name}", self.dbname).replace("{$table_name}", self.table_name) |
