buby 1.5.0.pre2-java → 1.5.0.pre3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/buby.gemspec +15 -4
- data/ext/buby/burp/BurpExtender.java +55 -16
- data/ext/burp_interfaces/burp/IBurpExtenderCallbacks.java +52 -53
- data/ext/burp_interfaces/burp/IContextMenuInvocation.java +26 -15
- data/ext/burp_interfaces/burp/IInterceptedProxyMessage.java +23 -3
- data/ext/burp_interfaces/burp/IProxyListener.java +1 -1
- data/lib/buby.rb +48 -30
- data/lib/buby/burp_extender.rb +339 -0
- data/lib/buby/burp_extender/console_frame.rb +33 -0
- data/lib/buby/burp_extender/console_pane.rb +26 -0
- data/lib/buby/burp_extender/console_tab.rb +15 -0
- data/lib/buby/burp_extender/context_menu.rb +29 -0
- data/lib/buby/burp_extender/context_menu_factory.rb +17 -0
- data/lib/buby/burp_extender/context_menu_item.rb +13 -0
- data/lib/buby/burp_extender/jcheck_box_menu_item.rb +12 -0
- data/lib/buby/burp_extender/jmenu.rb +11 -0
- data/lib/buby/burp_extender/jmenu_item.rb +12 -0
- data/lib/buby/burp_extender/menu.rb +11 -0
- data/lib/buby/burp_extender/menu_item.rb +12 -0
- data/lib/buby/extender.rb +156 -0
- data/lib/buby/implants/context_menu_invocation.rb +29 -2
- data/lib/buby/implants/cookie.rb +0 -1
- data/lib/buby/implants/extension_helpers.rb +0 -37
- data/lib/buby/implants/http_request_response.rb +3 -3
- data/lib/buby/implants/intercepted_proxy_message.rb +0 -1
- data/lib/buby/implants/intruder_attack.rb +0 -1
- data/lib/buby/implants/jruby.rb +19 -10
- data/lib/buby/implants/message_editor.rb +0 -1
- data/lib/buby/implants/message_editor_controller.rb +0 -1
- data/lib/buby/implants/parameter.rb +0 -1
- data/lib/buby/implants/request_info.rb +0 -1
- data/lib/buby/implants/response_info.rb +0 -1
- data/lib/buby/implants/scan_queue_item.rb +0 -1
- data/lib/buby/implants/scanner_insertion_point.rb +0 -1
- data/lib/buby/implants/temp_file.rb +0 -1
- data/lib/buby/implants/text_editor.rb +0 -1
- data/lib/buby/scanner_check.rb +1 -1
- data/lib/buby/version.rb +2 -2
- metadata +15 -4
- data/lib/buby.jar +0 -0
- data/lib/burp_interfaces.jar +0 -0
data/Rakefile
CHANGED
data/VERSION.yml
CHANGED
data/buby.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "buby"
|
8
|
-
s.version = "1.5.0.
|
8
|
+
s.version = "1.5.0.pre3"
|
9
9
|
s.platform = "java"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Eric Monti, tduehr"]
|
13
|
-
s.date = "2013-
|
13
|
+
s.date = "2013-03-14"
|
14
14
|
s.description = "Buby is a mashup of JRuby with the popular commercial web security testing tool Burp Suite from PortSwigger. Burp is driven from and tied to JRuby with a Java extension using the BurpExtender API. This extension aims to add Ruby scriptability to Burp Suite with an interface comparable to the Burp's pure Java extension interface."
|
15
15
|
s.email = "td@matasano.com"
|
16
16
|
s.executables = ["buby"]
|
@@ -64,10 +64,22 @@ Gem::Specification.new do |s|
|
|
64
64
|
"ext/burp_interfaces/burp/ITab.java",
|
65
65
|
"ext/burp_interfaces/burp/ITempFile.java",
|
66
66
|
"ext/burp_interfaces/burp/ITextEditor.java",
|
67
|
-
"lib/buby.jar",
|
68
67
|
"lib/buby.rb",
|
68
|
+
"lib/buby/burp_extender.rb",
|
69
|
+
"lib/buby/burp_extender/console_frame.rb",
|
70
|
+
"lib/buby/burp_extender/console_pane.rb",
|
71
|
+
"lib/buby/burp_extender/console_tab.rb",
|
72
|
+
"lib/buby/burp_extender/context_menu.rb",
|
73
|
+
"lib/buby/burp_extender/context_menu_factory.rb",
|
74
|
+
"lib/buby/burp_extender/context_menu_item.rb",
|
75
|
+
"lib/buby/burp_extender/jcheck_box_menu_item.rb",
|
76
|
+
"lib/buby/burp_extender/jmenu.rb",
|
77
|
+
"lib/buby/burp_extender/jmenu_item.rb",
|
78
|
+
"lib/buby/burp_extender/menu.rb",
|
79
|
+
"lib/buby/burp_extender/menu_item.rb",
|
69
80
|
"lib/buby/context_menu_factory.rb",
|
70
81
|
"lib/buby/cookie.rb",
|
82
|
+
"lib/buby/extender.rb",
|
71
83
|
"lib/buby/http_listener.rb",
|
72
84
|
"lib/buby/implants.rb",
|
73
85
|
"lib/buby/implants/buby_array_wrapper.rb",
|
@@ -109,7 +121,6 @@ Gem::Specification.new do |s|
|
|
109
121
|
"lib/buby/session_handling_action.rb",
|
110
122
|
"lib/buby/tab.rb",
|
111
123
|
"lib/buby/version.rb",
|
112
|
-
"lib/burp_interfaces.jar",
|
113
124
|
"samples/drb_buby.rb",
|
114
125
|
"samples/drb_sample_cli.rb",
|
115
126
|
"samples/mechanize_burp.rb",
|
@@ -7,6 +7,8 @@ import org.jruby.javasupport.JavaUtil;
|
|
7
7
|
import org.jruby.runtime.ThreadContext;
|
8
8
|
import org.jruby.runtime.builtin.IRubyObject;
|
9
9
|
import org.jruby.RubyBoolean;
|
10
|
+
import java.util.List;
|
11
|
+
import javax.swing.JMenuItem;
|
10
12
|
|
11
13
|
/**
|
12
14
|
* This is an implementation of the BurpExtender/IBurpExtender interface
|
@@ -15,7 +17,7 @@ import org.jruby.RubyBoolean;
|
|
15
17
|
* This is a complete implementation of the Burp Extender interfaces available
|
16
18
|
* as of Burp Suite 1.4
|
17
19
|
*/
|
18
|
-
public class BurpExtender implements IBurpExtender, IExtensionStateListener, IHttpListener, IProxyListener, IScannerListener {
|
20
|
+
public class BurpExtender implements IBurpExtender, IExtensionStateListener, IHttpListener, IProxyListener, IScannerListener, IContextMenuFactory, IScopeChangeListener {
|
19
21
|
|
20
22
|
// Legacy callbacks
|
21
23
|
public final static String L_CLOSE_METH = "evt_application_closing";
|
@@ -24,15 +26,20 @@ public class BurpExtender implements IBurpExtender, IExtensionStateListener, IHt
|
|
24
26
|
public final static String L_MAINARGS_METH = "evt_commandline_args";
|
25
27
|
public final static String L_PROXYMSG_METH = "evt_proxy_message_raw";
|
26
28
|
public final static String L_SCANISSUE_METH = "evt_scan_issue";
|
27
|
-
public final static String L_REG_METH
|
28
|
-
|
29
|
-
// new callbacks
|
30
|
-
public final static String INIT_METH
|
31
|
-
public final static String
|
32
|
-
public final static String
|
33
|
-
public final static String
|
34
|
-
public final static String
|
35
|
-
|
29
|
+
public final static String L_REG_METH = "evt_register_callbacks";
|
30
|
+
|
31
|
+
// new style callbacks
|
32
|
+
public final static String INIT_METH = "extender_initialize";
|
33
|
+
public final static String REG_METH = "register_callbacks";
|
34
|
+
public final static String PROXYMSG_METH = "process_proxy_message";
|
35
|
+
public final static String HTTPMSG_METH = "process_http_messge";
|
36
|
+
public final static String SCANISSUE_METH = "new_scan_issue";
|
37
|
+
|
38
|
+
// new callback methods
|
39
|
+
public final static String UNLOAD_METH = "extension_unloaded";
|
40
|
+
public final static String MENUFAC_METH = "create_menu_items";
|
41
|
+
public final static String SCOPE_METH = "scope_changed";
|
42
|
+
|
36
43
|
|
37
44
|
// Flag used to identify Burp Suite as a whole.
|
38
45
|
public static final int TOOL_SUITE = 0x00000001;
|
@@ -134,13 +141,14 @@ public class BurpExtender implements IBurpExtender, IExtensionStateListener, IHt
|
|
134
141
|
* <code>IBurpExtenderCallbacks</code> interface.
|
135
142
|
*/
|
136
143
|
public void registerExtenderCallbacks(IBurpExtenderCallbacks cb) {
|
144
|
+
cb.setExtensionName("Buby");
|
145
|
+
cb.issueAlert("[BurpExtender] registering JRuby handler callbacks");
|
146
|
+
cb.registerExtensionStateListener(this);
|
147
|
+
cb.registerHttpListener(this);
|
148
|
+
cb.registerScannerListener(this);
|
149
|
+
cb.registerContextMenuFactory(this);
|
150
|
+
cb.registerScopeChangeListener(this);
|
137
151
|
if(r_obj != null) {
|
138
|
-
// TODO should look for Buby class instead
|
139
|
-
cb.setExtensionName("Buby v" + r_obj.getType().defineOrGetModuleUnder("Version").getConstant("STRING"));
|
140
|
-
cb.issueAlert("[BurpExtender] registering JRuby handler callbacks");
|
141
|
-
cb.registerExtensionStateListener(this);
|
142
|
-
cb.registerHttpListener(this);
|
143
|
-
cb.registerScannerListener(this);
|
144
152
|
boolean respondsLegacyRegister = r_obj.respondsTo(L_REG_METH);
|
145
153
|
boolean respondsRegister = r_obj.respondsTo(REG_METH);
|
146
154
|
|
@@ -429,5 +437,36 @@ public class BurpExtender implements IBurpExtender, IExtensionStateListener, IHt
|
|
429
437
|
if (r_obj != null && r_obj.respondsTo(UNLOAD_METH))
|
430
438
|
r_obj.callMethod(ctx(r_obj), UNLOAD_METH);
|
431
439
|
}
|
440
|
+
|
441
|
+
/**
|
442
|
+
* This method will be called by Burp when the user invokes a context menu
|
443
|
+
* anywhere within Burp. The factory can then provide any custom context
|
444
|
+
* menu items that should be displayed in the context menu, based on the
|
445
|
+
* details of the menu invocation.
|
446
|
+
*
|
447
|
+
* @param invocation An object that implements the
|
448
|
+
* <code>IMessageEditorTabFactory</code> interface, which the extension can
|
449
|
+
* query to obtain details of the context menu invocation.
|
450
|
+
* @return A list of custom menu items (which may include sub-menus,
|
451
|
+
* checkbox menu items, etc.) that should be displayed. Extensions may
|
452
|
+
* return
|
453
|
+
* <code>null</code> from this method, to indicate that no menu items are
|
454
|
+
* required.
|
455
|
+
*/
|
456
|
+
public List<JMenuItem> createMenuItems(IContextMenuInvocation invocation) {
|
457
|
+
// IRubyObject ret = null;
|
458
|
+
if (r_obj != null && r_obj.respondsTo(MENUFAC_METH))
|
459
|
+
return (RubyArray)r_obj.callMethod(ctx(r_obj), MENUFAC_METH, to_ruby(rt(r_obj), invocation));
|
460
|
+
return null;
|
461
|
+
}
|
462
|
+
|
463
|
+
/**
|
464
|
+
* This method is invoked whenever a change occurs to Burp's suite-wide
|
465
|
+
* target scope.
|
466
|
+
*/
|
467
|
+
public void scopeChanged() {
|
468
|
+
if (r_obj != null && r_obj.respondsTo(SCOPE_METH))
|
469
|
+
r_obj.callMethod(ctx(r_obj), SCOPE_METH);
|
470
|
+
}
|
432
471
|
}
|
433
472
|
|
@@ -243,6 +243,11 @@ public interface IBurpExtenderCallbacks
|
|
243
243
|
*/
|
244
244
|
void registerSessionHandlingAction(ISessionHandlingAction action);
|
245
245
|
|
246
|
+
/**
|
247
|
+
* This method is used to unload the extension from Burp Suite.
|
248
|
+
*/
|
249
|
+
void unloadExtension();
|
250
|
+
|
246
251
|
/**
|
247
252
|
* This method is used to add a custom tab to the main Burp Suite window.
|
248
253
|
*
|
@@ -274,23 +279,29 @@ public interface IBurpExtenderCallbacks
|
|
274
279
|
*
|
275
280
|
* @param controller An object created by the extension that implements the
|
276
281
|
* <code>IMessageEditorController</code> interface. This parameter is
|
277
|
-
* optional and may be
|
278
|
-
*
|
279
|
-
* the
|
280
|
-
* displayed message, including the
|
282
|
+
* optional and may be <code>null</code>. If it is provided, then the
|
283
|
+
* message editor will query the controller when required to obtain details
|
284
|
+
* about the currently displayed message, including the
|
281
285
|
* <code>IHttpService</code> for the message, and the associated request or
|
282
286
|
* response message. If a controller is not provided, then the message
|
283
287
|
* editor will not support context menu actions, such as sending requests to
|
284
288
|
* other Burp tools.
|
285
289
|
* @param editable Indicates whether the editor created should be editable,
|
286
290
|
* or used only for message viewing.
|
287
|
-
* @return An object that implements the
|
288
|
-
*
|
289
|
-
* its own UI.
|
291
|
+
* @return An object that implements the <code>IMessageEditor</code>
|
292
|
+
* interface, and which the extension can use in its own UI.
|
290
293
|
*/
|
291
294
|
IMessageEditor createMessageEditor(IMessageEditorController controller,
|
292
295
|
boolean editable);
|
293
296
|
|
297
|
+
/**
|
298
|
+
* This method returns the command line arguments that were passed to Burp
|
299
|
+
* on startup.
|
300
|
+
*
|
301
|
+
* @return The command line arguments that were passed to Burp on startup.
|
302
|
+
*/
|
303
|
+
String[] getCommandLineArguments();
|
304
|
+
|
294
305
|
/**
|
295
306
|
* This method is used to save configuration settings for the extension in a
|
296
307
|
* persistent way that survives reloads of the extension and of Burp Suite.
|
@@ -298,9 +309,8 @@ public interface IBurpExtenderCallbacks
|
|
298
309
|
* <code>loadExtensionSetting()</code>.
|
299
310
|
*
|
300
311
|
* @param name The name of the setting.
|
301
|
-
* @param value The value of the setting. If this value is
|
302
|
-
*
|
303
|
-
* be removed.
|
312
|
+
* @param value The value of the setting. If this value is <code>null</code>
|
313
|
+
* then any existing setting with the specified name will be removed.
|
304
314
|
*/
|
305
315
|
void saveExtensionSetting(String name, String value);
|
306
316
|
|
@@ -310,8 +320,8 @@ public interface IBurpExtenderCallbacks
|
|
310
320
|
* <code>saveExtensionSetting()</code>.
|
311
321
|
*
|
312
322
|
* @param name The name of the setting.
|
313
|
-
* @return The value of the setting, or
|
314
|
-
*
|
323
|
+
* @return The value of the setting, or <code>null</code> if no value is
|
324
|
+
* set.
|
315
325
|
*/
|
316
326
|
String loadExtensionSetting(String name);
|
317
327
|
|
@@ -319,9 +329,8 @@ public interface IBurpExtenderCallbacks
|
|
319
329
|
* This method is used to create a new instance of Burp's plain text editor,
|
320
330
|
* for the extension to use in its own UI.
|
321
331
|
*
|
322
|
-
* @return An object that implements the
|
323
|
-
*
|
324
|
-
* its own UI.
|
332
|
+
* @return An object that implements the <code>ITextEditor</code> interface,
|
333
|
+
* and which the extension can use in its own UI.
|
325
334
|
*/
|
326
335
|
ITextEditor createTextEditor();
|
327
336
|
|
@@ -335,8 +344,8 @@ public interface IBurpExtenderCallbacks
|
|
335
344
|
* @param useHttps Flags whether the protocol is HTTPS or HTTP.
|
336
345
|
* @param request The full HTTP request.
|
337
346
|
* @param tabCaption An optional caption which will appear on the Repeater
|
338
|
-
* tab containing the request. If this value is
|
339
|
-
*
|
347
|
+
* tab containing the request. If this value is <code>null</code> then a
|
348
|
+
* default tab index will be displayed.
|
340
349
|
*/
|
341
350
|
void sendToRepeater(
|
342
351
|
String host,
|
@@ -460,9 +469,9 @@ public interface IBurpExtenderCallbacks
|
|
460
469
|
*
|
461
470
|
* @param httpService The HTTP service to which the request should be sent.
|
462
471
|
* @param request The full HTTP request.
|
463
|
-
* @return An object that implements the
|
464
|
-
*
|
465
|
-
*
|
472
|
+
* @return An object that implements the <code>IHttpRequestResponse</code>
|
473
|
+
* interface, and which the extension can query to obtain the details of the
|
474
|
+
* response.
|
466
475
|
*/
|
467
476
|
IHttpRequestResponse makeHttpRequest(IHttpService httpService,
|
468
477
|
byte[] request);
|
@@ -488,8 +497,8 @@ public interface IBurpExtenderCallbacks
|
|
488
497
|
* current Suite-wide scope.
|
489
498
|
*
|
490
499
|
* @param url The URL to query.
|
491
|
-
* @return Returns
|
492
|
-
*
|
500
|
+
* @return Returns <code>true</code> if the URL is within the current
|
501
|
+
* Suite-wide scope.
|
493
502
|
*/
|
494
503
|
boolean isInScope(java.net.URL url);
|
495
504
|
|
@@ -556,9 +565,8 @@ public interface IBurpExtenderCallbacks
|
|
556
565
|
* <code>ISessionHandlingAction</code> can query and update the cookie jar
|
557
566
|
* in order to handle unusual session handling mechanisms.
|
558
567
|
*
|
559
|
-
* @return A list of
|
560
|
-
*
|
561
|
-
* handling cookie jar.
|
568
|
+
* @return A list of <code>ICookie</code> objects representing the contents
|
569
|
+
* of Burp's session handling cookie jar.
|
562
570
|
*/
|
563
571
|
List<ICookie> getCookieJarContents();
|
564
572
|
|
@@ -568,11 +576,10 @@ public interface IBurpExtenderCallbacks
|
|
568
576
|
* <code>ISessionHandlingAction</code> can query and update the cookie jar
|
569
577
|
* in order to handle unusual session handling mechanisms.
|
570
578
|
*
|
571
|
-
* @param cookie An
|
572
|
-
*
|
573
|
-
*
|
574
|
-
*
|
575
|
-
* value and expiration, unless the new value is
|
579
|
+
* @param cookie An <code>ICookie</code> object containing details of the
|
580
|
+
* cookie to be updated. If the cookie jar already contains a cookie that
|
581
|
+
* matches the specified domain and name, then that cookie will be updated
|
582
|
+
* with the new value and expiration, unless the new value is
|
576
583
|
* <code>null</code>, in which case the cookie will be removed. If the
|
577
584
|
* cookie jar does not already contain a cookie that matches the specified
|
578
585
|
* domain and name, then the cookie will be added.
|
@@ -665,8 +672,7 @@ public interface IBurpExtenderCallbacks
|
|
665
672
|
* of runtime data, avoiding the need to retain that data in memory.
|
666
673
|
*
|
667
674
|
* @param buffer The data to be saved to a temporary file.
|
668
|
-
* @return An object that implements the
|
669
|
-
* <code>ITempFile</code> interface.
|
675
|
+
* @return An object that implements the <code>ITempFile</code> interface.
|
670
676
|
*/
|
671
677
|
ITempFile saveToTempFile(byte[] buffer);
|
672
678
|
|
@@ -677,9 +683,8 @@ public interface IBurpExtenderCallbacks
|
|
677
683
|
* <code>IHttpRequestResponse</code> objects into a form suitable for
|
678
684
|
* long-term storage.
|
679
685
|
*
|
680
|
-
* @param httpRequestResponse The
|
681
|
-
*
|
682
|
-
* messages are to be saved to temporary files.
|
686
|
+
* @param httpRequestResponse The <code>IHttpRequestResponse</code> object
|
687
|
+
* whose request and response messages are to be saved to temporary files.
|
683
688
|
* @return An object that implements the
|
684
689
|
* <code>IHttpRequestResponsePersisted</code> interface.
|
685
690
|
*/
|
@@ -693,19 +698,18 @@ public interface IBurpExtenderCallbacks
|
|
693
698
|
* payload positions, Scanner insertion points, and highlights in Scanner
|
694
699
|
* issues.
|
695
700
|
*
|
696
|
-
* @param httpRequestResponse The
|
697
|
-
*
|
698
|
-
* applied.
|
701
|
+
* @param httpRequestResponse The <code>IHttpRequestResponse</code> object
|
702
|
+
* to which the markers should be applied.
|
699
703
|
* @param requestMarkers A list of index pairs representing the offsets of
|
700
704
|
* markers to be applied to the request message. Each item in the list must
|
701
705
|
* be an int[2] array containing the start and end offsets for the marker.
|
702
|
-
* This parameter is optional and may be
|
703
|
-
*
|
706
|
+
* This parameter is optional and may be <code>null</code> if no request
|
707
|
+
* markers are required.
|
704
708
|
* @param responseMarkers A list of index pairs representing the offsets of
|
705
709
|
* markers to be applied to the response message. Each item in the list must
|
706
710
|
* be an int[2] array containing the start and end offsets for the marker.
|
707
|
-
* This parameter is optional and may be
|
708
|
-
*
|
711
|
+
* This parameter is optional and may be <code>null</code> if no response
|
712
|
+
* markers are required.
|
709
713
|
* @return An object that implements the
|
710
714
|
* <code>IHttpRequestResponseWithMarkers</code> interface.
|
711
715
|
*/
|
@@ -718,8 +722,7 @@ public interface IBurpExtenderCallbacks
|
|
718
722
|
* This method is used to obtain the descriptive name for the Burp tool
|
719
723
|
* identified by the tool flag provided.
|
720
724
|
*
|
721
|
-
* @param toolFlag A flag identifying a Burp tool (
|
722
|
-
* <code>TOOL_PROXY</code>,
|
725
|
+
* @param toolFlag A flag identifying a Burp tool ( <code>TOOL_PROXY</code>,
|
723
726
|
* <code>TOOL_SCANNER</code>, etc.). Tool flags are defined within this
|
724
727
|
* interface.
|
725
728
|
* @return The descriptive name for the specified tool.
|
@@ -746,11 +749,9 @@ public interface IBurpExtenderCallbacks
|
|
746
749
|
* request parameter.
|
747
750
|
*
|
748
751
|
* @param request The request to be parsed.
|
749
|
-
* @return An array of:
|
750
|
-
*
|
751
|
-
*
|
752
|
-
* @deprecated Use
|
753
|
-
* <code>IExtensionHelpers.analyzeRequest()</code> instead.
|
752
|
+
* @return An array of: <code>String[] { name, value, type }</code>
|
753
|
+
* containing details of the parameters contained within the request.
|
754
|
+
* @deprecated Use <code>IExtensionHelpers.analyzeRequest()</code> instead.
|
754
755
|
*/
|
755
756
|
@Deprecated
|
756
757
|
String[][] getParameters(byte[] request);
|
@@ -761,8 +762,7 @@ public interface IBurpExtenderCallbacks
|
|
761
762
|
*
|
762
763
|
* @param message The request to be parsed.
|
763
764
|
* @return An array of HTTP headers.
|
764
|
-
* @deprecated Use
|
765
|
-
* <code>IExtensionHelpers.analyzeRequest()</code> or
|
765
|
+
* @deprecated Use <code>IExtensionHelpers.analyzeRequest()</code> or
|
766
766
|
* <code>IExtensionHelpers.analyzeResponse()</code> instead.
|
767
767
|
*/
|
768
768
|
@Deprecated
|
@@ -776,8 +776,7 @@ public interface IBurpExtenderCallbacks
|
|
776
776
|
* @param menuItemCaption The caption to be displayed on the menu item.
|
777
777
|
* @param menuItemHandler The handler to be invoked when the user clicks on
|
778
778
|
* the menu item.
|
779
|
-
* @deprecated Use
|
780
|
-
* <code>registerContextMenuFactory()</code> instead.
|
779
|
+
* @deprecated Use <code>registerContextMenuFactory()</code> instead.
|
781
780
|
*/
|
782
781
|
@Deprecated
|
783
782
|
void registerMenuItem(
|
@@ -80,9 +80,8 @@ public interface IContextMenuInvocation
|
|
80
80
|
* This method can be used to retrieve the native Java input event that was
|
81
81
|
* the trigger for the context menu invocation.
|
82
82
|
*
|
83
|
-
* @return The
|
84
|
-
*
|
85
|
-
* invocation.
|
83
|
+
* @return The <code>InputEvent</code> that was the trigger for the context
|
84
|
+
* menu invocation.
|
86
85
|
*/
|
87
86
|
InputEvent getInputEvent();
|
88
87
|
|
@@ -113,8 +112,7 @@ public interface IContextMenuInvocation
|
|
113
112
|
* user's selection in the current message. If the user has not made any
|
114
113
|
* selection in the current message, both offsets indicate the position of
|
115
114
|
* the caret within the editor. If the menu is not being invoked from a
|
116
|
-
* message editor, the method returns
|
117
|
-
* <code>null</code>.
|
115
|
+
* message editor, the method returns <code>null</code>.
|
118
116
|
*/
|
119
117
|
int[] getSelectionBounds();
|
120
118
|
|
@@ -123,11 +121,25 @@ public interface IContextMenuInvocation
|
|
123
121
|
* responses that were shown or selected by the user when the context menu
|
124
122
|
* was invoked.
|
125
123
|
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
130
|
-
* <code>
|
124
|
+
* <b>Note:</b> For performance reasons, the objects returned from this
|
125
|
+
* method are tied to the originating context of the messages within the
|
126
|
+
* Burp UI. For example, if a context menu is invoked on the Proxy intercept
|
127
|
+
* panel, then the
|
128
|
+
* <code>IHttpRequestResponse</code> returned by this method will reflect
|
129
|
+
* the current contents of the interception panel, and this will change when
|
130
|
+
* the current message has been forwarded or dropped. If your extension
|
131
|
+
* needs to store details of the message for which the context menu has been
|
132
|
+
* invoked, then you should query those details from the
|
133
|
+
* <code>IHttpRequestResponse</code> at the time of invocation, or you
|
134
|
+
* should use
|
135
|
+
* <code>IBurpExtenderCallbacks.saveBuffersToTempFiles()</code> to create a
|
136
|
+
* persistent read-only copy of the
|
137
|
+
* <code>IHttpRequestResponse</code>.
|
138
|
+
*
|
139
|
+
* @return An array of <code>IHttpRequestResponse</code> objects
|
140
|
+
* representing the items that were shown or selected by the user when the
|
141
|
+
* context menu was invoked. This method returns <code>null</code> if no
|
142
|
+
* messages are applicable to the invocation.
|
131
143
|
*/
|
132
144
|
IHttpRequestResponse[] getSelectedMessages();
|
133
145
|
|
@@ -135,11 +147,10 @@ public interface IContextMenuInvocation
|
|
135
147
|
* This method can be used to retrieve details of the Scanner issues that
|
136
148
|
* were selected by the user when the context menu was invoked.
|
137
149
|
*
|
138
|
-
* @return An array of
|
139
|
-
*
|
140
|
-
*
|
141
|
-
*
|
142
|
-
* <code>null</code> if no Scanner issues are applicable to the invocation.
|
150
|
+
* @return An array of <code>IScanIssue</code> objects representing the
|
151
|
+
* issues that were selected by the user when the context menu was invoked.
|
152
|
+
* This method returns <code>null</code> if no Scanner issues are applicable
|
153
|
+
* to the invocation.
|
143
154
|
*/
|
144
155
|
IScanIssue[] getSelectedIssues();
|
145
156
|
}
|