forked from p15670423/monkey
Ports are now taken from elastic_fingerprint module
This commit is contained in:
parent
d4262ef0bd
commit
4d6472cce1
|
@ -9,6 +9,7 @@ import logging
|
|||
import requests
|
||||
from exploit.web_rce import WebRCE
|
||||
from model import WGET_HTTP_UPLOAD
|
||||
from network.elasticfinger import ES_PORT, ES_SERVICE
|
||||
|
||||
import re
|
||||
|
||||
|
@ -44,9 +45,8 @@ class ElasticGroovyExploiter(WebRCE):
|
|||
def get_open_service_ports(self, port_list, names):
|
||||
# We must append elastic port we get from elastic fingerprint module because It's not marked as 'http' service
|
||||
valid_ports = super(ElasticGroovyExploiter, self).get_open_service_ports(port_list, names)
|
||||
elastic_service = [service for service in self.host.services if 'elastic-search' in service][0]
|
||||
elastic_port = [elastic_service.lstrip('elastic-search-'), False]
|
||||
valid_ports.append(elastic_port)
|
||||
if ES_SERVICE in self.host.services:
|
||||
valid_ports.append([ES_PORT, False])
|
||||
return valid_ports
|
||||
|
||||
def exploit(self, url, command):
|
||||
|
|
Loading…
Reference in New Issue