Skip to content

Commit

Permalink
made startup announcement more Kotlinic
Browse files Browse the repository at this point in the history
 - reuse NAME
 - use "use { ... }" instead of explicit close()
 - use property instead of explicit getter
  • Loading branch information
dnet committed Dec 16, 2021
1 parent 56d1f31 commit 1abf23c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/kotlin/burp/BurpExtender.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package burp

import java.io.PrintWriter

import java.net.URL
import java.util.*
import java.util.concurrent.ConcurrentHashMap
Expand Down Expand Up @@ -61,9 +62,9 @@ class BurpExtender : IBurpExtender, IScannerCheck, IExtensionStateListener {
callbacks.registerScannerCheck(this)
callbacks.registerExtensionStateListener(this)

val stdout = PrintWriter(callbacks.getStdout(), true)
stdout.println("log4shell scanner loaded")
stdout.close()
PrintWriter(callbacks.stdout, true).use { stdout ->
stdout.println("$NAME loaded")
}
}

override fun doPassiveScan(baseRequestResponse: IHttpRequestResponse?): MutableList<IScanIssue> =
Expand Down

0 comments on commit 1abf23c

Please sign in to comment.