forked from p34709852/monkey
restored mission import
This commit is contained in:
parent
9adffe86dc
commit
df4c8c6415
|
@ -1,8 +1,9 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import array
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import array
|
import psutil
|
||||||
import ipaddress
|
import ipaddress
|
||||||
from random import randint
|
from random import randint
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,10 @@ class MonkeyTunnel(Thread):
|
||||||
|
|
||||||
def set_tunnel_for_host(self, host):
|
def set_tunnel_for_host(self, host):
|
||||||
assert isinstance(host, VictimHost)
|
assert isinstance(host, VictimHost)
|
||||||
|
|
||||||
|
if not self.local_port:
|
||||||
|
return
|
||||||
|
|
||||||
ip_match = get_close_matches(host.ip_addr, local_ips()) or self.l_ips
|
ip_match = get_close_matches(host.ip_addr, local_ips()) or self.l_ips
|
||||||
host.default_tunnel = '%s:%d' % (ip_match[0], self.local_port)
|
host.default_tunnel = '%s:%d' % (ip_match[0], self.local_port)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue