Skip to content
Snippets Groups Projects
Commit dae544de authored by qweqweasdasd's avatar qweqweasdasd
Browse files

Fixed endpoint port missing

parent 5a4fbf81
No related branches found
No related tags found
1 merge request!4Fixed endpoint port missing
Pipeline #85048 passed
......@@ -385,9 +385,19 @@ def import_dep_info(file_path, endpoints_to_scan):
endpoints = dict()
for key in data['outputs'].keys():
if key in endpoints_to_scan:
endpoint = str(data['outputs'][key]).split("/")[2]
print("endpoint",endpoint)
host,port = endpoint.split(':')
endpoint = str(data['outputs'][key])
prefix,url = endpoint.split("://")
if ":" in url:
host,port = url.split(":")
else:
host = url
if prefix == "https":
port = 443
elif prefix == 'http':
port = 80
else:
raise Exception(f"Impossible to parse the endpoint port. Endpoint: {endpoint}")
print(f"Endpoint: {host}:{port}")
if host not in endpoints:
endpoints[host] = {"22"}
endpoints[host].add(port)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment