buby 1.5.0.pre2-java → 1.5.0.pre3-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION.yml +1 -1
  3. data/buby.gemspec +15 -4
  4. data/ext/buby/burp/BurpExtender.java +55 -16
  5. data/ext/burp_interfaces/burp/IBurpExtenderCallbacks.java +52 -53
  6. data/ext/burp_interfaces/burp/IContextMenuInvocation.java +26 -15
  7. data/ext/burp_interfaces/burp/IInterceptedProxyMessage.java +23 -3
  8. data/ext/burp_interfaces/burp/IProxyListener.java +1 -1
  9. data/lib/buby.rb +48 -30
  10. data/lib/buby/burp_extender.rb +339 -0
  11. data/lib/buby/burp_extender/console_frame.rb +33 -0
  12. data/lib/buby/burp_extender/console_pane.rb +26 -0
  13. data/lib/buby/burp_extender/console_tab.rb +15 -0
  14. data/lib/buby/burp_extender/context_menu.rb +29 -0
  15. data/lib/buby/burp_extender/context_menu_factory.rb +17 -0
  16. data/lib/buby/burp_extender/context_menu_item.rb +13 -0
  17. data/lib/buby/burp_extender/jcheck_box_menu_item.rb +12 -0
  18. data/lib/buby/burp_extender/jmenu.rb +11 -0
  19. data/lib/buby/burp_extender/jmenu_item.rb +12 -0
  20. data/lib/buby/burp_extender/menu.rb +11 -0
  21. data/lib/buby/burp_extender/menu_item.rb +12 -0
  22. data/lib/buby/extender.rb +156 -0
  23. data/lib/buby/implants/context_menu_invocation.rb +29 -2
  24. data/lib/buby/implants/cookie.rb +0 -1
  25. data/lib/buby/implants/extension_helpers.rb +0 -37
  26. data/lib/buby/implants/http_request_response.rb +3 -3
  27. data/lib/buby/implants/intercepted_proxy_message.rb +0 -1
  28. data/lib/buby/implants/intruder_attack.rb +0 -1
  29. data/lib/buby/implants/jruby.rb +19 -10
  30. data/lib/buby/implants/message_editor.rb +0 -1
  31. data/lib/buby/implants/message_editor_controller.rb +0 -1
  32. data/lib/buby/implants/parameter.rb +0 -1
  33. data/lib/buby/implants/request_info.rb +0 -1
  34. data/lib/buby/implants/response_info.rb +0 -1
  35. data/lib/buby/implants/scan_queue_item.rb +0 -1
  36. data/lib/buby/implants/scanner_insertion_point.rb +0 -1
  37. data/lib/buby/implants/temp_file.rb +0 -1
  38. data/lib/buby/implants/text_editor.rb +0 -1
  39. data/lib/buby/scanner_check.rb +1 -1
  40. data/lib/buby/version.rb +2 -2
  41. metadata +15 -4
  42. data/lib/buby.jar +0 -0
  43. data/lib/burp_interfaces.jar +0 -0
@@ -13,9 +13,9 @@ class Buby
13
13
  end
14
14
 
15
15
  # @deprecated This will change to the new Buby::Implants style in the next
16
- # release. The methods will be overwritten to be Ruby-like themselves. If
17
- # the standard Java implententation is still desired, use the +__method+
18
- # version. (eg. {#__response} or {#__request})
16
+ # release. The interface methods will be overwritten to be Ruby-like
17
+ # themselves. If the standard Java implententation is still desired, use the
18
+ # +__method+ version (e.g. +#__response+ or +#__request+).
19
19
  module HttpRequestResponseHelper
20
20
 
21
21
  # returns the response as a Ruby String object - returns an empty string
@@ -27,7 +27,6 @@ class Buby
27
27
  # Install ourselves into the current +IInterceptedProxyMessage+ java class
28
28
  # @param [IInterceptedProxyMessage] message
29
29
  #
30
- # @todo __persistent__?
31
30
  def self.implant(message)
32
31
  unless message.implanted? || message.nil?
33
32
  pp [:implanting, message, message.class] if $DEBUG
@@ -15,7 +15,6 @@ class Buby
15
15
  # Install ourselves into the current +IIntruderAttack+ java class
16
16
  # @param [IIntruderAttack] attack
17
17
  #
18
- # @todo __persistent__?
19
18
  def self.implant(attack)
20
19
  unless attack.implanted? || attack.nil?
21
20
  pp [:implanting, attack, attack.class] if $DEBUG
@@ -1,20 +1,29 @@
1
1
  class Buby
2
2
  module Implants
3
3
  module Object
4
- def java_proxy?
5
- false
4
+ def implanted?(klass = nil)
5
+ self.class.ancestors.include?(klass)
6
6
  end
7
7
 
8
- def implanted?
9
- false
8
+ def unique_methods regular = true
9
+ klass = self.class
10
+ meths = self.methods regular
11
+ while (klass != ::Object)
12
+ meths -= JRuby.reference(klass).getMethods.each_with_object([]){|meth, arr| arr << meth.first.intern if meth.last.kind_of?(Java::OrgJrubyInternalRuntimeMethods::AliasMethod)}
13
+ klass = klass.superclass
14
+ end
15
+ meths
10
16
  end
11
17
  end
12
18
 
13
- module Enumerable
14
- # XXX backport for 1.8.7
15
- def each_with_object(memo)
16
- inject(memo) do |memo, obj|
17
- yield obj, memo
19
+ unless [].respond_to?(:each_with_object)
20
+ module Enumerable
21
+ # XXX backport for 1.8.7
22
+ def each_with_object(memo)
23
+ inject(memo) do |memo, item|
24
+ yield item, memo
25
+ memo
26
+ end
18
27
  end
19
28
  end
20
29
  end
@@ -23,7 +32,7 @@ class Buby
23
32
  def ruby_names_for_java_method meth
24
33
  self_java_ref = JRuby.reference(self).javaClass
25
34
  target_methods = self_java_ref.getMethods.group_by{|jmeth| jmeth.name}[meth.to_s]
26
- org.jruby.javasupport.JavaUtil.getRubyNamesForJavaName(target_methods.first.name, target_methods)
35
+ Java::OrgJrubyJavasupport::JavaUtil.getRubyNamesForJavaName(target_methods.first.name, target_methods)
27
36
  end
28
37
 
29
38
  # copies wrapper_id method to java_id and all ruby-like aliases
@@ -41,7 +41,6 @@ class Buby
41
41
  # Install ourselves into the current +IMessageEditor+ java class
42
42
  # @param [IMessageEditor] editor
43
43
  #
44
- # @todo __persistent__?
45
44
  def self.implant(editor)
46
45
  unless editor.implanted? || editor.nil?
47
46
  pp [:implanting, editor, editor.class] if $DEBUG
@@ -33,7 +33,6 @@ class Buby
33
33
  # Install ourselves into the current +IMessageEditorController+ java class
34
34
  # @param [IMessageEditorController] controller
35
35
  #
36
- # @todo __persistent__?
37
36
  def self.implant(controller)
38
37
  unless controller.implanted? || controller.nil?
39
38
  pp [:implanting, controller, controller.class] if $DEBUG
@@ -55,7 +55,6 @@ class Buby
55
55
  # Install ourselves into the current +IParameter+ java class
56
56
  # @param [IParameter] parameter
57
57
  #
58
- # @todo __persistent__?
59
58
  def self.implant(parameter)
60
59
  unless parameter.implanted? || parameter.nil?
61
60
  pp [:implanting, parameter, parameter.class] if $DEBUG
@@ -20,7 +20,6 @@ class Buby
20
20
  # Install ourselves into the current +IRequestInfo+ java class
21
21
  # @param [IRequestInfo] info
22
22
  #
23
- # @todo __persistent__?
24
23
  def self.implant(info)
25
24
  unless info.implanted? || info.nil?
26
25
  pp [:implanting, info, info.class] if $DEBUG
@@ -18,7 +18,6 @@ class Buby
18
18
  # Install ourselves into the current +IResponseInfo+ java class
19
19
  # @param [IResponseInfo] info
20
20
  #
21
- # @todo __persistent__?
22
21
  def self.implant(info)
23
22
  unless info.implanted? || info.nil?
24
23
  pp [:implanting, info, info.class] if $DEBUG
