Skip to content

Commit

Permalink
duplicate flags onto scan command because its more natural UX
Browse files Browse the repository at this point in the history
  • Loading branch information
factoidforrest committed Dec 14, 2021
1 parent 50f3d2a commit 4fd334e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions tools/log4shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ docker run --network=host log4shell

or

Make sure you have Maven installed, then:
```
./build-payload.sh && go build . && ./log4shell
```
Expand Down
2 changes: 1 addition & 1 deletion tools/log4shell/constants/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
//
package constants

const Version = "1.0.0"
const Version = "1.1.0"
12 changes: 12 additions & 0 deletions tools/log4shell/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ func main() {
Name: "output",
Usage: "File path for where to output findings in JSON format.",
},
&cli.BoolFlag{
Name: "verbose",
Usage: "Display verbose information when running commands.",
},
&cli.BoolFlag{
Name: "json",
Usage: "Display findings in json format.",
},
&cli.BoolFlag{
Name: "debug",
Usage: "Display helpful information while debugging the CLI.",
},
},
Action: scanCommand,
},
Expand Down
2 changes: 1 addition & 1 deletion tools/log4shell/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func identifyPotentiallyVulnerableFile(reader io.Reader, path, fileName string,

if vulnerableHash, ok := hashLookup[fileHash]; ok {
log.Info().
Str("fileName", fileName).
Str("path", path).
Str("fileName", fileName).
Str("versionInfo", vulnerableHash.Name).
Str("severity", vulnerableHash.Severity).
Msg("identified vulnerable path")
Expand Down

0 comments on commit 4fd334e

Please sign in to comment.