Update GetIPIntel.kt

This commit is contained in:
bluefireoly
2020-10-30 19:48:59 +01:00
parent a8e0773629
commit 6ae0ad47be

View File

@@ -12,7 +12,7 @@ class GetIPIntel(
private val contactEmail: String = "foo@bar.com"
) : BadIPDetectionService("getipintel.net") {
override fun requestString(ip: String) = "http://check.getipintel.net/check.php?ip=$ip&contact=$contactEmail"
override fun requestString(ip: String) = "http://check.getipintel.net/check.php?ip=$ip&contact=$contactEmail&format=json"
override fun interpreteResult(result: JSONObject): BadIPDetectionResult {
val probability = result.getStringOrNull("result")?.toFloatOrNull()