diff --git a/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt b/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt index 0e0add3..800f8b7 100644 --- a/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt +++ b/application/src/main/kotlin/org/gxf/crestdevicesimulator/simulator/response/PskExtractor.kt @@ -12,7 +12,7 @@ object PskExtractor { * Group 1 containing the next 16 chars after PSK: this is only the key * Group 2 containing the next 64 chars after the key this is only the hash */ - private val pskKeyHashSplitterRegex = "!PSK:([a-zA-Z0-9]{16})([a-zA-Z0-9]{64});PSK:[a-zA-Z0-9]{16}[a-zA-Z0-9]{64}SET".toRegex() + private val pskKeyHashSplitterRegex = "!PSK:([a-zA-Z0-9]{16}):([a-zA-Z0-9]{64});PSK:[a-zA-Z0-9]{16}:[a-zA-Z0-9]{64}SET".toRegex() fun hasPskCommand(command: String) = pskKeyHashSplitterRegex.matches(command)