forked from p34709852/monkey
Update elasticfinger.py
This commit is contained in:
parent
bd279446fe
commit
192c24f6d4
|
@ -9,7 +9,7 @@ from model.host import VictimHost
|
||||||
from network import HostFinger
|
from network import HostFinger
|
||||||
|
|
||||||
ES_PORT = 9200
|
ES_PORT = 9200
|
||||||
ES_SERVICE = 'elastic-search-3306'
|
ES_SERVICE = 'elastic-search-9200'
|
||||||
ES_HTTP_TIMEOUT = 5
|
ES_HTTP_TIMEOUT = 5
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
__author__ = 'danielg'
|
__author__ = 'danielg'
|
||||||
|
@ -17,7 +17,7 @@ __author__ = 'danielg'
|
||||||
|
|
||||||
class ElasticFinger(HostFinger):
|
class ElasticFinger(HostFinger):
|
||||||
"""
|
"""
|
||||||
Fingerprints elastic search clusters, only on port 3306
|
Fingerprints elastic search clusters, only on port 9200
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -35,7 +35,6 @@ class ElasticFinger(HostFinger):
|
||||||
with closing(requests.get(url, timeout=ES_HTTP_TIMEOUT)) as req:
|
with closing(requests.get(url, timeout=ES_HTTP_TIMEOUT)) as req:
|
||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
host.services[ES_SERVICE] = {}
|
host.services[ES_SERVICE] = {}
|
||||||
host.services[ES_SERVICE]['name'] = 'ElasticSearch'
|
|
||||||
host.services[ES_SERVICE]['cluster_name'] = data['cluster_name']
|
host.services[ES_SERVICE]['cluster_name'] = data['cluster_name']
|
||||||
host.services[ES_SERVICE]['name'] = data['name']
|
host.services[ES_SERVICE]['name'] = data['name']
|
||||||
host.services[ES_SERVICE]['version'] = data['version']['number']
|
host.services[ES_SERVICE]['version'] = data['version']['number']
|
||||||
|
|
Loading…
Reference in New Issue