Skip to content

Commit

Permalink
try to fix ports filter, but not succesfull
Browse files Browse the repository at this point in the history
  • Loading branch information
FischLord committed Feb 21, 2024
1 parent ed24ecf commit e07963d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ip-atlas/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def filterByPort(search, data):
# for host in data:
if not search in goThrough:
for i in range(len(data["hosts"])):
dataPorts = data["hosts"][i]["ports"]
for port in dataPorts:
if search in port:
dataPortsFB = data["hosts"][i]["portsFB"]
for portFB in dataPortsFB:
if search in portFB:
result["hosts"].append(data["hosts"][i])
break
return result
Expand Down Expand Up @@ -129,6 +129,8 @@ def filterByTags(search, data):

def filterAll(ip, name, port, tag, data):
result = data
print("Filter: ", ip, name, port, tag)
print("Data: ", data)
if ip != "":
ip = devideIp(ip)
result = filterByIp(ip[0], ip[1], ip[2], ip[3], result)
Expand Down

0 comments on commit e07963d

Please sign in to comment.