forked from p15670423/monkey
Remove unused `check_if_port_open` in `infection_monkey/exploit/web_rce.py`
This commit is contained in:
parent
5f8547a7ee
commit
0c3e385c86
|
@ -25,7 +25,7 @@ from infection_monkey.model import (
|
|||
RUN_MONKEY,
|
||||
WGET_HTTP_UPLOAD,
|
||||
)
|
||||
from infection_monkey.network.tools import check_tcp_port, tcp_port_to_service
|
||||
from infection_monkey.network.tools import tcp_port_to_service
|
||||
from infection_monkey.telemetry.attack.t1197_telem import T1197Telem
|
||||
from infection_monkey.telemetry.attack.t1222_telem import T1222Telem
|
||||
|
||||
|
@ -188,13 +188,6 @@ class WebRCE(HostExploiter):
|
|||
|
||||
return valid_ports
|
||||
|
||||
def check_if_port_open(self, port):
|
||||
is_open, _ = check_tcp_port(self.host.ip_addr, port)
|
||||
if not is_open:
|
||||
LOG.info("Port %d is closed on %r, skipping", port, self.host)
|
||||
return False
|
||||
return True
|
||||
|
||||
def get_command(self, path, http_path, commands):
|
||||
try:
|
||||
if "linux" in self.host.os["type"]:
|
||||
|
|
Loading…
Reference in New Issue