Merge remote-tracking branch 'origin/master' into hotfix/various-exploit-fixes
This commit is contained in:
commit
8c14136213
|
@ -138,12 +138,14 @@ def get_ips_from_interfaces():
|
||||||
res = []
|
res = []
|
||||||
ifs = get_host_subnets()
|
ifs = get_host_subnets()
|
||||||
for net_interface in ifs:
|
for net_interface in ifs:
|
||||||
host_addr = ipaddress.ip_address(net_interface['addr'])
|
address_str = unicode(net_interface['addr'])
|
||||||
ip_interface = ipaddress.ip_interface(u"%s/%s" % (net_interface['addr'], net_interface['netmask']))
|
netmask_str = unicode(net_interface['netmask'])
|
||||||
|
host_address = ipaddress.ip_address(address_str)
|
||||||
|
ip_interface = ipaddress.ip_interface(u"%s/%s" % (address_str, netmask_str))
|
||||||
# limit subnet scans to class C only
|
# limit subnet scans to class C only
|
||||||
if ip_interface.network.num_addresses > 255:
|
if ip_interface.network.num_addresses > 255:
|
||||||
ip_interface = ipaddress.ip_interface(u"%s/24" % net_interface['addr'])
|
ip_interface = ipaddress.ip_interface(u"%s/24" % address_str)
|
||||||
addrs = [str(addr) for addr in ip_interface.network.hosts() if addr != host_addr]
|
addrs = [str(addr) for addr in ip_interface.network.hosts() if addr != host_address]
|
||||||
res.extend(addrs)
|
res.extend(addrs)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ if [ -d "/etc/systemd/network" ]; then
|
||||||
cp ${MONKEY_FOLDER}/ubuntu/systemd/*.service /lib/systemd/system/
|
cp ${MONKEY_FOLDER}/ubuntu/systemd/*.service /lib/systemd/system/
|
||||||
chmod +x ${MONKEY_FOLDER}/ubuntu/systemd/start_server.sh
|
chmod +x ${MONKEY_FOLDER}/ubuntu/systemd/start_server.sh
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
systemctl enable monkey-mongo
|
||||||
|
systemctl enable monkey-island
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${MONKEY_FOLDER}/create_certificate.sh
|
${MONKEY_FOLDER}/create_certificate.sh
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Monkey Island Service
|
Description=Monkey Island Service
|
||||||
|
Wants=monkey-mongo.service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
Loading…
Reference in New Issue