diff --git a/Python/INFLUXDBmthrd.py b/Python/INFLUXDBmthrd.py index 3913f69..3715a24 100644 --- a/Python/INFLUXDBmthrd.py +++ b/Python/INFLUXDBmthrd.py @@ -3,7 +3,7 @@ from influxdb_client import InfluxDBClient, Point, WritePrecision from influxdb_client.client.write_api import SYNCHRONOUS, ASYNCHRONOUS, WriteOptions from datetime import timedelta from proto import manWhatTheProto -from IP2Loc import ermWhatTheCountry +from IP2Loc import ermWhatTheCountry #, ermWhatTheISP from whatDomain import ermWhatATheIpFromDomainYaCrazy, ermWhatAAAATheIpFromDomainYaCrazy from concurrent.futures import ThreadPoolExecutor from typing import Final @@ -88,7 +88,8 @@ def process_flow(i, entry): .field("dstMask", inEntry["DST_MASK"]) .field("dstCntr", ermWhatTheCountry(str(inEntry["IPV4_DST_ADDR"]))) .field("srcCntr", ermWhatTheCountry(str(inEntry["IPV4_SRC_ADDR"]))) - .tag("ISP", ermWhatTheISP(str(inEntry["IPV4_SRC_ADDR"]))) + # .tag("srcISP", ermWhatTheISP(str(inEntry["IPV4_SRC_ADDR"]))) + # .tag("dstISP", ermWhatTheISP(str(inEntry["IPV4_DST_ADDR"]))) ) print("----------------") diff --git a/Python/IP2Loc.py b/Python/IP2Loc.py index e08136f..8f82ccf 100644 --- a/Python/IP2Loc.py +++ b/Python/IP2Loc.py @@ -2,7 +2,7 @@ import IP2Location from typing import Optional, Annotated # Load database once -ip2loc_db: IP2Location = IP2Location.IP2Location("IP2LOCATION-LITE-DB9.BIN") +ip2loc_db: IP2Location = IP2Location.IP2Location("IP2LOCATION-LITE-DB9.BIN", "SHARED_MEMORY") def ermWhatTheCountry(inpIpAddress: Annotated[str, "Some IP address that ya want to get country for"]) -> str: try: