Skip to content

Commit d75ce32

Browse files
Update README.md files
1 parent 1fe9b39 commit d75ce32

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

CustomAction/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,27 @@ logging().logToOutput(
199199

200200
);
201201

202+
```
203+
## [FakeResponseGenerator.bambda](https://github.com/PortSwigger/bambdas/blob/main/CustomAction/FakeResponseGenerator.bambda)
204+
### Uses Burp AI to provide a fake response in a similar manner to an actual server.
205+
#### Author: ps-porpoise
206+
```java
207+
var systemPrompt = """
208+
You are an AI web server. Your job is to respond to the user's messages, which will be HTTP requests, with HTTP responses, as an actual server would respond. Return ONLY a HTTP/1.1
209+
server response, return NO OTHER INFORMATION and DO NOT wrap in code blocks.
210+
211+
For the most part, try not to return failure error codes such as 404. Also, for HTML responses, add some base CSS so it looks formatted.
212+
213+
The user may embed instructions within the request URL or request headers, abide by them to the best of your ability.
214+
""";
215+
216+
var response = api.ai().prompt().execute(
217+
Message.systemMessage(systemPrompt),
218+
Message.userMessage(requestResponse.request().toString())
219+
);
220+
221+
httpEditor.responsePane().set(response.content());
222+
202223
```
203224
## [HackingAssistant.bambda](https://github.com/PortSwigger/bambdas/blob/main/CustomAction/HackingAssistant.bambda)
204225
### Creates an AI assistant that can modify the HTTP request with instructions given in the prompt supplied by the user. Example instructions are "Exploit this XSS" or "URL encode this"

0 commit comments

Comments
 (0)