Rainbow Table Hash Chain
Can you use a rainbow table to recover a password?
There is no instruction to do anything, the task just describes some sort of a rainbow table mechanism.
You're right! Will update immediately. The task is to recover the password corresponding to the hash given in the beginning of the problem description.
Also, holy crap you solved 15 problems quickly. You're currently the top solver on the site; we'd be interested in getting your input on a new problem. If you're interested would you please email us? Contact info is in the contact tab on the nav bar.
val = sha256hash(val | pw)
Nothing here says what the difference is between
hex. As this iterates is
val a hex representation of the hash or something else?
AsaAyers, in the line
val = sha256hash(val | pw), the return value of
sha256hash is raw binary as opposed to the hex string representation, which is why the return value of the function is converted to hex.
For reference, the python function
hashlib.sha256('password').digest() will return the raw binary, as will the program
sha256 in Linux.
Is the rockyou file corrupted? If not what encoding is it using? The version I have has some odd binary and formatting on the end, and hashes to:
sha256: 6dfa76aa0e02303994fd1062d0ac983f0b69ece5474d85a5bba36362e19c1076 md5: 9076652d8ae75ce713e23ab09e10d9ee
I've downloaded both the bzip and raw versions, and they are the same.
@IzaHacker The dictionary file is indeed malformed. The thing is, some lines are encoded as UTF-8 and some as CP1252. That's why Python stumbles over them. I don't know if I should give further hints, but there is quite an obvious "workaround" without a need to fix encodings.
@IzaHacker, added a clarification. The output of
get_line_from_file('rockyou.txt', 14344108) should be
' \x93R3CKL3$$\x94'. Hopefully that helps!