Skip to content

Commit

Permalink
perf(app): 提升hash爆破性能340倍,rock you 1400w密码 md5 14s
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon406 committed May 5, 2022
1 parent 135d464 commit ead9255
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/src/main/kotlin/me/leon/controller/DigestController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ class DigestController : Controller() {
else path.fileHash(method)
}

// 首次加载1400W, 8s, 100w md5 1s 21c40fc4ddd462df2509b232fef4ec6c
// 1400w 14s md5 dd2978f9ae7014cd2d1884c5a1bbbca2
fun crack(method: String, data: String) =
catch({ "digest crack error: $it" }) {
dicts.find { pw ->
digest(method, pw, "raw", false).also { println("$pw $it") }.equals(data, true)
}
?: ""
dicts.find { pw -> digest(method, pw, "raw") == data } ?: ""
}
}

0 comments on commit ead9255

Please sign in to comment.