metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

Msf::Exploit::Remote::HttpServer::HTML#js_ajax_download

Downloads data using ajax

Supported arguments:
method => Optional. HTTP Verb (eg. GET/POST)
path   => Relative path to the file. In IE, you can actually use an URI. But in Firefox, you
          must use a relative path, otherwise you will be blocked by the browser.
data   => Optional. Data to pass to the server

Example of using the ajax_download() function:
For IE, your web server has to return this header to download binary data:
"text/plain; charset=x-user-defined"
   <script>
   #{js_ajax_download}

   ajax_download({path:"/test.bin"});
   </script>

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/msf/core/exploit/http/server/html.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Msf--Exploit--Remote--HttpServer--HTML-js_ajax_download-for-pr


# Commit to git

git add lib/msf/core/exploit/http/server/html.rbgit commit -m "better docs for Msf::Exploit::Remote::HttpServer::HTML#js_ajax_download"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Msf--Exploit--Remote--HttpServer--HTML-js_ajax_download-for-pr

hub pull-request


# Celebrate!