|
1 | | -# Copyright (C) 2002-2024 IP2Location.com |
| 1 | +# Copyright (C) 2002-2026 IP2Location.com |
2 | 2 | # All Rights Reserved |
3 | 3 | # |
4 | 4 | # This library is free software: you can redistribute it and/or |
@@ -85,7 +85,7 @@ def inet_pton(t, addr): |
85 | 85 | return out_addr_p.raw |
86 | 86 | socket.inet_pton = inet_pton |
87 | 87 |
|
88 | | -_VERSION = '3.5.1' |
| 88 | +_VERSION = '3.6.1' |
89 | 89 | _NO_IP = 'MISSING IP ADDRESS' |
90 | 90 | _FIELD_NOT_SUPPORTED = 'NOT SUPPORTED' |
91 | 91 | _INVALID_IP_ADDRESS = 'INVALID IP ADDRESS' |
@@ -175,7 +175,7 @@ def open(self, filename): |
175 | 175 | self._databasesize = struct.unpack('B', header_row[31:32])[0] |
176 | 176 |
|
177 | 177 | # check if is correct BIN (should be 2 for IP2Proxy BIN file), also checking for zipped file (PK being the first 2 chars) |
178 | | - # only BINs from Jan 2021 onwards have _dbcolumn and _dbtype |
| 178 | + # only BINs from Jan 2021 onwards have _productcode |
179 | 179 | if ((self._productcode != 2 and self._dbyear >= 21) or (self._dbtype == 80 and self._dbcolumn == 75)): |
180 | 180 | self._f.close() |
181 | 181 | del self._f |
@@ -357,9 +357,9 @@ def get_all(self, ip): |
357 | 357 | fraud_score = rec.fraud_score |
358 | 358 | if rec.country_short != _INVALID_IP_ADDRESS: |
359 | 359 | if self._dbtype == 1: |
360 | | - is_proxy = 0 if (rec.country_short == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES')) else 1) |
| 360 | + is_proxy = 0 if (rec.country_short == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES') | (rec.proxy_type == 'AIC')) else 1) |
361 | 361 | else: |
362 | | - is_proxy = 0 if (rec.proxy_type == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES')) else 1) |
| 362 | + is_proxy = 0 if (rec.proxy_type == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES') | (rec.proxy_type == 'AIC')) else 1) |
363 | 363 | else: |
364 | 364 | is_proxy = -1 |
365 | 365 | except: |
|
0 commit comments