Skip to content

Commit

Permalink
Update README.md files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 15, 2023
1 parent d58bce9 commit 6f2709f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
38 changes: 38 additions & 0 deletions Logger/View/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
*** AUTO-GENERATED FILE ***
This file is auto-generated by BambdaChecker.
Please do not manually edit this file, or include any changes to this file in pull requests.
-->
# Logger View Filter
Documentation: [Burp Logger view filter](https://portswigger.net/burp/documentation/desktop/tools/logger/filter-view#bambda-mode)
## [HighlightToolType.bambda](https://github.com/PortSwigger/bambdas/blob/main/Logger/View/HighlightToolType.bambda)
### Highlights messages according to their tool type.
#### Author: ps-porpoise
```java
var highlights = Map.of(
ToolType.TARGET, HighlightColor.RED,
ToolType.PROXY, HighlightColor.BLUE,
ToolType.INTRUDER, HighlightColor.CYAN,
ToolType.REPEATER, HighlightColor.MAGENTA,
ToolType.EXTENSIONS, HighlightColor.ORANGE,
ToolType.SCANNER, HighlightColor.GREEN,
ToolType.SEQUENCER, HighlightColor.PINK
);

requestResponse.annotations().setHighlightColor(
highlights.getOrDefault(requestResponse.toolSource().toolType(), HighlightColor.NONE)
);

return true;

```
## [SlowResponses.bambda](https://github.com/PortSwigger/bambdas/blob/main/Logger/View/SlowResponses.bambda)
### Finds slow responses.
#### Author: ps-porpoise
```java
var delta = requestResponse.timingData().timeBetweenRequestSentAndStartOfResponse();
var threshold = Duration.ofSeconds(3);

return delta != null && delta.toMillis() >= threshold.toMillis();

```
7 changes: 6 additions & 1 deletion Proxy/HTTP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ return false;
### Finds responses whose body length do not match their stated Content-Length header.
#### Author: albinowax
```java
if (!requestResponse.hasResponse() || requestResponse.request().method().equals("HEAD")) {
return false;
}

int realContentLength = requestResponse.response().body().length();
int declaredContentLength = Integer.parseInt(requestResponse.response().headerValue("Content-Length"));

Expand Down Expand Up @@ -427,7 +431,8 @@ return requestResponse.response().headers().stream()
### Finds responses with multiple HTML closing tags.
#### Author: albinowax
```java
return requestResponse.response().statedMimeType() == MimeType.HTML &&
return requestResponse.hasResponse() &&
requestResponse.response().statedMimeType() == MimeType.HTML &&
utilities().byteUtils().countMatches(
requestResponse.response().body().getBytes(), "</html>".getBytes()) > 1;

Expand Down

0 comments on commit 6f2709f

Please sign in to comment.