-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheapspray.rb
47 lines (35 loc) · 1 KB
/
heapspray.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
=begin
BETTERCAP
Author : ***YOUR NAME***
Email : ***YOUR EMAIL***
Blog : ***YOUR TWEETS***
This project is released under the GPL 3 license.
=end
class HeapSpray < BetterCap::Proxy::HTTP::Module
meta(
'Name' => 'HeapSpray',
'Description' => 'For Internet Explorer browsers, deliver a JS heap spray',
'Version' => '1.0.0',
'Author' => "***YOUR NAME***",
'License' => 'GPL3'
)
@@verbose = true
@@options = nil
def self.on_options(opts)
opts.separator ""
opts.separator "Heap Spray Proxy Module Options:"
opts.separator ""
opts.on( '--heapspray-verbose', 'Verbose logging.' ) do |v|
@@options = v
end
end
def initialize
@@verbose = false if @@options.nil?
end
def on_request(request, response)
detect_ie(request)
end
def detect_ie(request)
BetterCap::Logger.info request.headers['User-Agent'].green
end
end