From 7325ca49bbcc2f87c35e8cbef26655ac41e445af Mon Sep 17 00:00:00 2001 From: 尹姜谊 Date: Wed, 17 Jan 2024 10:58:28 +0800 Subject: Modified:.gitignore配置修改 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- detection/tool/Functions.py | 28 --------------------- .../tool/__pycache__/Functions.cpython-39.pyc | Bin 10696 -> 0 bytes .../__pycache__/__init__.cpython-39.pyc | Bin 247 -> 0 bytes .../__pycache__/hotspotvpn_serverip.cpython-39.pyc | Bin 2609 -> 0 bytes .../ipvanishvpn_serverip.cpython-39.pyc | Bin 3133 -> 0 bytes .../ipvanishvpn_servername.cpython-39.pyc | Bin 2437 -> 0 bytes 6 files changed, 28 deletions(-) delete mode 100644 detection/tool/__pycache__/Functions.cpython-39.pyc delete mode 100644 detection/vpnservices/__pycache__/__init__.cpython-39.pyc delete mode 100644 detection/vpnservices/__pycache__/hotspotvpn_serverip.cpython-39.pyc delete mode 100644 detection/vpnservices/__pycache__/ipvanishvpn_serverip.cpython-39.pyc delete mode 100644 detection/vpnservices/__pycache__/ipvanishvpn_servername.cpython-39.pyc (limited to 'detection') diff --git a/detection/tool/Functions.py b/detection/tool/Functions.py index 043be6b..abcee51 100644 --- a/detection/tool/Functions.py +++ b/detection/tool/Functions.py @@ -394,34 +394,6 @@ class connectTest(): port=config['port'], database=config['database']) self.dbname = config['database'] - def dataTest(self): - """ - :return: 0:no data 2:wrong configuration - """ - # 测试数据库有无数据 - try: - # testSQL = "select * from " + self.tableName + " where (toDateTime(common_recv_time) >= '" + str( - # self.headTime) + "') and (toDateTime(common_recv_time) <='" + str(self.tailTime) + "') Limit 1" - - testSQL = "select * from " + self.tableName + " where common_recv_time >= toDateTime('" \ - + str(self.headTime) + "', '" + self.timeZone + "') and common_recv_time < toDateTime('" \ - + str(self.tailTime) + "', '" + self.timeZone + "') limit 1 " - - queryResult = self.client.execute(testSQL) - - if len(queryResult) < 1: - # logger.error(datetime.datetime.now(tz=pytz.timezone(self.timeZone)).strftime( - # "%Y-%m-%d %H:%M:%S") + '-' + str(self.headTime) + '~' + str( - # self.tailTime) + ' dataTest: ' + str('No data in this time window')) - return 0 - return 1 - except: - return 2 - # logger.error(datetime.datetime.now(tz=pytz.timezone(self.timeZone)).strftime( - # "%Y-%m-%d %H:%M:%S") + '-' + 'time: ' + str(self.headTime) + '~' + str( - # self.tailTime) + ' dataTest: ' + str( - # 'please check database configuration in config.yaml')) - def get_project_path(): path = os.path.join(os.getcwd()) diff --git a/detection/tool/__pycache__/Functions.cpython-39.pyc b/detection/tool/__pycache__/Functions.cpython-39.pyc deleted file mode 100644 index 1375d38..0000000 Binary files a/detection/tool/__pycache__/Functions.cpython-39.pyc and /dev/null differ diff --git a/detection/vpnservices/__pycache__/__init__.cpython-39.pyc b/detection/vpnservices/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index 2a33991..0000000 Binary files a/detection/vpnservices/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/detection/vpnservices/__pycache__/hotspotvpn_serverip.cpython-39.pyc b/detection/vpnservices/__pycache__/hotspotvpn_serverip.cpython-39.pyc deleted file mode 100644 index bc2413a..0000000 Binary files a/detection/vpnservices/__pycache__/hotspotvpn_serverip.cpython-39.pyc and /dev/null differ diff --git a/detection/vpnservices/__pycache__/ipvanishvpn_serverip.cpython-39.pyc b/detection/vpnservices/__pycache__/ipvanishvpn_serverip.cpython-39.pyc deleted file mode 100644 index 5e3a0e2..0000000 Binary files a/detection/vpnservices/__pycache__/ipvanishvpn_serverip.cpython-39.pyc and /dev/null differ diff --git a/detection/vpnservices/__pycache__/ipvanishvpn_servername.cpython-39.pyc b/detection/vpnservices/__pycache__/ipvanishvpn_servername.cpython-39.pyc deleted file mode 100644 index b6603a4..0000000 Binary files a/detection/vpnservices/__pycache__/ipvanishvpn_servername.cpython-39.pyc and /dev/null differ -- cgit v1.2.3