Merge pull request #85 from codingo/ip-address-detector-fix

Ip address detector fix
This commit is contained in:
Sajeeb Lohani
2019-11-03 20:12:57 +11:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
__version__ = '1.7.2'
__version__ = '1.7.3'

View File

@@ -144,9 +144,9 @@ class InputHelper(object):
@staticmethod
def _pre_process_hosts(host_ranges, destination_set, arguments):
for host in host_ranges:
host = host.replace(" ", "")
host = host.replace(" ", "").replace("\n", "")
# check if it is a domain name
if host.split(".")[0][0].isalpha():
if host.split(".")[0][0].isalpha() or host.split(".")[-1][-1].isalpha():
destination_set.add(host)
continue
for ips in host.split(","):