forked from p15670423/monkey
Refactored struts2 to overload get_exploit_config
This commit is contained in:
parent
071535fd01
commit
b07e70855c
|
@ -25,8 +25,10 @@ class Struts2Exploiter(WebRCE):
|
||||||
def __init__(self, host):
|
def __init__(self, host):
|
||||||
super(Struts2Exploiter, self).__init__(host, None)
|
super(Struts2Exploiter, self).__init__(host, None)
|
||||||
|
|
||||||
def exploit_host(self):
|
def get_exploit_config(self):
|
||||||
return self.default_exploit_host(dropper=True)
|
exploit_config = super(Struts2Exploiter, self).get_exploit_config()
|
||||||
|
exploit_config['dropper'] = True
|
||||||
|
return exploit_config
|
||||||
|
|
||||||
def build_potential_urls(self, ports, extensions=None):
|
def build_potential_urls(self, ports, extensions=None):
|
||||||
"""
|
"""
|
||||||
|
@ -47,7 +49,7 @@ class Struts2Exploiter(WebRCE):
|
||||||
protocol = "https"
|
protocol = "https"
|
||||||
else:
|
else:
|
||||||
protocol = "http"
|
protocol = "http"
|
||||||
url = join(("%s://%s:%s" % (protocol, self.host.ip_addr, port[0])), extension)
|
url = join(("%s://%s:%s/" % (protocol, self.host.ip_addr, port[0])), extension)
|
||||||
redirected_url = self.get_redirected(url)
|
redirected_url = self.get_redirected(url)
|
||||||
url_list.append(redirected_url)
|
url_list.append(redirected_url)
|
||||||
if not url_list:
|
if not url_list:
|
||||||
|
|
Loading…
Reference in New Issue