mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 06:44:23 +01:00
Attempting better support for URL
This commit is contained in:
@@ -147,16 +147,13 @@ class InputHelper(object):
|
||||
host = host.replace(" ", "")
|
||||
for ips in host.split(","):
|
||||
# check if it is a domain name
|
||||
if ips.split(".")[-1][0].isalpha():
|
||||
if ips.split(".")[0][0].isalpha():
|
||||
destination_set.add(ips)
|
||||
continue
|
||||
# checking for CIDR
|
||||
|
||||
if not arguments.nocidr and "/" in ips:
|
||||
if len(ips.split("/")) == 2 and ip.split("/")[1].replace("\n", "").isdigit():
|
||||
destination_set.update(InputHelper._get_cidr_to_ips(ips))
|
||||
else:
|
||||
destination_set.add(ips)
|
||||
destination_set.update(InputHelper._get_cidr_to_ips(ips))
|
||||
# checking for IPs in a range
|
||||
elif "-" in ips:
|
||||
destination_set.update(InputHelper._get_ips_from_range(ips))
|
||||
|
||||
Reference in New Issue
Block a user