diff --git a/docs/build.rb b/docs/build.rb index 74b1b202d3..3c94b6aa73 100644 --- a/docs/build.rb +++ b/docs/build.rb @@ -293,6 +293,15 @@ module Build '@scanner', '@yieldparam', '@yieldreturn', + '@compressed', + '@content', + '@path', + '@sha1', + '@type', + '@git_repo_uri', + '@git_addr', + '@git_objs', + '@refs', ] # Replace any dangling github usernames, i.e. `@foo` - but not `[@foo](http://...)` or `email@example.com` diff --git a/docs/metasploit-framework.wiki/How-to-use-the-Git-mixin-to-write-an-exploit-module.md b/docs/metasploit-framework.wiki/How-to-use-the-Git-mixin-to-write-an-exploit-module.md index 39b552f083..76c08629d5 100644 --- a/docs/metasploit-framework.wiki/How-to-use-the-Git-mixin-to-write-an-exploit-module.md +++ b/docs/metasploit-framework.wiki/How-to-use-the-Git-mixin-to-write-an-exploit-module.md @@ -149,7 +149,7 @@ defining an `on_request_uri()` method, a `primer()` method, and an `exploit()` m The `primer()` method is first to execute, so setup for things like the repository uri can happen there: -``` +```ruby # Creates a random uri for the Git repo, ensuring that there are no spaces def create_git_uri "/#{Faker::App.name.downcase}.git".gsub(' ', '-') @@ -180,7 +180,7 @@ branch will exist, so `HEAD` will point to `refs/heads/master` and `refs/heads/m will point to the latest commit in the repo, which in this case is the only commit in the repo. This can be represented as the following hash: -``` +```ruby refs = { 'HEAD' => 'refs/heads/master', @@ -193,7 +193,7 @@ Creating a proper response to a `ref-discovery` request is done through The request object from `parse_raw_request()` and the above `refs` hash. After the response is built, it can be sent back to the client.: -``` +```ruby response = get_ref_discovery_response(request, @refs) cli.send_response(response) ``` @@ -208,7 +208,7 @@ in the repo. The `get_upload_pack_response()` method will check the sha1 hash of each object against the hashes in the want list that the client sent and send only the requested object hashes. -``` +```ruby response = get_upload_pack_response(request, @git_objs) cli.send_response(response) ``` @@ -218,7 +218,7 @@ the client will build out the repository. Putting it all together, the module should look something like the following: -``` +```ruby ## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework