Skip to content

Commit

Permalink
Merge branch 'bump-log4shell-cli-version' of github.com:lunasec-io/lu…
Browse files Browse the repository at this point in the history
…nasec into bump-log4shell-cli-version
  • Loading branch information
breadchris committed Dec 17, 2021
2 parents bca9018 + be2b698 commit b4751d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/blog/2021-12-12-log4j-zero-day-mitigation-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ log4shell scan your-project-dir/
log4shell.exe scan your-project-dir/
```
Because the tool contains exploit strings needed for the `livepatch` command, it might be falsely recognized as malware by some
virus scanners on Windows. Please add an exception for it.
virus scanners on Windows. Please add an exception for it.

**Example Output**
```shell
Expand Down
8 changes: 8 additions & 0 deletions tools/log4shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,11 @@ make build && ./log4shell
## Releases

Find the compiled tool for your OS [here](https://github.com/lunasec-io/lunasec/releases/).


## How to manually release to github
```shell
git tag -a v<VERSION>-log4shell -m "<RELEASE NAME>"
git push origin v<VERSION>-log4shell
GITHUB_TOKEN=<GITHUB_PERSONAL_ACCESS_TOKEN> goreleaser release --rm-dist
```
8 changes: 8 additions & 0 deletions tools/log4shell/commands/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ func enableGlobalFlags(c *cli.Context) {
consoleOutput.FormatFieldName = func(i interface{}) string {
return fmt.Sprintf("\n\t%s: ", util.Colorize(constants.ColorBlue, i))
}


consoleOutput.FormatLevel = func(i interface{}) string {
if (i == nil){
return util.Colorize(constants.ColorBold,"Scan Result:")
}
return fmt.Sprintf("| %-6s |", i)
}
log.Logger = log.Output(consoleOutput)

}
Expand Down

0 comments on commit b4751d1

Please sign in to comment.