forked from p15670423/monkey
Island: Use IPv4Address in resources.IPAddresses
This commit is contained in:
parent
526fd6f941
commit
c2f3def33b
|
@ -1,3 +1,4 @@
|
||||||
|
from ipaddress import IPv4Address
|
||||||
from typing import Sequence
|
from typing import Sequence
|
||||||
|
|
||||||
from monkey_island.cc.resources.AbstractResource import AbstractResource
|
from monkey_island.cc.resources.AbstractResource import AbstractResource
|
||||||
|
@ -11,8 +12,8 @@ class IPAddresses(AbstractResource):
|
||||||
|
|
||||||
urls = ["/api/island/ip-addresses"]
|
urls = ["/api/island/ip-addresses"]
|
||||||
|
|
||||||
def __init__(self, ip_addresses: Sequence[str]):
|
def __init__(self, ip_addresses: Sequence[IPv4Address]):
|
||||||
self._ips = ip_addresses
|
self._ips = list(map(str, ip_addresses))
|
||||||
|
|
||||||
@jwt_required
|
@jwt_required
|
||||||
def get(self) -> Sequence[str]:
|
def get(self) -> Sequence[str]:
|
||||||
|
|
Loading…
Reference in New Issue