defuse / crackstation-hashdb

CrackStation.net's Lookup Table Implementation.
GNU General Public License v3.0
365 stars 107 forks source link

Support partial matches #4

Closed defuse closed 8 years ago

defuse commented 8 years ago

To use this code on crackstation.net it needs to support partial (prefix) matches. Add a new constant, which is the number of leading bytes to compare. Only compare that many bytes in hashcmp. Then, make $results no longer an array, but an array of pairs ($word, parial/full).

So the overall process for cracking a hash is:

For each supported hash type:
    $results = CrackForThatType($target_hash)
    foreach ($results as $result) {
          output a result $result.word with $results.partial status
    }
defuse commented 8 years ago

This will actually be an improvement over the current crackstation.net code since it'll support returning multiple full and partial matches for a single hash (not just the first one according to index order).

defuse commented 8 years ago

Done.