|
@@ -9,7 +9,7 @@ import re
|
|
|
|
|
|
console = Console()
|
|
|
|
|
|
-table = Table(show_header=True, header_style="bold blue")
|
|
|
+table = Table(show_header=True, header_style="bold green")
|
|
|
table.add_column("IP", style="dim")
|
|
|
table.add_column("Host")
|
|
|
table.add_column("Port")
|
|
@@ -51,11 +51,12 @@ def filter_by_port(port):
|
|
|
|
|
|
def filter_by_service(service):
|
|
|
global hosts
|
|
|
+ recomp = re.compile(service, re.IGNORECASE)
|
|
|
out = []
|
|
|
ports = []
|
|
|
for host in hosts:
|
|
|
for p in host["ports"]:
|
|
|
- if service.lower() in p["service"].lower():
|
|
|
+ if len(recomp.findall(p["service"])) > 0:
|
|
|
ports.append(p)
|
|
|
host["ports"] = ports
|
|
|
ports = []
|
|
@@ -66,7 +67,7 @@ def filter_by_service(service):
|
|
|
def filter_by_version(version):
|
|
|
global hosts
|
|
|
|
|
|
- recomp = re.compile(version)
|
|
|
+ recomp = re.compile(version, re.IGNORECASE)
|
|
|
out = []
|
|
|
ports = []
|
|
|
for host in hosts:
|