add to ignored wordlist, add syntax highlighting
This commit is contained in:
parent
1885e23a84
commit
7ae91a9a39
|
@ -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`
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue