Remove Port from domgrep output

This commit is contained in:
TKE
2021-06-17 13:56:39 +02:00
parent 6254021e4f
commit 0d7f254aea

View File

@@ -11,7 +11,10 @@ for line in sys.stdin:
try: try:
p=urlparse(line) p=urlparse(line)
if not pattern.search(p.netloc): if not pattern.search(p.netloc):
print(p.netloc) if ":" in p.netloc:
print(p.netloc.split(":")[0])
else:
print(p.netloc)
except Exception as e: except Exception as e:
print(e) print(e)
pass pass