Update wiki to use latest ruby conventions
This commit is contained in:
+30
-31
@@ -198,69 +198,68 @@ To get thing started, here's a code example you can use start developing your br
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = NormalRanking
|
||||
|
||||
include Msf::Exploit::Remote::BrowserExploitServer
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "BrowserExploitServer Example",
|
||||
'Description' => %q{
|
||||
This is an example of building a browser exploit using the BrowserExploitServer mixin
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' =>
|
||||
[
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'BrowserExploitServer Example',
|
||||
'Description' => %q{
|
||||
This is an example of building a browser exploit using the BrowserExploitServer mixin
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [ 'sinn3r' ],
|
||||
'References' => [
|
||||
[ 'URL', 'http://metasploit.com' ]
|
||||
],
|
||||
'Platform' => 'win',
|
||||
'BrowserRequirements' =>
|
||||
{
|
||||
:source => /script|headers/i,
|
||||
'Platform' => 'win',
|
||||
'BrowserRequirements' => {
|
||||
source: /script|headers/i
|
||||
},
|
||||
'Targets' =>
|
||||
[
|
||||
'Targets' => [
|
||||
[ 'Automatic', {} ],
|
||||
[
|
||||
'Windows XP with IE 8',
|
||||
{
|
||||
'os_name' => 'Windows XP',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '8.0'
|
||||
'os_name' => 'Windows XP',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '8.0'
|
||||
}
|
||||
],
|
||||
[
|
||||
'Windows 7 with IE 9',
|
||||
{
|
||||
'os_name' => 'Windows 7',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '9.0'
|
||||
'os_name' => 'Windows 7',
|
||||
'ua_name' => 'MSIE',
|
||||
'ua_ver' => '9.0'
|
||||
}
|
||||
]
|
||||
],
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'DisclosureDate' => "Apr 1 2013",
|
||||
'DefaultTarget' => 0))
|
||||
'Payload' => { 'BadChars' => "\x00" },
|
||||
'DisclosureDate' => '2013-04-01',
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def exploit_template(target_info)
|
||||
template = %Q|
|
||||
template = %(
|
||||
Data source: <%=target_info[:source]%><br>
|
||||
OS name: <%=target_info[:os_name]%><br>
|
||||
UA name: <%=target_info[:ua_name]%><br>
|
||||
UA version: <%=target_info[:ua_ver]%><br>
|
||||
Java version: <%=target_info[:java]%><br>
|
||||
Office version: <%=target_info[:office]%>
|
||||
|
|
||||
)
|
||||
|
||||
return template, binding()
|
||||
return template, binding
|
||||
end
|
||||
|
||||
def on_request_exploit(cli, request, target_info)
|
||||
def on_request_exploit(cli, _request, target_info)
|
||||
send_exploit_html(cli, exploit_template(target_info))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user