@@ -26,7 +26,6 @@ class Buby
26
26
  # Install ourselves into the current +IScanQueueItem+ java class
27
27
  # @param [IScanQueueItem] item
28
28
  #
29
- # @todo __persistent__?
30
29
  def self.implant(item)
31
30
  unless item.implanted? || item.nil?
32
31
  pp [:implanting, item, item.class] if $DEBUG
@@ -65,7 +65,6 @@ class Buby
65
65
  # Install ourselves into the current +IScannerInsertionPoint+ java class
66
66
  # @param [IScannerInsertionPoint] point
67
67
  #
68
- # @todo __persistent__?
69
68
  def self.implant(point)
70
69
  unless point.implanted? || point.nil?
71
70
  pp [:implanting, point, point.class] if $DEBUG
@@ -17,7 +17,6 @@ class Buby
17
17
  # Install ourselves into the current +ITempFile+ java class
18
18
  # @param [ITempFile] file
19
19
  #
20
- # @todo __persistent__?
21
20
  def self.implant(file)
22
21
  unless file.implanted? || file.nil?
23
22
  pp [:implanting, file, file.class] if $DEBUG
@@ -35,7 +35,6 @@ class Buby
35
35
  # Install ourselves into the current +ITextEditor+ java class
36
36
  # @param [ITextEditor] editor
37
37
  #
38
- # @todo __persistent__?
39
38
  def self.implant(editor)
40
39
  unless editor.implanted? || editor.nil?
41
40
  pp [:implanting, editor, editor.class] if $DEBUG
@@ -1,6 +1,6 @@
1
1
  class Buby
2
2
  # Extensions can implement this interface and then call
3
- # {Burp#registerScannerCheck} to register a custom Scanner check. When
3
+ # {Buby#registerScannerCheck} to register a custom Scanner check. When
4
4
  # performing scanning, Burp will ask the check to perform active or passive
5
5
  # scanning on the base request, and report any Scanner issues that are
6
6
  # identified.
@@ -1,9 +1,9 @@
1
1
  class Buby
2
2
  module Version
3
- STRING = "1.5.0.pre2"
3
+ STRING = "1.5.0.pre3"
4
4
  MAJOR = 1
5
5
  MINOR = 5
6
6
  PATCH = 0
7
- BUILD = "pre2"
7
+ BUILD = "pre3"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.pre2
4
+ version: 1.5.0.pre3
5
5
  prerelease: 6
6
6
  platform: java
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
12
+ date: 2013-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -84,10 +84,22 @@ files:
84
84
  - ext/burp_interfaces/burp/ITab.java
85
85
  - ext/burp_interfaces/burp/ITempFile.java
86
86
  - ext/burp_interfaces/burp/ITextEditor.java
87
- - lib/buby.jar
88
87
  - lib/buby.rb
88
+ - lib/buby/burp_extender.rb
89
+ - lib/buby/burp_extender/console_frame.rb
90
+ - lib/buby/burp_extender/console_pane.rb
91
+ - lib/buby/burp_extender/console_tab.rb
92
+ - lib/buby/burp_extender/context_menu.rb
93
+ - lib/buby/burp_extender/context_menu_factory.rb
94
+ - lib/buby/burp_extender/context_menu_item.rb
95
+ - lib/buby/burp_extender/jcheck_box_menu_item.rb
96
+ - lib/buby/burp_extender/jmenu.rb
97
+ - lib/buby/burp_extender/jmenu_item.rb
98
+ - lib/buby/burp_extender/menu.rb
99
+ - lib/buby/burp_extender/menu_item.rb
89
100
  - lib/buby/context_menu_factory.rb
90
101
  - lib/buby/cookie.rb
102
+ - lib/buby/extender.rb
91
103
  - lib/buby/http_listener.rb
92
104
  - lib/buby/implants.rb
93
105
  - lib/buby/implants/buby_array_wrapper.rb
@@ -129,7 +141,6 @@ files:
129
141
  - lib/buby/session_handling_action.rb
130
142
  - lib/buby/tab.rb
131
143
  - lib/buby/version.rb
132
- - lib/burp_interfaces.jar
133
144
  - samples/drb_buby.rb
134
145
  - samples/drb_sample_cli.rb
135
146
  - samples/mechanize_burp.rb
Binary file
Binary file