diff --git a/README.md b/README.md index b07614d..bf90533 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@
-
+
diff --git a/das/common.py b/das/common.py
index 5e0e278..1b247cc 100644
--- a/das/common.py
+++ b/das/common.py
@@ -2,7 +2,7 @@
__author__ = '@snovvcrash'
__site__ = 'https://github.com/snovvcrash/DivideAndScan'
-__version__ = '1.0.2'
+__version__ = '1.0.3'
import time
import shlex
diff --git a/das/scan.py b/das/scan.py
index 9667f85..37a7938 100644
--- a/das/scan.py
+++ b/das/scan.py
@@ -52,13 +52,13 @@ def __init__(self, db_path, hosts, ports, limit=None, raw_output=False):
P = (Path.home() / '.das' / f'nmap_{self.db_name}').glob('*.*')
hosts = [ip.stem for ip in P]
#result = self.db.search(~(self.Host.ip.one_of(hosts)))
- result = [item[ip] for item in self.db.all() for ip in hosts if item[ip] not in hosts]
+ result = [item for item in self.db.all() if item['ip'] not in hosts]
else:
hosts = hosts.split(',')
hosts = [IPNetwork(h) for h in hosts]
hosts = [str(ip) for ip_obj in hosts for ip in ip_obj]
#result = self.db.search(self.Host.ip.one_of(hosts))
- result = [item[ip] for item in self.db.all() for ip in hosts]
+ result = [item for item in self.db.all() if item['ip'] in hosts]
self.ip_ports_dict, self.ip_domains_dict = defaultdict(set), {}
for item in result:
@@ -80,7 +80,7 @@ def __init__(self, db_path, hosts, ports, limit=None, raw_output=False):
else:
ports = [int(p) for p in ports.split(',')]
#result = self.db.search(self.Host.port.one_of(ports))
- result = [item[port] for item in self.db.all() for port in ports]
+ result = [item for item in self.db.all() if item['port'] in ports]
self.port_ip_dict = defaultdict(set)
for item in result:
diff --git a/pyproject.toml b/pyproject.toml
index 04b0b43..9bb2f6d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "divideandscan"
-version = "1.0.2"
+version = "1.0.3"
description = "Divide full port scan results and use it for targeted Nmap runs"
authors = ["Sam Freeside