buby 1.3.3-java → 1.5.0-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/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,156 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)IScannerInsertionPoint.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 define an insertion point for use by active Scanner
|
|
14
|
+
* checks. Extensions can obtain instances of this interface by registering an
|
|
15
|
+
* <code>IScannerCheck</code>, or can create instances for use by Burp's own
|
|
16
|
+
* scan checks by registering an
|
|
17
|
+
* <code>IScannerInsertionPointProvider</code>.
|
|
18
|
+
*/
|
|
19
|
+
public interface IScannerInsertionPoint
|
|
20
|
+
{
|
|
21
|
+
/**
|
|
22
|
+
* Used to indicate where the payload is inserted into the value of a URL
|
|
23
|
+
* parameter.
|
|
24
|
+
*/
|
|
25
|
+
static final byte INS_PARAM_URL = 0x00;
|
|
26
|
+
/**
|
|
27
|
+
* Used to indicate where the payload is inserted into the value of a body
|
|
28
|
+
* parameter.
|
|
29
|
+
*/
|
|
30
|
+
static final byte INS_PARAM_BODY = 0x01;
|
|
31
|
+
/**
|
|
32
|
+
* Used to indicate where the payload is inserted into the value of an HTTP
|
|
33
|
+
* cookie.
|
|
34
|
+
*/
|
|
35
|
+
static final byte INS_PARAM_COOKIE = 0x02;
|
|
36
|
+
/**
|
|
37
|
+
* Used to indicate where the payload is inserted into the value of an item
|
|
38
|
+
* of data within an XML data structure.
|
|
39
|
+
*/
|
|
40
|
+
static final byte INS_PARAM_XML = 0x03;
|
|
41
|
+
/**
|
|
42
|
+
* Used to indicate where the payload is inserted into the value of a tag
|
|
43
|
+
* attribute within an XML structure.
|
|
44
|
+
*/
|
|
45
|
+
static final byte INS_PARAM_XML_ATTR = 0x04;
|
|
46
|
+
/**
|
|
47
|
+
* Used to indicate where the payload is inserted into the value of a
|
|
48
|
+
* parameter attribute within a multi-part message body (such as the name of
|
|
49
|
+
* an uploaded file).
|
|
50
|
+
*/
|
|
51
|
+
static final byte INS_PARAM_MULTIPART_ATTR = 0x05;
|
|
52
|
+
/**
|
|
53
|
+
* Used to indicate where the payload is inserted into the value of an item
|
|
54
|
+
* of data within a JSON structure.
|
|
55
|
+
*/
|
|
56
|
+
static final byte INS_PARAM_JSON = 0x06;
|
|
57
|
+
/**
|
|
58
|
+
* Used to indicate where the payload is inserted into the value of an AMF
|
|
59
|
+
* parameter.
|
|
60
|
+
*/
|
|
61
|
+
static final byte INS_PARAM_AMF = 0x07;
|
|
62
|
+
/**
|
|
63
|
+
* Used to indicate where the payload is inserted into the value of an HTTP
|
|
64
|
+
* request header.
|
|
65
|
+
*/
|
|
66
|
+
static final byte INS_HEADER = 0x20;
|
|
67
|
+
/**
|
|
68
|
+
* Used to indicate where the payload is inserted into a REST parameter
|
|
69
|
+
* within the URL file path.
|
|
70
|
+
*/
|
|
71
|
+
static final byte INS_URL_REST = 0x21;
|
|
72
|
+
/**
|
|
73
|
+
* Used to indicate where the payload is inserted into the name of an added
|
|
74
|
+
* URL parameter.
|
|
75
|
+
*/
|
|
76
|
+
static final byte INS_PARAM_NAME_URL = 0x22;
|
|
77
|
+
/**
|
|
78
|
+
* Used to indicate where the payload is inserted into the name of an added
|
|
79
|
+
* body parameter.
|
|
80
|
+
*/
|
|
81
|
+
static final byte INS_PARAM_NAME_BODY = 0x23;
|
|
82
|
+
/**
|
|
83
|
+
* Used to indicate where the payload is inserted at a location manually
|
|
84
|
+
* configured by the user.
|
|
85
|
+
*/
|
|
86
|
+
static final byte INS_USER_PROVIDED = 0x40;
|
|
87
|
+
/**
|
|
88
|
+
* Used to indicate where the insertion point is provided by an
|
|
89
|
+
* extension-registered
|
|
90
|
+
* <code>IScannerInsertionPointProvider</code>.
|
|
91
|
+
*/
|
|
92
|
+
static final byte INS_EXTENSION_PROVIDED = 0x41;
|
|
93
|
+
/**
|
|
94
|
+
* Used to indicate where the payload is inserted at an unknown location
|
|
95
|
+
* within the request.
|
|
96
|
+
*/
|
|
97
|
+
static final byte INS_UNKNOWN = 0x7f;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* This method returns the name of the insertion point.
|
|
101
|
+
*
|
|
102
|
+
* @return The name of the insertion point (for example, a description of a
|
|
103
|
+
* particular request parameter).
|
|
104
|
+
*/
|
|
105
|
+
String getInsertionPointName();
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* This method returns the base value for this insertion point.
|
|
109
|
+
*
|
|
110
|
+
* @return the base value that appears in this insertion point in the base
|
|
111
|
+
* request being scanned, or
|
|
112
|
+
* <code>null</code> if there is no value in the base request that
|
|
113
|
+
* corresponds to this insertion point.
|
|
114
|
+
*/
|
|
115
|
+
String getBaseValue();
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* This method is used to build a request with the specified payload placed
|
|
119
|
+
* into the insertion point. Any necessary adjustments to the Content-Length
|
|
120
|
+
* header will be made by the Scanner itself when the request is issued, and
|
|
121
|
+
* there is no requirement for the insertion point to do this. <b>Note:</b>
|
|
122
|
+
* Burp's built-in scan checks do not apply any payload encoding (such as
|
|
123
|
+
* URL-encoding) when dealing with an extension-provided insertion point.
|
|
124
|
+
* Custom insertion points are responsible for performing any data encoding
|
|
125
|
+
* that is necessary given the nature and location of the insertion point.
|
|
126
|
+
*
|
|
127
|
+
* @param payload The payload that should be placed into the insertion
|
|
128
|
+
* point.
|
|
129
|
+
* @return The resulting request.
|
|
130
|
+
*/
|
|
131
|
+
byte[] buildRequest(byte[] payload);
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* This method is used to determine the offsets of the payload value within
|
|
135
|
+
* the request, when it is placed into the insertion point. Scan checks may
|
|
136
|
+
* invoke this method when reporting issues, so as to highlight the relevant
|
|
137
|
+
* part of the request within the UI.
|
|
138
|
+
*
|
|
139
|
+
* @param payload The payload that should be placed into the insertion
|
|
140
|
+
* point.
|
|
141
|
+
* @return An int[2] array containing the start and end offsets of the
|
|
142
|
+
* payload within the request, or null if this is not applicable (for
|
|
143
|
+
* example, where the insertion point places a payload into a serialized
|
|
144
|
+
* data structure, the raw payload may not literally appear anywhere within
|
|
145
|
+
* the resulting request).
|
|
146
|
+
*/
|
|
147
|
+
int[] getPayloadOffsets(byte[] payload);
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* This method returns the type of the insertion point.
|
|
151
|
+
*
|
|
152
|
+
* @return The type of the insertion point. Available types are defined in
|
|
153
|
+
* this interface.
|
|
154
|
+
*/
|
|
155
|
+
byte getInsertionPointType();
|
|
156
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)IScannerInsertionPointProvider.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.util.List;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Extensions can implement this interface and then call
|
|
16
|
+
* <code>IBurpExtenderCallbacks.registerScannerInsertionPointProvider()</code>
|
|
17
|
+
* to register a factory for custom Scanner insertion points.
|
|
18
|
+
*/
|
|
19
|
+
public interface IScannerInsertionPointProvider
|
|
20
|
+
{
|
|
21
|
+
/**
|
|
22
|
+
* When a request is actively scanned, the Scanner will invoke this method,
|
|
23
|
+
* and the provider should provide a list of custom insertion points that
|
|
24
|
+
* will be used in the scan. <b>Note:</b> these insertion points are used in
|
|
25
|
+
* addition to those that are derived from Burp Scanner's configuration, and
|
|
26
|
+
* those provided by any other Burp extensions.
|
|
27
|
+
*
|
|
28
|
+
* @param baseRequestResponse The base request that will be actively
|
|
29
|
+
* scanned.
|
|
30
|
+
* @return A list of
|
|
31
|
+
* <code>IScannerInsertionPoint</code> objects that should be used in the
|
|
32
|
+
* scanning, or
|
|
33
|
+
* <code>null</code> if no custom insertion points are applicable for this
|
|
34
|
+
* request.
|
|
35
|
+
*/
|
|
36
|
+
List<IScannerInsertionPoint> getInsertionPoints(
|
|
37
|
+
IHttpRequestResponse baseRequestResponse);
|
|
38
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)IScannerListener.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.registerScannerListener()</code> to register a
|
|
15
|
+
* Scanner listener. The listener will be notified of new issues that are
|
|
16
|
+
* reported by the Scanner tool. Extensions can perform custom analysis or
|
|
17
|
+
* logging of Scanner issues by registering a Scanner listener.
|
|
18
|
+
*/
|
|
19
|
+
public interface IScannerListener
|
|
20
|
+
{
|
|
21
|
+
/**
|
|
22
|
+
* This method is invoked when a new issue is added to Burp Scanner's
|
|
23
|
+
* results.
|
|
24
|
+
*
|
|
25
|
+
* @param issue An
|
|
26
|
+
* <code>IScanIssue</code> object that the extension can query to obtain
|
|
27
|
+
* details about the new issue.
|
|
28
|
+
*/
|
|
29
|
+
void newScanIssue(IScanIssue issue);
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)IScopeChangeListener.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.registerScopeChangeListener()</code> to register
|
|
15
|
+
* a scope change listener. The listener will be notified whenever a change
|
|
16
|
+
* occurs to Burp's suite-wide target scope.
|
|
17
|
+
*/
|
|
18
|
+
public interface IScopeChangeListener
|
|
19
|
+
{
|
|
20
|
+
/**
|
|
21
|
+
* This method is invoked whenever a change occurs to Burp's suite-wide
|
|
22
|
+
* target scope.
|
|
23
|
+
*/
|
|
24
|
+
void scopeChanged();
|
|
25
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)ISessionHandlingAction.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.registerSessionHandlingAction()</code> to
|
|
15
|
+
* register a custom session handling action. Each registered action will be
|
|
16
|
+
* available within the session handling rule UI for the user to select as a
|
|
17
|
+
* rule action. Users can choose to invoke an action directly in its own right,
|
|
18
|
+
* or following execution of a macro.
|
|
19
|
+
*/
|
|
20
|
+
public interface ISessionHandlingAction
|
|
21
|
+
{
|
|
22
|
+
/**
|
|
23
|
+
* This method is used by Burp to obtain the name of the session handling
|
|
24
|
+
* action. This will be displayed as an option within the session handling
|
|
25
|
+
* rule editor when the user selects to execute an extension-provided
|
|
26
|
+
* action.
|
|
27
|
+
*
|
|
28
|
+
* @return The name of the action.
|
|
29
|
+
*/
|
|
30
|
+
String getActionName();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* This method is invoked when the session handling action should be
|
|
34
|
+
* executed. This may happen as an action in its own right, or as a
|
|
35
|
+
* sub-action following execution of a macro.
|
|
36
|
+
*
|
|
37
|
+
* @param currentRequest The base request that is currently being processed.
|
|
38
|
+
* The action can query this object to obtain details about the base
|
|
39
|
+
* request. It can issue additional requests of its own if necessary, and
|
|
40
|
+
* can use the setter methods on this object to update the base request.
|
|
41
|
+
* @param macroItems If the action is invoked following execution of a
|
|
42
|
+
* macro, this parameter contains the result of executing the macro.
|
|
43
|
+
* Otherwise, it is
|
|
44
|
+
* <code>null</code>. Actions can use the details of the macro items to
|
|
45
|
+
* perform custom analysis of the macro to derive values of non-standard
|
|
46
|
+
* session handling tokens, etc.
|
|
47
|
+
*/
|
|
48
|
+
void performAction(
|
|
49
|
+
IHttpRequestResponse currentRequest,
|
|
50
|
+
IHttpRequestResponse[] macroItems);
|
|
51
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)ITab.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 Burp with details of a custom tab that will
|
|
16
|
+
* be added to Burp's UI, using a method such as
|
|
17
|
+
* <code>IBurpExtenderCallbacks.addSuiteTab()</code>.
|
|
18
|
+
*/
|
|
19
|
+
public interface ITab
|
|
20
|
+
{
|
|
21
|
+
/**
|
|
22
|
+
* Burp uses this method to obtain the caption that should appear on the
|
|
23
|
+
* custom tab when it is displayed.
|
|
24
|
+
*
|
|
25
|
+
* @return The caption that should appear on the custom tab when it is
|
|
26
|
+
* displayed.
|
|
27
|
+
*/
|
|
28
|
+
String getTabCaption();
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Burp uses this method to obtain the component that should be used as the
|
|
32
|
+
* contents of the custom tab when it is displayed.
|
|
33
|
+
*
|
|
34
|
+
* @return The component that should be used as the contents of the custom
|
|
35
|
+
* tab when it is displayed.
|
|
36
|
+
*/
|
|
37
|
+
Component getUiComponent();
|
|
38
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)ITempFile.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 of a temporary file that has been
|
|
14
|
+
* created via a call to
|
|
15
|
+
* <code>IBurpExtenderCallbacks.saveToTempFile()</code>.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
public interface ITempFile
|
|
19
|
+
{
|
|
20
|
+
/**
|
|
21
|
+
* This method is used to retrieve the contents of the buffer that was saved
|
|
22
|
+
* in the temporary file.
|
|
23
|
+
*
|
|
24
|
+
* @return The contents of the buffer that was saved in the temporary file.
|
|
25
|
+
*/
|
|
26
|
+
byte[] getBuffer();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This method is used to permanently delete the temporary file when it is
|
|
30
|
+
* no longer required.
|
|
31
|
+
*/
|
|
32
|
+
void delete();
|
|
33
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
package burp;
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* @(#)ITextEditor.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 raw
|
|
16
|
+
* text editor, for the extension to use in its own UI. Extensions should call
|
|
17
|
+
* <code>IBurpExtenderCallbacks.createTextEditor()</code> to obtain an instance
|
|
18
|
+
* of this interface.
|
|
19
|
+
*/
|
|
20
|
+
public interface ITextEditor
|
|
21
|
+
{
|
|
22
|
+
/**
|
|
23
|
+
* This method returns the UI component of the editor, for extensions to add
|
|
24
|
+
* to their own UI.
|
|
25
|
+
*
|
|
26
|
+
* @return The UI component of the editor.
|
|
27
|
+
*/
|
|
28
|
+
Component getComponent();
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This method is used to control whether the editor is currently editable.
|
|
32
|
+
* This status can be toggled on and off as required.
|
|
33
|
+
*
|
|
34
|
+
* @param editable Indicates whether the editor should be currently
|
|
35
|
+
* editable.
|
|
36
|
+
*/
|
|
37
|
+
void setEditable(boolean editable);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* This method is used to update the currently displayed text in the editor.
|
|
41
|
+
*
|
|
42
|
+
* @param text The text to be displayed.
|
|
43
|
+
*/
|
|
44
|
+
void setText(byte[] text);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* This method is used to retrieve the currently displayed text.
|
|
48
|
+
*
|
|
49
|
+
* @return The currently displayed text.
|
|
50
|
+
*/
|
|
51
|
+
byte[] getText();
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* This method is used to determine whether the user has modified the
|
|
55
|
+
* contents of the editor.
|
|
56
|
+
*
|
|
57
|
+
* @return An indication of whether the user has modified the contents of
|
|
58
|
+
* the editor since the last call to
|
|
59
|
+
* <code>setText()</code>.
|
|
60
|
+
*/
|
|
61
|
+
boolean isTextModified();
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* This method is used to obtain the currently selected text.
|
|
65
|
+
*
|
|
66
|
+
* @return The currently selected text, or
|
|
67
|
+
* <code>null</code> if the user has not made any selection.
|
|
68
|
+
*/
|
|
69
|
+
byte[] getSelectedText();
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This method can be used to retrieve the bounds of the user's selection
|
|
73
|
+
* into the displayed text, if applicable.
|
|
74
|
+
*
|
|
75
|
+
* @return An int[2] array containing the start and end offsets of the
|
|
76
|
+
* user's selection within the displayed text. If the user has not made any
|
|
77
|
+
* selection in the current message, both offsets indicate the position of
|
|
78
|
+
* the caret within the editor.
|
|
79
|
+
*/
|
|
80
|
+
int[] getSelectionBounds();
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* This method is used to update the search expression that is shown in the
|
|
84
|
+
* search bar below the editor. The editor will automatically highlight any
|
|
85
|
+
* regions of the displayed text that match the search expression.
|
|
86
|
+
*
|
|
87
|
+
* @param expression The search expression.
|
|
88
|
+
*/
|
|
89
|
+
void setSearchExpression(String expression);
|
|
90
|
+
}
|