Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4693cf74b2 | |||
| 5ed8482dcb | |||
| 0a96dff67f | |||
| f937bbe25b |
@@ -48,4 +48,4 @@ def hosts_in_subnet(network: str) -> List[str]:
|
||||
if not is_subnet(network):
|
||||
print(f"{network} is not a network")
|
||||
|
||||
return [str(_) for _ in ipaddress.ip_network(network).hosts()]
|
||||
return [str(host) for host in ipaddress.ip_network(network).hosts()]
|
||||
|
||||
@@ -7,8 +7,8 @@ def test_is_port_open():
|
||||
|
||||
|
||||
def test_is_subnet():
|
||||
assert pscanner.is_subnet("192.168.1.0") == False
|
||||
assert pscanner.is_subnet("192.168.0/24") == True
|
||||
assert pscanner.is_subnet("192.168.1.0") is False
|
||||
assert pscanner.is_subnet("192.168.0/24") is True
|
||||
|
||||
|
||||
def test_hosts_in_subnet():
|
||||
|
||||
Reference in New Issue
Block a user