buby 1.3.3-java → 1.5.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +28 -14
- data/Rakefile +96 -6
- data/VERSION.yml +5 -0
- data/bin/buby +2 -0
- data/buby.gemspec +102 -17
- data/{java/src → ext/buby/burp}/BurpExtender.java +189 -29
- data/ext/burp_interfaces/burp/IBurpExtender.java +31 -0
- data/ext/burp_interfaces/burp/IBurpExtenderCallbacks.java +785 -0
- data/ext/burp_interfaces/burp/IContextMenuFactory.java +38 -0
- data/ext/burp_interfaces/burp/IContextMenuInvocation.java +156 -0
- data/ext/burp_interfaces/burp/ICookie.java +53 -0
- data/ext/burp_interfaces/burp/IExtensionHelpers.java +352 -0
- data/ext/burp_interfaces/burp/IExtensionStateListener.java +27 -0
- data/ext/burp_interfaces/burp/IHttpListener.java +37 -0
- data/ext/burp_interfaces/burp/IHttpRequestResponse.java +102 -0
- data/ext/burp_interfaces/burp/IHttpRequestResponsePersisted.java +26 -0
- data/ext/burp_interfaces/burp/IHttpRequestResponseWithMarkers.java +44 -0
- data/ext/burp_interfaces/burp/IHttpService.java +39 -0
- data/ext/burp_interfaces/burp/IInterceptedProxyMessage.java +116 -0
- data/ext/burp_interfaces/burp/IIntruderAttack.java +31 -0
- data/ext/burp_interfaces/burp/IIntruderPayloadGenerator.java +50 -0
- data/ext/burp_interfaces/burp/IIntruderPayloadGeneratorFactory.java +40 -0
- data/ext/burp_interfaces/burp/IIntruderPayloadProcessor.java +45 -0
- data/{java/src → ext/burp_interfaces}/burp/IMenuItemHandler.java +36 -40
- data/ext/burp_interfaces/burp/IMessageEditor.java +64 -0
- data/ext/burp_interfaces/burp/IMessageEditorController.java +49 -0
- data/ext/burp_interfaces/burp/IMessageEditorTab.java +102 -0
- data/ext/burp_interfaces/burp/IMessageEditorTabFactory.java +38 -0
- data/ext/burp_interfaces/burp/IParameter.java +104 -0
- data/ext/burp_interfaces/burp/IProxyListener.java +37 -0
- data/ext/burp_interfaces/burp/IRequestInfo.java +95 -0
- data/ext/burp_interfaces/burp/IResponseInfo.java +54 -0
- data/ext/burp_interfaces/burp/IScanIssue.java +120 -0
- data/ext/burp_interfaces/burp/IScanQueueItem.java +80 -0
- data/ext/burp_interfaces/burp/IScannerCheck.java +89 -0
- data/ext/burp_interfaces/burp/IScannerInsertionPoint.java +156 -0
- data/ext/burp_interfaces/burp/IScannerInsertionPointProvider.java +38 -0
- data/ext/burp_interfaces/burp/IScannerListener.java +30 -0
- data/ext/burp_interfaces/burp/IScopeChangeListener.java +25 -0
- data/ext/burp_interfaces/burp/ISessionHandlingAction.java +51 -0
- data/ext/burp_interfaces/burp/ITab.java +38 -0
- data/ext/burp_interfaces/burp/ITempFile.java +33 -0
- data/ext/burp_interfaces/burp/ITextEditor.java +90 -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/burp_extender.rb +339 -0
- data/lib/buby/context_menu_factory.rb +35 -0
- data/lib/buby/cookie.rb +37 -0
- data/lib/buby/extender.rb +156 -0
- data/lib/buby/http_listener.rb +29 -0
- data/lib/buby/{extends → implants}/buby_array_wrapper.rb +0 -0
- data/lib/buby/implants/context_menu_invocation.rb +113 -0
- data/lib/buby/implants/cookie.rb +47 -0
- data/lib/buby/implants/extension_helpers.rb +286 -0
- data/lib/buby/{extends → implants}/http_request_response.rb +8 -1
- data/lib/buby/implants/intercepted_proxy_message.rb +53 -0
- data/lib/buby/implants/intruder_attack.rb +42 -0
- data/lib/buby/implants/jruby.rb +64 -0
- data/lib/buby/implants/message_editor.rb +70 -0
- data/lib/buby/implants/message_editor_controller.rb +60 -0
- data/lib/buby/implants/parameter.rb +84 -0
- data/lib/buby/implants/request_info.rb +47 -0
- data/lib/buby/implants/response_info.rb +44 -0
- data/lib/buby/{extends → implants}/scan_issue.rb +1 -2
- data/lib/buby/implants/scan_queue_item.rb +53 -0
- data/lib/buby/implants/scanner_insertion_point.rb +92 -0
- data/lib/buby/implants/temp_file.rb +43 -0
- data/lib/buby/implants/text_editor.rb +63 -0
- data/lib/buby/implants.rb +28 -0
- data/lib/buby/intruder_payload_generator.rb +60 -0
- data/lib/buby/intruder_payload_generator_factory.rb +32 -0
- data/lib/buby/intruder_payload_processor.rb +38 -0
- data/lib/buby/message_editor_controller.rb +41 -0
- data/lib/buby/message_editor_tab.rb +98 -0
- data/lib/buby/message_editor_tab_factory.rb +28 -0
- data/lib/buby/parameter/base.rb +40 -0
- data/lib/buby/parameter/body.rb +7 -0
- data/lib/buby/parameter/cookie.rb +7 -0
- data/lib/buby/parameter/url.rb +7 -0
- data/lib/buby/parameter.rb +15 -0
- data/lib/buby/proxy_listener.rb +26 -0
- data/lib/buby/scan_issue.rb +112 -0
- data/lib/buby/scanner_check.rb +84 -0
- data/lib/buby/scanner_insertion_point.rb +118 -0
- data/lib/buby/scanner_insertion_point_provider.rb +27 -0
- data/lib/buby/scanner_listener.rb +22 -0
- data/lib/buby/scope_change_listener.rb +19 -0
- data/lib/buby/session_handling_action.rb +43 -0
- data/lib/buby/tab.rb +37 -0
- data/lib/buby/version.rb +9 -0
- data/lib/buby.rb +892 -101
- metadata +118 -22
- data/VERSION +0 -1
- data/java/buby.jar +0 -0
- data/java/src/burp/IBurpExtender.java +0 -180
- data/java/src/burp/IBurpExtenderCallbacks.java +0 -373
- data/java/src/burp/IHttpRequestResponse.java +0 -156
- data/java/src/burp/IScanIssue.java +0 -106
- data/java/src/burp/IScanQueueItem.java +0 -76
- data/lib/buby/extends.rb +0 -4
@@ -0,0 +1,40 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IIntruderPayloadGeneratorFactory.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
* Extensions can implement this interface and then call
|
14
|
+
* <code>IBurpExtenderCallbacks.registerIntruderPayloadGeneratorFactory()</code>
|
15
|
+
* to register a factory for custom Intruder payloads.
|
16
|
+
*/
|
17
|
+
public interface IIntruderPayloadGeneratorFactory
|
18
|
+
{
|
19
|
+
/**
|
20
|
+
* This method is used by Burp to obtain the name of the payload generator.
|
21
|
+
* This will be displayed as an option within the Intruder UI when the user
|
22
|
+
* selects to use extension-generated payloads.
|
23
|
+
*
|
24
|
+
* @return The name of the payload generator.
|
25
|
+
*/
|
26
|
+
String getGeneratorName();
|
27
|
+
|
28
|
+
/**
|
29
|
+
* This method is used by Burp when the user starts an Intruder attack that
|
30
|
+
* uses this payload generator.
|
31
|
+
*
|
32
|
+
* @param attack An
|
33
|
+
* <code>IIntruderAttack</code> object that can be queried to obtain details
|
34
|
+
* about the attack in which the payload generator will be used.
|
35
|
+
* @return A new instance of
|
36
|
+
* <code>IIntruderPayloadGenerator</code> that will be used to generate
|
37
|
+
* payloads for the attack.
|
38
|
+
*/
|
39
|
+
IIntruderPayloadGenerator createNewInstance(IIntruderAttack attack);
|
40
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IIntruderPayloadProcessor.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
* Extensions can implement this interface and then call
|
14
|
+
* <code>IBurpExtenderCallbacks.registerIntruderPayloadProcessor()</code> to
|
15
|
+
* register a custom Intruder payload processor.
|
16
|
+
*/
|
17
|
+
public interface IIntruderPayloadProcessor
|
18
|
+
{
|
19
|
+
/**
|
20
|
+
* This method is used by Burp to obtain the name of the payload processor.
|
21
|
+
* This will be displayed as an option within the Intruder UI when the user
|
22
|
+
* selects to use an extension-provided payload processor.
|
23
|
+
*
|
24
|
+
* @return The name of the payload processor.
|
25
|
+
*/
|
26
|
+
String getProcessorName();
|
27
|
+
|
28
|
+
/**
|
29
|
+
* This method is invoked by Burp each time the processor should be applied
|
30
|
+
* to an Intruder payload.
|
31
|
+
*
|
32
|
+
* @param currentPayload The value of the payload to be processed.
|
33
|
+
* @param originalPayload The value of the original payload prior to
|
34
|
+
* processing by any already-applied processing rules.
|
35
|
+
* @param baseValue The base value of the payload position, which will be
|
36
|
+
* replaced with the current payload.
|
37
|
+
* @return The value of the processed payload. This may be
|
38
|
+
* <code>null</code> to indicate that the current payload should be skipped,
|
39
|
+
* and the attack will move directly to the next payload.
|
40
|
+
*/
|
41
|
+
byte[] processPayload(
|
42
|
+
byte[] currentPayload,
|
43
|
+
byte[] originalPayload,
|
44
|
+
byte[] baseValue);
|
45
|
+
}
|
@@ -1,40 +1,36 @@
|
|
1
|
-
package burp;
|
2
|
-
|
3
|
-
/*
|
4
|
-
* @(#)IMenuItemHandler.java
|
5
|
-
*
|
6
|
-
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
-
*
|
8
|
-
* This code may be used to extend the functionality of Burp Suite
|
9
|
-
* Suite Professional, provided that this usage does not violate the
|
10
|
-
* license terms for those products.
|
11
|
-
*/
|
12
|
-
|
13
|
-
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
* This
|
29
|
-
*
|
30
|
-
*
|
31
|
-
*
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
public void menuItemClicked(
|
38
|
-
String menuItemCaption,
|
39
|
-
IHttpRequestResponse[] messageInfo);
|
40
|
-
}
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IMenuItemHandler.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
* Extensions can implement this interface and then call
|
14
|
+
* <code>IBurpExtenderCallbacks.registerMenuItem()</code> to register a custom
|
15
|
+
* context menu item.
|
16
|
+
*
|
17
|
+
* @deprecated Use
|
18
|
+
* <code>IContextMenuFactory</code> instead.
|
19
|
+
*/
|
20
|
+
@Deprecated
|
21
|
+
public interface IMenuItemHandler
|
22
|
+
{
|
23
|
+
/**
|
24
|
+
* This method is invoked by Burp Suite when the user clicks on a custom
|
25
|
+
* menu item which the extension has registered with Burp.
|
26
|
+
*
|
27
|
+
* @param menuItemCaption The caption of the menu item which was clicked.
|
28
|
+
* This parameter enables extensions to provide a single implementation
|
29
|
+
* which handles multiple different menu items.
|
30
|
+
* @param messageInfo Details of the HTTP message(s) for which the context
|
31
|
+
* menu was displayed.
|
32
|
+
*/
|
33
|
+
void menuItemClicked(
|
34
|
+
String menuItemCaption,
|
35
|
+
IHttpRequestResponse[] messageInfo);
|
36
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IMessageEditor.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
import java.awt.Component;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* This interface is used to provide extensions with an instance of Burp's HTTP
|
16
|
+
* message editor, for the extension to use in its own UI. Extensions should
|
17
|
+
* call
|
18
|
+
* <code>IBurpExtenderCallbacks.createMessageEditor()</code> to obtain an
|
19
|
+
* instance of this interface.
|
20
|
+
*/
|
21
|
+
public interface IMessageEditor
|
22
|
+
{
|
23
|
+
/**
|
24
|
+
* This method returns the UI component of the editor, for extensions to add
|
25
|
+
* to their own UI.
|
26
|
+
*
|
27
|
+
* @return The UI component of the editor.
|
28
|
+
*/
|
29
|
+
Component getComponent();
|
30
|
+
|
31
|
+
/**
|
32
|
+
* This method is used to display an HTTP message in the editor.
|
33
|
+
*
|
34
|
+
* @param message The HTTP message to be displayed.
|
35
|
+
* @param isRequest Flags whether the message is an HTTP request or
|
36
|
+
* response.
|
37
|
+
*/
|
38
|
+
void setMessage(byte[] message, boolean isRequest);
|
39
|
+
|
40
|
+
/**
|
41
|
+
* This method is used to retrieve the currently displayed message, which
|
42
|
+
* may have been modified by the user.
|
43
|
+
*
|
44
|
+
* @return The currently displayed HTTP message.
|
45
|
+
*/
|
46
|
+
byte[] getMessage();
|
47
|
+
|
48
|
+
/**
|
49
|
+
* This method is used to determine whether the current message has been
|
50
|
+
* modified by the user.
|
51
|
+
*
|
52
|
+
* @return An indication of whether the current message has been modified by
|
53
|
+
* the user since it was first displayed.
|
54
|
+
*/
|
55
|
+
boolean isMessageModified();
|
56
|
+
|
57
|
+
/**
|
58
|
+
* This method returns the data that is currently selected by the user.
|
59
|
+
*
|
60
|
+
* @return The data that is currently selected by the user, or
|
61
|
+
* <code>null</code> if no selection is made.
|
62
|
+
*/
|
63
|
+
byte[] getSelectedData();
|
64
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IMessageEditorController.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
* This interface is used by an
|
14
|
+
* <code>IMessageEditor</code> to obtain details about the currently displayed
|
15
|
+
* message. Extensions that create instances of Burp's HTTP message editor can
|
16
|
+
* optionally provide an implementation of
|
17
|
+
* <code>IMessageEditorController</code>, which the editor will invoke when it
|
18
|
+
* requires further information about the current message (for example, to send
|
19
|
+
* it to another Burp tool). Extensions that provide custom editor tabs via an
|
20
|
+
* <code>IMessageEditorTabFactory</code> will receive a reference to an
|
21
|
+
* <code>IMessageEditorController</code> object for each tab instance they
|
22
|
+
* generate, which the tab can invoke if it requires further information about
|
23
|
+
* the current message.
|
24
|
+
*/
|
25
|
+
public interface IMessageEditorController
|
26
|
+
{
|
27
|
+
/**
|
28
|
+
* This method is used to retrieve the HTTP service for the current message.
|
29
|
+
*
|
30
|
+
* @return The HTTP service for the current message.
|
31
|
+
*/
|
32
|
+
IHttpService getHttpService();
|
33
|
+
|
34
|
+
/**
|
35
|
+
* This method is used to retrieve the HTTP request associated with the
|
36
|
+
* current message (which may itself be a response).
|
37
|
+
*
|
38
|
+
* @return The HTTP request associated with the current message.
|
39
|
+
*/
|
40
|
+
byte[] getRequest();
|
41
|
+
|
42
|
+
/**
|
43
|
+
* This method is used to retrieve the HTTP response associated with the
|
44
|
+
* current message (which may itself be a request).
|
45
|
+
*
|
46
|
+
* @return The HTTP response associated with the current message.
|
47
|
+
*/
|
48
|
+
byte[] getResponse();
|
49
|
+
}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IMessageEditorTab.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
import java.awt.Component;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Extensions that register an
|
16
|
+
* <code>IMessageEditorTabFactory</code> must return instances of this
|
17
|
+
* interface, which Burp will use to create custom tabs within its HTTP message
|
18
|
+
* editors.
|
19
|
+
*/
|
20
|
+
public interface IMessageEditorTab
|
21
|
+
{
|
22
|
+
/**
|
23
|
+
* This method returns the caption that should appear on the custom tab when
|
24
|
+
* it is displayed. <b>Note:</b> Burp invokes this method once when the tab
|
25
|
+
* is first generated, and the same caption will be used every time the tab
|
26
|
+
* is displayed.
|
27
|
+
*
|
28
|
+
* @return The caption that should appear on the custom tab when it is
|
29
|
+
* displayed.
|
30
|
+
*/
|
31
|
+
String getTabCaption();
|
32
|
+
|
33
|
+
/**
|
34
|
+
* This method returns the component that should be used as the contents of
|
35
|
+
* the custom tab when it is displayed. <b>Note:</b> Burp invokes this
|
36
|
+
* method once when the tab is first generated, and the same component will
|
37
|
+
* be used every time the tab is displayed.
|
38
|
+
*
|
39
|
+
* @return The component that should be used as the contents of the custom
|
40
|
+
* tab when it is displayed.
|
41
|
+
*/
|
42
|
+
Component getUiComponent();
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The hosting editor will invoke this method before it displays a new HTTP
|
46
|
+
* message, so that the custom tab can indicate whether it should be enabled
|
47
|
+
* for that message.
|
48
|
+
*
|
49
|
+
* @param content The message that is about to be displayed.
|
50
|
+
* @param isRequest Indicates whether the message is a request or a
|
51
|
+
* response.
|
52
|
+
* @return The method should return
|
53
|
+
* <code>true</code> if the custom tab is able to handle the specified
|
54
|
+
* message, and so will be displayed within the editor. Otherwise, the tab
|
55
|
+
* will be hidden while this message is displayed.
|
56
|
+
*/
|
57
|
+
boolean isEnabled(byte[] content, boolean isRequest);
|
58
|
+
|
59
|
+
/**
|
60
|
+
* The hosting editor will invoke this method to display a new message or to
|
61
|
+
* clear the existing message. This method will only be called with a new
|
62
|
+
* message if the tab has already returned
|
63
|
+
* <code>true</code> to a call to
|
64
|
+
* <code>isEnabled()</code> with the same message details.
|
65
|
+
*
|
66
|
+
* @param content The message that is to be displayed, or
|
67
|
+
* <code>null</code> if the tab should clear its contents and disable any
|
68
|
+
* editable controls.
|
69
|
+
* @param isRequest Indicates whether the message is a request or a
|
70
|
+
* response.
|
71
|
+
*/
|
72
|
+
void setMessage(byte[] content, boolean isRequest);
|
73
|
+
|
74
|
+
/**
|
75
|
+
* This method returns the currently displayed message.
|
76
|
+
*
|
77
|
+
* @return The currently displayed message.
|
78
|
+
*/
|
79
|
+
byte[] getMessage();
|
80
|
+
|
81
|
+
/**
|
82
|
+
* This method is used to determine whether the currently displayed message
|
83
|
+
* has been modified by the user. The hosting editor will always call
|
84
|
+
* <code>getMessage()</code> before calling this method, so any pending
|
85
|
+
* edits should be completed within
|
86
|
+
* <code>getMessage()</code>.
|
87
|
+
*
|
88
|
+
* @return The method should return
|
89
|
+
* <code>true</code> if the user has modified the current message since it
|
90
|
+
* was first displayed.
|
91
|
+
*/
|
92
|
+
boolean isModified();
|
93
|
+
|
94
|
+
/**
|
95
|
+
* This method is used to retrieve the data that is currently selected by
|
96
|
+
* the user.
|
97
|
+
*
|
98
|
+
* @return The data that is currently selected by the user. This may be
|
99
|
+
* <code>null</code> if no selection is currently made.
|
100
|
+
*/
|
101
|
+
byte[] getSelectedData();
|
102
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IMessageEditorTabFactory.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
* Extensions can implement this interface and then call
|
14
|
+
* <code>IBurpExtenderCallbacks.registerMessageEditorTabFactory()</code> to
|
15
|
+
* register a factory for custom message editor tabs. This allows extensions to
|
16
|
+
* provide custom rendering or editing of HTTP messages, within Burp's own HTTP
|
17
|
+
* editor.
|
18
|
+
*/
|
19
|
+
public interface IMessageEditorTabFactory
|
20
|
+
{
|
21
|
+
/**
|
22
|
+
* Burp will call this method once for each HTTP message editor, and the
|
23
|
+
* factory should provide a new instance of an
|
24
|
+
* <code>IMessageEditorTab</code> object.
|
25
|
+
*
|
26
|
+
* @param controller An
|
27
|
+
* <code>IMessageEditorController</code> object, which the new tab can query
|
28
|
+
* to retrieve details about the currently displayed message. This may be
|
29
|
+
* <code>null</code> for extension-invoked message editors where the
|
30
|
+
* extension has not provided an editor controller.
|
31
|
+
* @param editable Indicates whether the hosting editor is editable or
|
32
|
+
* read-only.
|
33
|
+
* @return A new
|
34
|
+
* <code>IMessageEditorTab</code> object for use within the message editor.
|
35
|
+
*/
|
36
|
+
IMessageEditorTab createNewInstance(IMessageEditorController controller,
|
37
|
+
boolean editable);
|
38
|
+
}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
package burp;
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @(#)IParameter.java
|
5
|
+
*
|
6
|
+
* Copyright PortSwigger Ltd. All rights reserved.
|
7
|
+
*
|
8
|
+
* This code may be used to extend the functionality of Burp Suite Free Edition
|
9
|
+
* and Burp Suite Professional, provided that this usage does not violate the
|
10
|
+
* license terms for those products.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
* This interface is used to hold details about an HTTP request parameter.
|
14
|
+
*/
|
15
|
+
public interface IParameter
|
16
|
+
{
|
17
|
+
/**
|
18
|
+
* Used to indicate a parameter within the URL query string.
|
19
|
+
*/
|
20
|
+
static final byte PARAM_URL = 0;
|
21
|
+
/**
|
22
|
+
* Used to indicate a parameter within the message body.
|
23
|
+
*/
|
24
|
+
static final byte PARAM_BODY = 1;
|
25
|
+
/**
|
26
|
+
* Used to indicate an HTTP cookie.
|
27
|
+
*/
|
28
|
+
static final byte PARAM_COOKIE = 2;
|
29
|
+
/**
|
30
|
+
* Used to indicate an item of data within an XML structure.
|
31
|
+
*/
|
32
|
+
static final byte PARAM_XML = 3;
|
33
|
+
/**
|
34
|
+
* Used to indicate the value of a tag attribute within an XML structure.
|
35
|
+
*/
|
36
|
+
static final byte PARAM_XML_ATTR = 4;
|
37
|
+
/**
|
38
|
+
* Used to indicate the value of a parameter attribute within a multi-part
|
39
|
+
* message body (such as the name of an uploaded file).
|
40
|
+
*/
|
41
|
+
static final byte PARAM_MULTIPART_ATTR = 5;
|
42
|
+
/**
|
43
|
+
* Used to indicate an item of data within a JSON structure.
|
44
|
+
*/
|
45
|
+
static final byte PARAM_JSON = 6;
|
46
|
+
|
47
|
+
/**
|
48
|
+
* This method is used to retrieve the parameter type.
|
49
|
+
*
|
50
|
+
* @return The parameter type. The available types are defined within this
|
51
|
+
* interface.
|
52
|
+
*/
|
53
|
+
byte getType();
|
54
|
+
|
55
|
+
/**
|
56
|
+
* This method is used to retrieve the parameter name.
|
57
|
+
*
|
58
|
+
* @return The parameter name.
|
59
|
+
*/
|
60
|
+
String getName();
|
61
|
+
|
62
|
+
/**
|
63
|
+
* This method is used to retrieve the parameter value.
|
64
|
+
*
|
65
|
+
* @return The parameter value.
|
66
|
+
*/
|
67
|
+
String getValue();
|
68
|
+
|
69
|
+
/**
|
70
|
+
* This method is used to retrieve the start offset of the parameter name
|
71
|
+
* within the HTTP request.
|
72
|
+
*
|
73
|
+
* @return The start offset of the parameter name within the HTTP request,
|
74
|
+
* or -1 if the parameter is not associated with a specific request.
|
75
|
+
*/
|
76
|
+
int getNameStart();
|
77
|
+
|
78
|
+
/**
|
79
|
+
* This method is used to retrieve the end offset of the parameter name
|
80
|
+
* within the HTTP request.
|
81
|
+
*
|
82
|
+
* @return The end offset of the parameter name within the HTTP request, or
|
83
|
+
* -1 if the parameter is not associated with a specific request.
|
84
|
+
*/
|
85
|
+
int getNameEnd();
|
86
|
+
|
87
|
+
/**
|
88
|
+
* This method is used to retrieve the start offset of the parameter value
|
89
|
+
* within the HTTP request.
|
90
|
+
*
|
91
|
+
* @return The start offset of the parameter value within the HTTP request,
|
92
|
+
* or -1 if the parameter is not associated with a specific request.
|
93
|
+
*/
|
94
|
+
int getValueStart();
|
95
|
+
|
96
|
+
/**
|
97
|
+
* This method is used to retrieve the end offset of the parameter value
|
98
|
+
* within the HTTP request.
|
99
|
+
*
|
100
|
+
* @return The end offset of the parameter value within the HTTP request, or
|
101
|
+
* -1 if the parameter is not associated with a specific request.
|
102
|
+
*/
|
103
|
+
int getValueEnd();
|
104
|
+
}
|