idk
This commit is contained in:
parent
93ac65e87a
commit
a2950a7c14
@ -87,6 +87,7 @@ 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"])))
|
||||
)
|
||||
|
||||
print("----------------")
|
||||
|
@ -14,5 +14,15 @@ def ermWhatTheCountry(inpIpAddress: Annotated[str, "Some IP address that ya want
|
||||
except Exception as errrrrr:
|
||||
return f"Error: {errrrrr}"
|
||||
|
||||
def ermWhatTheISP(inpIpAddress: Annotated[str, "Some IP address that ya want to get ISP for"]):
|
||||
try:
|
||||
skibidi = ip2loc_db.get_all(inpIpAddress)
|
||||
|
||||
#return rec.country_long # Full country name, e.g. "Sweden"
|
||||
return skibidi.isp
|
||||
|
||||
except Exception as errrrrr:
|
||||
return f"Error: {errrrrr}"
|
||||
|
||||
#print(ermWhatTheCountry("65.109.142.32"))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user