Skip to content

Commit 436a693

Browse files
committed
version 1.0.3
1 parent b251714 commit 436a693

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,27 @@ Unfortunately, log4j is deployed in a huge variety of ways that make traditional
3232

3333
You can use safelog4j in just about any environment using Java.
3434

35-
1. Download the latest [safelog4j-1.0.1.jar](https://github.com/Contrast-Security-OSS/safelog4j/releases/download/v1.0.1/safelog4j-1.0.1.jar)
36-
1. Place the jar file anywhere on the server you wish to defend
37-
1. Either set the javaagent flag wherever you launch Java
35+
1. Download the latest [safelog4j-1.0.3.jar](https://github.com/Contrast-Security-OSS/safelog4j/releases/download/v1.0.1/safelog4j-1.0.1.jar)
36+
37+
You can run it wherever you launch a JVM...
38+
3839
```shell
39-
java -javaagent:/path/to/safelog4j-1.0.jar=[check|block|both|none] -jar yourjar.jar
40+
java -javaagent:safelog4j-x.x.x.jar=[check|block|both|none] -jar yourjar.jar
4041
```
4142
-or-
4243
```
4344
JAVA_TOOL_OPTIONS=-javaagent:/path/to/safelog4j-1.0.jar=[check|block|both|none]
4445
```
45-
1. Restart the application.
46+
47+
Or you can attach to a JVM that is already running...
48+
49+
```shell
50+
java -javaaagent:safelog4j-x.x.x.jar # will print available JVM processes with PID
51+
```
52+
-then-
53+
```
54+
java -javaagent:safelog4j-x.x.x.jar PID [check|block|both|none]
55+
```
4656

4757

4858
## Safelog4j Options

src/main/java/com/contrastsecurity/LookupAdvice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static String onEnter() {
1717
return "attack blocked by safelog4j";
1818
}
1919

20-
// the following line means to return original method return - see skipOn
20+
// 'return null' causes ByteBuddy to execute original method body and return normally - see skipOn
2121
return null;
2222
}
2323

0 commit comments

Comments
 (0)